)]}'
{"nova/virt/libvirt/driver.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"982d32e996be63183c70e7597ef29b7146b89810","unresolved":false,"context_lines":[{"line_number":886,"context_line":"        return tpool.Proxy(rbd_utils.RBDDriver("},{"line_number":887,"context_line":"                           pool\u003dCONF.libvirt.images_rbd_pool,"},{"line_number":888,"context_line":"                           ceph_conf\u003dCONF.libvirt.images_rbd_ceph_conf,"},{"line_number":889,"context_line":"                           rbd_user\u003dCONF.libvirt.rbd_user))"},{"line_number":890,"context_line":""},{"line_number":891,"context_line":"    def _cleanup_rbd(self, instance):"},{"line_number":892,"context_line":"        LibvirtDriver._get_rbd_driver().cleanup_volumes(instance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a0c5dc1_1bb55930","line":889,"updated":"2015-05-13 17:19:24.000000000","message":"I don\u0027t believe this is safe to do. The tpool Proxy runs the wrapped code in a native thread. Due to Nova\u0027s use of eventlet, the code running in the native thread has some real restrictions. In particular it cannot do anything that triggers thread synchronization primitives as that would end up invoking green thread primitives from a native thread context, which results in deadlocks of the interpretor. This problem is particularly seen if the code uses the python logging APIs.\n\nAs a result, the tpool.Proxy() wrapping must only be done with python objects/methods that are backed up by native code, or using pure python code that has been closely vetted to ensure it doesn\u0027t end up triggered eventlet primitives.\n\nSo at most I think you would have to wrwap the 3rd party \u0027rbd\u0027 module, and not the nova rbd_utils.RBDDriver object. Even then the rbd module is using ctypes, so has a bit of pure python code that will need vetting.","commit_id":"ae9b2fc8f588c4fc0740096a2228f67e65140a94"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"2126787f3e36e8934f7e2680abe9a19e38b59ac3","unresolved":false,"context_lines":[{"line_number":886,"context_line":"        return tpool.Proxy(rbd_utils.RBDDriver("},{"line_number":887,"context_line":"                           pool\u003dCONF.libvirt.images_rbd_pool,"},{"line_number":888,"context_line":"                           ceph_conf\u003dCONF.libvirt.images_rbd_ceph_conf,"},{"line_number":889,"context_line":"                           rbd_user\u003dCONF.libvirt.rbd_user))"},{"line_number":890,"context_line":""},{"line_number":891,"context_line":"    def _cleanup_rbd(self, instance):"},{"line_number":892,"context_line":"        LibvirtDriver._get_rbd_driver().cleanup_volumes(instance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a0c5dc1_2a9c48bf","line":889,"in_reply_to":"9a0c5dc1_1bb55930","updated":"2015-05-13 17:40:18.000000000","message":"Interesting.  It sounds like we want to do something similar to this but with greenthreads instead of native threads, then.\n\nI don\u0027t know enough of the details to know how to do that at the moment, but I\u0027ll look into it if you think that is viable.","commit_id":"ae9b2fc8f588c4fc0740096a2228f67e65140a94"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"3242e24a575b7e0559595591e02f1d5bdb5ec6d9","unresolved":false,"context_lines":[{"line_number":886,"context_line":"        return tpool.Proxy(rbd_utils.RBDDriver("},{"line_number":887,"context_line":"                           pool\u003dCONF.libvirt.images_rbd_pool,"},{"line_number":888,"context_line":"                           ceph_conf\u003dCONF.libvirt.images_rbd_ceph_conf,"},{"line_number":889,"context_line":"                           rbd_user\u003dCONF.libvirt.rbd_user))"},{"line_number":890,"context_line":""},{"line_number":891,"context_line":"    def _cleanup_rbd(self, instance):"},{"line_number":892,"context_line":"        LibvirtDriver._get_rbd_driver().cleanup_volumes(instance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a0c5dc1_8ac0d47d","line":889,"in_reply_to":"9a0c5dc1_2a9c48bf","updated":"2015-05-13 19:25:08.000000000","message":"I don\u0027t know how ctypes module interacts with eventlet - you may well need to use native threads, if the ctypes native calls block the entire interpretor.","commit_id":"ae9b2fc8f588c4fc0740096a2228f67e65140a94"},{"author":{"_account_id":1107,"name":"Josh Durgin","email":"jdurgin@redhat.com","username":"jdurgin"},"change_message_id":"faeb0153049fbc3bf5e4941d2f87d697bd84d5cf","unresolved":false,"context_lines":[{"line_number":886,"context_line":"        return tpool.Proxy(rbd_utils.RBDDriver("},{"line_number":887,"context_line":"                           pool\u003dCONF.libvirt.images_rbd_pool,"},{"line_number":888,"context_line":"                           ceph_conf\u003dCONF.libvirt.images_rbd_ceph_conf,"},{"line_number":889,"context_line":"                           rbd_user\u003dCONF.libvirt.rbd_user))"},{"line_number":890,"context_line":""},{"line_number":891,"context_line":"    def _cleanup_rbd(self, instance):"},{"line_number":892,"context_line":"        LibvirtDriver._get_rbd_driver().cleanup_volumes(instance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_80c48a92","line":889,"in_reply_to":"9a0c5dc1_8ac0d47d","updated":"2015-05-14 03:46:45.000000000","message":"FWIW we fell back to wrapping all the ctypes calls in the rados python bindings with a native thread for related reasons - python won\u0027t get signals when its main thread is stuck in a ctypes call.\n\nMaybe we should just do this in the rbd python bindings too, instead of working around it in openstack.","commit_id":"ae9b2fc8f588c4fc0740096a2228f67e65140a94"}]}
