)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4468,"name":"Wangpan","email":"hzwangpan@corp.netease.com","username":"hzwangpan"},"change_message_id":"69d60e68bc280e6a6e50d18dd89ec09af97494b7","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Additional check for qemu-nbd hang"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"/sys/block/*device*/pid check is not enough. I see that the unix"},{"line_number":10,"context_line":"socket used by the device my be stuck as well, so let\u0027s add another"},{"line_number":11,"context_line":"check for the path to the unix socket for the device as well to"},{"line_number":12,"context_line":"figure out if the device is free"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAUH%2F%2B%2FN8%3D","line":9,"updated":"2014-01-20 02:03:02.000000000","message":"I want to know why this pid checking is not enough? Could you explain to me? thanks!","commit_id":"25ba98c67e53537b522baf3c69ee95ff15cbbc98"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"0367b51cbd20b7739bdc214f48b31909244a5100","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Additional check for qemu-nbd hang"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"/sys/block/*device*/pid check is not enough. I see that the unix"},{"line_number":10,"context_line":"socket used by the device my be stuck as well, so let\u0027s add another"},{"line_number":11,"context_line":"check for the path to the unix socket for the device as well to"},{"line_number":12,"context_line":"figure out if the device is free"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAUH%2F%2B9NM%3D","line":9,"in_reply_to":"AAAAUH%2F%2B%2FN8%3D","updated":"2014-01-20 12:41:43.000000000","message":"@Wangpan, i\u0027ve recreated the scenario many times in a local environment where there is no pid but the unix socket is present. This could be because of the old version of qemu-nbd, but that\u0027s what is present in preceise LTS and the problem happens in the jenkins jobs as well.","commit_id":"25ba98c67e53537b522baf3c69ee95ff15cbbc98"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"9d7f219eb1df8621c5c0e3f87b573596e8dd826c","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Additional check for qemu-nbd hang"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"/sys/block/*device*/pid check is not enough. I see that the unix"},{"line_number":10,"context_line":"socket used by the device my be stuck as well, so let\u0027s add another"},{"line_number":11,"context_line":"check for the path to the unix socket for the device as well to"},{"line_number":12,"context_line":"figure out if the device is free"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAUH%2F%2B40k%3D","line":9,"in_reply_to":"AAAAUH%2F%2B9NM%3D","updated":"2014-01-21 02:59:35.000000000","message":"Fairly sure it happens on saucy as well - e.g. it\u0027s not going away anytime soon :)","commit_id":"25ba98c67e53537b522baf3c69ee95ff15cbbc98"}],"nova/virt/disk/mount/nbd.py":[{"author":{"_account_id":1812,"name":"p-draigbrady","email":"P@draigBrady.com","username":"p-draigbrady"},"change_message_id":"f5ed39b6e7009e20027f5c87888d6695d3393bc2","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    def _find_unused(self, devices):"},{"line_number":53,"context_line":"        for device in devices:"},{"line_number":54,"context_line":"            if not os.path.exists(os.path.join(\u0027/sys/block/\u0027, device, \u0027pid\u0027)):"},{"line_number":55,"context_line":"                if not os.path.exists(\u0027/var/lock/qemu-nbd-%s\u0027 % device):"},{"line_number":56,"context_line":"                    return device"},{"line_number":57,"context_line":"        LOG.warn(_(\u0027No free nbd devices\u0027))"},{"line_number":58,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B5Go%3D","line":55,"updated":"2014-01-21 01:20:22.000000000","message":"So if this is an edge case that shouldn\u0027t happen and will cause the system to eventually run out of \"qemu-nbd slots\" then we should bleat loudly about it, with LOG.error()\n\nAlso it was mentioned previously but there are all sorts of TOCTOU races with us checking qemu artefacts like this anyway. Hinting at a correct interface is:\nhttp://lists.gnu.org/archive/html/qemu-devel/2011-11/msg02201.html\n\nCan\u0027t the systems supporting qemu-nbd just patch it to use\nthe correct atomic operations etc. and expose a -f option that\nwe can try or else fall back to this racy alternative?","commit_id":"25ba98c67e53537b522baf3c69ee95ff15cbbc98"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"b0885d32832fd82984dd52d7bdab27f422d341dd","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    def _find_unused(self, devices):"},{"line_number":53,"context_line":"        for device in devices:"},{"line_number":54,"context_line":"            if not os.path.exists(os.path.join(\u0027/sys/block/\u0027, device, \u0027pid\u0027)):"},{"line_number":55,"context_line":"                if not os.path.exists(\u0027/var/lock/qemu-nbd-%s\u0027 % device):"},{"line_number":56,"context_line":"                    return device"},{"line_number":57,"context_line":"        LOG.warn(_(\u0027No free nbd devices\u0027))"},{"line_number":58,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BvSo%3D","line":55,"in_reply_to":"AAAAUH%2F%2B5Go%3D","updated":"2014-01-22 16:39:40.000000000","message":"I can work on that in a subsequent patch, let\u0027s please get this in to help with neutron gate issues.","commit_id":"25ba98c67e53537b522baf3c69ee95ff15cbbc98"}]}
