)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"415fc7fed0b4d340bb74c4d5d225a014e31d4385","unresolved":false,"context_lines":[{"line_number":4608,"context_line":"                rt.reportclient.delete_allocation_for_instance(instance.uuid)"},{"line_number":4609,"context_line":"                # FIXME: Umm, shouldn\u0027t we be rolling back port bindings too?"},{"line_number":4610,"context_line":"                self._terminate_volume_connections(context, instance, bdms)"},{"line_number":4611,"context_line":"                self._nil_out_instance_obj_host_and_node(instance)"},{"line_number":4612,"context_line":""},{"line_number":4613,"context_line":"        if image:"},{"line_number":4614,"context_line":"            instance.image_ref \u003d shelved_image_ref"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_bc31f95b","line":4611,"range":{"start_line":4611,"start_character":16,"end_line":4611,"end_character":66},"updated":"2017-10-07 15:51:26.000000000","message":"This doesn\u0027t update the instance in the database, only nulls out the fields, so you\u0027ll still have to call this:\n\ninstance.save(expected_task_state\u003dtask_states.SPAWNING)","commit_id":"69db9663c65dc4be9f74f78bf9e24d1f84640bda"},{"author":{"_account_id":20354,"name":"Shoham Peller","email":"shohamp@gmail.com","username":"shoham.peller"},"change_message_id":"cf2f3d552909a1c9477b79359aca218919084dcf","unresolved":false,"context_lines":[{"line_number":4608,"context_line":"                rt.reportclient.delete_allocation_for_instance(instance.uuid)"},{"line_number":4609,"context_line":"                # FIXME: Umm, shouldn\u0027t we be rolling back port bindings too?"},{"line_number":4610,"context_line":"                self._terminate_volume_connections(context, instance, bdms)"},{"line_number":4611,"context_line":"                self._nil_out_instance_obj_host_and_node(instance)"},{"line_number":4612,"context_line":""},{"line_number":4613,"context_line":"        if image:"},{"line_number":4614,"context_line":"            instance.image_ref \u003d shelved_image_ref"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4b6375_3277c93d","line":4611,"range":{"start_line":4611,"start_character":16,"end_line":4611,"end_character":66},"in_reply_to":"7f515b1d_bc31f95b","updated":"2017-10-19 10:42:12.000000000","message":"Done","commit_id":"69db9663c65dc4be9f74f78bf9e24d1f84640bda"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2879836f96cfda9eff8edc25e7799d30c28f94dc","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                instance \u003d keyed_args[\u0027instance\u0027]"},{"line_number":169,"context_line":"                original_task_state \u003d instance.task_state"},{"line_number":170,"context_line":"                try:"},{"line_number":171,"context_line":"                    self._instance_update(context, instance, task_state\u003dNone)"},{"line_number":172,"context_line":"                    LOG.info(\"Successfully reverted task state from %s on \""},{"line_number":173,"context_line":"                             \"failure for instance.\","},{"line_number":174,"context_line":"                             original_task_state, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_b993a500","line":171,"updated":"2017-11-30 21:19:27.000000000","message":"This will save the updates.","commit_id":"768d6fd038b26b3aeee752c2b15919f783416a57"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2879836f96cfda9eff8edc25e7799d30c28f94dc","unresolved":false,"context_lines":[{"line_number":559,"context_line":""},{"line_number":560,"context_line":"        for k, v in kwargs.items():"},{"line_number":561,"context_line":"            setattr(instance, k, v)"},{"line_number":562,"context_line":"        instance.save()"},{"line_number":563,"context_line":"        self._update_resource_tracker(context, instance)"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"    def _nil_out_instance_obj_host_and_node(self, instance):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_799d1d09","line":562,"updated":"2017-11-30 21:19:27.000000000","message":"Here.","commit_id":"768d6fd038b26b3aeee752c2b15919f783416a57"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2879836f96cfda9eff8edc25e7799d30c28f94dc","unresolved":false,"context_lines":[{"line_number":4519,"context_line":"                phase\u003dfields.NotificationPhase.END)"},{"line_number":4520,"context_line":""},{"line_number":4521,"context_line":"    @wrap_exception()"},{"line_number":4522,"context_line":"    @reverts_task_state"},{"line_number":4523,"context_line":"    @wrap_instance_event(prefix\u003d\u0027compute\u0027)"},{"line_number":4524,"context_line":"    @wrap_instance_fault"},{"line_number":4525,"context_line":"    def unshelve_instance(self, context, instance, image,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_59d619c6","line":4522,"range":{"start_line":4522,"start_character":5,"end_line":4522,"end_character":23},"updated":"2017-11-30 21:19:27.000000000","message":"Actually this will save the instance state, so I guess we don\u0027t need to explicitly save the host/node change before re-raising the error.","commit_id":"768d6fd038b26b3aeee752c2b15919f783416a57"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"08894aa2ac886426f2d5cb9971b908e3e348100a","unresolved":false,"context_lines":[{"line_number":4606,"context_line":"                # or if we did claim but the spawn failed, because aborting the"},{"line_number":4607,"context_line":"                # instance claim will not remove the allocations."},{"line_number":4608,"context_line":"                rt.reportclient.delete_allocation_for_instance(instance.uuid)"},{"line_number":4609,"context_line":"                # FIXME: Umm, shouldn\u0027t we be rolling back port bindings too?"},{"line_number":4610,"context_line":"                self._terminate_volume_connections(context, instance, bdms)"},{"line_number":4611,"context_line":"                self._nil_out_instance_obj_host_and_node(instance)"},{"line_number":4612,"context_line":"                instance.save(expected_task_state\u003dtask_states.SPAWNING)"},{"line_number":4613,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_b9772509","line":4610,"range":{"start_line":4609,"start_character":16,"end_line":4610,"end_character":75},"updated":"2017-11-30 21:14:31.000000000","message":"This is an unrelated change. Rebase error?","commit_id":"768d6fd038b26b3aeee752c2b15919f783416a57"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2879836f96cfda9eff8edc25e7799d30c28f94dc","unresolved":false,"context_lines":[{"line_number":4606,"context_line":"                # or if we did claim but the spawn failed, because aborting the"},{"line_number":4607,"context_line":"                # instance claim will not remove the allocations."},{"line_number":4608,"context_line":"                rt.reportclient.delete_allocation_for_instance(instance.uuid)"},{"line_number":4609,"context_line":"                # FIXME: Umm, shouldn\u0027t we be rolling back port bindings too?"},{"line_number":4610,"context_line":"                self._terminate_volume_connections(context, instance, bdms)"},{"line_number":4611,"context_line":"                self._nil_out_instance_obj_host_and_node(instance)"},{"line_number":4612,"context_line":"                instance.save(expected_task_state\u003dtask_states.SPAWNING)"},{"line_number":4613,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_f94dadc4","line":4610,"range":{"start_line":4609,"start_character":16,"end_line":4610,"end_character":75},"in_reply_to":"ff82abbf_b9772509","updated":"2017-11-30 21:19:27.000000000","message":"Nevermind, I was thinking of something else.","commit_id":"768d6fd038b26b3aeee752c2b15919f783416a57"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"9011bad0c5765ddd2c7072c508111bc3a9a64f04","unresolved":false,"context_lines":[{"line_number":4608,"context_line":"                rt.reportclient.delete_allocation_for_instance(instance.uuid)"},{"line_number":4609,"context_line":"                # FIXME: Umm, shouldn\u0027t we be rolling back port bindings too?"},{"line_number":4610,"context_line":"                self._terminate_volume_connections(context, instance, bdms)"},{"line_number":4611,"context_line":"                self._nil_out_instance_obj_host_and_node(instance)"},{"line_number":4612,"context_line":"                instance.save(expected_task_state\u003dtask_states.SPAWNING)"},{"line_number":4613,"context_line":""},{"line_number":4614,"context_line":"        if image:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_fb6afaea","line":4611,"range":{"start_line":4611,"start_character":15,"end_line":4611,"end_character":66},"updated":"2017-11-27 03:34:09.000000000","message":"not sure this is correct...\nunshelve failed lead to the instance\u0027s host to be none?","commit_id":"768d6fd038b26b3aeee752c2b15919f783416a57"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"08894aa2ac886426f2d5cb9971b908e3e348100a","unresolved":false,"context_lines":[{"line_number":4608,"context_line":"                rt.reportclient.delete_allocation_for_instance(instance.uuid)"},{"line_number":4609,"context_line":"                # FIXME: Umm, shouldn\u0027t we be rolling back port bindings too?"},{"line_number":4610,"context_line":"                self._terminate_volume_connections(context, instance, bdms)"},{"line_number":4611,"context_line":"                self._nil_out_instance_obj_host_and_node(instance)"},{"line_number":4612,"context_line":"                instance.save(expected_task_state\u003dtask_states.SPAWNING)"},{"line_number":4613,"context_line":""},{"line_number":4614,"context_line":"        if image:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_991101b0","line":4611,"range":{"start_line":4611,"start_character":15,"end_line":4611,"end_character":66},"in_reply_to":"ff82abbf_fb6afaea","updated":"2017-11-30 21:14:31.000000000","message":"No, the bug is that the host/node aren\u0027t unset on failure.\n\nThe instance_claim call sets the host/node on the instance:\n\nhttps://github.com/openstack/nova/blob/100a194ab1ae00cdf0883b1e699a38a626dca549/nova/compute/resource_tracker.py#L222\n\nBut if we fail to spawn() then we shouldn\u0027t say that the instance is on this host/node, so this code is undoing that.","commit_id":"768d6fd038b26b3aeee752c2b15919f783416a57"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"4d2ac1aa78359a6b9016e6d645d5745756252896","unresolved":false,"context_lines":[{"line_number":4789,"context_line":"                # or if we did claim but the spawn failed, because aborting the"},{"line_number":4790,"context_line":"                # instance claim will not remove the allocations."},{"line_number":4791,"context_line":"                rt.reportclient.delete_allocation_for_instance(instance.uuid)"},{"line_number":4792,"context_line":"                # FIXME: Umm, shouldn\u0027t we be rolling back port bindings too?"},{"line_number":4793,"context_line":"                self._terminate_volume_connections(context, instance, bdms)"},{"line_number":4794,"context_line":"                # The reverts_task_state decorator on unshelve_instance will"},{"line_number":4795,"context_line":"                # eventually save these updates."}],"source_content_type":"text/x-python","patch_set":4,"id":"df87a7cf_ff2bd2e7","line":4792,"range":{"start_line":4792,"start_character":30,"end_line":4792,"end_character":76},"updated":"2017-12-18 18:14:36.000000000","message":"Curious: why aren\u0027t you fixing this issue, too?","commit_id":"487a7a78f1116b938b347abb85a6fd28264e3872"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c25b507eb6a7e99052b6798e5a1e3f6e66ff2e08","unresolved":false,"context_lines":[{"line_number":4935,"context_line":"                # instance claim will not remove the allocations."},{"line_number":4936,"context_line":"                rt.reportclient.delete_allocation_for_instance(context,"},{"line_number":4937,"context_line":"                                                               instance.uuid)"},{"line_number":4938,"context_line":"                # FIXME: Umm, shouldn\u0027t we be rolling back port bindings too?"},{"line_number":4939,"context_line":"                self._terminate_volume_connections(context, instance, bdms)"},{"line_number":4940,"context_line":"                # The reverts_task_state decorator on unshelve_instance will"},{"line_number":4941,"context_line":"                # eventually save these updates."}],"source_content_type":"text/x-python","patch_set":8,"id":"3fa0c359_1cde9fd9","line":4938,"range":{"start_line":4938,"start_character":16,"end_line":4938,"end_character":77},"updated":"2018-02-22 14:16:58.000000000","message":"maybe. maybe not, actually... I\u0027m trying to think of whether the port binding affects whether an IP address continues to be bound to an instance. If it does, then we definitely don\u0027t want to release the port binding information since, well, as we all know, unshelve is all about the \"this is my pet and I want to keep its IP address and not pay for it!\" use case.","commit_id":"dcdd2c9832c7c60fe9163cd744ca2b5acfe16bcc"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e775169bb59134dd630c9ea69fdf21a321a4f839","unresolved":false,"context_lines":[{"line_number":4935,"context_line":"                # instance claim will not remove the allocations."},{"line_number":4936,"context_line":"                rt.reportclient.delete_allocation_for_instance(context,"},{"line_number":4937,"context_line":"                                                               instance.uuid)"},{"line_number":4938,"context_line":"                # FIXME: Umm, shouldn\u0027t we be rolling back port bindings too?"},{"line_number":4939,"context_line":"                self._terminate_volume_connections(context, instance, bdms)"},{"line_number":4940,"context_line":"                # The reverts_task_state decorator on unshelve_instance will"},{"line_number":4941,"context_line":"                # eventually save these updates."}],"source_content_type":"text/x-python","patch_set":8,"id":"1f9dbf25_270f752f","line":4938,"range":{"start_line":4938,"start_character":16,"end_line":4938,"end_character":77},"in_reply_to":"3fa0c359_1cde9fd9","updated":"2018-02-27 16:24:51.000000000","message":"I think you\u0027re right that we wouldn\u0027t want to release the port binding but FWIW it doesn\u0027t look like it\u0027s even possible through our APIs. That is, in neutronv2/api.py cleanup_instance_network_on_host is a no-op/pass. It appears that they only way we ever release a port binding is by deleting the port altogether (via deallocate_for_instance).","commit_id":"dcdd2c9832c7c60fe9163cd744ca2b5acfe16bcc"}],"nova/tests/unit/compute/test_shelve.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fae72bfd087005f97663e6d2cde713bc68fad357","unresolved":false,"context_lines":[{"line_number":475,"context_line":"            mock_notify_instance_usage, mock_prep_block_device, mock_spawn,"},{"line_number":476,"context_line":"            mock_setup_network, mock_instance_claim,"},{"line_number":477,"context_line":"            mock_notify_instance_action, mock_get_bdms):"},{"line_number":478,"context_line":"        \"\"\"Tests error handling when a volume-backed instance fails to unshelve"},{"line_number":479,"context_line":"        and makes sure that volume connections are cleaned up from the host"},{"line_number":480,"context_line":"        and that the host/node values are unset on the instance."},{"line_number":481,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa0c359_99b2da48","line":478,"range":{"start_line":478,"start_character":39,"end_line":478,"end_character":61},"updated":"2018-02-21 16:02:15.000000000","message":"I don\u0027t actually see anything in this test that indicates the instance is volume-backed... and frankly, I\u0027m not entirely sure why an instance being a boot-from-volume instance would make any difference to how things run...","commit_id":"2d162c1d7160628a3ecd78bb5d5470027168bee3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2ad302967e8fd84ccb0b678500e5f70b5b00be58","unresolved":false,"context_lines":[{"line_number":475,"context_line":"            mock_notify_instance_usage, mock_prep_block_device, mock_spawn,"},{"line_number":476,"context_line":"            mock_setup_network, mock_instance_claim,"},{"line_number":477,"context_line":"            mock_notify_instance_action, mock_get_bdms):"},{"line_number":478,"context_line":"        \"\"\"Tests error handling when a volume-backed instance fails to unshelve"},{"line_number":479,"context_line":"        and makes sure that volume connections are cleaned up from the host"},{"line_number":480,"context_line":"        and that the host/node values are unset on the instance."},{"line_number":481,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa0c359_1f01c338","line":478,"range":{"start_line":478,"start_character":39,"end_line":478,"end_character":61},"in_reply_to":"3fa0c359_99b2da48","updated":"2018-02-21 23:00:57.000000000","message":"True, it\u0027s not volume-backed, it just mocks out a bdm list such that the server has volumes attached. This docstring could be re-worded.\n\n\u003clater\u003e\n\nOh I see what happened; this test is copied from the one above and made to hit a failure with driver.spawn so that we rollback the volume connections. The test it was copied from is called _volume_backed_ but isn\u0027t either.","commit_id":"2d162c1d7160628a3ecd78bb5d5470027168bee3"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fae72bfd087005f97663e6d2cde713bc68fad357","unresolved":false,"context_lines":[{"line_number":487,"context_line":"        filter_properties \u003d {\u0027limits\u0027: limits}"},{"line_number":488,"context_line":"        instance.task_state \u003d task_states.UNSHELVING"},{"line_number":489,"context_line":"        instance.save()"},{"line_number":490,"context_line":"        image_meta \u003d {\u0027properties\u0027: {\u0027base_image_ref\u0027: uuids.image_id}}"},{"line_number":491,"context_line":"        mock_image_meta.return_value \u003d image_meta"},{"line_number":492,"context_line":""},{"line_number":493,"context_line":"        tracking \u003d {\u0027last_state\u0027: instance.task_state}"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa0c359_d96702e9","line":490,"range":{"start_line":490,"start_character":8,"end_line":490,"end_character":71},"updated":"2018-02-21 16:02:15.000000000","message":"this seems to contradict the docstring... this isn\u0027t a volume-backed image if the base_image_ref is not None, right?","commit_id":"2d162c1d7160628a3ecd78bb5d5470027168bee3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2ad302967e8fd84ccb0b678500e5f70b5b00be58","unresolved":false,"context_lines":[{"line_number":487,"context_line":"        filter_properties \u003d {\u0027limits\u0027: limits}"},{"line_number":488,"context_line":"        instance.task_state \u003d task_states.UNSHELVING"},{"line_number":489,"context_line":"        instance.save()"},{"line_number":490,"context_line":"        image_meta \u003d {\u0027properties\u0027: {\u0027base_image_ref\u0027: uuids.image_id}}"},{"line_number":491,"context_line":"        mock_image_meta.return_value \u003d image_meta"},{"line_number":492,"context_line":""},{"line_number":493,"context_line":"        tracking \u003d {\u0027last_state\u0027: instance.task_state}"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa0c359_dff6fb5d","line":490,"range":{"start_line":490,"start_character":8,"end_line":490,"end_character":71},"in_reply_to":"3fa0c359_d96702e9","updated":"2018-02-21 23:00:57.000000000","message":"Correct. Will fix the docstring.","commit_id":"2d162c1d7160628a3ecd78bb5d5470027168bee3"}]}
