[Bug 1501772] Re: Metadata proxy process errors with binary user_data
** Changed in: neutron Milestone: liberty-rc2 => 7.0.0 -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
Reviewed: https://review.openstack.org/233136 Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=118a76fd651c19ad098cdee9d0a122a00ddc4e3b Submitter: Jenkins Branch:stable/kilo commit 118a76fd651c19ad098cdee9d0a122a00ddc4e3b Author: Ihar HrachyshkaDate: Thu Oct 1 17:13:25 2015 +0200 metadata: don't crash proxy on non-unicode user data We attempt to log every successful metadata response with LOG.debug. But as per oslo.log docs [1], we should make sure that what we pass into the library is unicode. Http.request returns a tuple of Response object and a string, which is bytes in Python 2.x [2]. That's why we need to convert the response content to unicode before passing it into oslo.log. To achieve it, we utilize encodeutils.safe_decode with 'replace' errors handling strategy, so that we don't get exceptions on input that does not conform unicode. For the unit test case, we pass a string that is not expected to convert to unicode with errors='strict' strategy or similar, and check that we still don't crash. While at it, we remove a check for the number of log calls being triggered, because it's something that we should avoid validating in test cases, and it cannot trigger a real bug. The mock that was used to count the number would also hide the bug that we try to reproduce. Note that the bug does not require debug to be set because the crash occurs before oslo.log machinery decides it should not log the message. [1]: http://docs.openstack.org/developer/oslo.log/usage.html#no-more-implicit-conversion-to-unicode-str [2]: http://bitworking.org/projects/httplib2/doc/html/libhttplib2.html#httplib2.Http.request Conflicts: neutron/agent/metadata/namespace_proxy.py neutron/tests/unit/agent/metadata/test_namespace_proxy.py Closes-Bug: #1501772 Change-Id: I6a32c40ff117fae43913386134c8981539697ce8 (cherry picked from commit 80e3d9be4923ecad17377b1d15c8392b8a43dac6) ** Tags added: in-stable-kilo -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
oslo.log was not used in Juno, so not affected. ** Tags removed: juno-backport-potential -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
** Tags removed: liberty-rc-potential ** Tags added: juno-backport-potential kilo-backport-potential -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
** Changed in: neutron Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
This bug was fixed in the package neutron - 2:7.0.0~rc1-0ubuntu4 --- neutron (2:7.0.0~rc1-0ubuntu4) wily; urgency=medium * Drop hard requirement on python-ryu for this cycle as it supports a new alternative agent implementation for Open vSwitch and is not the default, avoiding inclusion of ryu in main for Wily. - d/control: Drop (Build-)Depends on ryu, add Suggests. - d/p/drop-ryu-dep.patch: Patch out hard requirement on ryu. -- James PageFri, 02 Oct 2015 18:10:49 +0100 ** Changed in: neutron (Ubuntu) Status: In Progress => Fix Released -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
** Branch linked: lp:ubuntu/wily-proposed/neutron -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
** Changed in: neutron (Ubuntu) Assignee: (unassigned) => James Page (james-page) ** Changed in: neutron (Ubuntu) Importance: Undecided => High ** Changed in: neutron (Ubuntu) Status: New => In Progress -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
** Changed in: neutron/liberty Importance: Undecided => High ** Changed in: neutron/liberty Milestone: None => liberty-rc2 -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
** Also affects: neutron/liberty Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
** Changed in: neutron Milestone: mitaka-1 => liberty-rc2 ** No longer affects: neutron/liberty -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
Fix proposed to branch: stable/liberty Review: https://review.openstack.org/230513 ** Changed in: neutron/liberty Status: New => In Progress ** Changed in: neutron/liberty Assignee: (unassigned) => Kyle Mestery (mestery) -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
Reviewed: https://review.openstack.org/230513 Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=13b6d76da361178ea0b84baf4831a4c7f53e29c7 Submitter: Jenkins Branch:stable/liberty commit 13b6d76da361178ea0b84baf4831a4c7f53e29c7 Author: Ihar HrachyshkaDate: Thu Oct 1 17:13:25 2015 +0200 metadata: don't crash proxy on non-unicode user data We attempt to log every successful metadata response with LOG.debug. But as per oslo.log docs [1], we should make sure that what we pass into the library is unicode. Http.request returns a tuple of Response object and a string, which is bytes in Python 2.x [2]. That's why we need to convert the response content to unicode before passing it into oslo.log. To achieve it, we utilize encodeutils.safe_decode with 'replace' errors handling strategy, so that we don't get exceptions on input that does not conform unicode. For the unit test case, we pass a string that is not expected to convert to unicode with errors='strict' strategy or similar, and check that we still don't crash. While at it, we remove a check for the number of log calls being triggered, because it's something that we should avoid validating in test cases, and it cannot trigger a real bug. The mock that was used to count the number would also hide the bug that we try to reproduce. Note that the bug does not require debug to be set because the crash occurs before oslo.log machinery decides it should not log the message. [1]: http://docs.openstack.org/developer/oslo.log/usage.html#no-more-implicit-conversion-to-unicode-str [2]: http://bitworking.org/projects/httplib2/doc/html/libhttplib2.html#httplib2.Http.request Closes-Bug: #1501772 Change-Id: I6a32c40ff117fae43913386134c8981539697ce8 (cherry picked from commit 80e3d9be4923ecad17377b1d15c8392b8a43dac6) ** Tags added: in-stable-liberty -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
I'm just re-deploying the environment where I saw this issue - some other bug reports for this error code would indicate that maybe the unicode package is not installed. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
Installing random unicode packages did not help. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
I have a test case to reproduce it. ** Changed in: neutron Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
** Changed in: neutron Assignee: (unassigned) => Ihar Hrachyshka (ihar-hrachyshka) -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
** Tags added: liberty-rc-potential ** Changed in: neutron Importance: Undecided => High -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
Fix proposed to branch: master Review: https://review.openstack.org/229958 ** Changed in: neutron Status: Confirmed => In Progress -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
Kyle Patch works OK for me. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
James, any chance you can try the patch here [1] to see if it fixes the issue? Thanks to Ihar for the quick turnaround! [1] https://review.openstack.org/#/c/229958/ -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
** Changed in: neutron Milestone: None => mitaka-1 -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
** Changed in: neutron Assignee: Ihar Hrachyshka (ihar-hrachyshka) => Cedric Brandily (cbrandily) -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
** Changed in: neutron Assignee: Cedric Brandily (cbrandily) => Henry Gessau (gessau) -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1501772] Re: Metadata proxy process errors with binary user_data
Reviewed: https://review.openstack.org/229958 Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=80e3d9be4923ecad17377b1d15c8392b8a43dac6 Submitter: Jenkins Branch:master commit 80e3d9be4923ecad17377b1d15c8392b8a43dac6 Author: Ihar HrachyshkaDate: Thu Oct 1 17:13:25 2015 +0200 metadata: don't crash proxy on non-unicode user data We attempt to log every successful metadata response with LOG.debug. But as per oslo.log docs [1], we should make sure that what we pass into the library is unicode. Http.request returns a tuple of Response object and a string, which is bytes in Python 2.x [2]. That's why we need to convert the response content to unicode before passing it into oslo.log. To achieve it, we utilize encodeutils.safe_decode with 'replace' errors handling strategy, so that we don't get exceptions on input that does not conform unicode. For the unit test case, we pass a string that is not expected to convert to unicode with errors='strict' strategy or similar, and check that we still don't crash. While at it, we remove a check for the number of log calls being triggered, because it's something that we should avoid validating in test cases, and it cannot trigger a real bug. The mock that was used to count the number would also hide the bug that we try to reproduce. Note that the bug does not require debug to be set because the crash occurs before oslo.log machinery decides it should not log the message. [1]: http://docs.openstack.org/developer/oslo.log/usage.html#no-more-implicit-conversion-to-unicode-str [2]: http://bitworking.org/projects/httplib2/doc/html/libhttplib2.html#httplib2.Http.request Closes-Bug: #1501772 Change-Id: I6a32c40ff117fae43913386134c8981539697ce8 ** Changed in: neutron Status: In Progress => Fix Committed -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to neutron in Ubuntu. https://bugs.launchpad.net/bugs/1501772 Title: Metadata proxy process errors with binary user_data To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1501772/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs