[Bug 1832210] Re: incorrect decode of log prefix under python 3
Ubuntu SRU information [Impact] netfilter based firewall logging does not correctly identify the log prefix resulting in lack of mapping from netfilter log messages to neutron ports. [Test Case] Deploy OpenStack Enabled firewall-group logging (~openstack-charmers-next feature) Create instance and firewall-group for SSH access. Access instance via SSH (original bug report unknown cookie message seen). [Regression Potential] Minimal; the safe_encode function used to ensure that the log prefix is correctly decoded has been well used and tested across OpenStack. ** Summary changed: - incorrect decode of log prefix under python 3 + fwaas netfilter_log: incorrect decode of log prefix under python 3 ** Changed in: neutron-fwaas (Ubuntu Cosmic) Status: Triaged => In Progress ** Changed in: neutron-fwaas (Ubuntu Cosmic) Assignee: (unassigned) => James Page (james-page) ** Changed in: neutron-fwaas (Ubuntu Disco) Assignee: (unassigned) => James Page (james-page) ** Changed in: neutron-fwaas (Ubuntu Disco) Status: Triaged => In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1832210 Title: fwaas netfilter_log: incorrect decode of log prefix under python 3 To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-archive/+bug/1832210/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1832210] Re: incorrect decode of log prefix under python 3
Patches pushed to stein and rocky branches for Ubuntu packaging. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1832210 Title: incorrect decode of log prefix under python 3 To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-archive/+bug/1832210/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1832210] Re: incorrect decode of log prefix under python 3
This bug was fixed in the package neutron-fwaas - 1:15.0.0~b1~git2019061312.45a36b8ba-0ubuntu1 --- neutron-fwaas (1:15.0.0~b1~git2019061312.45a36b8ba-0ubuntu1) eoan; urgency=medium * d/p/netfilter_log-Correct-decode-binary-types.patch: Cherry pick fix to resolve decoding of netfilter log prefix information under Python 3 (LP: #1832210). * New upstream snapshot for OpenStack Train. * d/control: Align (Build-)Depends with upstream. -- James Page Thu, 13 Jun 2019 12:04:51 +0100 ** Changed in: neutron-fwaas (Ubuntu Eoan) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1832210 Title: incorrect decode of log prefix under python 3 To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-archive/+bug/1832210/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1832210] Re: incorrect decode of log prefix under python 3
** Also affects: cloud-archive Importance: Undecided Status: New ** Changed in: neutron-fwaas (Ubuntu Eoan) Status: New => Fix Committed ** Also affects: cloud-archive/rocky Importance: Undecided Status: New ** Also affects: cloud-archive/stein Importance: Undecided Status: New ** Also affects: cloud-archive/train Importance: Undecided Status: New ** Changed in: cloud-archive/train Status: New => Fix Committed ** Changed in: cloud-archive/stein Status: New => Triaged ** Changed in: cloud-archive/rocky Status: New => Triaged ** Changed in: neutron-fwaas (Ubuntu Disco) Status: New => Triaged ** Changed in: neutron-fwaas (Ubuntu Cosmic) Status: New => Triaged ** Changed in: neutron-fwaas (Ubuntu Cosmic) Importance: Undecided => Medium ** Changed in: neutron-fwaas (Ubuntu Disco) Importance: Undecided => Medium ** Changed in: cloud-archive/rocky Importance: Undecided => Medium ** Changed in: cloud-archive/train Importance: Undecided => Medium ** Changed in: neutron-fwaas (Ubuntu Eoan) Importance: Undecided => Medium ** Changed in: cloud-archive/stein Importance: Undecided => Medium -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1832210 Title: incorrect decode of log prefix under python 3 To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-archive/+bug/1832210/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1832210] Re: incorrect decode of log prefix under python 3
Reviewed: https://review.opendev.org/664234 Committed: https://git.openstack.org/cgit/openstack/neutron-fwaas/commit/?id=5c334d584b180c735d8744ff1807f2747c024a55 Submitter: Zuul Branch:master commit 5c334d584b180c735d8744ff1807f2747c024a55 Author: James Page Date: Mon Jun 10 10:36:05 2019 +0100 netfilter_log: Correctly decode binary type prefix Under Python 3, firewall log prefixes are incorrectly decoded resulting in a mismatch between the stringy-fied 'prefix' value and the information available in the prefixes data. Use oslo.utils safe_decode function to ensure that data is correctly decoded. Change-Id: I9742207e98c07f0a4632631631288d9ada8cf8c7 Closes-Bug: 1832210 ** Changed in: neutron Status: In Progress => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1832210 Title: incorrect decode of log prefix under python 3 To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1832210/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1832210] Re: incorrect decode of log prefix under python 3
** Tags added: py3 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1832210 Title: incorrect decode of log prefix under python 3 To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1832210/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1832210] Re: incorrect decode of log prefix under python 3
** Changed in: neutron Importance: Undecided => Medium -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1832210 Title: incorrect decode of log prefix under python 3 To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1832210/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1832210] Re: incorrect decode of log prefix under python 3
** Also affects: neutron-fwaas (Ubuntu Eoan) Importance: Undecided Status: New ** Also affects: neutron-fwaas (Ubuntu Disco) Importance: Undecided Status: New ** Also affects: neutron-fwaas (Ubuntu Cosmic) Importance: Undecided Status: New ** Description changed: Under Python 3, the prefix of a firewall log message is not correctly - decode: + decoded "b'10612530182266949194'": 2019-06-10 09:14:34 Unknown cookie packet_in pkt=ethernet(dst='fa:16:3e:c6:58:5e',ethertype=2048,src='fa:16:3e:e0:2c:be')ipv4(csum=51290,dst='10.5.0.10',flags=2,header_length=5,identification=37612,offset=0,option=None,proto=6,src='192.168.21.182',tos=16,total_length=52,ttl=63,version=4)tcp(ack=3151291228,bits=17,csum=23092,dst_port=57776,offset=8,option=[TCPOptionNoOperation(kind=1,length=1), TCPOptionNoOperation(kind=1,length=1), TCPOptionTimestamps(kind=8,length=10,ts_ecr=1574746440,ts_val=482688)],seq=2769917228,src_port=22,urgent=0,window_size=3120) 2019-06-10 09:14:34 {'prefix': "b'10612530182266949194'", 'msg': "ethernet(dst='fa:16:3e:c6:58:5e',ethertype=2048,src='fa:16:3e:e0:2c:be')ipv4(csum=51290,dst='10.5.0.10',flags=2,header_length=5,identification=37612,offset=0,option=None,proto=6,src='192.168.21.182',tos=16,total_length=52,ttl=63,version=4)tcp(ack=3151291228,bits=17,csum=23092,dst_port=57776,offset=8,option=[TCPOptionNoOperation(kind=1,length=1), TCPOptionNoOperation(kind=1,length=1), TCPOptionTimestamps(kind=8,length=10,ts_ecr=1574746440,ts_val=482688)],seq=2769917228,src_port=22,urgent=0,window_size=3120)"} 2019-06-10 09:14:34 {'0bf81ded-bf94-437d-ad49-063bba9be9bb': [, ]} This results in the firewall log driver not being able to map the message to the associated port and log resources in neutron resulting in the 'unknown cookie packet_in' warning message. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1832210 Title: incorrect decode of log prefix under python 3 To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1832210/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1832210] Re: incorrect decode of log prefix under python 3
Fix proposed to branch: master Review: https://review.opendev.org/664234 ** Changed in: neutron Status: New => In Progress ** Changed in: neutron Assignee: (unassigned) => James Page (james-page) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1832210 Title: incorrect decode of log prefix under python 3 To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1832210/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1832210] Re: incorrect decode of log prefix under python 3
Illustrated: >>> str(b'10612530182266949194') "b'10612530182266949194'" >>> b'10612530182266949194'.decode('UTF-8') '10612530182266949194' ** Also affects: neutron Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1832210 Title: incorrect decode of log prefix under python 3 To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1832210/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1832210] Re: incorrect decode of log prefix under python 3
Incorrect encoding: https://opendev.org/openstack/neutron- fwaas/src/branch/master/neutron_fwaas/privileged/netfilter_log/libnetfilter_log.py#L169 str(X) -> X.decode('UTF-8') -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1832210 Title: incorrect decode of log prefix under python 3 To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1832210/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs