)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7a521f0970f8b0eb079403bec921219401771e4e","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix \u0027on-shared-storage\u0027 check of evacuate for RBD"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Based on current implement, nova evacuate and nova rebuild"},{"line_number":10,"context_line":"are sharing some code. When user enable the on_shared_storage"},{"line_number":11,"context_line":"option for nova evacuate, nova will check if the instance"},{"line_number":12,"context_line":"path is accessiable. For the RBD scenario, the volume(block)"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da9df570_380b5f7e","line":9,"updated":"2014-09-25 19:44:48.000000000","message":"s/implement/implementation/","commit_id":"0bb11a67d41eef4e258f2bc08926566223af8ac3"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7a521f0970f8b0eb079403bec921219401771e4e","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix \u0027on-shared-storage\u0027 check of evacuate for RBD"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Based on current implement, nova evacuate and nova rebuild"},{"line_number":10,"context_line":"are sharing some code. When user enable the on_shared_storage"},{"line_number":11,"context_line":"option for nova evacuate, nova will check if the instance"},{"line_number":12,"context_line":"path is accessiable. For the RBD scenario, the volume(block)"},{"line_number":13,"context_line":"is sharing between different hosts indeed. Though the path"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da9df570_782887e2","line":10,"updated":"2014-09-25 19:44:48.000000000","message":"s/enable/enables/","commit_id":"0bb11a67d41eef4e258f2bc08926566223af8ac3"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7a521f0970f8b0eb079403bec921219401771e4e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Based on current implement, nova evacuate and nova rebuild"},{"line_number":10,"context_line":"are sharing some code. When user enable the on_shared_storage"},{"line_number":11,"context_line":"option for nova evacuate, nova will check if the instance"},{"line_number":12,"context_line":"path is accessiable. For the RBD scenario, the volume(block)"},{"line_number":13,"context_line":"is sharing between different hosts indeed. Though the path"},{"line_number":14,"context_line":"isn\u0027t sharing at the filesystem level. This patch fixes this"},{"line_number":15,"context_line":"issue and adds test cases for that."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da9df570_b81e6fb9","line":12,"updated":"2014-09-25 19:44:48.000000000","message":"\"accessible\" is misspelled","commit_id":"0bb11a67d41eef4e258f2bc08926566223af8ac3"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7a521f0970f8b0eb079403bec921219401771e4e","unresolved":false,"context_lines":[{"line_number":10,"context_line":"are sharing some code. When user enable the on_shared_storage"},{"line_number":11,"context_line":"option for nova evacuate, nova will check if the instance"},{"line_number":12,"context_line":"path is accessiable. For the RBD scenario, the volume(block)"},{"line_number":13,"context_line":"is sharing between different hosts indeed. Though the path"},{"line_number":14,"context_line":"isn\u0027t sharing at the filesystem level. This patch fixes this"},{"line_number":15,"context_line":"issue and adds test cases for that."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da9df570_18813bc4","line":13,"updated":"2014-09-25 19:44:48.000000000","message":"s/sharing/shared/\n\ns/ indeed//","commit_id":"0bb11a67d41eef4e258f2bc08926566223af8ac3"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7a521f0970f8b0eb079403bec921219401771e4e","unresolved":false,"context_lines":[{"line_number":11,"context_line":"option for nova evacuate, nova will check if the instance"},{"line_number":12,"context_line":"path is accessiable. For the RBD scenario, the volume(block)"},{"line_number":13,"context_line":"is sharing between different hosts indeed. Though the path"},{"line_number":14,"context_line":"isn\u0027t sharing at the filesystem level. This patch fixes this"},{"line_number":15,"context_line":"issue and adds test cases for that."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-Bug: 1340411"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da9df570_d8725310","line":14,"updated":"2014-09-25 19:44:48.000000000","message":"s/sharing/shared/","commit_id":"0bb11a67d41eef4e258f2bc08926566223af8ac3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8b181d263ec72615c18a3dd4461feb62b97ba862","unresolved":false,"context_lines":[{"line_number":15,"context_line":"will check if the instance path is accessible. For"},{"line_number":16,"context_line":"the RBD scenario, the volume(block) is shared between"},{"line_number":17,"context_line":"different hosts, though the path isn\u0027t shared at the"},{"line_number":18,"context_line":"filesystem level. This patch fixes this issue and adds"},{"line_number":19,"context_line":"test cases for that."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"2. Missing the \u0027recreate\u0027 parameter for rebuild method."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"9aa7fdbe_2476c7a4","line":18,"updated":"2014-10-24 14:44:23.000000000","message":"This is the instance_on_disk change to check the image backend for shared storage True/False.","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8b181d263ec72615c18a3dd4461feb62b97ba862","unresolved":false,"context_lines":[{"line_number":23,"context_line":"well."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"3. After evacuated successfully, and restarting the failed"},{"line_number":26,"context_line":"host to get it back. Nova will call init_host() and then"},{"line_number":27,"context_line":"call method _destroy_evacuated_instances(). In method"},{"line_number":28,"context_line":"_destroy_evacuated_instances(), nova will check again if"},{"line_number":29,"context_line":"the storage is shared or not to decide if the storage"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"9aa7fdbe_646c4fd1","line":26,"updated":"2014-10-24 14:44:23.000000000","message":"s/back./back,/","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"0af1465eb7ca1ba2c15303481fc303e508b73421","unresolved":false,"context_lines":[{"line_number":23,"context_line":"well."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"3. After evacuated successfully, and restarting the failed"},{"line_number":26,"context_line":"host to get it back. Nova will call init_host() and then"},{"line_number":27,"context_line":"call method _destroy_evacuated_instances(). In method"},{"line_number":28,"context_line":"_destroy_evacuated_instances(), nova will check again if"},{"line_number":29,"context_line":"the storage is shared or not to decide if the storage"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"9aa7fdbe_8265961f","line":26,"in_reply_to":"9aa7fdbe_646c4fd1","updated":"2014-10-25 02:48:31.000000000","message":"Fixed in https://review.openstack.org/130905","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8b181d263ec72615c18a3dd4461feb62b97ba862","unresolved":false,"context_lines":[{"line_number":29,"context_line":"the storage is shared or not to decide if the storage"},{"line_number":30,"context_line":"should be destroyed. Now nova is using temp file to check"},{"line_number":31,"context_line":"if it\u0027s shared file system, but it\u0027s wrong for RBD case."},{"line_number":32,"context_line":"so Nova will run into a failure to fail to delete the"},{"line_number":33,"context_line":"block storage, since it\u0027s used by the new instance. This"},{"line_number":34,"context_line":"patch fixes this issue and adds test cases for that."},{"line_number":35,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"9aa7fdbe_e45f5f0d","line":32,"updated":"2014-10-24 14:44:23.000000000","message":"s/so/So/.\n\n\"So Nova will attempt to delete the shared block storage, which will fail since it\u0027s used by the new instance.\"","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"0af1465eb7ca1ba2c15303481fc303e508b73421","unresolved":false,"context_lines":[{"line_number":29,"context_line":"the storage is shared or not to decide if the storage"},{"line_number":30,"context_line":"should be destroyed. Now nova is using temp file to check"},{"line_number":31,"context_line":"if it\u0027s shared file system, but it\u0027s wrong for RBD case."},{"line_number":32,"context_line":"so Nova will run into a failure to fail to delete the"},{"line_number":33,"context_line":"block storage, since it\u0027s used by the new instance. This"},{"line_number":34,"context_line":"patch fixes this issue and adds test cases for that."},{"line_number":35,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"9aa7fdbe_a26a9aeb","line":32,"in_reply_to":"9aa7fdbe_e45f5f0d","updated":"2014-10-25 02:48:31.000000000","message":"Fixed in https://review.openstack.org/130905","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b631e3b00318eb1fb9d0a0e2804a541d317181b8","unresolved":false,"context_lines":[{"line_number":18,"context_line":"filesystem level. This patch fixes this issue and adds"},{"line_number":19,"context_line":"test cases for that."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"2. Missing the \u0027recreate\u0027 parameter for rebuild method."},{"line_number":22,"context_line":"Issue is fixed in this patch and test case is added as"},{"line_number":23,"context_line":"well."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"9aa7fdbe_ac6195aa","line":21,"updated":"2014-10-27 15:37:20.000000000","message":"Per my understanding, we don\u0027t care as much about the driver rebuild method since the libvirt driver doesn\u0027t implement that (I think only ironic does?), but we really need to set recreate in kwargs so it gets passed to _rebuild_default_impl so we don\u0027t call driver.destroy on evacuate.  You might want to update this comment a bit in the commit message for clarity.","commit_id":"56ca1d329300170b5ea7515186fe46d21ebd5497"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"d178974371c84185c9d5ca778692e4d459d59f95","unresolved":false,"context_lines":[{"line_number":18,"context_line":"filesystem level. This patch fixes this issue and adds"},{"line_number":19,"context_line":"test cases for that."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"2. Missing the \u0027recreate\u0027 parameter for rebuild method."},{"line_number":22,"context_line":"Issue is fixed in this patch and test case is added as"},{"line_number":23,"context_line":"well."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"9aa7fdbe_1c472278","line":21,"in_reply_to":"9aa7fdbe_ac6195aa","updated":"2014-10-28 00:15:14.000000000","message":"Done","commit_id":"56ca1d329300170b5ea7515186fe46d21ebd5497"}],"nova/compute/manager.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"650d373ab69d268b1a0bfdd79d0bb0c0d9d544e9","unresolved":false,"context_lines":[{"line_number":2776,"context_line":"                block_device_info\u003dblock_device_info,"},{"line_number":2777,"context_line":"                network_info\u003dnetwork_info,"},{"line_number":2778,"context_line":"                preserve_ephemeral\u003dpreserve_ephemeral,"},{"line_number":2779,"context_line":"                recreate\u003drecreate)"},{"line_number":2780,"context_line":"            try:"},{"line_number":2781,"context_line":"                self.driver.rebuild(**kwargs)"},{"line_number":2782,"context_line":"            except NotImplementedError:"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_5650185e","line":2779,"updated":"2014-09-24 19:40:52.000000000","message":"this looks like a related, but a separate issue (afaiu, without this line evacuate will fail down the stack trying to destroy() a non-existing instance on a target node)","commit_id":"0a120667c82fb9289a0a0ba6d897a91f1a637c46"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc9025aee208208c3a7e314d37bf09d453b656ef","unresolved":false,"context_lines":[{"line_number":2776,"context_line":"                block_device_info\u003dblock_device_info,"},{"line_number":2777,"context_line":"                network_info\u003dnetwork_info,"},{"line_number":2778,"context_line":"                preserve_ephemeral\u003dpreserve_ephemeral,"},{"line_number":2779,"context_line":"                recreate\u003drecreate)"},{"line_number":2780,"context_line":"            try:"},{"line_number":2781,"context_line":"                self.driver.rebuild(**kwargs)"},{"line_number":2782,"context_line":"            except NotImplementedError:"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_1c9e0b64","line":2779,"updated":"2014-10-10 03:11:13.000000000","message":"Confirmed that this is part of the rebuild method in the virt driver (the kwargs were making me nervous):\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/virt/driver.py?id\u003d2014.2.rc1#n267\n\nHowever, the libvirt driver isn\u0027t using this (is there some other virt driver being used that has it\u0027s own rebuild method, I thought Ironic was the only one that implemented rebuild) - is this just to pass the value which we weren\u0027t doing before (for completeness)?","commit_id":"57b72d3580724047f4cd8fc17a64380115477ba8"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"1a1013aea41a6743fbb60dbb4d68c012e4a94d28","unresolved":false,"context_lines":[{"line_number":2776,"context_line":"                block_device_info\u003dblock_device_info,"},{"line_number":2777,"context_line":"                network_info\u003dnetwork_info,"},{"line_number":2778,"context_line":"                preserve_ephemeral\u003dpreserve_ephemeral,"},{"line_number":2779,"context_line":"                recreate\u003drecreate)"},{"line_number":2780,"context_line":"            try:"},{"line_number":2781,"context_line":"                self.driver.rebuild(**kwargs)"},{"line_number":2782,"context_line":"            except NotImplementedError:"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_6a3fff25","line":2779,"in_reply_to":"baa201ad_1c9e0b64","updated":"2014-10-14 02:08:44.000000000","message":"As you mentioned, it\u0027s one of the parameters of rebuild method. And IMHO, it\u0027s just being missed.","commit_id":"57b72d3580724047f4cd8fc17a64380115477ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc9025aee208208c3a7e314d37bf09d453b656ef","unresolved":false,"context_lines":[{"line_number":2782,"context_line":"            except NotImplementedError:"},{"line_number":2783,"context_line":"                # NOTE(rpodolyaka): driver doesn\u0027t provide specialized version"},{"line_number":2784,"context_line":"                # of rebuild, fall back to the default implementation"},{"line_number":2785,"context_line":"                self._rebuild_default_impl(**kwargs)"},{"line_number":2786,"context_line":"            instance.power_state \u003d self._get_power_state(context, instance)"},{"line_number":2787,"context_line":"            instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":2788,"context_line":"            instance.task_state \u003d None"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_fc778739","line":2785,"updated":"2014-10-10 03:11:13.000000000","message":"Or for use here?  Since the libvirt driver isn\u0027t updated to use this, is this part of one of the bugs listed in the commit message?  If so, you should call out this change in the commit message also, otherwise it seems like a separate change from the on-shared-storage fix.\n\nAlso, apparently there isn\u0027t any compute manager unit test to make sure the recreate flag is passed to the virt driver or _rebuild_default_impl.  We should have one if it\u0027s fixing a bug.","commit_id":"57b72d3580724047f4cd8fc17a64380115477ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b54c1be79cef0abc4e6431d68ab906d1e34434c3","unresolved":false,"context_lines":[{"line_number":2782,"context_line":"            except NotImplementedError:"},{"line_number":2783,"context_line":"                # NOTE(rpodolyaka): driver doesn\u0027t provide specialized version"},{"line_number":2784,"context_line":"                # of rebuild, fall back to the default implementation"},{"line_number":2785,"context_line":"                self._rebuild_default_impl(**kwargs)"},{"line_number":2786,"context_line":"            instance.power_state \u003d self._get_power_state(context, instance)"},{"line_number":2787,"context_line":"            instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":2788,"context_line":"            instance.task_state \u003d None"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa7fdbe_95240061","line":2785,"in_reply_to":"baa201ad_8a68a322","updated":"2014-10-24 13:52:09.000000000","message":"My thinking was simply having a unit test for rebuild_instance which stubs everything out but makes sure that the driver\u0027s rebuild method and the _rebuild_default_impl methods are called with the recreate flag.","commit_id":"57b72d3580724047f4cd8fc17a64380115477ba8"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"1a1013aea41a6743fbb60dbb4d68c012e4a94d28","unresolved":false,"context_lines":[{"line_number":2782,"context_line":"            except NotImplementedError:"},{"line_number":2783,"context_line":"                # NOTE(rpodolyaka): driver doesn\u0027t provide specialized version"},{"line_number":2784,"context_line":"                # of rebuild, fall back to the default implementation"},{"line_number":2785,"context_line":"                self._rebuild_default_impl(**kwargs)"},{"line_number":2786,"context_line":"            instance.power_state \u003d self._get_power_state(context, instance)"},{"line_number":2787,"context_line":"            instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":2788,"context_line":"            instance.task_state \u003d None"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_8a68a322","line":2785,"in_reply_to":"baa201ad_fc778739","updated":"2014-10-14 02:08:44.000000000","message":"Maybe. But from the other hand, leaving the rebuild method missing \u0027recreate\u0027 parameter doesn\u0027t make sense. \n\nAnd yes, this change is a part of this fix. And without this change, the block storage will be destroyed, see line 2624 in method _rebuild_default_impl()\n\nI will update the commit message to reflect this change.\n\nAs for unit test, I was thinking about that. But given it\u0027s adding a missing parameter, so TBH, I\u0027m not really sure how to test it since most of the case have been covered in test_manager.py.","commit_id":"57b72d3580724047f4cd8fc17a64380115477ba8"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"581b841c31e4876f1e95b753b63798cc9d3a095b","unresolved":false,"context_lines":[{"line_number":2806,"context_line":"                block_device_info\u003dblock_device_info,"},{"line_number":2807,"context_line":"                network_info\u003dnetwork_info,"},{"line_number":2808,"context_line":"                preserve_ephemeral\u003dpreserve_ephemeral,"},{"line_number":2809,"context_line":"                recreate\u003drecreate)"},{"line_number":2810,"context_line":"            try:"},{"line_number":2811,"context_line":"                self.driver.rebuild(**kwargs)"},{"line_number":2812,"context_line":"            except NotImplementedError:"}],"source_content_type":"text/x-python","patch_set":10,"id":"baa201ad_e4e650af","line":2809,"updated":"2014-10-17 12:23:33.000000000","message":"is there a test in compute to test the passing of this dictionary parameter?","commit_id":"12c884e9c2d401fab0e7148762f1cb45f46fe174"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"97effc210eb06f366ef4c032e60b305fc0e88ed6","unresolved":false,"context_lines":[{"line_number":2806,"context_line":"                block_device_info\u003dblock_device_info,"},{"line_number":2807,"context_line":"                network_info\u003dnetwork_info,"},{"line_number":2808,"context_line":"                preserve_ephemeral\u003dpreserve_ephemeral,"},{"line_number":2809,"context_line":"                recreate\u003drecreate)"},{"line_number":2810,"context_line":"            try:"},{"line_number":2811,"context_line":"                self.driver.rebuild(**kwargs)"},{"line_number":2812,"context_line":"            except NotImplementedError:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa7fdbe_6794ed37","line":2809,"in_reply_to":"baa201ad_e4e650af","updated":"2014-10-20 02:02:32.000000000","message":"Done","commit_id":"12c884e9c2d401fab0e7148762f1cb45f46fe174"}],"nova/tests/compute/test_compute.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"eec3bfe9102bc943dc439641af52eb2f04bbf37e","unresolved":false,"context_lines":[{"line_number":2560,"context_line":"            called[\u0027spawn\u0027] \u003d True"},{"line_number":2561,"context_line":"            pass"},{"line_number":2562,"context_line":""},{"line_number":2563,"context_line":"        self.stubs.Set(self.compute.driver, \u0027rebuild\u0027, rebuild)"},{"line_number":2564,"context_line":"        self.stubs.Set(self.compute.driver, \u0027destroy\u0027, destroy)"},{"line_number":2565,"context_line":"        self.stubs.Set(self.compute.network_api, \u0027setup_networks_on_host\u0027,"},{"line_number":2566,"context_line":"                       setup_networks_on_host)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9aa7fdbe_f14929d1","line":2563,"updated":"2014-10-22 09:06:13.000000000","message":"please use mock instead of stubs","commit_id":"8d3da52faa00e8ce24c795ee69bdfaaa96139cb4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"eec3bfe9102bc943dc439641af52eb2f04bbf37e","unresolved":false,"context_lines":[{"line_number":2566,"context_line":"                       setup_networks_on_host)"},{"line_number":2567,"context_line":"        self.stubs.Set(self.compute.driver, \u0027spawn\u0027, spawn)"},{"line_number":2568,"context_line":""},{"line_number":2569,"context_line":"        instance \u003d jsonutils.to_primitive(self._create_fake_instance())"},{"line_number":2570,"context_line":"        image_ref \u003d instance[\u0027image_ref\u0027]"},{"line_number":2571,"context_line":"        sys_metadata \u003d db.instance_system_metadata_get(self.context,"},{"line_number":2572,"context_line":"                        instance[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":13,"id":"9aa7fdbe_511675a8","line":2569,"updated":"2014-10-22 09:06:13.000000000","message":"the instance here should be an object","commit_id":"8d3da52faa00e8ce24c795ee69bdfaaa96139cb4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8b181d263ec72615c18a3dd4461feb62b97ba862","unresolved":false,"context_lines":[{"line_number":2523,"context_line":"                                      on_shared_storage\u003dFalse)"},{"line_number":2524,"context_line":"        self.compute.terminate_instance(self.context, instance, [], [])"},{"line_number":2525,"context_line":""},{"line_number":2526,"context_line":"    @mock.patch.object(nova.virt.fake.FakeDriver, \u0027rebuild\u0027)"},{"line_number":2527,"context_line":"    @mock.patch.object(nova.virt.fake.FakeDriver, \u0027destroy\u0027)"},{"line_number":2528,"context_line":"    @mock.patch.object(network_api.API, \u0027setup_networks_on_host\u0027)"},{"line_number":2529,"context_line":"    @mock.patch.object(nova.virt.fake.FakeDriver, \u0027spawn\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_15e3b0a4","line":2526,"updated":"2014-10-24 14:44:23.000000000","message":"Rather than hard-code to the fake driver, you could just mock out self.compute.driver, that\u0027s what a lot of other tests do, but you can\u0027t decorate the test method with that, you\u0027d either have to use a nested method within the test (there are examples in test_compute_mgr), or use a nested context within the test (which is also pretty common).","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"0af1465eb7ca1ba2c15303481fc303e508b73421","unresolved":false,"context_lines":[{"line_number":2523,"context_line":"                                      on_shared_storage\u003dFalse)"},{"line_number":2524,"context_line":"        self.compute.terminate_instance(self.context, instance, [], [])"},{"line_number":2525,"context_line":""},{"line_number":2526,"context_line":"    @mock.patch.object(nova.virt.fake.FakeDriver, \u0027rebuild\u0027)"},{"line_number":2527,"context_line":"    @mock.patch.object(nova.virt.fake.FakeDriver, \u0027destroy\u0027)"},{"line_number":2528,"context_line":"    @mock.patch.object(network_api.API, \u0027setup_networks_on_host\u0027)"},{"line_number":2529,"context_line":"    @mock.patch.object(nova.virt.fake.FakeDriver, \u0027spawn\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_c26b1eef","line":2526,"in_reply_to":"9aa7fdbe_15e3b0a4","updated":"2014-10-25 02:48:31.000000000","message":"Done","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8b181d263ec72615c18a3dd4461feb62b97ba862","unresolved":false,"context_lines":[{"line_number":2527,"context_line":"    @mock.patch.object(nova.virt.fake.FakeDriver, \u0027destroy\u0027)"},{"line_number":2528,"context_line":"    @mock.patch.object(network_api.API, \u0027setup_networks_on_host\u0027)"},{"line_number":2529,"context_line":"    @mock.patch.object(nova.virt.fake.FakeDriver, \u0027spawn\u0027)"},{"line_number":2530,"context_line":"    def test_rebuild_default_impl(self,"},{"line_number":2531,"context_line":"                                  mock_spawn,"},{"line_number":2532,"context_line":"                                  mock_setup_networks_on_host,"},{"line_number":2533,"context_line":"                                  mock_destroy,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_d56e882e","line":2530,"updated":"2014-10-24 14:44:23.000000000","message":"Please move this test to nova.tests.compute.test_compute_mgr since those are no-db test cases. We\u0027d like to write/move unit tests that don\u0027t depend on the database for the compute manager in test_compute_mgr, since test_compute is really a lot of integration testing and it\u0027s slow.\n\nThere are some things that would have to change if you move it to test_compute_mgr, like you\u0027ll have to mock out the call to nova.objects.Instance.save(), but that\u0027s easy (and there are examples in there of doing that).","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"0af1465eb7ca1ba2c15303481fc303e508b73421","unresolved":false,"context_lines":[{"line_number":2527,"context_line":"    @mock.patch.object(nova.virt.fake.FakeDriver, \u0027destroy\u0027)"},{"line_number":2528,"context_line":"    @mock.patch.object(network_api.API, \u0027setup_networks_on_host\u0027)"},{"line_number":2529,"context_line":"    @mock.patch.object(nova.virt.fake.FakeDriver, \u0027spawn\u0027)"},{"line_number":2530,"context_line":"    def test_rebuild_default_impl(self,"},{"line_number":2531,"context_line":"                                  mock_spawn,"},{"line_number":2532,"context_line":"                                  mock_setup_networks_on_host,"},{"line_number":2533,"context_line":"                                  mock_destroy,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_e27022de","line":2530,"in_reply_to":"9aa7fdbe_d56e882e","updated":"2014-10-25 02:48:31.000000000","message":"Done","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8b181d263ec72615c18a3dd4461feb62b97ba862","unresolved":false,"context_lines":[{"line_number":2534,"context_line":"                                  mock_rebuild"},{"line_number":2535,"context_line":"                                  ):"},{"line_number":2536,"context_line":"        mock_rebuild.side_effect \u003d NotImplementedError()"},{"line_number":2537,"context_line":"        mock_destroy.return_value \u003d None"},{"line_number":2538,"context_line":"        mock_setup_networks_on_host.return_value \u003d None"},{"line_number":2539,"context_line":"        mock_spawn.return_value \u003d None"},{"line_number":2540,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_5597f8eb","line":2537,"updated":"2014-10-24 14:44:23.000000000","message":"The return_value \u003d None here and for setup_networks_on_host and spawn are unnecessary.","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"0af1465eb7ca1ba2c15303481fc303e508b73421","unresolved":false,"context_lines":[{"line_number":2534,"context_line":"                                  mock_rebuild"},{"line_number":2535,"context_line":"                                  ):"},{"line_number":2536,"context_line":"        mock_rebuild.side_effect \u003d NotImplementedError()"},{"line_number":2537,"context_line":"        mock_destroy.return_value \u003d None"},{"line_number":2538,"context_line":"        mock_setup_networks_on_host.return_value \u003d None"},{"line_number":2539,"context_line":"        mock_spawn.return_value \u003d None"},{"line_number":2540,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_0279a6c7","line":2537,"in_reply_to":"9aa7fdbe_5597f8eb","updated":"2014-10-25 02:48:31.000000000","message":"Done","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8b181d263ec72615c18a3dd4461feb62b97ba862","unresolved":false,"context_lines":[{"line_number":2540,"context_line":""},{"line_number":2541,"context_line":"        instance \u003d self._create_fake_instance_obj()"},{"line_number":2542,"context_line":"        image_ref \u003d instance[\u0027image_ref\u0027]"},{"line_number":2543,"context_line":"        sys_metadata \u003d db.instance_system_metadata_get(self.context,"},{"line_number":2544,"context_line":"                        instance[\u0027uuid\u0027])"},{"line_number":2545,"context_line":"        self.compute.run_instance(self.context, instance, {}, {}, [],"},{"line_number":2546,"context_line":"                                  None, None, True, None, False)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_d58a08be","line":2543,"updated":"2014-10-24 14:44:23.000000000","message":"Why go to the DB for this? Just call instance.system_metadata.","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"0af1465eb7ca1ba2c15303481fc303e508b73421","unresolved":false,"context_lines":[{"line_number":2540,"context_line":""},{"line_number":2541,"context_line":"        instance \u003d self._create_fake_instance_obj()"},{"line_number":2542,"context_line":"        image_ref \u003d instance[\u0027image_ref\u0027]"},{"line_number":2543,"context_line":"        sys_metadata \u003d db.instance_system_metadata_get(self.context,"},{"line_number":2544,"context_line":"                        instance[\u0027uuid\u0027])"},{"line_number":2545,"context_line":"        self.compute.run_instance(self.context, instance, {}, {}, [],"},{"line_number":2546,"context_line":"                                  None, None, True, None, False)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_2276aad7","line":2543,"in_reply_to":"9aa7fdbe_d58a08be","updated":"2014-10-25 02:48:31.000000000","message":"Done","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8b181d263ec72615c18a3dd4461feb62b97ba862","unresolved":false,"context_lines":[{"line_number":2545,"context_line":"        self.compute.run_instance(self.context, instance, {}, {}, [],"},{"line_number":2546,"context_line":"                                  None, None, True, None, False)"},{"line_number":2547,"context_line":"        db.instance_update(self.context, instance[\u0027uuid\u0027],"},{"line_number":2548,"context_line":"                           {\"task_state\": task_states.REBUILDING})"},{"line_number":2549,"context_line":""},{"line_number":2550,"context_line":"        self.compute.rebuild_instance(self.context,"},{"line_number":2551,"context_line":"                                      instance,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_15a8101f","line":2548,"updated":"2014-10-24 14:44:23.000000000","message":"Pass this to _create_fake_instance_obj via the params kwarg when the instance object is created, then we don\u0027t need the update.","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"0af1465eb7ca1ba2c15303481fc303e508b73421","unresolved":false,"context_lines":[{"line_number":2545,"context_line":"        self.compute.run_instance(self.context, instance, {}, {}, [],"},{"line_number":2546,"context_line":"                                  None, None, True, None, False)"},{"line_number":2547,"context_line":"        db.instance_update(self.context, instance[\u0027uuid\u0027],"},{"line_number":2548,"context_line":"                           {\"task_state\": task_states.REBUILDING})"},{"line_number":2549,"context_line":""},{"line_number":2550,"context_line":"        self.compute.rebuild_instance(self.context,"},{"line_number":2551,"context_line":"                                      instance,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_427f2eab","line":2548,"in_reply_to":"9aa7fdbe_15a8101f","updated":"2014-10-25 02:48:31.000000000","message":"Done","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"}],"nova/tests/compute/test_compute_mgr.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b631e3b00318eb1fb9d0a0e2804a541d317181b8","unresolved":false,"context_lines":[{"line_number":2005,"context_line":"        ):"},{"line_number":2006,"context_line":"            instance \u003d fake_instance.fake_instance_obj(self.context)"},{"line_number":2007,"context_line":"            instance.task_state \u003d task_states.REBUILDING"},{"line_number":2008,"context_line":"            instance.save \u003d _save"},{"line_number":2009,"context_line":""},{"line_number":2010,"context_line":"            self.compute._rebuild_default_impl(self.context,"},{"line_number":2011,"context_line":"                                               instance,"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aa7fdbe_cc3259a6","line":2008,"updated":"2014-10-27 15:37:20.000000000","message":"Just mock out nova.objects.Instance.save so you can assert that it\u0027s called with the expected task_state.","commit_id":"56ca1d329300170b5ea7515186fe46d21ebd5497"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b631e3b00318eb1fb9d0a0e2804a541d317181b8","unresolved":false,"context_lines":[{"line_number":2021,"context_line":"                                               preserve_ephemeral\u003dFalse)"},{"line_number":2022,"context_line":""},{"line_number":2023,"context_line":"            self.assertFalse(mock_destroy.called)"},{"line_number":2024,"context_line":"            self.assertTrue(mock_spawn.called)"},{"line_number":2025,"context_line":""},{"line_number":2026,"context_line":""},{"line_number":2027,"context_line":"class ComputeManagerBuildInstanceTestCase(test.NoDBTestCase):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aa7fdbe_acb995cd","line":2024,"updated":"2014-10-27 15:37:20.000000000","message":"nit: this test could be better in that attach_block_devices returns the new block device info which is passed to driver.spawn with the block_device_info kwarg, so we could actually test that in here if your _attach fake returned a sentinel that we asserted was used when calling driver.spawn.  It\u0027s not a huge issue, but it\u0027s an easy enough add for coverage.","commit_id":"56ca1d329300170b5ea7515186fe46d21ebd5497"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"d178974371c84185c9d5ca778692e4d459d59f95","unresolved":false,"context_lines":[{"line_number":2021,"context_line":"                                               preserve_ephemeral\u003dFalse)"},{"line_number":2022,"context_line":""},{"line_number":2023,"context_line":"            self.assertFalse(mock_destroy.called)"},{"line_number":2024,"context_line":"            self.assertTrue(mock_spawn.called)"},{"line_number":2025,"context_line":""},{"line_number":2026,"context_line":""},{"line_number":2027,"context_line":"class ComputeManagerBuildInstanceTestCase(test.NoDBTestCase):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aa7fdbe_9c523233","line":2024,"in_reply_to":"9aa7fdbe_acb995cd","updated":"2014-10-28 00:15:14.000000000","message":"Done","commit_id":"56ca1d329300170b5ea7515186fe46d21ebd5497"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c3ad27c10f3fd634738aa7c9341c7ce88158e76f","unresolved":false,"context_lines":[{"line_number":1993,"context_line":""},{"line_number":1994,"context_line":"        def _spawn(context, instance, image_meta, injected_files,"},{"line_number":1995,"context_line":"              admin_password, network_info\u003dNone, block_device_info\u003dNone):"},{"line_number":1996,"context_line":"            self.assertEqual(block_device_info[\u0027block_device_mapping\u0027],"},{"line_number":1997,"context_line":"                             \u0027shared_block_storage\u0027)"},{"line_number":1998,"context_line":""},{"line_number":1999,"context_line":"        with contextlib.nested("}],"source_content_type":"text/x-python","patch_set":16,"id":"9aa7fdbe_9a3dbbdf","line":1996,"updated":"2014-10-28 17:47:03.000000000","message":"nit: args are assertEqual(expected, observed)","commit_id":"91d3272b975572d9866b7d959547e438142dc4fb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c3ad27c10f3fd634738aa7c9341c7ce88158e76f","unresolved":false,"context_lines":[{"line_number":2000,"context_line":"            mock.patch.object(self.compute.driver, \u0027destroy\u0027,"},{"line_number":2001,"context_line":"                              return_value\u003dNone),"},{"line_number":2002,"context_line":"            mock.patch.object(self.compute.driver, \u0027spawn\u0027,"},{"line_number":2003,"context_line":"                              side_effect\u003d_spawn),"},{"line_number":2004,"context_line":"            mock.patch.object(objects.Instance, \u0027save\u0027,"},{"line_number":2005,"context_line":"                              return_value\u003dNone)"},{"line_number":2006,"context_line":"        ) as("}],"source_content_type":"text/x-python","patch_set":16,"id":"9aa7fdbe_2e02d409","line":2003,"updated":"2014-10-28 17:47:03.000000000","message":"This is a little different from what I was expecting, I was expecting mock.assert_called_once_with would be used, but this achieves the same thing.","commit_id":"91d3272b975572d9866b7d959547e438142dc4fb"}],"nova/tests/virt/libvirt/test_driver.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc9025aee208208c3a7e314d37bf09d453b656ef","unresolved":false,"context_lines":[{"line_number":9806,"context_line":"                          lambda x: x)"},{"line_number":9807,"context_line":""},{"line_number":9808,"context_line":"    def test_check_instance_shared_storage_local(self):"},{"line_number":9809,"context_line":"        CONF.set_override(\u0027images_type\u0027, \u0027raw\u0027, \u0027libvirt\u0027)"},{"line_number":9810,"context_line":"        CONF.set_override(\u0027instances_path\u0027, \u0027/tmp\u0027)"},{"line_number":9811,"context_line":"        os.mkdir(\u0027/tmp/22d67c3e3e5d4881a1763565b3f1934d\u0027)"},{"line_number":9812,"context_line":"        driver \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_dccf2356","line":9809,"updated":"2014-10-10 03:11:13.000000000","message":"Use self.flags.","commit_id":"57b72d3580724047f4cd8fc17a64380115477ba8"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"1a1013aea41a6743fbb60dbb4d68c012e4a94d28","unresolved":false,"context_lines":[{"line_number":9806,"context_line":"                          lambda x: x)"},{"line_number":9807,"context_line":""},{"line_number":9808,"context_line":"    def test_check_instance_shared_storage_local(self):"},{"line_number":9809,"context_line":"        CONF.set_override(\u0027images_type\u0027, \u0027raw\u0027, \u0027libvirt\u0027)"},{"line_number":9810,"context_line":"        CONF.set_override(\u0027instances_path\u0027, \u0027/tmp\u0027)"},{"line_number":9811,"context_line":"        os.mkdir(\u0027/tmp/22d67c3e3e5d4881a1763565b3f1934d\u0027)"},{"line_number":9812,"context_line":"        driver \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_aa772701","line":9809,"in_reply_to":"baa201ad_dccf2356","updated":"2014-10-14 02:08:44.000000000","message":"Will fix in next PS.","commit_id":"57b72d3580724047f4cd8fc17a64380115477ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc9025aee208208c3a7e314d37bf09d453b656ef","unresolved":false,"context_lines":[{"line_number":9807,"context_line":""},{"line_number":9808,"context_line":"    def test_check_instance_shared_storage_local(self):"},{"line_number":9809,"context_line":"        CONF.set_override(\u0027images_type\u0027, \u0027raw\u0027, \u0027libvirt\u0027)"},{"line_number":9810,"context_line":"        CONF.set_override(\u0027instances_path\u0027, \u0027/tmp\u0027)"},{"line_number":9811,"context_line":"        os.mkdir(\u0027/tmp/22d67c3e3e5d4881a1763565b3f1934d\u0027)"},{"line_number":9812,"context_line":"        driver \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":9813,"context_line":"        instance \u003d objects.Instance(id\u003d1,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_fccce763","line":9810,"updated":"2014-10-10 03:11:13.000000000","message":"ditto","commit_id":"57b72d3580724047f4cd8fc17a64380115477ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc9025aee208208c3a7e314d37bf09d453b656ef","unresolved":false,"context_lines":[{"line_number":9808,"context_line":"    def test_check_instance_shared_storage_local(self):"},{"line_number":9809,"context_line":"        CONF.set_override(\u0027images_type\u0027, \u0027raw\u0027, \u0027libvirt\u0027)"},{"line_number":9810,"context_line":"        CONF.set_override(\u0027instances_path\u0027, \u0027/tmp\u0027)"},{"line_number":9811,"context_line":"        os.mkdir(\u0027/tmp/22d67c3e3e5d4881a1763565b3f1934d\u0027)"},{"line_number":9812,"context_line":"        driver \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":9813,"context_line":"        instance \u003d objects.Instance(id\u003d1,"},{"line_number":9814,"context_line":"                                    uuid\u003d\u002722d67c3e3e5d4881a1763565b3f1934d\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_5c033376","line":9811,"updated":"2014-10-10 03:11:13.000000000","message":"Can\u0027t we just mock out the call to tempfile.mkstemp and os.close?","commit_id":"57b72d3580724047f4cd8fc17a64380115477ba8"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"1a1013aea41a6743fbb60dbb4d68c012e4a94d28","unresolved":false,"context_lines":[{"line_number":9808,"context_line":"    def test_check_instance_shared_storage_local(self):"},{"line_number":9809,"context_line":"        CONF.set_override(\u0027images_type\u0027, \u0027raw\u0027, \u0027libvirt\u0027)"},{"line_number":9810,"context_line":"        CONF.set_override(\u0027instances_path\u0027, \u0027/tmp\u0027)"},{"line_number":9811,"context_line":"        os.mkdir(\u0027/tmp/22d67c3e3e5d4881a1763565b3f1934d\u0027)"},{"line_number":9812,"context_line":"        driver \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":9813,"context_line":"        instance \u003d objects.Instance(id\u003d1,"},{"line_number":9814,"context_line":"                                    uuid\u003d\u002722d67c3e3e5d4881a1763565b3f1934d\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_6df9d9c7","line":9811,"in_reply_to":"baa201ad_5c033376","updated":"2014-10-14 02:08:44.000000000","message":"Will fix in next PS.","commit_id":"57b72d3580724047f4cd8fc17a64380115477ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc9025aee208208c3a7e314d37bf09d453b656ef","unresolved":false,"context_lines":[{"line_number":12249,"context_line":"        self.assertFalse(conn.instance_on_disk(instance))"},{"line_number":12250,"context_line":""},{"line_number":12251,"context_line":"    def test_instance_on_disk_rbd(self):"},{"line_number":12252,"context_line":"        CONF.set_override(\u0027images_type\u0027, \u0027rbd\u0027, \u0027libvirt\u0027)"},{"line_number":12253,"context_line":"        conn \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":12254,"context_line":"        instance \u003d objects.Instance(uuid\u003d\u0027fake-uuid\u0027, id\u003d1)"},{"line_number":12255,"context_line":"        self.assertTrue(conn.instance_on_disk(instance))"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_bceb3faf","line":12252,"updated":"2014-10-10 03:11:13.000000000","message":"Use self.flags instead.","commit_id":"57b72d3580724047f4cd8fc17a64380115477ba8"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"1a1013aea41a6743fbb60dbb4d68c012e4a94d28","unresolved":false,"context_lines":[{"line_number":12249,"context_line":"        self.assertFalse(conn.instance_on_disk(instance))"},{"line_number":12250,"context_line":""},{"line_number":12251,"context_line":"    def test_instance_on_disk_rbd(self):"},{"line_number":12252,"context_line":"        CONF.set_override(\u0027images_type\u0027, \u0027rbd\u0027, \u0027libvirt\u0027)"},{"line_number":12253,"context_line":"        conn \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":12254,"context_line":"        instance \u003d objects.Instance(uuid\u003d\u0027fake-uuid\u0027, id\u003d1)"},{"line_number":12255,"context_line":"        self.assertTrue(conn.instance_on_disk(instance))"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_0a64b347","line":12252,"in_reply_to":"baa201ad_bceb3faf","updated":"2014-10-14 02:08:44.000000000","message":"Will fix in next PS.","commit_id":"57b72d3580724047f4cd8fc17a64380115477ba8"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"581b841c31e4876f1e95b753b63798cc9d3a095b","unresolved":false,"context_lines":[{"line_number":10378,"context_line":"    def test_check_instance_shared_storage_local(self):"},{"line_number":10379,"context_line":"        self.flags(images_type\u003d\u0027raw\u0027, group\u003d\u0027libvirt\u0027)"},{"line_number":10380,"context_line":"        self.flags(instances_path\u003d\u0027/tmp\u0027)"},{"line_number":10381,"context_line":"        path \u003d tempfile.mkdtemp(dir\u003d\u0027/tmp\u0027)"},{"line_number":10382,"context_line":"        driver \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":10383,"context_line":"        instance \u003d objects.Instance(id\u003d1,"},{"line_number":10384,"context_line":"                                    uuid\u003dos.path.split(path)[1])"}],"source_content_type":"text/x-python","patch_set":10,"id":"baa201ad_649180f0","line":10381,"updated":"2014-10-17 12:23:33.000000000","message":"why do we need this? how about mocking this operation?","commit_id":"12c884e9c2d401fab0e7148762f1cb45f46fe174"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"97effc210eb06f366ef4c032e60b305fc0e88ed6","unresolved":false,"context_lines":[{"line_number":10378,"context_line":"    def test_check_instance_shared_storage_local(self):"},{"line_number":10379,"context_line":"        self.flags(images_type\u003d\u0027raw\u0027, group\u003d\u0027libvirt\u0027)"},{"line_number":10380,"context_line":"        self.flags(instances_path\u003d\u0027/tmp\u0027)"},{"line_number":10381,"context_line":"        path \u003d tempfile.mkdtemp(dir\u003d\u0027/tmp\u0027)"},{"line_number":10382,"context_line":"        driver \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":10383,"context_line":"        instance \u003d objects.Instance(id\u003d1,"},{"line_number":10384,"context_line":"                                    uuid\u003dos.path.split(path)[1])"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa7fdbe_678dcd31","line":10381,"in_reply_to":"baa201ad_649180f0","updated":"2014-10-20 02:02:32.000000000","message":"Done","commit_id":"12c884e9c2d401fab0e7148762f1cb45f46fe174"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"581b841c31e4876f1e95b753b63798cc9d3a095b","unresolved":false,"context_lines":[{"line_number":10381,"context_line":"        path \u003d tempfile.mkdtemp(dir\u003d\u0027/tmp\u0027)"},{"line_number":10382,"context_line":"        driver \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":10383,"context_line":"        instance \u003d objects.Instance(id\u003d1,"},{"line_number":10384,"context_line":"                                    uuid\u003dos.path.split(path)[1])"},{"line_number":10385,"context_line":"        temp_file \u003d driver.check_instance_shared_storage_local(self.context,"},{"line_number":10386,"context_line":"                                                               instance)"},{"line_number":10387,"context_line":"        self.assertIsNotNone(temp_file[\u0027filename\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"baa201ad_c4c14ce5","line":10384,"updated":"2014-10-17 12:23:33.000000000","message":"why not use a uuid here?","commit_id":"12c884e9c2d401fab0e7148762f1cb45f46fe174"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"97effc210eb06f366ef4c032e60b305fc0e88ed6","unresolved":false,"context_lines":[{"line_number":10381,"context_line":"        path \u003d tempfile.mkdtemp(dir\u003d\u0027/tmp\u0027)"},{"line_number":10382,"context_line":"        driver \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":10383,"context_line":"        instance \u003d objects.Instance(id\u003d1,"},{"line_number":10384,"context_line":"                                    uuid\u003dos.path.split(path)[1])"},{"line_number":10385,"context_line":"        temp_file \u003d driver.check_instance_shared_storage_local(self.context,"},{"line_number":10386,"context_line":"                                                               instance)"},{"line_number":10387,"context_line":"        self.assertIsNotNone(temp_file[\u0027filename\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa7fdbe_8782b1fe","line":10384,"in_reply_to":"baa201ad_c4c14ce5","updated":"2014-10-20 02:02:32.000000000","message":"Done","commit_id":"12c884e9c2d401fab0e7148762f1cb45f46fe174"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"581b841c31e4876f1e95b753b63798cc9d3a095b","unresolved":false,"context_lines":[{"line_number":10387,"context_line":"        self.assertIsNotNone(temp_file[\u0027filename\u0027])"},{"line_number":10388,"context_line":""},{"line_number":10389,"context_line":"    def test_check_instance_shared_storage_local_rbd(self):"},{"line_number":10390,"context_line":"        CONF.set_override(\u0027images_type\u0027, \u0027rbd\u0027, \u0027libvirt\u0027)"},{"line_number":10391,"context_line":"        driver \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":10392,"context_line":"        instance \u003d objects.Instance(id\u003d1, uuid\u003d\u0027fake-uuid\u0027)"},{"line_number":10393,"context_line":"        self.assertIsNone(driver."}],"source_content_type":"text/x-python","patch_set":10,"id":"baa201ad_44ad5c30","line":10390,"updated":"2014-10-17 12:23:33.000000000","message":"please use self.flags - self.flags(images_type\u003d\u0027rbd\u0027, group\u003d\u0027libvirt\u0027)","commit_id":"12c884e9c2d401fab0e7148762f1cb45f46fe174"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"97effc210eb06f366ef4c032e60b305fc0e88ed6","unresolved":false,"context_lines":[{"line_number":10387,"context_line":"        self.assertIsNotNone(temp_file[\u0027filename\u0027])"},{"line_number":10388,"context_line":""},{"line_number":10389,"context_line":"    def test_check_instance_shared_storage_local_rbd(self):"},{"line_number":10390,"context_line":"        CONF.set_override(\u0027images_type\u0027, \u0027rbd\u0027, \u0027libvirt\u0027)"},{"line_number":10391,"context_line":"        driver \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":10392,"context_line":"        instance \u003d objects.Instance(id\u003d1, uuid\u003d\u0027fake-uuid\u0027)"},{"line_number":10393,"context_line":"        self.assertIsNone(driver."}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa7fdbe_a787b50e","line":10390,"in_reply_to":"baa201ad_44ad5c30","updated":"2014-10-20 02:02:32.000000000","message":"Done","commit_id":"12c884e9c2d401fab0e7148762f1cb45f46fe174"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"581b841c31e4876f1e95b753b63798cc9d3a095b","unresolved":false,"context_lines":[{"line_number":10389,"context_line":"    def test_check_instance_shared_storage_local_rbd(self):"},{"line_number":10390,"context_line":"        CONF.set_override(\u0027images_type\u0027, \u0027rbd\u0027, \u0027libvirt\u0027)"},{"line_number":10391,"context_line":"        driver \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":10392,"context_line":"        instance \u003d objects.Instance(id\u003d1, uuid\u003d\u0027fake-uuid\u0027)"},{"line_number":10393,"context_line":"        self.assertIsNone(driver."},{"line_number":10394,"context_line":"                          check_instance_shared_storage_local(self.context,"},{"line_number":10395,"context_line":"                                                              instance))"}],"source_content_type":"text/x-python","patch_set":10,"id":"baa201ad_84a3c441","line":10392,"updated":"2014-10-17 12:23:33.000000000","message":"can you please use a reall uuid?","commit_id":"12c884e9c2d401fab0e7148762f1cb45f46fe174"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"97effc210eb06f366ef4c032e60b305fc0e88ed6","unresolved":false,"context_lines":[{"line_number":10389,"context_line":"    def test_check_instance_shared_storage_local_rbd(self):"},{"line_number":10390,"context_line":"        CONF.set_override(\u0027images_type\u0027, \u0027rbd\u0027, \u0027libvirt\u0027)"},{"line_number":10391,"context_line":"        driver \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":10392,"context_line":"        instance \u003d objects.Instance(id\u003d1, uuid\u003d\u0027fake-uuid\u0027)"},{"line_number":10393,"context_line":"        self.assertIsNone(driver."},{"line_number":10394,"context_line":"                          check_instance_shared_storage_local(self.context,"},{"line_number":10395,"context_line":"                                                              instance))"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa7fdbe_c77bd927","line":10392,"in_reply_to":"baa201ad_84a3c441","updated":"2014-10-20 02:02:32.000000000","message":"Done","commit_id":"12c884e9c2d401fab0e7148762f1cb45f46fe174"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8b181d263ec72615c18a3dd4461feb62b97ba862","unresolved":false,"context_lines":[{"line_number":10454,"context_line":"                                     \u0027/tmp/{0}/file\u0027.format(instance_uuid))"},{"line_number":10455,"context_line":"        mock_close.return_value \u003d None"},{"line_number":10456,"context_line":"        driver \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":10457,"context_line":"        instance \u003d objects.Instance(id\u003d1,"},{"line_number":10458,"context_line":"                                    uuid\u003dinstance_uuid)"},{"line_number":10459,"context_line":"        temp_file \u003d driver.check_instance_shared_storage_local(self.context,"},{"line_number":10460,"context_line":"                                                               instance)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_f01e3a0b","line":10457,"updated":"2014-10-24 14:44:23.000000000","message":"nit: just use fake_instance.fake_instance_obj and then you don\u0027t need to specify the id or uuid fields yourself.","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"0af1465eb7ca1ba2c15303481fc303e508b73421","unresolved":false,"context_lines":[{"line_number":10454,"context_line":"                                     \u0027/tmp/{0}/file\u0027.format(instance_uuid))"},{"line_number":10455,"context_line":"        mock_close.return_value \u003d None"},{"line_number":10456,"context_line":"        driver \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":10457,"context_line":"        instance \u003d objects.Instance(id\u003d1,"},{"line_number":10458,"context_line":"                                    uuid\u003dinstance_uuid)"},{"line_number":10459,"context_line":"        temp_file \u003d driver.check_instance_shared_storage_local(self.context,"},{"line_number":10460,"context_line":"                                                               instance)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_627c32b6","line":10457,"in_reply_to":"9aa7fdbe_f01e3a0b","updated":"2014-10-25 02:48:31.000000000","message":"Fixed in https://review.openstack.org/130905","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8b181d263ec72615c18a3dd4461feb62b97ba862","unresolved":false,"context_lines":[{"line_number":10464,"context_line":"    def test_check_instance_shared_storage_local_rbd(self):"},{"line_number":10465,"context_line":"        self.flags(images_type\u003d\u0027rbd\u0027, group\u003d\u0027libvirt\u0027)"},{"line_number":10466,"context_line":"        driver \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":10467,"context_line":"        instance \u003d objects.Instance(id\u003d1, uuid\u003dstr(uuid.uuid4()))"},{"line_number":10468,"context_line":"        self.assertIsNone(driver."},{"line_number":10469,"context_line":"                          check_instance_shared_storage_local(self.context,"},{"line_number":10470,"context_line":"                                                              instance))"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_1091fef0","line":10467,"updated":"2014-10-24 14:44:23.000000000","message":"Ditto, use fake_instance.fake_instance_obj.","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"0af1465eb7ca1ba2c15303481fc303e508b73421","unresolved":false,"context_lines":[{"line_number":10464,"context_line":"    def test_check_instance_shared_storage_local_rbd(self):"},{"line_number":10465,"context_line":"        self.flags(images_type\u003d\u0027rbd\u0027, group\u003d\u0027libvirt\u0027)"},{"line_number":10466,"context_line":"        driver \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":10467,"context_line":"        instance \u003d objects.Instance(id\u003d1, uuid\u003dstr(uuid.uuid4()))"},{"line_number":10468,"context_line":"        self.assertIsNone(driver."},{"line_number":10469,"context_line":"                          check_instance_shared_storage_local(self.context,"},{"line_number":10470,"context_line":"                                                              instance))"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_824cb69f","line":10467,"in_reply_to":"9aa7fdbe_1091fef0","updated":"2014-10-25 02:48:31.000000000","message":"Fixed in https://review.openstack.org/130905","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":6984,"name":"Sébastien Han","email":"seb@redhat.com","username":"leseb"},"change_message_id":"2a2090cdf31526dd2897d4b1f722f746f92e5056","unresolved":false,"context_lines":[{"line_number":6174,"context_line":"        instance_path \u003d libvirt_utils.get_instance_path(instance)"},{"line_number":6175,"context_line":"        LOG.debug(\u0027Checking instance files accessibility %s\u0027, instance_path)"},{"line_number":6176,"context_line":"        filesystem_shared \u003d os.access(instance_path, os.W_OK)"},{"line_number":6177,"context_line":"        # NOTE(flwang): For rbd case(not CephFS), the file system is not realy"},{"line_number":6178,"context_line":"        # shared by the two hosts, but the volume of the evacuated instance"},{"line_number":6179,"context_line":"        # is reachable."},{"line_number":6180,"context_line":"        rbd_based \u003d self.image_backend.backend().is_shared_block_storage()"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_352bfd82","line":6177,"updated":"2014-09-16 08:06:32.000000000","message":"s/realy/really/","commit_id":"0acecbc649982cd4458fa8a9bf2aee8de06f6fe0"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"99f5c217d03ba425b59962889e3ff451d1073418","unresolved":false,"context_lines":[{"line_number":6174,"context_line":"        instance_path \u003d libvirt_utils.get_instance_path(instance)"},{"line_number":6175,"context_line":"        LOG.debug(\u0027Checking instance files accessibility %s\u0027, instance_path)"},{"line_number":6176,"context_line":"        filesystem_shared \u003d os.access(instance_path, os.W_OK)"},{"line_number":6177,"context_line":"        # NOTE(flwang): For rbd case(not CephFS), the file system is not realy"},{"line_number":6178,"context_line":"        # shared by the two hosts, but the volume of the evacuated instance"},{"line_number":6179,"context_line":"        # is reachable."},{"line_number":6180,"context_line":"        rbd_based \u003d self.image_backend.backend().is_shared_block_storage()"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_d090ffee","line":6177,"in_reply_to":"fa98f980_352bfd82","updated":"2014-09-16 09:22:50.000000000","message":"Done","commit_id":"0acecbc649982cd4458fa8a9bf2aee8de06f6fe0"},{"author":{"_account_id":6984,"name":"Sébastien Han","email":"seb@redhat.com","username":"leseb"},"change_message_id":"2a2090cdf31526dd2897d4b1f722f746f92e5056","unresolved":false,"context_lines":[{"line_number":6175,"context_line":"        LOG.debug(\u0027Checking instance files accessibility %s\u0027, instance_path)"},{"line_number":6176,"context_line":"        filesystem_shared \u003d os.access(instance_path, os.W_OK)"},{"line_number":6177,"context_line":"        # NOTE(flwang): For rbd case(not CephFS), the file system is not realy"},{"line_number":6178,"context_line":"        # shared by the two hosts, but the volume of the evacuated instance"},{"line_number":6179,"context_line":"        # is reachable."},{"line_number":6180,"context_line":"        rbd_based \u003d self.image_backend.backend().is_shared_block_storage()"},{"line_number":6181,"context_line":"        return filesystem_shared or rbd_based"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_b5360de5","line":6178,"updated":"2014-09-16 08:06:32.000000000","message":"\"between the two hosts\" maybe?","commit_id":"0acecbc649982cd4458fa8a9bf2aee8de06f6fe0"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"99f5c217d03ba425b59962889e3ff451d1073418","unresolved":false,"context_lines":[{"line_number":6175,"context_line":"        LOG.debug(\u0027Checking instance files accessibility %s\u0027, instance_path)"},{"line_number":6176,"context_line":"        filesystem_shared \u003d os.access(instance_path, os.W_OK)"},{"line_number":6177,"context_line":"        # NOTE(flwang): For rbd case(not CephFS), the file system is not realy"},{"line_number":6178,"context_line":"        # shared by the two hosts, but the volume of the evacuated instance"},{"line_number":6179,"context_line":"        # is reachable."},{"line_number":6180,"context_line":"        rbd_based \u003d self.image_backend.backend().is_shared_block_storage()"},{"line_number":6181,"context_line":"        return filesystem_shared or rbd_based"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_30c14be4","line":6178,"in_reply_to":"fa98f980_b5360de5","updated":"2014-09-16 09:22:50.000000000","message":"Done","commit_id":"0acecbc649982cd4458fa8a9bf2aee8de06f6fe0"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"650d373ab69d268b1a0bfdd79d0bb0c0d9d544e9","unresolved":false,"context_lines":[{"line_number":6174,"context_line":"        instance_path \u003d libvirt_utils.get_instance_path(instance)"},{"line_number":6175,"context_line":"        LOG.debug(\u0027Checking instance files accessibility %s\u0027, instance_path)"},{"line_number":6176,"context_line":"        filesystem_shared \u003d os.access(instance_path, os.W_OK)"},{"line_number":6177,"context_line":"        # NOTE(flwang): For rbd case, the file system is not realy shared by"},{"line_number":6178,"context_line":"        # the two hosts, but the volume of evacuated instance is reachable."},{"line_number":6179,"context_line":"        rbd_based \u003d self.image_backend.backend().is_shared_block_storage()"},{"line_number":6180,"context_line":"        return filesystem_shared or rbd_based"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_227ef36b","line":6177,"updated":"2014-09-24 19:40:52.000000000","message":"typo: really","commit_id":"0a120667c82fb9289a0a0ba6d897a91f1a637c46"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"ba2cf35b6057a57be1c24c669a44083236d5baea","unresolved":false,"context_lines":[{"line_number":6174,"context_line":"        instance_path \u003d libvirt_utils.get_instance_path(instance)"},{"line_number":6175,"context_line":"        LOG.debug(\u0027Checking instance files accessibility %s\u0027, instance_path)"},{"line_number":6176,"context_line":"        filesystem_shared \u003d os.access(instance_path, os.W_OK)"},{"line_number":6177,"context_line":"        # NOTE(flwang): For rbd case, the file system is not realy shared by"},{"line_number":6178,"context_line":"        # the two hosts, but the volume of evacuated instance is reachable."},{"line_number":6179,"context_line":"        rbd_based \u003d self.image_backend.backend().is_shared_block_storage()"},{"line_number":6180,"context_line":"        return filesystem_shared or rbd_based"}],"source_content_type":"text/x-python","patch_set":4,"id":"da9df570_f58739d5","line":6177,"in_reply_to":"da9df570_227ef36b","updated":"2014-09-25 03:59:10.000000000","message":"Done","commit_id":"0a120667c82fb9289a0a0ba6d897a91f1a637c46"},{"author":{"_account_id":8787,"name":"Dmitry Borodaenko","email":"angdraug@gmail.com","username":"angdraug"},"change_message_id":"33c9e76383d3467da7b24bc384a99348325e641b","unresolved":false,"context_lines":[{"line_number":6182,"context_line":"        # NOTE(flwang): For rbd case, the file system is not really shared by"},{"line_number":6183,"context_line":"        # the two hosts, but the volume of evacuated instance is reachable."},{"line_number":6184,"context_line":"        rbd_based \u003d self.image_backend.backend().is_shared_block_storage()"},{"line_number":6185,"context_line":"        return filesystem_shared or rbd_based"},{"line_number":6186,"context_line":""},{"line_number":6187,"context_line":"    def inject_network_info(self, instance, nw_info):"},{"line_number":6188,"context_line":"        self.firewall_driver.setup_basic_filtering(instance, nw_info)"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_92d806f1","line":6185,"updated":"2014-09-30 18:11:46.000000000","message":"Cosmetic: it would be nice to stay consistent with the terminology used in the live migrations code path and call these shared_instance_path and shared_block_storage.","commit_id":"762eda4b50d3bce26ade6d494bbedb6f19e50b93"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc9025aee208208c3a7e314d37bf09d453b656ef","unresolved":false,"context_lines":[{"line_number":4934,"context_line":"        return stats"},{"line_number":4935,"context_line":""},{"line_number":4936,"context_line":"    def check_instance_shared_storage_local(self, context, instance):"},{"line_number":4937,"context_line":"        # NOTE(flwang): If it\u0027s shared block storage, then we should avoid"},{"line_number":4938,"context_line":"        # using the temp file to detect further."},{"line_number":4939,"context_line":"        if self.image_backend.backend().is_shared_block_storage():"},{"line_number":4940,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_bc025f6d","line":4937,"updated":"2014-10-10 03:11:13.000000000","message":"This is to avoid the rpc call in the compute manager I\u0027m guessing?  This flow is a bit new to me so trying to figure out how it\u0027s all tied together.","commit_id":"57b72d3580724047f4cd8fc17a64380115477ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b54c1be79cef0abc4e6431d68ab906d1e34434c3","unresolved":false,"context_lines":[{"line_number":4934,"context_line":"        return stats"},{"line_number":4935,"context_line":""},{"line_number":4936,"context_line":"    def check_instance_shared_storage_local(self, context, instance):"},{"line_number":4937,"context_line":"        # NOTE(flwang): If it\u0027s shared block storage, then we should avoid"},{"line_number":4938,"context_line":"        # using the temp file to detect further."},{"line_number":4939,"context_line":"        if self.image_backend.backend().is_shared_block_storage():"},{"line_number":4940,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa7fdbe_552d38fd","line":4937,"in_reply_to":"baa201ad_2a133767","updated":"2014-10-24 13:52:09.000000000","message":"Of the two bugs in the commit message then, which is this fixing? It seems like this could be a separate change.","commit_id":"57b72d3580724047f4cd8fc17a64380115477ba8"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"1a1013aea41a6743fbb60dbb4d68c012e4a94d28","unresolved":false,"context_lines":[{"line_number":4934,"context_line":"        return stats"},{"line_number":4935,"context_line":""},{"line_number":4936,"context_line":"    def check_instance_shared_storage_local(self, context, instance):"},{"line_number":4937,"context_line":"        # NOTE(flwang): If it\u0027s shared block storage, then we should avoid"},{"line_number":4938,"context_line":"        # using the temp file to detect further."},{"line_number":4939,"context_line":"        if self.image_backend.backend().is_shared_block_storage():"},{"line_number":4940,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_2a133767","line":4937,"in_reply_to":"baa201ad_bc025f6d","updated":"2014-10-14 02:08:44.000000000","message":"Good question.\n\nKind of. After the instances were evacuated on another host successfully, admin may want to get the failed host back. And when the nova compute service starting, it will call init_host() and then call method _destroy_evacuated_instances(). In method _destroy_evacuated_instances(), nova will check again if the storage is shared or not to decide if the storage should be destroyed. For now, Nova will get a wrong info said it\u0027s not, so Nova will run into a failure to fail to delete the block storage, since it\u0027s used by the new instance.\n\nI will reword the comment and highlight this in commit message as well.","commit_id":"57b72d3580724047f4cd8fc17a64380115477ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc9025aee208208c3a7e314d37bf09d453b656ef","unresolved":false,"context_lines":[{"line_number":4936,"context_line":"    def check_instance_shared_storage_local(self, context, instance):"},{"line_number":4937,"context_line":"        # NOTE(flwang): If it\u0027s shared block storage, then we should avoid"},{"line_number":4938,"context_line":"        # using the temp file to detect further."},{"line_number":4939,"context_line":"        if self.image_backend.backend().is_shared_block_storage():"},{"line_number":4940,"context_line":"            return None"},{"line_number":4941,"context_line":""},{"line_number":4942,"context_line":"        dirpath \u003d libvirt_utils.get_instance_path(instance)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_9caf5b7d","line":4939,"updated":"2014-10-10 03:11:13.000000000","message":"nit: would be nice to have a delegation method in image_backend for calling is_shared_block_storage() so we don\u0027t have to call into the backend() method to figure that out.","commit_id":"57b72d3580724047f4cd8fc17a64380115477ba8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b54c1be79cef0abc4e6431d68ab906d1e34434c3","unresolved":false,"context_lines":[{"line_number":4936,"context_line":"    def check_instance_shared_storage_local(self, context, instance):"},{"line_number":4937,"context_line":"        # NOTE(flwang): If it\u0027s shared block storage, then we should avoid"},{"line_number":4938,"context_line":"        # using the temp file to detect further."},{"line_number":4939,"context_line":"        if self.image_backend.backend().is_shared_block_storage():"},{"line_number":4940,"context_line":"            return None"},{"line_number":4941,"context_line":""},{"line_number":4942,"context_line":"        dirpath \u003d libvirt_utils.get_instance_path(instance)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa7fdbe_d5d208ff","line":4939,"in_reply_to":"baa201ad_0d784d8e","updated":"2014-10-24 13:52:09.000000000","message":"That\u0027s fine with me.","commit_id":"57b72d3580724047f4cd8fc17a64380115477ba8"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"1a1013aea41a6743fbb60dbb4d68c012e4a94d28","unresolved":false,"context_lines":[{"line_number":4936,"context_line":"    def check_instance_shared_storage_local(self, context, instance):"},{"line_number":4937,"context_line":"        # NOTE(flwang): If it\u0027s shared block storage, then we should avoid"},{"line_number":4938,"context_line":"        # using the temp file to detect further."},{"line_number":4939,"context_line":"        if self.image_backend.backend().is_shared_block_storage():"},{"line_number":4940,"context_line":"            return None"},{"line_number":4941,"context_line":""},{"line_number":4942,"context_line":"        dirpath \u003d libvirt_utils.get_instance_path(instance)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_0d784d8e","line":4939,"in_reply_to":"baa201ad_9caf5b7d","updated":"2014-10-14 02:08:44.000000000","message":"Sounds good. But I prefer don\u0027t involving the change in this patch.","commit_id":"57b72d3580724047f4cd8fc17a64380115477ba8"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"581b841c31e4876f1e95b753b63798cc9d3a095b","unresolved":false,"context_lines":[{"line_number":4928,"context_line":"        # decision, see the method _is_instance_storage_shared of manager.py"},{"line_number":4929,"context_line":"        # under \u003cnova\u003e/compute."},{"line_number":4930,"context_line":"        if self.image_backend.backend().is_shared_block_storage():"},{"line_number":4931,"context_line":"            return None"},{"line_number":4932,"context_line":""},{"line_number":4933,"context_line":"        dirpath \u003d libvirt_utils.get_instance_path(instance)"},{"line_number":4934,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"baa201ad_247938c8","line":4931,"updated":"2014-10-17 12:23:33.000000000","message":"you do not need the return None. if you do return None is returned by default","commit_id":"12c884e9c2d401fab0e7148762f1cb45f46fe174"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"97effc210eb06f366ef4c032e60b305fc0e88ed6","unresolved":false,"context_lines":[{"line_number":4928,"context_line":"        # decision, see the method _is_instance_storage_shared of manager.py"},{"line_number":4929,"context_line":"        # under \u003cnova\u003e/compute."},{"line_number":4930,"context_line":"        if self.image_backend.backend().is_shared_block_storage():"},{"line_number":4931,"context_line":"            return None"},{"line_number":4932,"context_line":""},{"line_number":4933,"context_line":"        dirpath \u003d libvirt_utils.get_instance_path(instance)"},{"line_number":4934,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa7fdbe_478fe923","line":4931,"in_reply_to":"baa201ad_247938c8","updated":"2014-10-20 02:02:32.000000000","message":"Done","commit_id":"12c884e9c2d401fab0e7148762f1cb45f46fe174"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8b181d263ec72615c18a3dd4461feb62b97ba862","unresolved":false,"context_lines":[{"line_number":4952,"context_line":""},{"line_number":4953,"context_line":"    def check_instance_shared_storage_local(self, context, instance):"},{"line_number":4954,"context_line":"        # NOTE(flwang): For shared block storage scenario, we should"},{"line_number":4955,"context_line":"        # avoid using the temp file to check. Otherwise Nova will make wrong"},{"line_number":4956,"context_line":"        # decision, see the method _is_instance_storage_shared of manager.py"},{"line_number":4957,"context_line":"        # under \u003cnova\u003e/compute."},{"line_number":4958,"context_line":"        if self.image_backend.backend().is_shared_block_storage():"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_d014d645","line":4955,"updated":"2014-10-24 14:44:23.000000000","message":"Wrong decision in that w/o this, _destroy_evacuated_instances in the compute manager will set destroy_disks to True when driver.destroy is called and then your shared storage is wiped out.","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"0af1465eb7ca1ba2c15303481fc303e508b73421","unresolved":false,"context_lines":[{"line_number":4952,"context_line":""},{"line_number":4953,"context_line":"    def check_instance_shared_storage_local(self, context, instance):"},{"line_number":4954,"context_line":"        # NOTE(flwang): For shared block storage scenario, we should"},{"line_number":4955,"context_line":"        # avoid using the temp file to check. Otherwise Nova will make wrong"},{"line_number":4956,"context_line":"        # decision, see the method _is_instance_storage_shared of manager.py"},{"line_number":4957,"context_line":"        # under \u003cnova\u003e/compute."},{"line_number":4958,"context_line":"        if self.image_backend.backend().is_shared_block_storage():"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_a251ba37","line":4955,"in_reply_to":"9aa7fdbe_d014d645","updated":"2014-10-25 02:48:31.000000000","message":"Done","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8b181d263ec72615c18a3dd4461feb62b97ba862","unresolved":false,"context_lines":[{"line_number":4953,"context_line":"    def check_instance_shared_storage_local(self, context, instance):"},{"line_number":4954,"context_line":"        # NOTE(flwang): For shared block storage scenario, we should"},{"line_number":4955,"context_line":"        # avoid using the temp file to check. Otherwise Nova will make wrong"},{"line_number":4956,"context_line":"        # decision, see the method _is_instance_storage_shared of manager.py"},{"line_number":4957,"context_line":"        # under \u003cnova\u003e/compute."},{"line_number":4958,"context_line":"        if self.image_backend.backend().is_shared_block_storage():"},{"line_number":4959,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_b023d2a5","line":4956,"updated":"2014-10-24 14:44:23.000000000","message":"I\u0027d probably reword the last part as:\n\n\"see methods _destroy_evacuated_instances and _is_instance_storage_shared in nova.compute.manager.\"","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"0af1465eb7ca1ba2c15303481fc303e508b73421","unresolved":false,"context_lines":[{"line_number":4953,"context_line":"    def check_instance_shared_storage_local(self, context, instance):"},{"line_number":4954,"context_line":"        # NOTE(flwang): For shared block storage scenario, we should"},{"line_number":4955,"context_line":"        # avoid using the temp file to check. Otherwise Nova will make wrong"},{"line_number":4956,"context_line":"        # decision, see the method _is_instance_storage_shared of manager.py"},{"line_number":4957,"context_line":"        # under \u003cnova\u003e/compute."},{"line_number":4958,"context_line":"        if self.image_backend.backend().is_shared_block_storage():"},{"line_number":4959,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_c2423e67","line":4956,"in_reply_to":"9aa7fdbe_b023d2a5","updated":"2014-10-25 02:48:31.000000000","message":"Done","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8b181d263ec72615c18a3dd4461feb62b97ba862","unresolved":false,"context_lines":[{"line_number":4955,"context_line":"        # avoid using the temp file to check. Otherwise Nova will make wrong"},{"line_number":4956,"context_line":"        # decision, see the method _is_instance_storage_shared of manager.py"},{"line_number":4957,"context_line":"        # under \u003cnova\u003e/compute."},{"line_number":4958,"context_line":"        if self.image_backend.backend().is_shared_block_storage():"},{"line_number":4959,"context_line":"            return"},{"line_number":4960,"context_line":""},{"line_number":4961,"context_line":"        dirpath \u003d libvirt_utils.get_instance_path(instance)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_1049fe5f","line":4958,"updated":"2014-10-24 14:44:23.000000000","message":"I still feel like this is a separate change...isn\u0027t this for one of the bugs specifically, for the _destroy_evacuated_instances case?  Can\u0027t we fix this independently of the rebuild_instance bug where recreate wasn\u0027t being passed to the default impl?","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"0af1465eb7ca1ba2c15303481fc303e508b73421","unresolved":false,"context_lines":[{"line_number":4955,"context_line":"        # avoid using the temp file to check. Otherwise Nova will make wrong"},{"line_number":4956,"context_line":"        # decision, see the method _is_instance_storage_shared of manager.py"},{"line_number":4957,"context_line":"        # under \u003cnova\u003e/compute."},{"line_number":4958,"context_line":"        if self.image_backend.backend().is_shared_block_storage():"},{"line_number":4959,"context_line":"            return"},{"line_number":4960,"context_line":""},{"line_number":4961,"context_line":"        dirpath \u003d libvirt_utils.get_instance_path(instance)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_e2474275","line":4958,"in_reply_to":"9aa7fdbe_1049fe5f","updated":"2014-10-25 02:48:31.000000000","message":"Done, see https://review.openstack.org/130905","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8b181d263ec72615c18a3dd4461feb62b97ba862","unresolved":false,"context_lines":[{"line_number":6245,"context_line":"        instance_path \u003d libvirt_utils.get_instance_path(instance)"},{"line_number":6246,"context_line":"        LOG.debug(\u0027Checking instance files accessibility %s\u0027, instance_path)"},{"line_number":6247,"context_line":"        shared_instance_path \u003d os.access(instance_path, os.W_OK)"},{"line_number":6248,"context_line":"        # NOTE(flwang): For rbd case, the file system is not really shared by"},{"line_number":6249,"context_line":"        # the two hosts, but the volume of evacuated instance is reachable."},{"line_number":6250,"context_line":"        shared_block_storage \u003d (self.image_backend.backend()."},{"line_number":6251,"context_line":"                                is_shared_block_storage())"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_f070fa73","line":6248,"updated":"2014-10-24 14:44:23.000000000","message":"nit: we don\u0027t really need to say \u0027for the rbd case\u0027, it\u0027s really any case where the image backend returns True for is_shared_block_storage - it just so happens that the Rbd image backend is currently the only one that does that.  But saying \u0027for the rbd case\u0027, it sounds like there should be a check for the type here or something, which there isn\u0027t (and doesn\u0027t need to be).","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"0af1465eb7ca1ba2c15303481fc303e508b73421","unresolved":false,"context_lines":[{"line_number":6245,"context_line":"        instance_path \u003d libvirt_utils.get_instance_path(instance)"},{"line_number":6246,"context_line":"        LOG.debug(\u0027Checking instance files accessibility %s\u0027, instance_path)"},{"line_number":6247,"context_line":"        shared_instance_path \u003d os.access(instance_path, os.W_OK)"},{"line_number":6248,"context_line":"        # NOTE(flwang): For rbd case, the file system is not really shared by"},{"line_number":6249,"context_line":"        # the two hosts, but the volume of evacuated instance is reachable."},{"line_number":6250,"context_line":"        shared_block_storage \u003d (self.image_backend.backend()."},{"line_number":6251,"context_line":"                                is_shared_block_storage())"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aa7fdbe_0260c6ff","line":6248,"in_reply_to":"9aa7fdbe_f070fa73","updated":"2014-10-25 02:48:31.000000000","message":"Done","commit_id":"e96d798393089674bb9d78d7099341b135eac98e"}]}
