)]}'
{"nova/virt/libvirt/driver.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"302aaa99b84a753aa5808643654e88c3c8b53827","unresolved":false,"context_lines":[{"line_number":1059,"context_line":"        # throw errors, like it should."},{"line_number":1060,"context_line":"        if backend.check_image_exists():"},{"line_number":1061,"context_line":"            backend.remove_snap(libvirt_utils.RESIZE_SNAPSHOT_NAME,"},{"line_number":1062,"context_line":"                                ignore_errors\u003dTrue)"},{"line_number":1063,"context_line":""},{"line_number":1064,"context_line":"        if instance.host !\u003d CONF.host:"},{"line_number":1065,"context_line":"            self._undefine_domain(instance)"}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_88e07e2a","line":1062,"updated":"2016-05-11 19:39:34.000000000","message":"This could still race, right? Should we maybe just do a try..except for the thing that happens if the image is gone?","commit_id":"70f6164330944fc633e5259513256029d625c46a"},{"author":{"_account_id":5280,"name":"Nicolas Simonds","email":"nic@metacloud.com","username":"nicolas.simonds"},"change_message_id":"689a52178bcf653bff60a6aa6485248ffbf49c6c","unresolved":false,"context_lines":[{"line_number":1059,"context_line":"        # throw errors, like it should."},{"line_number":1060,"context_line":"        if backend.check_image_exists():"},{"line_number":1061,"context_line":"            backend.remove_snap(libvirt_utils.RESIZE_SNAPSHOT_NAME,"},{"line_number":1062,"context_line":"                                ignore_errors\u003dTrue)"},{"line_number":1063,"context_line":""},{"line_number":1064,"context_line":"        if instance.host !\u003d CONF.host:"},{"line_number":1065,"context_line":"            self._undefine_domain(instance)"}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_89a7dfa5","line":1062,"in_reply_to":"dab17558_88e07e2a","updated":"2016-05-11 21:24:59.000000000","message":"\"The thing that happens\" is driver-dependent; so a catch-all here would be unwise.  There\u0027s plenty of examples elsewhere of using this method for determining whether or not to do work, so if it\u0027s racy, then we\u0027ve got dozens of races in this code.","commit_id":"70f6164330944fc633e5259513256029d625c46a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"10f7d6e543a25f70ae38f9863999397005a501dd","unresolved":false,"context_lines":[{"line_number":1059,"context_line":"        # throw errors, like it should."},{"line_number":1060,"context_line":"        if backend.check_image_exists():"},{"line_number":1061,"context_line":"            backend.remove_snap(libvirt_utils.RESIZE_SNAPSHOT_NAME,"},{"line_number":1062,"context_line":"                                ignore_errors\u003dTrue)"},{"line_number":1063,"context_line":""},{"line_number":1064,"context_line":"        if instance.host !\u003d CONF.host:"},{"line_number":1065,"context_line":"            self._undefine_domain(instance)"}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_a9fbc345","line":1062,"in_reply_to":"dab17558_89a7dfa5","updated":"2016-05-11 21:33:33.000000000","message":"The only other case where we call check_image_exists() is purely to emit a warning log message.\n\nThe call itself isn\u0027t racy, of course, it\u0027s the pattern of \"if thing exists, do thing assuming it exists\" where it could be removed or deleted between the check and the action.\n\nAnyway, sounds like we should of course have a common exception for all backends so we can catch that case instead of catching everything. But, I\u0027m happy to leave that to another patch if it\u0027s really going to be a refactor.","commit_id":"70f6164330944fc633e5259513256029d625c46a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5001219ff96a1bef4e29ce634b48f146bc569a49","unresolved":false,"context_lines":[{"line_number":1058,"context_line":"        # anymore, it should be set back to False (the default) so it will"},{"line_number":1059,"context_line":"        # throw errors, like it should."},{"line_number":1060,"context_line":"        if backend.check_image_exists():"},{"line_number":1061,"context_line":"            backend.remove_snap(libvirt_utils.RESIZE_SNAPSHOT_NAME,"},{"line_number":1062,"context_line":"                                ignore_errors\u003dTrue)"},{"line_number":1063,"context_line":""},{"line_number":1064,"context_line":"        if instance.host !\u003d CONF.host:"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_63e0dc29","line":1061,"updated":"2016-05-11 20:23:57.000000000","message":"In https://github.com/openstack/nova/blob/master/nova/virt/libvirt/storage/rbd_utils.py#L397 would it also be useful to check that snap is not None?\n\n  if name in [snap.get(\u0027name\u0027, \u0027\u0027) for snap in vol.list_snaps()]:\n\nto:\n\n  if name in [snap.get(\u0027name\u0027, \u0027\u0027) if snap else \u0027\u0027 for snap in vol.list_snaps()]:","commit_id":"0a5835daf52cc5f5625f3c5acb8a208907c099d3"}]}
