)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"86778aa9b59f16f58c75ba3bf237c09599ed339e","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add FinishResizeAtDestTask"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This adds the FinishResizeAtDestTask sub-task which"},{"line_number":10,"context_line":"asynchronously RPC calls finish_snapshot_based_resize_at_dest"},{"line_number":11,"context_line":"on the destination compute service in the target cell"},{"line_number":12,"context_line":"to finish the resize."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":38,"id":"7faddb67_42582c30","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":14},"updated":"2019-08-12 14:37:32.000000000","message":"As far as I see finish_snapshot_based_resize_at_dest is an RPC call so this is synchronous.","commit_id":"24e490479beade6d4f1b054089a71dfaea80aa85"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"5af7e363680e2c992b46a6e0c32cbe551259870b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add FinishResizeAtDestTask"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This adds the FinishResizeAtDestTask sub-task which"},{"line_number":10,"context_line":"asynchronously RPC calls finish_snapshot_based_resize_at_dest"},{"line_number":11,"context_line":"on the destination compute service in the target cell"},{"line_number":12,"context_line":"to finish the resize."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":38,"id":"7faddb67_d238603c","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":14},"in_reply_to":"7faddb67_42582c30","updated":"2019-08-13 07:00:40.000000000","message":"Yup, https://review.opendev.org/#/c/635080/38/nova/compute/rpcapi.py@630, it used call to send RPC.","commit_id":"24e490479beade6d4f1b054089a71dfaea80aa85"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f61393bfc7349b0d3b704e2979c284102a11cdbb","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add FinishResizeAtDestTask"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This adds the FinishResizeAtDestTask sub-task which"},{"line_number":10,"context_line":"asynchronously RPC calls finish_snapshot_based_resize_at_dest"},{"line_number":11,"context_line":"on the destination compute service in the target cell"},{"line_number":12,"context_line":"to finish the resize."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":39,"id":"7faddb67_d3ec54f5","line":10,"updated":"2019-08-21 16:18:39.000000000","message":"As far as I see finish_snapshot_based_resize_at_dest is an RPC call so this is synchronous.","commit_id":"7c91dd50fac1a5151f4dac1f7ec2f16cc86a7996"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"529c1099b776bdfc1ded751a10e1b48849b2190d","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add FinishResizeAtDestTask"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This adds the FinishResizeAtDestTask sub-task which"},{"line_number":10,"context_line":"asynchronously RPC calls finish_snapshot_based_resize_at_dest"},{"line_number":11,"context_line":"on the destination compute service in the target cell"},{"line_number":12,"context_line":"to finish the resize."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":39,"id":"7faddb67_d0f62691","line":10,"in_reply_to":"7faddb67_d3ec54f5","updated":"2019-08-27 18:55:46.000000000","message":"Done","commit_id":"7c91dd50fac1a5151f4dac1f7ec2f16cc86a7996"}],"nova/conductor/tasks/cross_cell_migrate.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7e16437f1b29f627289a1ef46763902b98d81907","unresolved":false,"context_lines":[{"line_number":512,"context_line":"        self.instance.task_state \u003d task_states.RESIZE_MIGRATED"},{"line_number":513,"context_line":"        self.instance.save()"},{"line_number":514,"context_line":"        try:"},{"line_number":515,"context_line":"            self.compute_rpcapi.finish_snapshot_based_resize_at_dest("},{"line_number":516,"context_line":"                self.context, self.instance, self.migration)"},{"line_number":517,"context_line":"        except Exception:"},{"line_number":518,"context_line":"            # What we need to do here is mimic the error handlers on"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_c5715eaa","line":515,"updated":"2019-02-11 23:15:45.000000000","message":"The new_flavor needs to be set on either the instance or the instance.migration_context before we get here otherwise the compute method is going to blow up.","commit_id":"08ab9529de380a89201c63ba01f5c7ec3ccdcc77"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8cd7d0da72c3fa8c03e9ce0de2071b3af041780a","unresolved":false,"context_lines":[{"line_number":512,"context_line":"        self.instance.task_state \u003d task_states.RESIZE_MIGRATED"},{"line_number":513,"context_line":"        self.instance.save()"},{"line_number":514,"context_line":"        try:"},{"line_number":515,"context_line":"            self.compute_rpcapi.finish_snapshot_based_resize_at_dest("},{"line_number":516,"context_line":"                self.context, self.instance, self.migration)"},{"line_number":517,"context_line":"        except Exception:"},{"line_number":518,"context_line":"            # What we need to do here is mimic the error handlers on"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_1a0c8aea","line":515,"in_reply_to":"9fdfeff1_c5715eaa","updated":"2019-02-12 20:48:06.000000000","message":"Done","commit_id":"08ab9529de380a89201c63ba01f5c7ec3ccdcc77"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"77db0ab3ebca20b05fce27edc5f4b15cec32147b","unresolved":false,"context_lines":[{"line_number":870,"context_line":""},{"line_number":871,"context_line":"        # Prepare the instance at the source host (stop it, optionally snapshot"},{"line_number":872,"context_line":"        # it, disconnect volumes and VIFs, etc)."},{"line_number":873,"context_line":"        self._prep_resize_at_source()"},{"line_number":874,"context_line":""},{"line_number":875,"context_line":"        # Finish the resize at the destination host, swap the hidden fields"},{"line_number":876,"context_line":"        # on the instances and update the instance mapping."}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_f6a8918c","line":873,"updated":"2019-02-14 18:02:05.000000000","message":"Need to pass the snapshot_id from this through to _finish_resize_at_dest and the FinishResizeAtDestTask.","commit_id":"99b7a0a84772c10a869e475578efd3934860c668"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2674904832db47851d04648985107b4abddf0a78","unresolved":false,"context_lines":[{"line_number":870,"context_line":""},{"line_number":871,"context_line":"        # Prepare the instance at the source host (stop it, optionally snapshot"},{"line_number":872,"context_line":"        # it, disconnect volumes and VIFs, etc)."},{"line_number":873,"context_line":"        self._prep_resize_at_source()"},{"line_number":874,"context_line":""},{"line_number":875,"context_line":"        # Finish the resize at the destination host, swap the hidden fields"},{"line_number":876,"context_line":"        # on the instances and update the instance mapping."}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_d6246d0f","line":873,"in_reply_to":"9fdfeff1_f6a8918c","updated":"2019-02-14 18:17:31.000000000","message":"Done","commit_id":"99b7a0a84772c10a869e475578efd3934860c668"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a76007541c4e5006d8736e6d5f59a3ae3257d5a1","unresolved":false,"context_lines":[{"line_number":586,"context_line":"        # instance is successfully resized in the dest host because if that"},{"line_number":587,"context_line":"        # fails, we want to be able to rebuild in the source cell to recover"},{"line_number":588,"context_line":"        # the instance."},{"line_number":589,"context_line":"        instance_mapping \u003d objects.InstanceMapping.get_by_instance_uuid("},{"line_number":590,"context_line":"            self.context, self.instance.uuid)"},{"line_number":591,"context_line":"        instance_mapping.cell_mapping \u003d self.target_cell_mapping"},{"line_number":592,"context_line":"        # If this fails the cascading task failures should delete the instance"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_b40b8a7b","line":589,"updated":"2019-02-19 21:40:11.000000000","message":"Should probably query this first before the save() above to make the window of time where both instances are hidden\u003dFalse as small as possible.","commit_id":"9a134cb7f004ea2b98c8dda1044ac37bc5ba5ba9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d21a75248da83231e779fb29173861a3cfc9ce2f","unresolved":false,"context_lines":[{"line_number":586,"context_line":"        # instance is successfully resized in the dest host because if that"},{"line_number":587,"context_line":"        # fails, we want to be able to rebuild in the source cell to recover"},{"line_number":588,"context_line":"        # the instance."},{"line_number":589,"context_line":"        instance_mapping \u003d objects.InstanceMapping.get_by_instance_uuid("},{"line_number":590,"context_line":"            self.context, self.instance.uuid)"},{"line_number":591,"context_line":"        instance_mapping.cell_mapping \u003d self.target_cell_mapping"},{"line_number":592,"context_line":"        # If this fails the cascading task failures should delete the instance"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_dfad079c","line":589,"in_reply_to":"9fdfeff1_b40b8a7b","updated":"2019-02-19 22:26:37.000000000","message":"Done","commit_id":"9a134cb7f004ea2b98c8dda1044ac37bc5ba5ba9"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"958fbc8423e2806892dcfe46c05d34aac5a7f1b2","unresolved":false,"context_lines":[{"line_number":504,"context_line":"            # service so those changes are reflected in the source cell"},{"line_number":505,"context_line":"            # instance."},{"line_number":506,"context_line":"            with excutils.save_and_reraise_exception(logger\u003dLOG):"},{"line_number":507,"context_line":"                # reverts_task_state and _error_out_instance_on_exception:"},{"line_number":508,"context_line":"                self.source_cell_instance.task_state \u003d None"},{"line_number":509,"context_line":"                self.source_cell_instance.vm_state \u003d vm_states.ERROR"},{"line_number":510,"context_line":"                self.source_cell_instance.save()"}],"source_content_type":"text/x-python","patch_set":40,"id":"7faddb67_8f062b21","line":507,"range":{"start_line":507,"start_character":73,"end_line":507,"end_character":74},"updated":"2019-08-29 11:52:16.000000000","message":"nit:redundant?","commit_id":"db3c6d3d2a6a03988366ac8849b36403f2f350ca"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"df7a9709670ec12f2f06352187502e1666e7230b","unresolved":false,"context_lines":[{"line_number":201,"context_line":"            # This needs to be a hard delete because if resize fails later for"},{"line_number":202,"context_line":"            # some reason, we want to be able to retry the resize to this cell"},{"line_number":203,"context_line":"            # again without hitting a duplicate entry unique constraint error."},{"line_number":204,"context_line":"            self._target_cell_instance.destroy(hard_delete\u003dTrue)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"class PrepResizeAtDestTask(base.TaskBase):"}],"source_content_type":"text/x-python","patch_set":48,"id":"3fa7e38b_bb172da3","line":204,"updated":"2019-11-04 16:42:40.000000000","message":"This is the rollback that will hard destroy the target cell DB instance.","commit_id":"612d8c682d7df28cc0700d37ac626a7406925cd4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"bb85dc16d6a06432b4ca4938c1188f736a62b901","unresolved":false,"context_lines":[{"line_number":497,"context_line":"        \"\"\""},{"line_number":498,"context_line":"        LOG.debug(\u0027Finishing cross-cell resize at the destination host %s\u0027,"},{"line_number":499,"context_line":"                  self.migration.dest_compute, instance\u003dself.instance)"},{"line_number":500,"context_line":"        # prep_snapshot_based_resize_at_source in the source cell would have"},{"line_number":501,"context_line":"        # changed the source cell instance.task_state to resize_migrated and"},{"line_number":502,"context_line":"        # we need to reflect that in the target cell instance before calling"},{"line_number":503,"context_line":"        # the destination compute."}],"source_content_type":"text/x-python","patch_set":48,"id":"3fa7e38b_5bc879a6","line":500,"range":{"start_line":500,"start_character":10,"end_line":500,"end_character":46},"updated":"2019-11-04 16:19:00.000000000","message":"I guess it seems a little weird to just set the state here and then call to the dest to expect this and switch it again. Is this task state transition protecting us against anything? Any reason not to just set it earlier, or go straight to finish on the dest in the finish call below?\n\n\n...yes, I see you\u0027ve been doing this earlier in the file and, no we don\u0027t need to look and see if I\u0027ve approved any of those previous changes without complaining.","commit_id":"612d8c682d7df28cc0700d37ac626a7406925cd4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9f36e94d9d5a4c47551b9a6ae170f5f95ae8139d","unresolved":false,"context_lines":[{"line_number":497,"context_line":"        \"\"\""},{"line_number":498,"context_line":"        LOG.debug(\u0027Finishing cross-cell resize at the destination host %s\u0027,"},{"line_number":499,"context_line":"                  self.migration.dest_compute, instance\u003dself.instance)"},{"line_number":500,"context_line":"        # prep_snapshot_based_resize_at_source in the source cell would have"},{"line_number":501,"context_line":"        # changed the source cell instance.task_state to resize_migrated and"},{"line_number":502,"context_line":"        # we need to reflect that in the target cell instance before calling"},{"line_number":503,"context_line":"        # the destination compute."}],"source_content_type":"text/x-python","patch_set":48,"id":"3fa7e38b_5b95d930","line":500,"range":{"start_line":500,"start_character":10,"end_line":500,"end_character":46},"in_reply_to":"3fa7e38b_3be25d02","updated":"2019-11-04 16:30:38.000000000","message":"\u003e and I tried to keep those as similar as possible (in the compute\n \u003e manager) so we could maybe eventually DRY up some of that common\n \u003e code between same and cross cell resize.\n\nThe likely reason I\u0027m setting task_state to RESIZE_MIGRATED here in conductor is probably because I wrote the compute manager method first based on the existing finish_resize, and then did the conductor stuff on top after that to call it, which is the MO for how I structured this series, and when I got to the functional test part it blew up in the compute on expected_task_state and I changed this here in the caller rather than in the callee.","commit_id":"612d8c682d7df28cc0700d37ac626a7406925cd4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"bf108fb4625b76b5747521859d03aa202bc4edbc","unresolved":false,"context_lines":[{"line_number":497,"context_line":"        \"\"\""},{"line_number":498,"context_line":"        LOG.debug(\u0027Finishing cross-cell resize at the destination host %s\u0027,"},{"line_number":499,"context_line":"                  self.migration.dest_compute, instance\u003dself.instance)"},{"line_number":500,"context_line":"        # prep_snapshot_based_resize_at_source in the source cell would have"},{"line_number":501,"context_line":"        # changed the source cell instance.task_state to resize_migrated and"},{"line_number":502,"context_line":"        # we need to reflect that in the target cell instance before calling"},{"line_number":503,"context_line":"        # the destination compute."}],"source_content_type":"text/x-python","patch_set":48,"id":"3fa7e38b_bbbbadc1","line":500,"range":{"start_line":500,"start_character":10,"end_line":500,"end_character":46},"in_reply_to":"3fa7e38b_5b95d930","updated":"2019-11-04 16:35:43.000000000","message":"It\u0027s just DB traffic for kinda no reason. Not a huge deal, it just doesn\u0027t seem to be buying us much.","commit_id":"612d8c682d7df28cc0700d37ac626a7406925cd4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"592f68e63dee7189a82835e2b77f9dd72c4bd0b4","unresolved":false,"context_lines":[{"line_number":497,"context_line":"        \"\"\""},{"line_number":498,"context_line":"        LOG.debug(\u0027Finishing cross-cell resize at the destination host %s\u0027,"},{"line_number":499,"context_line":"                  self.migration.dest_compute, instance\u003dself.instance)"},{"line_number":500,"context_line":"        # prep_snapshot_based_resize_at_source in the source cell would have"},{"line_number":501,"context_line":"        # changed the source cell instance.task_state to resize_migrated and"},{"line_number":502,"context_line":"        # we need to reflect that in the target cell instance before calling"},{"line_number":503,"context_line":"        # the destination compute."}],"source_content_type":"text/x-python","patch_set":48,"id":"3fa7e38b_3be25d02","line":500,"range":{"start_line":500,"start_character":10,"end_line":500,"end_character":46},"in_reply_to":"3fa7e38b_5bc879a6","updated":"2019-11-04 16:26:39.000000000","message":"\u003e I guess it seems a little weird to just set the state here and then\n \u003e call to the dest to expect this and switch it again. Is this task\n \u003e state transition protecting us against anything? Any reason not to\n \u003e just set it earlier, or go straight to finish on the dest in the\n \u003e finish call below?\n\nThe finish_snapshot_based_resize_at_dest method on the target host in the target cell is expecting the task_state to be RESIZE_MIGRATED here:\n\nhttps://review.opendev.org/#/c/635080/48/nova/compute/manager.py@5420\n\nSince prep_snapshot_based_resize_at_source runs on a copy of the instance in the source cell db and finish_snapshot_based_resize_at_dest runs on the copy of the instance in the target cell db, I have to reflect that across both DBs.\n\nI\u0027m not sure what you mean by \"or go straight to finish on the dest in the finish call below?\" Oh I guess you mean why not just have finish_snapshot_based_resize_at_dest go straight to task_states.RESIZE_FINISH and not care about the expected_task_state? I guess not a huge reason, but if we don\u0027t set the task_state to RESIZE_MIGRATED here then we should expect task_states.RESIZE_PREP in finish_snapshot_based_resize_at_dest and that\u0027s different from how finish_resize works for same-cell resize in the compute service and I tried to keep those as similar as possible (in the compute manager) so we could maybe eventually DRY up some of that common code between same and cross cell resize.\n\n \u003e \n \u003e \n \u003e ...yes, I see you\u0027ve been doing this earlier in the file and, no we\n \u003e don\u0027t need to look and see if I\u0027ve approved any of those previous\n \u003e changes without complaining.\n\nHeh, I won\u0027t tell anyone if you won\u0027t.","commit_id":"612d8c682d7df28cc0700d37ac626a7406925cd4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ec2f5d4f5b0373f78b36ade744045bbe1fe07389","unresolved":false,"context_lines":[{"line_number":497,"context_line":"        \"\"\""},{"line_number":498,"context_line":"        LOG.debug(\u0027Finishing cross-cell resize at the destination host %s\u0027,"},{"line_number":499,"context_line":"                  self.migration.dest_compute, instance\u003dself.instance)"},{"line_number":500,"context_line":"        # prep_snapshot_based_resize_at_source in the source cell would have"},{"line_number":501,"context_line":"        # changed the source cell instance.task_state to resize_migrated and"},{"line_number":502,"context_line":"        # we need to reflect that in the target cell instance before calling"},{"line_number":503,"context_line":"        # the destination compute."}],"source_content_type":"text/x-python","patch_set":48,"id":"3fa7e38b_bb096d95","line":500,"range":{"start_line":500,"start_character":10,"end_line":500,"end_character":46},"in_reply_to":"3fa7e38b_bbbbadc1","updated":"2019-11-04 16:41:01.000000000","message":"True. I could change finish_snapshot_based_resize_at_dest to expect RESIZE_PREP or RESIZE_MIGRATED and then drop this here in conductor, though that\u0027s technically a behavior change at this point without an RPC bump unless we pull the finish_snapshot_based_resize_at_dest compute manager patch from the gate.","commit_id":"612d8c682d7df28cc0700d37ac626a7406925cd4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"bb85dc16d6a06432b4ca4938c1188f736a62b901","unresolved":false,"context_lines":[{"line_number":537,"context_line":"            fault \u003d objects.InstanceFault.get_latest_for_instance("},{"line_number":538,"context_line":"                self.context, self.instance.uuid)"},{"line_number":539,"context_line":"            if fault:"},{"line_number":540,"context_line":"                fault \u003d clone_creatable_object(source_cell_context, fault)"},{"line_number":541,"context_line":"                fault.create()"},{"line_number":542,"context_line":"        except Exception:"},{"line_number":543,"context_line":"            LOG.exception("}],"source_content_type":"text/x-python","patch_set":48,"id":"3fa7e38b_7b40d506","line":540,"range":{"start_line":540,"start_character":16,"end_line":540,"end_character":21},"updated":"2019-11-04 16:19:00.000000000","message":"I know it doesn\u0027t really matter since you don\u0027t use it beyond the next line, but this would probably be clearer (IMHO) if it was called fault_clone or fault_dest or something and didn\u0027t eclipse the original object. No need to change this, I just wanted to complain.","commit_id":"612d8c682d7df28cc0700d37ac626a7406925cd4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"592f68e63dee7189a82835e2b77f9dd72c4bd0b4","unresolved":false,"context_lines":[{"line_number":537,"context_line":"            fault \u003d objects.InstanceFault.get_latest_for_instance("},{"line_number":538,"context_line":"                self.context, self.instance.uuid)"},{"line_number":539,"context_line":"            if fault:"},{"line_number":540,"context_line":"                fault \u003d clone_creatable_object(source_cell_context, fault)"},{"line_number":541,"context_line":"                fault.create()"},{"line_number":542,"context_line":"        except Exception:"},{"line_number":543,"context_line":"            LOG.exception("}],"source_content_type":"text/x-python","patch_set":48,"id":"3fa7e38b_db9a296d","line":540,"range":{"start_line":540,"start_character":16,"end_line":540,"end_character":21},"in_reply_to":"3fa7e38b_7b40d506","updated":"2019-11-04 16:26:39.000000000","message":"fault_clone makes sense to me, I probably just didn\u0027t think about it because like you said I\u0027m not using the original after this. I could clean it up in a FUP if you want.","commit_id":"612d8c682d7df28cc0700d37ac626a7406925cd4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"bb85dc16d6a06432b4ca4938c1188f736a62b901","unresolved":false,"context_lines":[{"line_number":568,"context_line":"                # create it in the source cell DB."},{"line_number":569,"context_line":"                for event in events:"},{"line_number":570,"context_line":"                    if event.event \u003d\u003d event_name:"},{"line_number":571,"context_line":"                        event \u003d clone_creatable_object("},{"line_number":572,"context_line":"                            source_cell_context, event)"},{"line_number":573,"context_line":"                        event.create(action.instance_uuid, action.request_id)"},{"line_number":574,"context_line":"                        break"}],"source_content_type":"text/x-python","patch_set":48,"id":"3fa7e38b_bb63adb0","line":571,"range":{"start_line":571,"start_character":24,"end_line":571,"end_character":29},"updated":"2019-11-04 16:19:00.000000000","message":"Same.","commit_id":"612d8c682d7df28cc0700d37ac626a7406925cd4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"592f68e63dee7189a82835e2b77f9dd72c4bd0b4","unresolved":false,"context_lines":[{"line_number":568,"context_line":"                # create it in the source cell DB."},{"line_number":569,"context_line":"                for event in events:"},{"line_number":570,"context_line":"                    if event.event \u003d\u003d event_name:"},{"line_number":571,"context_line":"                        event \u003d clone_creatable_object("},{"line_number":572,"context_line":"                            source_cell_context, event)"},{"line_number":573,"context_line":"                        event.create(action.instance_uuid, action.request_id)"},{"line_number":574,"context_line":"                        break"}],"source_content_type":"text/x-python","patch_set":48,"id":"3fa7e38b_9b8a7118","line":571,"range":{"start_line":571,"start_character":24,"end_line":571,"end_character":29},"in_reply_to":"3fa7e38b_bb63adb0","updated":"2019-11-04 16:26:39.000000000","message":"ditto - FUP?","commit_id":"612d8c682d7df28cc0700d37ac626a7406925cd4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"bf108fb4625b76b5747521859d03aa202bc4edbc","unresolved":false,"context_lines":[{"line_number":613,"context_line":"        instance_mapping.cell_mapping \u003d self.target_cell_mapping"},{"line_number":614,"context_line":"        # If this fails the cascading task failures should delete the instance"},{"line_number":615,"context_line":"        # in the target cell database so we do not need to hide it again."},{"line_number":616,"context_line":"        instance_mapping.save()"},{"line_number":617,"context_line":"        # Mark the source cell instance record as hidden\u003dTrue to hide it from"},{"line_number":618,"context_line":"        # the user when listing servers."},{"line_number":619,"context_line":"        self.source_cell_instance.hidden \u003d True"}],"source_content_type":"text/x-python","patch_set":48,"id":"3fa7e38b_dba8e978","line":616,"range":{"start_line":616,"start_character":8,"end_line":616,"end_character":31},"updated":"2019-11-04 16:35:43.000000000","message":"If this fails, shouldn\u0027t we try our best to re-hide the destination instance? Just so that we don\u0027t end up with a ghost instance in lists after some failure, or at least, ideally.","commit_id":"612d8c682d7df28cc0700d37ac626a7406925cd4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e1720d14410219c0ffefda200365bb96ef7d4e70","unresolved":false,"context_lines":[{"line_number":613,"context_line":"        instance_mapping.cell_mapping \u003d self.target_cell_mapping"},{"line_number":614,"context_line":"        # If this fails the cascading task failures should delete the instance"},{"line_number":615,"context_line":"        # in the target cell database so we do not need to hide it again."},{"line_number":616,"context_line":"        instance_mapping.save()"},{"line_number":617,"context_line":"        # Mark the source cell instance record as hidden\u003dTrue to hide it from"},{"line_number":618,"context_line":"        # the user when listing servers."},{"line_number":619,"context_line":"        self.source_cell_instance.hidden \u003d True"}],"source_content_type":"text/x-python","patch_set":48,"id":"3fa7e38b_a6d63426","line":616,"range":{"start_line":616,"start_character":8,"end_line":616,"end_character":31},"in_reply_to":"3fa7e38b_7bff7565","updated":"2019-11-04 17:52:18.000000000","message":"Cripes, sorry.","commit_id":"612d8c682d7df28cc0700d37ac626a7406925cd4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ec2f5d4f5b0373f78b36ade744045bbe1fe07389","unresolved":false,"context_lines":[{"line_number":613,"context_line":"        instance_mapping.cell_mapping \u003d self.target_cell_mapping"},{"line_number":614,"context_line":"        # If this fails the cascading task failures should delete the instance"},{"line_number":615,"context_line":"        # in the target cell database so we do not need to hide it again."},{"line_number":616,"context_line":"        instance_mapping.save()"},{"line_number":617,"context_line":"        # Mark the source cell instance record as hidden\u003dTrue to hide it from"},{"line_number":618,"context_line":"        # the user when listing servers."},{"line_number":619,"context_line":"        self.source_cell_instance.hidden \u003d True"}],"source_content_type":"text/x-python","patch_set":48,"id":"3fa7e38b_7bff7565","line":616,"range":{"start_line":616,"start_character":8,"end_line":616,"end_character":31},"in_reply_to":"3fa7e38b_dba8e978","updated":"2019-11-04 16:41:01.000000000","message":"As the comment above this says, if this fails we\u0027ll cascade the task rollbacks which will hard destroy the copy of the instance in the target cell.","commit_id":"612d8c682d7df28cc0700d37ac626a7406925cd4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"df7a9709670ec12f2f06352187502e1666e7230b","unresolved":false,"context_lines":[{"line_number":883,"context_line":"        # Rollback the completed tasks in reverse order."},{"line_number":884,"context_line":"        for task_name in reversed(self._completed_tasks):"},{"line_number":885,"context_line":"            try:"},{"line_number":886,"context_line":"                self._completed_tasks[task_name].rollback()"},{"line_number":887,"context_line":"            except Exception:"},{"line_number":888,"context_line":"                LOG.exception(\u0027Rollback for task %s failed.\u0027, task_name)"}],"source_content_type":"text/x-python","patch_set":48,"id":"3fa7e38b_7b0d358d","line":886,"updated":"2019-11-04 16:42:40.000000000","message":"And this is the cascading rollback handling.","commit_id":"612d8c682d7df28cc0700d37ac626a7406925cd4"}],"nova/tests/unit/conductor/tasks/test_cross_cell_migrate.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"bf108fb4625b76b5747521859d03aa202bc4edbc","unresolved":false,"context_lines":[{"line_number":994,"context_line":"        # copied from the target cell DB to the source cell DB."},{"line_number":995,"context_line":"        copy_fault.assert_called_once_with(self.source_context)"},{"line_number":996,"context_line":"        copy_event.assert_called_once_with(self.source_context)"},{"line_number":997,"context_line":""},{"line_number":998,"context_line":"    def test_copy_latest_fault(self):"},{"line_number":999,"context_line":"        \"\"\"Tests _copy_latest_fault working as expected\"\"\""},{"line_number":1000,"context_line":"        # Inject a fault in the target cell database."}],"source_content_type":"text/x-python","patch_set":48,"id":"3fa7e38b_9bb831c8","line":997,"updated":"2019-11-04 16:35:43.000000000","message":"Could assert that the mapping didn\u0027t get moved?","commit_id":"612d8c682d7df28cc0700d37ac626a7406925cd4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ec2f5d4f5b0373f78b36ade744045bbe1fe07389","unresolved":false,"context_lines":[{"line_number":994,"context_line":"        # copied from the target cell DB to the source cell DB."},{"line_number":995,"context_line":"        copy_fault.assert_called_once_with(self.source_context)"},{"line_number":996,"context_line":"        copy_event.assert_called_once_with(self.source_context)"},{"line_number":997,"context_line":""},{"line_number":998,"context_line":"    def test_copy_latest_fault(self):"},{"line_number":999,"context_line":"        \"\"\"Tests _copy_latest_fault working as expected\"\"\""},{"line_number":1000,"context_line":"        # Inject a fault in the target cell database."}],"source_content_type":"text/x-python","patch_set":48,"id":"3fa7e38b_fbea859d","line":997,"in_reply_to":"3fa7e38b_9bb831c8","updated":"2019-11-04 16:41:01.000000000","message":"Yeah I can add that - FUP or want me to respin and rebase the entire series? I\u0027d prefer FUP since I could address those other variable name nits.","commit_id":"612d8c682d7df28cc0700d37ac626a7406925cd4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"bf108fb4625b76b5747521859d03aa202bc4edbc","unresolved":false,"context_lines":[{"line_number":998,"context_line":"    def test_copy_latest_fault(self):"},{"line_number":999,"context_line":"        \"\"\"Tests _copy_latest_fault working as expected\"\"\""},{"line_number":1000,"context_line":"        # Inject a fault in the target cell database."},{"line_number":1001,"context_line":"        try:"},{"line_number":1002,"context_line":"            raise test.TestingException(\u0027test-fault\u0027)"},{"line_number":1003,"context_line":"        except test.TestingException as fault:"},{"line_number":1004,"context_line":"            compute_utils.add_instance_fault_from_exc("},{"line_number":1005,"context_line":"                self.target_context, self.task.instance, fault)"},{"line_number":1006,"context_line":"        self.task._copy_latest_fault(self.source_context)"}],"source_content_type":"text/x-python","patch_set":48,"id":"3fa7e38b_fb95a53d","line":1003,"range":{"start_line":1001,"start_character":0,"end_line":1003,"end_character":46},"updated":"2019-11-04 16:35:43.000000000","message":"Heh.","commit_id":"612d8c682d7df28cc0700d37ac626a7406925cd4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ec2f5d4f5b0373f78b36ade744045bbe1fe07389","unresolved":false,"context_lines":[{"line_number":998,"context_line":"    def test_copy_latest_fault(self):"},{"line_number":999,"context_line":"        \"\"\"Tests _copy_latest_fault working as expected\"\"\""},{"line_number":1000,"context_line":"        # Inject a fault in the target cell database."},{"line_number":1001,"context_line":"        try:"},{"line_number":1002,"context_line":"            raise test.TestingException(\u0027test-fault\u0027)"},{"line_number":1003,"context_line":"        except test.TestingException as fault:"},{"line_number":1004,"context_line":"            compute_utils.add_instance_fault_from_exc("},{"line_number":1005,"context_line":"                self.target_context, self.task.instance, fault)"},{"line_number":1006,"context_line":"        self.task._copy_latest_fault(self.source_context)"}],"source_content_type":"text/x-python","patch_set":48,"id":"3fa7e38b_1b3f6125","line":1003,"range":{"start_line":1001,"start_character":0,"end_line":1003,"end_character":46},"in_reply_to":"3fa7e38b_fb95a53d","updated":"2019-11-04 16:41:01.000000000","message":"I was probably doing this because I thought add_instance_fault_from_exc would pull sys.exc_info but maybe that\u0027s changed since I wrote this.","commit_id":"612d8c682d7df28cc0700d37ac626a7406925cd4"}]}
