)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"28a2728d6c285dd7f8fb1fdb15ce233b38b71c04","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Use of logging in native thread causes deadlock connecting to libvirtd"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When connecting to libvirtd dameon we were calling the _connect"},{"line_number":10,"context_line":"method in a native thread. The use of logging in this method hit this"},{"line_number":11,"context_line":"bug in eventlet https://bitbucket.org/eventlet/eventlet/issue/137/"},{"line_number":12,"context_line":"casuing nova-compute to hang."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F%2B59M%3D","line":9,"updated":"2013-11-18 18:31:56.000000000","message":"s/dameon/daemon/","commit_id":"366f5251f50a4403b0a9ab8c5a254375abc37ec3"},{"author":{"_account_id":6969,"name":"Michael Kerrin","email":"michael.kerrin@hpe.com","username":"mkerrin"},"change_message_id":"3040a1e63d6b7ad9246a17ee494c1d59d3f22c7f","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Use of logging in native thread causes deadlock connecting to libvirtd"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When connecting to libvirtd dameon we were calling the _connect"},{"line_number":10,"context_line":"method in a native thread. The use of logging in this method hit this"},{"line_number":11,"context_line":"bug in eventlet https://bitbucket.org/eventlet/eventlet/issue/137/"},{"line_number":12,"context_line":"casuing nova-compute to hang."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F%2B57k%3D","line":9,"in_reply_to":"AAAATn%2F%2B59M%3D","updated":"2013-11-18 18:38:50.000000000","message":"Done","commit_id":"366f5251f50a4403b0a9ab8c5a254375abc37ec3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"28a2728d6c285dd7f8fb1fdb15ce233b38b71c04","unresolved":false,"context_lines":[{"line_number":11,"context_line":"bug in eventlet https://bitbucket.org/eventlet/eventlet/issue/137/"},{"line_number":12,"context_line":"casuing nova-compute to hang."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Fixes bug: #1252409"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I0d22c3ed1b3288aeb1afae130f11a4f38dc6440a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F%2B59A%3D","line":14,"updated":"2013-11-18 18:31:56.000000000","message":"Format is:\n\nCloses-Bug: #1252409\n\nI noticed that the launchpad bug wasn\u0027t assigned to you or marked in progress, this is probably why.","commit_id":"366f5251f50a4403b0a9ab8c5a254375abc37ec3"},{"author":{"_account_id":6969,"name":"Michael Kerrin","email":"michael.kerrin@hpe.com","username":"mkerrin"},"change_message_id":"3040a1e63d6b7ad9246a17ee494c1d59d3f22c7f","unresolved":false,"context_lines":[{"line_number":11,"context_line":"bug in eventlet https://bitbucket.org/eventlet/eventlet/issue/137/"},{"line_number":12,"context_line":"casuing nova-compute to hang."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Fixes bug: #1252409"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I0d22c3ed1b3288aeb1afae130f11a4f38dc6440a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F%2B57g%3D","line":14,"in_reply_to":"AAAATn%2F%2B59A%3D","updated":"2013-11-18 18:38:50.000000000","message":"Done","commit_id":"366f5251f50a4403b0a9ab8c5a254375abc37ec3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5d509187a062b15826719a15b54213876093ac75","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When connecting to libvirtd daemon we were calling the _connect"},{"line_number":10,"context_line":"method in a native thread. The use of logging in this method hit this"},{"line_number":11,"context_line":"bug in eventlet https://bitbucket.org/eventlet/eventlet/issue/137/"},{"line_number":12,"context_line":"casuing nova-compute to hang."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-Bug: #1252409"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAATn%2F%2B0SA%3D","line":12,"updated":"2013-11-19 19:07:51.000000000","message":"s/casuing/causing/","commit_id":"f15a26f03f2e0fbfab7e68271a68cbe855c73a66"}],"nova/tests/virt/libvirt/test_libvirt.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5d509187a062b15826719a15b54213876093ac75","unresolved":false,"context_lines":[{"line_number":7263,"context_line":"        jsonutils.to_primitive(connection._conn, convert_instances\u003dTrue)"},{"line_number":7264,"context_line":""},{"line_number":7265,"context_line":"    def test_tpool_execute_calls_libvirt(self):"},{"line_number":7266,"context_line":"        # Test bug 1252409."},{"line_number":7267,"context_line":"        self.mox.StubOutWithMock(eventlet.tpool, \u0027execute\u0027)"},{"line_number":7268,"context_line":"        conn \u003d libvirt.virConnect()"},{"line_number":7269,"context_line":"        conn.is_expected \u003d True"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2B0R8%3D","line":7266,"updated":"2013-11-19 19:07:51.000000000","message":"Don\u0027t need to call out the bug in the code, the commit message has the bug reference in it and the commit message is what someone would see in the git log history.  Would be better to actually explain what this is testing and/or why, rather than just referencing a bug.","commit_id":"f15a26f03f2e0fbfab7e68271a68cbe855c73a66"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5d509187a062b15826719a15b54213876093ac75","unresolved":false,"context_lines":[{"line_number":7274,"context_line":""},{"line_number":7275,"context_line":"        driver \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"},{"line_number":7276,"context_line":"        c \u003d driver._get_connection()"},{"line_number":7277,"context_line":"        self.assertEqual(c.is_expected, True)"},{"line_number":7278,"context_line":""},{"line_number":7279,"context_line":""},{"line_number":7280,"context_line":"class LibvirtVolumeSnapshotTestCase(test.TestCase):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2B0R4%3D","line":7277,"updated":"2013-11-19 19:07:51.000000000","message":"nit: args are reversed in the method definition (expected, observed)","commit_id":"f15a26f03f2e0fbfab7e68271a68cbe855c73a66"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6399bba2354e0ec27c7374d68f7e4ba0571513ef","unresolved":false,"context_lines":[{"line_number":7286,"context_line":""},{"line_number":7287,"context_line":"    def setUp(self):"},{"line_number":7288,"context_line":"        super(LibvirtNonblockingTestCase, self).setUp()"},{"line_number":7289,"context_line":"        self.flags(api_thread_pool\u003dTrue, connection_uri\u003d\"test:///default\","},{"line_number":7290,"context_line":"                   group\u003d\u0027libvirt\u0027)"},{"line_number":7291,"context_line":""},{"line_number":7292,"context_line":"    def test_connection_to_primitive(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2Bibc%3D","line":7289,"updated":"2013-11-24 21:37:52.000000000","message":"Seems that we should have a test for the api_thread_pool\u003dFalse case juts to make sure that libvirt.openAuth is called w/o the eventlet thread pool execute method.","commit_id":"e4b0d8e9446ad3ad3a514b9cf65722f6ed95888d"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":1706,"name":"Tom Hancock","email":"tom.hancock@hp.com","username":"tom-hancock"},"change_message_id":"64acbcc7eff00c140c3c412c6371f6974c9c94a8","unresolved":false,"context_lines":[{"line_number":697,"context_line":"                flags \u003d libvirt.VIR_CONNECT_RO"},{"line_number":698,"context_line":"            if not CONF.libvirt_nonblocking:"},{"line_number":699,"context_line":"                return libvirt.openAuth(uri, auth, flags)"},{"line_number":700,"context_line":"            else:"},{"line_number":701,"context_line":"                return tpool.proxy_call("},{"line_number":702,"context_line":"                    (libvirt.virDomain, libvirt.virConnect),"},{"line_number":703,"context_line":"                    libvirt.openAuth, uri, auth, flags)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2B59I%3D","line":700,"updated":"2013-11-18 18:30:39.000000000","message":"comment here about not calling functions that use python logging?","commit_id":"366f5251f50a4403b0a9ab8c5a254375abc37ec3"},{"author":{"_account_id":6969,"name":"Michael Kerrin","email":"michael.kerrin@hpe.com","username":"mkerrin"},"change_message_id":"3040a1e63d6b7ad9246a17ee494c1d59d3f22c7f","unresolved":false,"context_lines":[{"line_number":697,"context_line":"                flags \u003d libvirt.VIR_CONNECT_RO"},{"line_number":698,"context_line":"            if not CONF.libvirt_nonblocking:"},{"line_number":699,"context_line":"                return libvirt.openAuth(uri, auth, flags)"},{"line_number":700,"context_line":"            else:"},{"line_number":701,"context_line":"                return tpool.proxy_call("},{"line_number":702,"context_line":"                    (libvirt.virDomain, libvirt.virConnect),"},{"line_number":703,"context_line":"                    libvirt.openAuth, uri, auth, flags)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2B57o%3D","line":700,"in_reply_to":"AAAATn%2F%2B59I%3D","updated":"2013-11-18 18:38:50.000000000","message":"Done","commit_id":"366f5251f50a4403b0a9ab8c5a254375abc37ec3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6399bba2354e0ec27c7374d68f7e4ba0571513ef","unresolved":false,"context_lines":[{"line_number":627,"context_line":"        # call with _wrapped_conn_lock held"},{"line_number":628,"context_line":"        LOG.debug(_(\u0027Connecting to libvirt: %s\u0027), self.uri())"},{"line_number":629,"context_line":"        wrapped_conn \u003d None"},{"line_number":630,"context_line":""},{"line_number":631,"context_line":"        try:"},{"line_number":632,"context_line":"            wrapped_conn \u003d self._connect(self.uri(), self.read_only)"},{"line_number":633,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2Bibw%3D","line":630,"updated":"2013-11-24 21:37:52.000000000","message":"Unnecessary whitespace change.","commit_id":"e4b0d8e9446ad3ad3a514b9cf65722f6ed95888d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6399bba2354e0ec27c7374d68f7e4ba0571513ef","unresolved":false,"context_lines":[{"line_number":737,"context_line":"            if read_only:"},{"line_number":738,"context_line":"                flags \u003d libvirt.VIR_CONNECT_RO"},{"line_number":739,"context_line":"            if not CONF.libvirt.api_thread_pool:"},{"line_number":740,"context_line":"                return libvirt.openAuth(uri, auth, flags)"},{"line_number":741,"context_line":"            else:"},{"line_number":742,"context_line":"                # tpool.proxy_call creates a native thread. Due to limitations"},{"line_number":743,"context_line":"                # with eventlet locking we cannot use the logging API inside"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2Bibg%3D","line":740,"updated":"2013-11-24 21:37:52.000000000","message":"Do you know if there are any existing tests that cover this case?  Would be good to have one if there isn\u0027t since the code is being moved.","commit_id":"e4b0d8e9446ad3ad3a514b9cf65722f6ed95888d"},{"author":{"_account_id":6969,"name":"Michael Kerrin","email":"michael.kerrin@hpe.com","username":"mkerrin"},"change_message_id":"0b24357dde079b1344c3db3067784260bc6b2ddc","unresolved":false,"context_lines":[{"line_number":737,"context_line":"            if read_only:"},{"line_number":738,"context_line":"                flags \u003d libvirt.VIR_CONNECT_RO"},{"line_number":739,"context_line":"            if not CONF.libvirt.api_thread_pool:"},{"line_number":740,"context_line":"                return libvirt.openAuth(uri, auth, flags)"},{"line_number":741,"context_line":"            else:"},{"line_number":742,"context_line":"                # tpool.proxy_call creates a native thread. Due to limitations"},{"line_number":743,"context_line":"                # with eventlet locking we cannot use the logging API inside"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2BCDg%3D","line":740,"in_reply_to":"AAAATn%2F%2BENM%3D","updated":"2013-12-03 08:56:27.000000000","message":"Matt, no. This just highlights the case where we always execute the nwfilterDefineXML method on the libvirtd connection in a native thread no matter the value of libvirt.api_thread_pool. I referenced this in a previous comment.\n\nIn the case of the else clause. _conn is a tpool proxy object so nwfilterDefineXML gets called in a native thread.\n\nnwfilterDefineXML is a method in python-libvirt and none of these methods suffer from the eventlet bug where an eventlet patched python logging method was used is a seperate native thread, so it is safe to call them via a tpool proxy or via tpool.execute","commit_id":"e4b0d8e9446ad3ad3a514b9cf65722f6ed95888d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6328a006b3d16dc77531d0ec3b59ecbd71c6b94","unresolved":false,"context_lines":[{"line_number":737,"context_line":"            if read_only:"},{"line_number":738,"context_line":"                flags \u003d libvirt.VIR_CONNECT_RO"},{"line_number":739,"context_line":"            if not CONF.libvirt.api_thread_pool:"},{"line_number":740,"context_line":"                return libvirt.openAuth(uri, auth, flags)"},{"line_number":741,"context_line":"            else:"},{"line_number":742,"context_line":"                # tpool.proxy_call creates a native thread. Due to limitations"},{"line_number":743,"context_line":"                # with eventlet locking we cannot use the logging API inside"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2BENM%3D","line":740,"in_reply_to":"AAAATn%2F%2BVjk%3D","updated":"2013-12-02 22:00:58.000000000","message":"Michael, does this cause issues with your patch?","commit_id":"e4b0d8e9446ad3ad3a514b9cf65722f6ed95888d"},{"author":{"_account_id":1678,"name":"Tiantian Gao","email":"gtt116@gmail.com","username":"gtt116"},"change_message_id":"cabfaffe4e1bb16beed9077f2ff2dcb826ece961","unresolved":false,"context_lines":[{"line_number":737,"context_line":"            if read_only:"},{"line_number":738,"context_line":"                flags \u003d libvirt.VIR_CONNECT_RO"},{"line_number":739,"context_line":"            if not CONF.libvirt.api_thread_pool:"},{"line_number":740,"context_line":"                return libvirt.openAuth(uri, auth, flags)"},{"line_number":741,"context_line":"            else:"},{"line_number":742,"context_line":"                # tpool.proxy_call creates a native thread. Due to limitations"},{"line_number":743,"context_line":"                # with eventlet locking we cannot use the logging API inside"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2BVjk%3D","line":740,"in_reply_to":"AAAATn%2F%2BWPs%3D","updated":"2013-11-27 08:41:35.000000000","message":"I guess QiuYu want to highlight some comments in nova/virt/libvirt/firewall.py\n\n ...\n239     def _define_filter(self, xml):                                                                                                                                                  \n240         if callable(xml):                                                                                                                                                          \n241             xml \u003d xml()                                                                                                                                                            \n242         # execute in a native thread and block current greenthread until done                                                                                                      \n243         if not CONF.libvirt.api_thread_pool:                                                                                                                                       \n244             # NOTE(maoy): the original implementation is to have the API called                                                                                                    \n245             # in the thread pool no matter what.                                                                                                                                   \n246             tpool.execute(self._conn.nwfilterDefineXML, xml)                                                                                                                       \n247         else:                                                                                                                                                                      \n248             # NOTE(maoy): self._conn is an eventlet.tpool.Proxy object                                                                                                             \n249             self._conn.nwfilterDefineXML(xml)\n...","commit_id":"e4b0d8e9446ad3ad3a514b9cf65722f6ed95888d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fe48f50d54055e8b65f2da20a18c87b2acbcc620","unresolved":false,"context_lines":[{"line_number":737,"context_line":"            if read_only:"},{"line_number":738,"context_line":"                flags \u003d libvirt.VIR_CONNECT_RO"},{"line_number":739,"context_line":"            if not CONF.libvirt.api_thread_pool:"},{"line_number":740,"context_line":"                return libvirt.openAuth(uri, auth, flags)"},{"line_number":741,"context_line":"            else:"},{"line_number":742,"context_line":"                # tpool.proxy_call creates a native thread. Due to limitations"},{"line_number":743,"context_line":"                # with eventlet locking we cannot use the logging API inside"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2BeZk%3D","line":740,"in_reply_to":"AAAATn%2F%2Bgn8%3D","updated":"2013-11-25 17:41:32.000000000","message":"+1, I\u0027ll get a bug report opened to track removal of the option.","commit_id":"e4b0d8e9446ad3ad3a514b9cf65722f6ed95888d"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"178a1e095e5402c18badd719650608a77bd59f4c","unresolved":false,"context_lines":[{"line_number":737,"context_line":"            if read_only:"},{"line_number":738,"context_line":"                flags \u003d libvirt.VIR_CONNECT_RO"},{"line_number":739,"context_line":"            if not CONF.libvirt.api_thread_pool:"},{"line_number":740,"context_line":"                return libvirt.openAuth(uri, auth, flags)"},{"line_number":741,"context_line":"            else:"},{"line_number":742,"context_line":"                # tpool.proxy_call creates a native thread. Due to limitations"},{"line_number":743,"context_line":"                # with eventlet locking we cannot use the logging API inside"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2Bgn8%3D","line":740,"in_reply_to":"AAAATn%2F%2Bgqk%3D","updated":"2013-11-25 10:35:51.000000000","message":"If you submit a change to remove this config param \u0026 always use threads, I\u0027ll happily review it.","commit_id":"e4b0d8e9446ad3ad3a514b9cf65722f6ed95888d"},{"author":{"_account_id":2468,"name":"unicell","email":"unicell@gmail.com","username":"unicell"},"change_message_id":"57ffeb02c21ad0414e974f46877f7280ce8d9be6","unresolved":false,"context_lines":[{"line_number":737,"context_line":"            if read_only:"},{"line_number":738,"context_line":"                flags \u003d libvirt.VIR_CONNECT_RO"},{"line_number":739,"context_line":"            if not CONF.libvirt.api_thread_pool:"},{"line_number":740,"context_line":"                return libvirt.openAuth(uri, auth, flags)"},{"line_number":741,"context_line":"            else:"},{"line_number":742,"context_line":"                # tpool.proxy_call creates a native thread. Due to limitations"},{"line_number":743,"context_line":"                # with eventlet locking we cannot use the logging API inside"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2BWPs%3D","line":740,"in_reply_to":"AAAATn%2F%2Bgqk%3D","updated":"2013-11-27 03:29:50.000000000","message":"Sorry, guess you mean if the option is TRUE, then execute the nwfilterDefineXML in thread?\n\n239     def _define_filter(self, xml):\n240         if callable(xml):\n241             xml \u003d xml()\n242         # execute in a native thread and block current greenthread until done\n243         if not CONF.libvirt.api_thread_pool:\n244             # NOTE(maoy): the original implementation is to have the API called\n245             # in the thread pool no matter what.\n246             tpool.execute(self._conn.nwfilterDefineXML, xml)\n247         else:\n248             # NOTE(maoy): self._conn is an eventlet.tpool.Proxy object\n249             self._conn.nwfilterDefineXML(xml)","commit_id":"e4b0d8e9446ad3ad3a514b9cf65722f6ed95888d"},{"author":{"_account_id":6969,"name":"Michael Kerrin","email":"michael.kerrin@hpe.com","username":"mkerrin"},"change_message_id":"7d5f7bef947f9379e45df4c41ec8d43af22a54a3","unresolved":false,"context_lines":[{"line_number":737,"context_line":"            if read_only:"},{"line_number":738,"context_line":"                flags \u003d libvirt.VIR_CONNECT_RO"},{"line_number":739,"context_line":"            if not CONF.libvirt.api_thread_pool:"},{"line_number":740,"context_line":"                return libvirt.openAuth(uri, auth, flags)"},{"line_number":741,"context_line":"            else:"},{"line_number":742,"context_line":"                # tpool.proxy_call creates a native thread. Due to limitations"},{"line_number":743,"context_line":"                # with eventlet locking we cannot use the logging API inside"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2Bgqk%3D","line":740,"in_reply_to":"AAAATn%2F%2Bibg%3D","updated":"2013-11-25 10:29:24.000000000","message":"There are no tests for when api_thread_pool is False anywhere. It is my opinion that we should remove this option from the code base and always execute the libvirtd commands in a native thread.\n\nOn line 245 we even override this option. That is if the option is False, we execute the libvirtd nwfilterDefineXML in a thread anyways. This is getting complicated and heading in the direction of running in threads anyway. If someone does make this False then certain features become problematic and they way run into other bugs which could get assigned against nova. We should make a decision on this and stick to it.\n\nThis option was recently renamed so I doubt that many people are using this option in any case.\n\nThis bug is causing me grief, so I am happy to add the test if it gets the review through. But I don\u0027t see the point of it at the moment. I would like to remove this option and if people think that is a good idea then I am also happy to put the effort into that.","commit_id":"e4b0d8e9446ad3ad3a514b9cf65722f6ed95888d"}]}
