)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2279ee19952c844ff35bb4ffa6ae205403b24cc2","unresolved":false,"context_lines":[{"line_number":12,"context_line":"by making it a part of the RPC call."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Also - if we called the scheduler, we also know the node of the chosen"},{"line_number":15,"context_line":"host, and the limits set, and this infromation is needed for doing claims."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"We also make sure that rebuild now uses claims and resource tracking. This"},{"line_number":18,"context_line":"means that we will now be properly tracking resources for"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"ba15a1d1_8406671a","line":15,"updated":"2015-09-17 06:15:34.000000000","message":"infromation \u003d\u003e information","commit_id":"e662aeb84048ebe455d969e505ac93d15662d6ed"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"0f7376368d82c060278d9650dc8c37a5eaa1c24b","unresolved":false,"context_lines":[{"line_number":12,"context_line":"by making it a part of the RPC call."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Also - if we called the scheduler, we also know the node of the chosen"},{"line_number":15,"context_line":"host, and the limits set, and this infromation is needed for doing claims."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"We also make sure that rebuild now uses claims and resource tracking. This"},{"line_number":18,"context_line":"means that we will now be properly tracking resources for"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"ba15a1d1_087a1e88","line":15,"in_reply_to":"ba15a1d1_8406671a","updated":"2015-09-18 16:44:46.000000000","message":"Done","commit_id":"e662aeb84048ebe455d969e505ac93d15662d6ed"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2279ee19952c844ff35bb4ffa6ae205403b24cc2","unresolved":false,"context_lines":[{"line_number":23,"context_line":"With this change we effectively have resource claims when doing"},{"line_number":24,"context_line":"rebuild/evacuate."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"DocImpact"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Related-bug: #1417667"},{"line_number":29,"context_line":"Change-Id: I0233f964d8f294f0ffd9edcb16b1aaf93486177f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"ba15a1d1_443ccfc7","line":26,"updated":"2015-09-17 06:15:34.000000000","message":"Should we not have UpgradeImpact here too as this will be a change in the current behaviour - or is that a complete overkill","commit_id":"e662aeb84048ebe455d969e505ac93d15662d6ed"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"0f7376368d82c060278d9650dc8c37a5eaa1c24b","unresolved":false,"context_lines":[{"line_number":23,"context_line":"With this change we effectively have resource claims when doing"},{"line_number":24,"context_line":"rebuild/evacuate."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"DocImpact"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Related-bug: #1417667"},{"line_number":29,"context_line":"Change-Id: I0233f964d8f294f0ffd9edcb16b1aaf93486177f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"ba15a1d1_284a8255","line":26,"in_reply_to":"ba15a1d1_443ccfc7","updated":"2015-09-18 16:44:46.000000000","message":"Well from that POV any change is an upgrade impact :) I think that UI is reserved for stuff that you need to be aware of when doing upgrades so as not to cause an outage. This is not out of the ordinary at all - just a version bump","commit_id":"e662aeb84048ebe455d969e505ac93d15662d6ed"}],"nova/compute/manager.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"58b27f2065fe5e45b5bda3046aa9379231761876","unresolved":false,"context_lines":[{"line_number":2615,"context_line":"        :param node: A node of the host chosen by the scheduler. If a host was"},{"line_number":2616,"context_line":"                     specified by the user, this will be None"},{"line_number":2617,"context_line":"        :param limits: Overcommit limits set by the scheduler. If a host was"},{"line_number":2618,"context_line":"                       specified by the user, this will be None"},{"line_number":2619,"context_line":""},{"line_number":2620,"context_line":"        \"\"\""},{"line_number":2621,"context_line":"        context \u003d context.elevated()"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa1b9901_13e406de","line":2618,"updated":"2015-08-25 14:39:27.000000000","message":"Typically we add usage of new fields in the same patch. This is kindof awkward because it looks like we now accept these parameters, but we don\u0027t yet honor them as our rpc version seems to indicate that we do.\n\nIf you really need to split these, I would say add the parameters, version bump and usage here, and then add the api/rpcapi, etc in the next patch, although I don\u0027t think it\u0027s really necessary.","commit_id":"355f72287be28f5f9d3ae8095d0cf484dd94f7dd"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"73cb482fedb830eef3a5ecc3fe761369d3e9f9bc","unresolved":false,"context_lines":[{"line_number":2615,"context_line":"        :param node: A node of the host chosen by the scheduler. If a host was"},{"line_number":2616,"context_line":"                     specified by the user, this will be None"},{"line_number":2617,"context_line":"        :param limits: Overcommit limits set by the scheduler. If a host was"},{"line_number":2618,"context_line":"                       specified by the user, this will be None"},{"line_number":2619,"context_line":""},{"line_number":2620,"context_line":"        \"\"\""},{"line_number":2621,"context_line":"        context \u003d context.elevated()"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa1b9901_5fbd9f66","line":2618,"in_reply_to":"fa1b9901_13e406de","updated":"2015-08-25 15:40:02.000000000","message":"Yeah I\u0027ll flip these around - adding it all in one patch is going to be huge, but I get your point about not bumping the version before functionality is there.","commit_id":"355f72287be28f5f9d3ae8095d0cf484dd94f7dd"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7930dddfa30a76cd3dde77eb2bd51886cebe0684","unresolved":false,"context_lines":[{"line_number":2635,"context_line":"            @contextlib.contextmanager"},{"line_number":2636,"context_line":"            def noop_claim(context, instance, limits\u003dNone,"},{"line_number":2637,"context_line":"                           image_meta\u003dNone, migration\u003dNone):"},{"line_number":2638,"context_line":"                yield"},{"line_number":2639,"context_line":""},{"line_number":2640,"context_line":"            rebuild_claim \u003d noop_claim"},{"line_number":2641,"context_line":"            drop_rebuild_claim \u003d lambda *a, **k: None"}],"source_content_type":"text/x-python","patch_set":19,"id":"da20952f_40570e02","line":2638,"updated":"2015-09-03 15:37:22.000000000","message":"This is kinda ugly, defining this so deeply nested, IMHO.","commit_id":"e99d78e24f81cc41559e477adc1db9a88e0ef746"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"50a05db2399e612b0d08ad1ee9724458efd850fd","unresolved":false,"context_lines":[{"line_number":2635,"context_line":"            @contextlib.contextmanager"},{"line_number":2636,"context_line":"            def noop_claim(context, instance, limits\u003dNone,"},{"line_number":2637,"context_line":"                           image_meta\u003dNone, migration\u003dNone):"},{"line_number":2638,"context_line":"                yield"},{"line_number":2639,"context_line":""},{"line_number":2640,"context_line":"            rebuild_claim \u003d noop_claim"},{"line_number":2641,"context_line":"            drop_rebuild_claim \u003d lambda *a, **k: None"}],"source_content_type":"text/x-python","patch_set":19,"id":"da20952f_57f6f5f9","line":2638,"in_reply_to":"da20952f_40570e02","updated":"2015-09-03 16:15:26.000000000","message":"I could probably re-use the existing no-op claim class but with some modifications (since the actual call we use is part of the resource_tracker object) that way we could avoid a lot of this stuff/move it to the resource tracker for more consistency - would that work better in your opinion?","commit_id":"e99d78e24f81cc41559e477adc1db9a88e0ef746"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"bc47c43dca6be4915655d72d5209cd143d30e655","unresolved":false,"context_lines":[{"line_number":2635,"context_line":"            @contextlib.contextmanager"},{"line_number":2636,"context_line":"            def noop_claim(context, instance, limits\u003dNone,"},{"line_number":2637,"context_line":"                           image_meta\u003dNone, migration\u003dNone):"},{"line_number":2638,"context_line":"                yield"},{"line_number":2639,"context_line":""},{"line_number":2640,"context_line":"            rebuild_claim \u003d noop_claim"},{"line_number":2641,"context_line":"            drop_rebuild_claim \u003d lambda *a, **k: None"}],"source_content_type":"text/x-python","patch_set":19,"id":"da20952f_6337b7b0","line":2638,"in_reply_to":"da20952f_57f6f5f9","updated":"2015-09-03 17:21:21.000000000","message":"Or just define this at the top of the file and use it here instead of defining inline.","commit_id":"e99d78e24f81cc41559e477adc1db9a88e0ef746"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7930dddfa30a76cd3dde77eb2bd51886cebe0684","unresolved":false,"context_lines":[{"line_number":2652,"context_line":"                        context, instance, orig_image_ref,"},{"line_number":2653,"context_line":"                        image_ref, injected_files, new_pass, orig_sys_metadata,"},{"line_number":2654,"context_line":"                        bdms, recreate, on_shared_storage, preserve_ephemeral,"},{"line_number":2655,"context_line":"                        scheduled_node)"},{"line_number":2656,"context_line":"            except exception.ComputeResourcesUnavailable as e:"},{"line_number":2657,"context_line":"                LOG.debug(\"Could not rebuild instance on this host, not \""},{"line_number":2658,"context_line":"                          \"enough resources available.\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":19,"id":"da20952f_803766af","line":2655,"updated":"2015-09-03 15:37:22.000000000","message":"This nesting is getting really deep and messy, IMHO.\n\nseems like we need another layer here, something like do_rebuild_with_claim() which does all this claim behavior, wrapping _do_rebuild_instance() below...","commit_id":"e99d78e24f81cc41559e477adc1db9a88e0ef746"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"50a05db2399e612b0d08ad1ee9724458efd850fd","unresolved":false,"context_lines":[{"line_number":2652,"context_line":"                        context, instance, orig_image_ref,"},{"line_number":2653,"context_line":"                        image_ref, injected_files, new_pass, orig_sys_metadata,"},{"line_number":2654,"context_line":"                        bdms, recreate, on_shared_storage, preserve_ephemeral,"},{"line_number":2655,"context_line":"                        scheduled_node)"},{"line_number":2656,"context_line":"            except exception.ComputeResourcesUnavailable as e:"},{"line_number":2657,"context_line":"                LOG.debug(\"Could not rebuild instance on this host, not \""},{"line_number":2658,"context_line":"                          \"enough resources available.\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":19,"id":"da20952f_97e00dce","line":2655,"in_reply_to":"da20952f_803766af","updated":"2015-09-03 16:15:26.000000000","message":"OK makes sense","commit_id":"e99d78e24f81cc41559e477adc1db9a88e0ef746"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"371194b3f86d7642f6da35b66455835919028b8a","unresolved":false,"context_lines":[{"line_number":2723,"context_line":"                    compute_node \u003d self._get_compute_info(context, self.host)"},{"line_number":2724,"context_line":"                    scheduled_node \u003d compute_node.hypervisor_hostname"},{"line_number":2725,"context_line":"                except exception.ComputeHostNotFound:"},{"line_number":2726,"context_line":"                    LOG.exception(_LE(\u0027Failed to get compute_info for %s\u0027),"},{"line_number":2727,"context_line":"                                    self.host)"},{"line_number":2728,"context_line":"            instance.host \u003d self.host"},{"line_number":2729,"context_line":"            instance.node \u003d scheduled_node"}],"source_content_type":"text/x-python","patch_set":19,"id":"da20952f_f7705242","line":2726,"updated":"2015-09-04 02:40:03.000000000","message":"String freeze.","commit_id":"e99d78e24f81cc41559e477adc1db9a88e0ef746"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"47f8c4a41d1cd3370d501a6cc9150d410d907961","unresolved":false,"context_lines":[{"line_number":2723,"context_line":"                    compute_node \u003d self._get_compute_info(context, self.host)"},{"line_number":2724,"context_line":"                    scheduled_node \u003d compute_node.hypervisor_hostname"},{"line_number":2725,"context_line":"                except exception.ComputeHostNotFound:"},{"line_number":2726,"context_line":"                    LOG.exception(_LE(\u0027Failed to get compute_info for %s\u0027),"},{"line_number":2727,"context_line":"                                    self.host)"},{"line_number":2728,"context_line":"            instance.host \u003d self.host"},{"line_number":2729,"context_line":"            instance.node \u003d scheduled_node"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba15a1d1_bdb1a091","line":2726,"in_reply_to":"da20952f_f7705242","updated":"2015-09-15 09:53:08.000000000","message":"we can leave this alone now","commit_id":"e99d78e24f81cc41559e477adc1db9a88e0ef746"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"14bcf4c59f9d0b5bf1867bfc4545fde2fb067d88","unresolved":false,"context_lines":[{"line_number":2672,"context_line":"                          \"enough resources available.\", instance\u003dinstance)"},{"line_number":2673,"context_line":""},{"line_number":2674,"context_line":"                # NOTE(ndipanov): We just abort the build for now and leave a"},{"line_number":2675,"context_line":"                # migration record for poteantial cleanup later"},{"line_number":2676,"context_line":"                if migration:"},{"line_number":2677,"context_line":"                    migration.status \u003d \u0027error\u0027"},{"line_number":2678,"context_line":"                    migration.save()"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba15a1d1_60e6b8b1","line":2675,"range":{"start_line":2675,"start_character":39,"end_line":2675,"end_character":49},"updated":"2015-09-16 16:26:18.000000000","message":"should be \"potential\"","commit_id":"e662aeb84048ebe455d969e505ac93d15662d6ed"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"0f7376368d82c060278d9650dc8c37a5eaa1c24b","unresolved":false,"context_lines":[{"line_number":2672,"context_line":"                          \"enough resources available.\", instance\u003dinstance)"},{"line_number":2673,"context_line":""},{"line_number":2674,"context_line":"                # NOTE(ndipanov): We just abort the build for now and leave a"},{"line_number":2675,"context_line":"                # migration record for poteantial cleanup later"},{"line_number":2676,"context_line":"                if migration:"},{"line_number":2677,"context_line":"                    migration.status \u003d \u0027error\u0027"},{"line_number":2678,"context_line":"                    migration.save()"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba15a1d1_65d18322","line":2675,"in_reply_to":"ba15a1d1_60e6b8b1","updated":"2015-09-18 16:44:46.000000000","message":"Done","commit_id":"e662aeb84048ebe455d969e505ac93d15662d6ed"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"14bcf4c59f9d0b5bf1867bfc4545fde2fb067d88","unresolved":false,"context_lines":[{"line_number":2674,"context_line":"                # NOTE(ndipanov): We just abort the build for now and leave a"},{"line_number":2675,"context_line":"                # migration record for poteantial cleanup later"},{"line_number":2676,"context_line":"                if migration:"},{"line_number":2677,"context_line":"                    migration.status \u003d \u0027error\u0027"},{"line_number":2678,"context_line":"                    migration.save()"},{"line_number":2679,"context_line":""},{"line_number":2680,"context_line":"                instance.task_state \u003d None"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba15a1d1_43137e5b","line":2677,"updated":"2015-09-16 16:26:18.000000000","message":"If you do this, I think the next run of _cleanup_incomplete_migrations() will delete the instance files on the local machine. That\u0027s not actually what you want in this case, right?","commit_id":"e662aeb84048ebe455d969e505ac93d15662d6ed"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"0f7376368d82c060278d9650dc8c37a5eaa1c24b","unresolved":false,"context_lines":[{"line_number":2674,"context_line":"                # NOTE(ndipanov): We just abort the build for now and leave a"},{"line_number":2675,"context_line":"                # migration record for poteantial cleanup later"},{"line_number":2676,"context_line":"                if migration:"},{"line_number":2677,"context_line":"                    migration.status \u003d \u0027error\u0027"},{"line_number":2678,"context_line":"                    migration.save()"},{"line_number":2679,"context_line":""},{"line_number":2680,"context_line":"                instance.task_state \u003d None"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba15a1d1_c5b5efec","line":2677,"in_reply_to":"ba15a1d1_43137e5b","updated":"2015-09-18 16:44:46.000000000","message":"That is correct - if we failed to set the host (likely) - will change this to \u0027failed\u0027","commit_id":"e662aeb84048ebe455d969e505ac93d15662d6ed"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2279ee19952c844ff35bb4ffa6ae205403b24cc2","unresolved":false,"context_lines":[{"line_number":2744,"context_line":"                    scheduled_node \u003d compute_node.hypervisor_hostname"},{"line_number":2745,"context_line":"                except exception.ComputeHostNotFound:"},{"line_number":2746,"context_line":"                    LOG.exception(_LE(\u0027Failed to get compute_info for %s\u0027),"},{"line_number":2747,"context_line":"                                    self.host)"},{"line_number":2748,"context_line":"            instance.host \u003d self.host"},{"line_number":2749,"context_line":"            instance.node \u003d scheduled_node"},{"line_number":2750,"context_line":"            instance.save()"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba15a1d1_e17f15de","line":2747,"updated":"2015-09-17 06:15:34.000000000","message":"indentation id dodgy","commit_id":"e662aeb84048ebe455d969e505ac93d15662d6ed"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"77ce3d5335432c1dcd8b03080d5984bc0be16786","unresolved":false,"context_lines":[{"line_number":2633,"context_line":"                                   partition must be preserved on rebuild"},{"line_number":2634,"context_line":"        :param migration: a Migration object if one was created for this"},{"line_number":2635,"context_line":"                          rebuild operation (if it\u0027s a part of evacaute)"},{"line_number":2636,"context_line":"        :param node: A node of the host chosen by the scheduler. If a host was"},{"line_number":2637,"context_line":"                     specified by the user, this will be None"},{"line_number":2638,"context_line":"        :param limits: Overcommit limits set by the scheduler. If a host was"},{"line_number":2639,"context_line":"                       specified by the user, this will be None"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba15a1d1_b00b3e2b","line":2636,"updated":"2015-09-20 10:39:03.000000000","message":"nit s/node/scheduled_node/","commit_id":"8e5d760dba6a59573d225607faf1eed38f8c2332"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"7a449ebe3d1ac31aeebd033c234758e52095acda","unresolved":false,"context_lines":[{"line_number":2633,"context_line":"                                   partition must be preserved on rebuild"},{"line_number":2634,"context_line":"        :param migration: a Migration object if one was created for this"},{"line_number":2635,"context_line":"                          rebuild operation (if it\u0027s a part of evacaute)"},{"line_number":2636,"context_line":"        :param node: A node of the host chosen by the scheduler. If a host was"},{"line_number":2637,"context_line":"                     specified by the user, this will be None"},{"line_number":2638,"context_line":"        :param limits: Overcommit limits set by the scheduler. If a host was"},{"line_number":2639,"context_line":"                       specified by the user, this will be None"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba15a1d1_85c7d363","line":2636,"in_reply_to":"ba15a1d1_b00b3e2b","updated":"2015-09-21 07:49:42.000000000","message":"Done","commit_id":"8e5d760dba6a59573d225607faf1eed38f8c2332"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"77ce3d5335432c1dcd8b03080d5984bc0be16786","unresolved":false,"context_lines":[{"line_number":2697,"context_line":"                instance.apply_migration_context()"},{"line_number":2698,"context_line":""},{"line_number":2699,"context_line":"                instance.save()"},{"line_number":2700,"context_line":"                drop_rebuild_claim(context, instance, image_meta\u003dimage_meta)"},{"line_number":2701,"context_line":""},{"line_number":2702,"context_line":"    def _do_rebuild_instance_with_claim(self, claim_context, *args, **kwargs):"},{"line_number":2703,"context_line":"        \"\"\"Helper to avoid deep nesting in the top-level method.\"\"\""}],"source_content_type":"text/x-python","patch_set":22,"id":"ba15a1d1_532aec7f","line":2700,"updated":"2015-09-20 10:39:03.000000000","message":"Emm....not sure what I\u0027m missing. Why we drop claim when rebuild successful, not fail?","commit_id":"8e5d760dba6a59573d225607faf1eed38f8c2332"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"70a5252fa7fed06bb372981dea2e5c32f895a6d9","unresolved":false,"context_lines":[{"line_number":2697,"context_line":"                instance.apply_migration_context()"},{"line_number":2698,"context_line":""},{"line_number":2699,"context_line":"                instance.save()"},{"line_number":2700,"context_line":"                drop_rebuild_claim(context, instance, image_meta\u003dimage_meta)"},{"line_number":2701,"context_line":""},{"line_number":2702,"context_line":"    def _do_rebuild_instance_with_claim(self, claim_context, *args, **kwargs):"},{"line_number":2703,"context_line":"        \"\"\"Helper to avoid deep nesting in the top-level method.\"\"\""}],"source_content_type":"text/x-python","patch_set":22,"id":"ba15a1d1_7d81ef4c","line":2700,"in_reply_to":"ba15a1d1_34aab486","updated":"2015-09-21 11:16:33.000000000","message":"Here\u0027s how claims work: \n\nWhen claiming instances we do only 1 thing: update the compute_node table in the DB to reflect that there is one more instance there (in case the claim succeeds otherwise we don\u0027t do anything with resources).\n\nIn case of a move (so currently we are talking about resize and rebuild claims) - we do 2 things - update the compute node table (same as 1) but also create the migration record, so that we can track those resources properly on the next pass of the RT (Every 60 sec by default).\n\ndrop_rebuild_claim removes that migration record - so that we don\u0027t track it on the soruce host anymore (although we wouldn\u0027t do it anyway https://github.com/openstack/nova/blob/1df8248b6ad7982174c417abf80070107eac8909/nova/compute/resource_tracker.py#L779 but it is needed for consistency).\n\nWith the above in mind - it is clear to see that we want to remove the migration record on success so that there is no tracking on the source host anymore.\n\nSo that leaves us with the question - why not remove the record on failure too.\n\nThe problem is that other than the record  - we have no good way to track the actual state of the evacuate task. So we use the migration record for that too (arguably this is kind of hacky). So if an evacuation fails, we leave the migration record there to signal to the process doing the evacuation (remember that is something outside of Nova - Nova will not do orchestration like this) to possibly retry it on a different host, or fail altogether.","commit_id":"8e5d760dba6a59573d225607faf1eed38f8c2332"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"8c3865b25fb180a47dac6965631d778803a85dee","unresolved":false,"context_lines":[{"line_number":2697,"context_line":"                instance.apply_migration_context()"},{"line_number":2698,"context_line":""},{"line_number":2699,"context_line":"                instance.save()"},{"line_number":2700,"context_line":"                drop_rebuild_claim(context, instance, image_meta\u003dimage_meta)"},{"line_number":2701,"context_line":""},{"line_number":2702,"context_line":"    def _do_rebuild_instance_with_claim(self, claim_context, *args, **kwargs):"},{"line_number":2703,"context_line":"        \"\"\"Helper to avoid deep nesting in the top-level method.\"\"\""}],"source_content_type":"text/x-python","patch_set":22,"id":"ba15a1d1_9e2e36a4","line":2700,"in_reply_to":"ba15a1d1_3de7f7ad","updated":"2015-09-21 13:54:32.000000000","message":"So it seems that the difference between resize and this case is that in resize, we would drop the the resize claim on the source host, while here we do it on the destination. So in this case YAR - we want to only remove the record but not decrease the usage as we are leaving a window between this moment and the next run of the resource tracker when the resources are not accounted for.\n\nI think we need to modify the drop_move_claim method to not drop the resources, just delete the migration, or better yet do something a bit more explicit that explains why we are doing the things we are doing.","commit_id":"8e5d760dba6a59573d225607faf1eed38f8c2332"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"7a449ebe3d1ac31aeebd033c234758e52095acda","unresolved":false,"context_lines":[{"line_number":2697,"context_line":"                instance.apply_migration_context()"},{"line_number":2698,"context_line":""},{"line_number":2699,"context_line":"                instance.save()"},{"line_number":2700,"context_line":"                drop_rebuild_claim(context, instance, image_meta\u003dimage_meta)"},{"line_number":2701,"context_line":""},{"line_number":2702,"context_line":"    def _do_rebuild_instance_with_claim(self, claim_context, *args, **kwargs):"},{"line_number":2703,"context_line":"        \"\"\"Helper to avoid deep nesting in the top-level method.\"\"\""}],"source_content_type":"text/x-python","patch_set":22,"id":"ba15a1d1_c5cdcb87","line":2700,"in_reply_to":"ba15a1d1_532aec7f","updated":"2015-09-21 07:49:42.000000000","message":"Yeah this is how Claims context managers work. It\u0027s better to go read the code than for me to explain it here in detail, but the overview is: once the claim is successful AND the instance is safely provisioned - we want to drop the claim because 1) we no longer need to track it on the source 2) it will be tracked on the destintation automatically once the host attribute is changed.","commit_id":"8e5d760dba6a59573d225607faf1eed38f8c2332"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"7318276110a80da83167e8c850c60a456e13b65b","unresolved":false,"context_lines":[{"line_number":2697,"context_line":"                instance.apply_migration_context()"},{"line_number":2698,"context_line":""},{"line_number":2699,"context_line":"                instance.save()"},{"line_number":2700,"context_line":"                drop_rebuild_claim(context, instance, image_meta\u003dimage_meta)"},{"line_number":2701,"context_line":""},{"line_number":2702,"context_line":"    def _do_rebuild_instance_with_claim(self, claim_context, *args, **kwargs):"},{"line_number":2703,"context_line":"        \"\"\"Helper to avoid deep nesting in the top-level method.\"\"\""}],"source_content_type":"text/x-python","patch_set":22,"id":"ba15a1d1_3de7f7ad","line":2700,"in_reply_to":"ba15a1d1_7d81ef4c","updated":"2015-09-21 11:36:05.000000000","message":"Thanks for the such detail explain first!\n\nI also agree we need remove the migration record. What I\u0027m point to is more about we shouldn\u0027t drop the resource consume in the destination host.\n\nif we drop the the claim, there may have 60s to wait next available resource update by RT. So in that 60s, the scheduler may schedule more instance to this node, if the last resource already used by rebuild instance, the instance will be rebuild failed. (That is another we should fix also, add retry for rebuild after we have claim). At least, if we didn\u0027t drop the resource consume, we can reduce a lot of this kind of race happened. (if you want to say we have retry later, I would say retry is cost also, it send request back to conductor again).\n\nSo the right way to is we remove the migration record when success, but didn\u0027t drop the resource consuming.","commit_id":"8e5d760dba6a59573d225607faf1eed38f8c2332"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"3dd030b9bdf696c17a3d3ab600ce85cb04abb697","unresolved":false,"context_lines":[{"line_number":2697,"context_line":"                instance.apply_migration_context()"},{"line_number":2698,"context_line":""},{"line_number":2699,"context_line":"                instance.save()"},{"line_number":2700,"context_line":"                drop_rebuild_claim(context, instance, image_meta\u003dimage_meta)"},{"line_number":2701,"context_line":""},{"line_number":2702,"context_line":"    def _do_rebuild_instance_with_claim(self, claim_context, *args, **kwargs):"},{"line_number":2703,"context_line":"        \"\"\"Helper to avoid deep nesting in the top-level method.\"\"\""}],"source_content_type":"text/x-python","patch_set":22,"id":"ba15a1d1_f680c3f9","line":2700,"in_reply_to":"ba15a1d1_c5cdcb87","updated":"2015-09-21 09:32:17.000000000","message":"I don\u0027t think so. Special for 2), we didn\u0027t doing that for resize, and booting instance.\n\nAnd this can be disabled https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L192","commit_id":"8e5d760dba6a59573d225607faf1eed38f8c2332"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"d95171b60b1c9a34993958934f89e522b64460ca","unresolved":false,"context_lines":[{"line_number":2697,"context_line":"                instance.apply_migration_context()"},{"line_number":2698,"context_line":""},{"line_number":2699,"context_line":"                instance.save()"},{"line_number":2700,"context_line":"                drop_rebuild_claim(context, instance, image_meta\u003dimage_meta)"},{"line_number":2701,"context_line":""},{"line_number":2702,"context_line":"    def _do_rebuild_instance_with_claim(self, claim_context, *args, **kwargs):"},{"line_number":2703,"context_line":"        \"\"\"Helper to avoid deep nesting in the top-level method.\"\"\""}],"source_content_type":"text/x-python","patch_set":22,"id":"ba15a1d1_34aab486","line":2700,"in_reply_to":"ba15a1d1_f680c3f9","updated":"2015-09-21 10:00:47.000000000","message":"I mean we didn\u0027t abort(abort means drop the claim) claim for resize and booting instance \nhttps://github.com/openstack/nova/blob/master/nova/compute/claims.py#L51","commit_id":"8e5d760dba6a59573d225607faf1eed38f8c2332"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"77ce3d5335432c1dcd8b03080d5984bc0be16786","unresolved":false,"context_lines":[{"line_number":2755,"context_line":"            instance.save()"},{"line_number":2756,"context_line":""},{"line_number":2757,"context_line":"        if image_ref:"},{"line_number":2758,"context_line":"            image_meta \u003d self.image_api.get(context, image_ref)"},{"line_number":2759,"context_line":"        else:"},{"line_number":2760,"context_line":"            image_meta \u003d {}"},{"line_number":2761,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"ba15a1d1_9319647c","line":2758,"updated":"2015-09-20 10:39:03.000000000","message":"at line 2655 already get image_meta, looks like we can save one.","commit_id":"8e5d760dba6a59573d225607faf1eed38f8c2332"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"7a449ebe3d1ac31aeebd033c234758e52095acda","unresolved":false,"context_lines":[{"line_number":2755,"context_line":"            instance.save()"},{"line_number":2756,"context_line":""},{"line_number":2757,"context_line":"        if image_ref:"},{"line_number":2758,"context_line":"            image_meta \u003d self.image_api.get(context, image_ref)"},{"line_number":2759,"context_line":"        else:"},{"line_number":2760,"context_line":"            image_meta \u003d {}"},{"line_number":2761,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"ba15a1d1_05aae385","line":2758,"in_reply_to":"ba15a1d1_9319647c","updated":"2015-09-21 07:49:42.000000000","message":"Not really related to this patch so I\u0027d leave it as a cleanup for later.","commit_id":"8e5d760dba6a59573d225607faf1eed38f8c2332"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d521e7ac2f94a15af9b40dea271d5d9ddb26e42d","unresolved":false,"context_lines":[{"line_number":2635,"context_line":"                          rebuild operation (if it\u0027s a part of evacaute)"},{"line_number":2636,"context_line":"        :param scheduled_node: A node of the host chosen by the scheduler. If a"},{"line_number":2637,"context_line":"                               host was specified by the user, this will be"},{"line_number":2638,"context_line":"                               None"},{"line_number":2639,"context_line":"        :param limits: Overcommit limits set by the scheduler. If a host was"},{"line_number":2640,"context_line":"                       specified by the user, this will be None"},{"line_number":2641,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":23,"id":"ba15a1d1_f7c3de88","line":2638,"updated":"2015-09-21 11:30:36.000000000","message":"Nit: tempting to add a note saying this is about evacuate and rebuild is always on the same host, I think?","commit_id":"ecc85d46daf5277dae81e1c4ccc91513556e9d95"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d521e7ac2f94a15af9b40dea271d5d9ddb26e42d","unresolved":false,"context_lines":[{"line_number":2655,"context_line":"        if image_ref:"},{"line_number":2656,"context_line":"            image_meta \u003d self.image_api.get(context, image_ref)"},{"line_number":2657,"context_line":""},{"line_number":2658,"context_line":"        def _fail_migration(migration, instance):"},{"line_number":2659,"context_line":"            if migration:"},{"line_number":2660,"context_line":"                migration.status \u003d \u0027failed\u0027"},{"line_number":2661,"context_line":"                migration.save()"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba15a1d1_fa3985d9","line":2658,"updated":"2015-09-21 11:30:36.000000000","message":"Nit: its tempting to do this as a decorator for consistency, but part of me likes this more explicit approach here.","commit_id":"ecc85d46daf5277dae81e1c4ccc91513556e9d95"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a595c21826d50eea1f4fb5ca5d52e4a5d12d08d4","unresolved":false,"context_lines":[{"line_number":2698,"context_line":"                instance.apply_migration_context()"},{"line_number":2699,"context_line":""},{"line_number":2700,"context_line":"                instance.save()"},{"line_number":2701,"context_line":"                drop_rebuild_claim(context, instance, image_meta\u003dimage_meta)"},{"line_number":2702,"context_line":""},{"line_number":2703,"context_line":"    def _do_rebuild_instance_with_claim(self, claim_context, *args, **kwargs):"},{"line_number":2704,"context_line":"        \"\"\"Helper to avoid deep nesting in the top-level method.\"\"\""}],"source_content_type":"text/x-python","patch_set":23,"id":"ba15a1d1_e8545f22","line":2701,"updated":"2015-09-21 12:42:02.000000000","message":"Confirm resize seems to drop the rebuild_claim for the destination host:\nhttps://github.com/openstack/nova/blob/master/nova/compute/manager.py#L3369\n\nThis seems closer to revert resize, which seems wrong:\nhttps://github.com/openstack/nova/blob/master/nova/compute/manager.py#L3459\n\nBut maybe this works because its not a resize, bit confused.","commit_id":"ecc85d46daf5277dae81e1c4ccc91513556e9d95"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"2586bc58f2c99be8fd309a23b71a292ed5150a90","unresolved":false,"context_lines":[{"line_number":2698,"context_line":"                instance.apply_migration_context()"},{"line_number":2699,"context_line":""},{"line_number":2700,"context_line":"                instance.save()"},{"line_number":2701,"context_line":"                drop_rebuild_claim(context, instance, image_meta\u003dimage_meta)"},{"line_number":2702,"context_line":""},{"line_number":2703,"context_line":"    def _do_rebuild_instance_with_claim(self, claim_context, *args, **kwargs):"},{"line_number":2704,"context_line":"        \"\"\"Helper to avoid deep nesting in the top-level method.\"\"\""}],"source_content_type":"text/x-python","patch_set":23,"id":"ba15a1d1_f147631b","line":2701,"in_reply_to":"ba15a1d1_3e24caad","updated":"2015-09-21 13:57:48.000000000","message":"So the difference between this and the confirm_resize case is that we drop the claim on the soruce_node there but in this case we drop it on the destination_node.\n\nThis indeed means that we need to only drop the migration but not the usage. We can\u0027t really call back to the old host since in case of evac it is assumed dead.","commit_id":"ecc85d46daf5277dae81e1c4ccc91513556e9d95"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"6a229a3c910691e9b11300d7b4f77f99e05264d4","unresolved":false,"context_lines":[{"line_number":2698,"context_line":"                instance.apply_migration_context()"},{"line_number":2699,"context_line":""},{"line_number":2700,"context_line":"                instance.save()"},{"line_number":2701,"context_line":"                drop_rebuild_claim(context, instance, image_meta\u003dimage_meta)"},{"line_number":2702,"context_line":""},{"line_number":2703,"context_line":"    def _do_rebuild_instance_with_claim(self, claim_context, *args, **kwargs):"},{"line_number":2704,"context_line":"        \"\"\"Helper to avoid deep nesting in the top-level method.\"\"\""}],"source_content_type":"text/x-python","patch_set":23,"id":"ba15a1d1_3e24caad","line":2701,"in_reply_to":"ba15a1d1_e8545f22","updated":"2015-09-21 13:43:09.000000000","message":"if resize drop that also, I think we should improve that.\n\nConsider with or without this patch, the problem which I pointed to at previous patchset always existed, so we can fix that in later.\n\nIf we think this is acceptable and this patch important for L, just free to ignore my -1, merge this directly.\n\nsorry I can\u0027t waiting for more time to discuss, I need take a rest for uncomfortable.","commit_id":"ecc85d46daf5277dae81e1c4ccc91513556e9d95"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"d2e6797e856ad6c7c73c91dd8c2751a6398dd53c","unresolved":false,"context_lines":[{"line_number":2698,"context_line":"                instance.apply_migration_context()"},{"line_number":2699,"context_line":""},{"line_number":2700,"context_line":"                instance.save()"},{"line_number":2701,"context_line":"                drop_rebuild_claim(context, instance, image_meta\u003dimage_meta)"},{"line_number":2702,"context_line":""},{"line_number":2703,"context_line":"    def _do_rebuild_instance_with_claim(self, claim_context, *args, **kwargs):"},{"line_number":2704,"context_line":"        \"\"\"Helper to avoid deep nesting in the top-level method.\"\"\""}],"source_content_type":"text/x-python","patch_set":23,"id":"ba15a1d1_00db981c","line":2701,"in_reply_to":"ba15a1d1_f147631b","updated":"2015-09-21 16:54:49.000000000","message":"OK so finally after staring at the code for some more, I have convinced myself that the same issue exists in resize but is slightly more difficult to hit.\n\nso it goes like this (with the current implementation):\n\n  1. run a resize_claim on the target host - this creates the migration record or sets it\u0027s destination.\n  2. do the actual migration which includes setting (and this is really important and wrong) instance.host to destination (we do this in resize_instance)\n  (happens async) 3. Run a resource tracker pass which will register the instance as belonging to the host in the resource tracker so we are now tracking it from it\u0027s instance record (and not it\u0027s migration record) \u003c-- note that this is wrong as we will not be using the right context.\n  4. apply the migration_context \u003c-- from this point on the next pass, we\u0027ll be tracking it properly on the destination host (we do this on confirm_resize)\n  5. Drop the resize_claim (decrement the resource and delete the migration record) Now we will not be tracking it on the source as there is no going back anymore. \n\nThe problem Alex spotted happens if 3 does not happen before 4 and 5 in which case we actually end up decrementing the usage and potentially reporting free resources until the next run of RT\n\nBased on the above we should consider making changing of the host an atomic operation that also 1) applies the new flavor and context. 2) updates instance.host\n\nSince the above is actually not a trivial thing to fix and already exists in the codebase, I am kind of  hesitant to say that we should not land this, as this is a big improvement on top of what is now (exactly 0 resource tracking so wrong all the time).\n\nI will raise a bug for this subtle issue to be fixed both here and in resize in M.","commit_id":"ecc85d46daf5277dae81e1c4ccc91513556e9d95"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f1cde939d5f05f335a39fc0d87a5586144d2c37c","unresolved":false,"context_lines":[{"line_number":2698,"context_line":"                instance.apply_migration_context()"},{"line_number":2699,"context_line":""},{"line_number":2700,"context_line":"                instance.save()"},{"line_number":2701,"context_line":"                drop_rebuild_claim(context, instance, image_meta\u003dimage_meta)"},{"line_number":2702,"context_line":""},{"line_number":2703,"context_line":"    def _do_rebuild_instance_with_claim(self, claim_context, *args, **kwargs):"},{"line_number":2704,"context_line":"        \"\"\"Helper to avoid deep nesting in the top-level method.\"\"\""}],"source_content_type":"text/x-python","patch_set":23,"id":"ba15a1d1_9a13970d","line":2701,"in_reply_to":"ba15a1d1_f147631b","updated":"2015-09-21 16:20:46.000000000","message":"oh... gotcha, its this bit:\nhttps://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L338\nthats crazy subtal.\n\nAgreed it makes no sense for evacuate to worry about the old node, at least in the case we generally care about. Although I am not totally sure we assume it stays dead, in all cases. At least thats not totally clear to me.","commit_id":"ecc85d46daf5277dae81e1c4ccc91513556e9d95"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"562b10f450c5aeb32102ab88d488f11d4656b274","unresolved":false,"context_lines":[{"line_number":2689,"context_line":"            finally:"},{"line_number":2690,"context_line":"                instance.host \u003d self.host"},{"line_number":2691,"context_line":"                instance.node \u003d node_name"},{"line_number":2692,"context_line":"                instance.save()"},{"line_number":2693,"context_line":""},{"line_number":2694,"context_line":"        if image_ref:"},{"line_number":2695,"context_line":"            image_meta \u003d self.image_api.get(context, image_ref)"}],"source_content_type":"text/x-python","patch_set":25,"id":"ba15a1d1_903ff3d5","side":"PARENT","line":2692,"updated":"2015-09-21 17:56:36.000000000","message":"This save was moved out as we need to make sure we don\u0027t mark the isntance as belonging to this host before we make sure that all RT stuff is set up correctly to avoid the RT kicking in and seeing an inconsistent view of things.","commit_id":"1e9c350bdcc83cf4e8926f79b1bd9234d59ae408"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"710295a709ffc0d5f536df1a8cd64739507b4eb1","unresolved":false,"context_lines":[{"line_number":2694,"context_line":"                # attributes that have been set in _do_rebuild_instance thus"},{"line_number":2695,"context_line":"                # making sure that next RT pass is consistent since it will be"},{"line_number":2696,"context_line":"                # based on the instance and not the migration DB entry."},{"line_number":2697,"context_line":"                instance.save()"},{"line_number":2698,"context_line":"                instance.drop_migration_context()"},{"line_number":2699,"context_line":""},{"line_number":2700,"context_line":"                # NOTE (ndipanov): Mark the migration as done only after we"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba15a1d1_069e34b8","line":2697,"updated":"2015-09-22 08:58:32.000000000","message":"See line 2783, I think it has already been saved.","commit_id":"77141b44cc6668b6eaccc33733f625f3a5d1eab9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"710295a709ffc0d5f536df1a8cd64739507b4eb1","unresolved":false,"context_lines":[{"line_number":2755,"context_line":"                    LOG.exception(_LE(\u0027Failed to get compute_info for %s\u0027),"},{"line_number":2756,"context_line":"                                  self.host)"},{"line_number":2757,"context_line":"            instance.host \u003d self.host"},{"line_number":2758,"context_line":"            instance.node \u003d scheduled_node"},{"line_number":2759,"context_line":""},{"line_number":2760,"context_line":"        if image_ref:"},{"line_number":2761,"context_line":"            image_meta \u003d self.image_api.get(context, image_ref)"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba15a1d1_06507409","line":2758,"updated":"2015-09-22 08:58:32.000000000","message":"Nit: I am tempted to say we add a comment here to say when this gets saved (on error, or just before updating the migration to done). I think this code must live here, but it takes quite a detailed look to come up with that conclusion.","commit_id":"77141b44cc6668b6eaccc33733f625f3a5d1eab9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"710295a709ffc0d5f536df1a8cd64739507b4eb1","unresolved":false,"context_lines":[{"line_number":2780,"context_line":""},{"line_number":2781,"context_line":"        instance.power_state \u003d self._get_power_state(context, instance)"},{"line_number":2782,"context_line":"        instance.task_state \u003d task_states.REBUILDING"},{"line_number":2783,"context_line":"        instance.save(expected_task_state\u003d[task_states.REBUILDING])"},{"line_number":2784,"context_line":""},{"line_number":2785,"context_line":"        if recreate:"},{"line_number":2786,"context_line":"            # Needed for nova-network, does nothing for neutron"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba15a1d1_465d0c14","line":2783,"updated":"2015-09-22 08:58:32.000000000","message":"bummer, this will update the host and node, is that OK?\n\nMaybe we need to move that host node update after this save?","commit_id":"77141b44cc6668b6eaccc33733f625f3a5d1eab9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"710295a709ffc0d5f536df1a8cd64739507b4eb1","unresolved":false,"context_lines":[{"line_number":2830,"context_line":"            # of rebuild, fall back to the default implementation"},{"line_number":2831,"context_line":"            self._rebuild_default_impl(**kwargs)"},{"line_number":2832,"context_line":"        self._update_instance_after_spawn(context, instance)"},{"line_number":2833,"context_line":"        instance.save(expected_task_state\u003d[task_states.REBUILD_SPAWNING])"},{"line_number":2834,"context_line":""},{"line_number":2835,"context_line":"        if orig_vm_state \u003d\u003d vm_states.STOPPED:"},{"line_number":2836,"context_line":"            LOG.info(_LI(\"bringing vm to original state: \u0027%s\u0027\"),"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba15a1d1_06ecf427","line":2833,"updated":"2015-09-22 08:58:32.000000000","message":"We have another few saves down here, do this also race?","commit_id":"77141b44cc6668b6eaccc33733f625f3a5d1eab9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"50db2df0edb8ac32516b005f4dfa74225ba3c9a1","unresolved":false,"context_lines":[{"line_number":2669,"context_line":"                migration.status \u003d \u0027failed\u0027"},{"line_number":2670,"context_line":"                migration.save()"},{"line_number":2671,"context_line":""},{"line_number":2672,"context_line":"            instance.task_state \u003d None"},{"line_number":2673,"context_line":"            instance.save()"},{"line_number":2674,"context_line":""},{"line_number":2675,"context_line":"        with self._error_out_instance_on_exception(context, instance):"}],"source_content_type":"text/x-python","patch_set":27,"id":"ba15a1d1_066154a8","line":2672,"updated":"2015-09-22 09:08:39.000000000","message":"Nit: this duplicates the decorator: reverts_task_state","commit_id":"8863da3253c3c2bc073c11ac8b7fa3da9302d0c4"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"643492bd50ca28064eea661b3f65e7fcfb4bcab8","unresolved":false,"context_lines":[{"line_number":2669,"context_line":"                migration.status \u003d \u0027failed\u0027"},{"line_number":2670,"context_line":"                migration.save()"},{"line_number":2671,"context_line":""},{"line_number":2672,"context_line":"            instance.task_state \u003d None"},{"line_number":2673,"context_line":"            instance.save()"},{"line_number":2674,"context_line":""},{"line_number":2675,"context_line":"        with self._error_out_instance_on_exception(context, instance):"}],"source_content_type":"text/x-python","patch_set":27,"id":"ba15a1d1_e103ea74","line":2672,"in_reply_to":"ba15a1d1_066154a8","updated":"2015-09-22 09:24:46.000000000","message":"Done though this was there already","commit_id":"8863da3253c3c2bc073c11ac8b7fa3da9302d0c4"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"c0d5c7f6f78097603641e73f8508b1ccf99d6083","unresolved":false,"context_lines":[{"line_number":2669,"context_line":"                migration.status \u003d \u0027failed\u0027"},{"line_number":2670,"context_line":"                migration.save()"},{"line_number":2671,"context_line":""},{"line_number":2672,"context_line":"            instance.task_state \u003d None"},{"line_number":2673,"context_line":"            instance.save()"},{"line_number":2674,"context_line":""},{"line_number":2675,"context_line":"        with self._error_out_instance_on_exception(context, instance):"}],"source_content_type":"text/x-python","patch_set":27,"id":"ba15a1d1_cc705da7","line":2672,"in_reply_to":"ba15a1d1_e103ea74","updated":"2015-09-22 09:30:36.000000000","message":"Actually it wasn\u0027t - let me remove this.","commit_id":"8863da3253c3c2bc073c11ac8b7fa3da9302d0c4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"50db2df0edb8ac32516b005f4dfa74225ba3c9a1","unresolved":false,"context_lines":[{"line_number":2694,"context_line":"                raise exception.BuildAbortException("},{"line_number":2695,"context_line":"                    instance_uuid\u003dinstance.uuid, reason\u003de.format_message())"},{"line_number":2696,"context_line":"            except Exception as e:"},{"line_number":2697,"context_line":"                _fail_migration(migration, instance)"},{"line_number":2698,"context_line":"                self._notify_about_instance_usage(context, instance,"},{"line_number":2699,"context_line":"                        \u0027rebuild.error\u0027, fault\u003de)"},{"line_number":2700,"context_line":"                raise"}],"source_content_type":"text/x-python","patch_set":27,"id":"ba15a1d1_663ff025","line":2697,"updated":"2015-09-22 09:08:39.000000000","message":"do we need to update the scheduled_node in this case, so the admin will know which host to go and clean up any mess on?","commit_id":"8863da3253c3c2bc073c11ac8b7fa3da9302d0c4"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"643492bd50ca28064eea661b3f65e7fcfb4bcab8","unresolved":false,"context_lines":[{"line_number":2694,"context_line":"                raise exception.BuildAbortException("},{"line_number":2695,"context_line":"                    instance_uuid\u003dinstance.uuid, reason\u003de.format_message())"},{"line_number":2696,"context_line":"            except Exception as e:"},{"line_number":2697,"context_line":"                _fail_migration(migration, instance)"},{"line_number":2698,"context_line":"                self._notify_about_instance_usage(context, instance,"},{"line_number":2699,"context_line":"                        \u0027rebuild.error\u0027, fault\u003de)"},{"line_number":2700,"context_line":"                raise"}],"source_content_type":"text/x-python","patch_set":27,"id":"ba15a1d1_01985e1a","line":2697,"in_reply_to":"ba15a1d1_663ff025","updated":"2015-09-22 09:24:46.000000000","message":"This will now be visible from the migration record. We should probably be documenting it though.","commit_id":"8863da3253c3c2bc073c11ac8b7fa3da9302d0c4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"86055d735571b21ad4c9c2a08d284246900ca389","unresolved":false,"context_lines":[{"line_number":2694,"context_line":"                raise exception.BuildAbortException("},{"line_number":2695,"context_line":"                    instance_uuid\u003dinstance.uuid, reason\u003de.format_message())"},{"line_number":2696,"context_line":"            except Exception as e:"},{"line_number":2697,"context_line":"                _fail_migration(migration, instance)"},{"line_number":2698,"context_line":"                self._notify_about_instance_usage(context, instance,"},{"line_number":2699,"context_line":"                        \u0027rebuild.error\u0027, fault\u003de)"},{"line_number":2700,"context_line":"                raise"}],"source_content_type":"text/x-python","patch_set":27,"id":"ba15a1d1_41bf36aa","line":2697,"in_reply_to":"ba15a1d1_663ff025","updated":"2015-09-22 09:35:30.000000000","message":"Yeah, after discussing, I think its a good change, but yeah, its worth noting that somewhere.","commit_id":"8863da3253c3c2bc073c11ac8b7fa3da9302d0c4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"50db2df0edb8ac32516b005f4dfa74225ba3c9a1","unresolved":false,"context_lines":[{"line_number":2705,"context_line":"                # it will be based on the instance and not the migration DB"},{"line_number":2706,"context_line":"                # entry."},{"line_number":2707,"context_line":"                instance.host \u003d self.host"},{"line_number":2708,"context_line":"                instance.node \u003d scheduled_node"},{"line_number":2709,"context_line":"                instance.save()"},{"line_number":2710,"context_line":"                instance.drop_migration_context()"},{"line_number":2711,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"ba15a1d1_06bdd4d6","line":2708,"updated":"2015-09-22 09:08:39.000000000","message":"what if scheduled_node is None, I think we should skip this in that case?","commit_id":"8863da3253c3c2bc073c11ac8b7fa3da9302d0c4"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"643492bd50ca28064eea661b3f65e7fcfb4bcab8","unresolved":false,"context_lines":[{"line_number":2705,"context_line":"                # it will be based on the instance and not the migration DB"},{"line_number":2706,"context_line":"                # entry."},{"line_number":2707,"context_line":"                instance.host \u003d self.host"},{"line_number":2708,"context_line":"                instance.node \u003d scheduled_node"},{"line_number":2709,"context_line":"                instance.save()"},{"line_number":2710,"context_line":"                instance.drop_migration_context()"},{"line_number":2711,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"ba15a1d1_8159ce5d","line":2708,"in_reply_to":"ba15a1d1_06bdd4d6","updated":"2015-09-22 09:24:46.000000000","message":"Not sure we want to leave it inconsistent in that case. The old code would do it this way too + node being None should really be an edge case that should never happen (host being set to the wrong value or DB record gone from under us)","commit_id":"8863da3253c3c2bc073c11ac8b7fa3da9302d0c4"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"1edf6cd89470ec3f171062f38c670ae5e67b076f","unresolved":false,"context_lines":[{"line_number":2705,"context_line":"                # it will be based on the instance and not the migration DB"},{"line_number":2706,"context_line":"                # entry."},{"line_number":2707,"context_line":"                instance.host \u003d self.host"},{"line_number":2708,"context_line":"                instance.node \u003d scheduled_node"},{"line_number":2709,"context_line":"                instance.save()"},{"line_number":2710,"context_line":"                instance.drop_migration_context()"},{"line_number":2711,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"ba15a1d1_8c7265e2","line":2708,"in_reply_to":"ba15a1d1_0c3ad598","updated":"2015-09-22 09:50:10.000000000","message":"Right but we would then fish it out of the DB up there at the beginning (or at least the first one we find).","commit_id":"8863da3253c3c2bc073c11ac8b7fa3da9302d0c4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"86055d735571b21ad4c9c2a08d284246900ca389","unresolved":false,"context_lines":[{"line_number":2705,"context_line":"                # it will be based on the instance and not the migration DB"},{"line_number":2706,"context_line":"                # entry."},{"line_number":2707,"context_line":"                instance.host \u003d self.host"},{"line_number":2708,"context_line":"                instance.node \u003d scheduled_node"},{"line_number":2709,"context_line":"                instance.save()"},{"line_number":2710,"context_line":"                instance.drop_migration_context()"},{"line_number":2711,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"ba15a1d1_0c3ad598","line":2708,"in_reply_to":"ba15a1d1_8159ce5d","updated":"2015-09-22 09:35:30.000000000","message":"oh, I was thinking scheduled_node would be None for rebuild, but not evacuate, OK.","commit_id":"8863da3253c3c2bc073c11ac8b7fa3da9302d0c4"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"35eeeb8ffa3f42f8dc2258e8b453dd49acabe0a8","unresolved":false,"context_lines":[{"line_number":2633,"context_line":"                                   partition must be preserved on rebuild"},{"line_number":2634,"context_line":"        :param migration: a Migration object if one was created for this"},{"line_number":2635,"context_line":"                          rebuild operation (if it\u0027s a part of evacaute)"},{"line_number":2636,"context_line":"        :param scheduled_node: A node of the host chosen by the scheduler. If a"},{"line_number":2637,"context_line":"                               host was specified by the user, this will be"},{"line_number":2638,"context_line":"                               None"},{"line_number":2639,"context_line":"        :param limits: Overcommit limits set by the scheduler. If a host was"},{"line_number":2640,"context_line":"                       specified by the user, this will be None"},{"line_number":2641,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_2340f5a4","line":2638,"range":{"start_line":2636,"start_character":75,"end_line":2638,"end_character":35},"updated":"2015-09-22 15:25:44.000000000","message":"thanks for the comment, it makes understandable why you name it scheduled_node and not just node.\n\nNote, this could probably change given that we plan to modify the evacuate API using http://specs.openstack.org/openstack/nova-specs/specs/liberty/approved/check-destination-on-migrations.html but we would still leave room for forcing a destination (and in that case, we should make sure to still provide a nullable attribute for \u0027node\u0027)","commit_id":"77aa751f7357cb7cd38eb043f632d193991a6236"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"4583550c88d47d5fb7dfc451b156ae7b678b493a","unresolved":false,"context_lines":[{"line_number":2689,"context_line":"                self._notify_about_instance_usage(context, instance,"},{"line_number":2690,"context_line":"                        \u0027rebuild.error\u0027, fault\u003de)"},{"line_number":2691,"context_line":"                raise exception.BuildAbortException("},{"line_number":2692,"context_line":"                    instance_uuid\u003dinstance.uuid, reason\u003de.format_message())"},{"line_number":2693,"context_line":"            except Exception as e:"},{"line_number":2694,"context_line":"                _fail_migration(migration)"},{"line_number":2695,"context_line":"                self._notify_about_instance_usage(context, instance,"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_0f2c0449","line":2692,"updated":"2015-09-22 11:09:15.000000000","message":"Emmm....We should drop the resource usage consuming when failed for evacuate action. Right?\n\nSame as for line 2693","commit_id":"77aa751f7357cb7cd38eb043f632d193991a6236"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"2877dc18243385cd81e6528b00a5b63671c8ae8c","unresolved":false,"context_lines":[{"line_number":2689,"context_line":"                self._notify_about_instance_usage(context, instance,"},{"line_number":2690,"context_line":"                        \u0027rebuild.error\u0027, fault\u003de)"},{"line_number":2691,"context_line":"                raise exception.BuildAbortException("},{"line_number":2692,"context_line":"                    instance_uuid\u003dinstance.uuid, reason\u003de.format_message())"},{"line_number":2693,"context_line":"            except Exception as e:"},{"line_number":2694,"context_line":"                _fail_migration(migration)"},{"line_number":2695,"context_line":"                self._notify_about_instance_usage(context, instance,"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_1218a783","line":2692,"in_reply_to":"ba15a1d1_0f2c0449","updated":"2015-09-22 12:11:17.000000000","message":"so instance is not set to this host if this happens and migration is not in progress anymore (it\u0027s moved to failed) we could call drop_resize_claim here but it\u0027s an optimization really - next pass of the RT will be correct.","commit_id":"77aa751f7357cb7cd38eb043f632d193991a6236"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"9f8c97ca75cbc09bfabd6d4b2cc79dc9a6533eb5","unresolved":false,"context_lines":[{"line_number":2689,"context_line":"                self._notify_about_instance_usage(context, instance,"},{"line_number":2690,"context_line":"                        \u0027rebuild.error\u0027, fault\u003de)"},{"line_number":2691,"context_line":"                raise exception.BuildAbortException("},{"line_number":2692,"context_line":"                    instance_uuid\u003dinstance.uuid, reason\u003de.format_message())"},{"line_number":2693,"context_line":"            except Exception as e:"},{"line_number":2694,"context_line":"                _fail_migration(migration)"},{"line_number":2695,"context_line":"                self._notify_about_instance_usage(context, instance,"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_beaf447c","line":2692,"in_reply_to":"ba15a1d1_1218a783","updated":"2015-09-22 12:42:41.000000000","message":"Actually this willbe taken care of by the claim context manager in both cases.","commit_id":"77aa751f7357cb7cd38eb043f632d193991a6236"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"00a15fd0cd0d4a5ca29eb1669305ef9282ed0954","unresolved":false,"context_lines":[{"line_number":2689,"context_line":"                self._notify_about_instance_usage(context, instance,"},{"line_number":2690,"context_line":"                        \u0027rebuild.error\u0027, fault\u003de)"},{"line_number":2691,"context_line":"                raise exception.BuildAbortException("},{"line_number":2692,"context_line":"                    instance_uuid\u003dinstance.uuid, reason\u003de.format_message())"},{"line_number":2693,"context_line":"            except Exception as e:"},{"line_number":2694,"context_line":"                _fail_migration(migration)"},{"line_number":2695,"context_line":"                self._notify_about_instance_usage(context, instance,"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_7cb455f1","line":2692,"in_reply_to":"ba15a1d1_5cd95182","updated":"2015-09-22 12:55:33.000000000","message":"There is nothing to fix - it is handled by the context manager, if there was an exception, the __exit__ calls the drop_move_claim() method","commit_id":"77aa751f7357cb7cd38eb043f632d193991a6236"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"77a0c2230ffac5860c074b8cd6e386393b3851c7","unresolved":false,"context_lines":[{"line_number":2689,"context_line":"                self._notify_about_instance_usage(context, instance,"},{"line_number":2690,"context_line":"                        \u0027rebuild.error\u0027, fault\u003de)"},{"line_number":2691,"context_line":"                raise exception.BuildAbortException("},{"line_number":2692,"context_line":"                    instance_uuid\u003dinstance.uuid, reason\u003de.format_message())"},{"line_number":2693,"context_line":"            except Exception as e:"},{"line_number":2694,"context_line":"                _fail_migration(migration)"},{"line_number":2695,"context_line":"                self._notify_about_instance_usage(context, instance,"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_ff34d7de","line":2692,"in_reply_to":"ba15a1d1_7cb455f1","updated":"2015-09-22 13:05:20.000000000","message":"sorry, I missed the line 2718","commit_id":"77aa751f7357cb7cd38eb043f632d193991a6236"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"aea5222533316c66d3ac162dde06894056fa997f","unresolved":false,"context_lines":[{"line_number":2689,"context_line":"                self._notify_about_instance_usage(context, instance,"},{"line_number":2690,"context_line":"                        \u0027rebuild.error\u0027, fault\u003de)"},{"line_number":2691,"context_line":"                raise exception.BuildAbortException("},{"line_number":2692,"context_line":"                    instance_uuid\u003dinstance.uuid, reason\u003de.format_message())"},{"line_number":2693,"context_line":"            except Exception as e:"},{"line_number":2694,"context_line":"                _fail_migration(migration)"},{"line_number":2695,"context_line":"                self._notify_about_instance_usage(context, instance,"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_5cd95182","line":2692,"in_reply_to":"ba15a1d1_beaf447c","updated":"2015-09-22 12:52:33.000000000","message":"yea, agree, claim context manager is better way. I point to this similar to successful case. We can update the resource early. But this isn\u0027t serious than successful case. If you think this is hard to fix for now. we can fix it later, and leave an TODO at here.","commit_id":"77aa751f7357cb7cd38eb043f632d193991a6236"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"ad97b039f642c455ca42ba8d1b0bc74b66015d29","unresolved":false,"context_lines":[{"line_number":2662,"context_line":"                scheduled_node \u003d compute_node.hypervisor_hostname"},{"line_number":2663,"context_line":"            except exception.ComputeHostNotFound:"},{"line_number":2664,"context_line":"                LOG.exception(_LE(\u0027Failed to get compute_info for %s\u0027),"},{"line_number":2665,"context_line":"                                self.host)"},{"line_number":2666,"context_line":""},{"line_number":2667,"context_line":"        def _fail_migration(migration):"},{"line_number":2668,"context_line":"            if migration:"}],"source_content_type":"text/x-python","patch_set":29,"id":"ba15a1d1_1c0c15eb","line":2665,"range":{"start_line":2665,"start_character":41,"end_line":2665,"end_character":42},"updated":"2015-09-23 05:04:44.000000000","message":"I think perhaps this should have instance\u003dinstance in the log message, but its not worth -1\u0027ing over.","commit_id":"dc0221d7240326a2d1b467e2a367bebb7e764e61"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3662ecc1cf0ed64df90a93203bb01a079c96e51d","unresolved":false,"context_lines":[{"line_number":2690,"context_line":"                        \u0027rebuild.error\u0027, fault\u003de)"},{"line_number":2691,"context_line":"                raise exception.BuildAbortException("},{"line_number":2692,"context_line":"                    instance_uuid\u003dinstance.uuid, reason\u003de.format_message())"},{"line_number":2693,"context_line":"            except Exception as e:"},{"line_number":2694,"context_line":"                _fail_migration(migration)"},{"line_number":2695,"context_line":"                self._notify_about_instance_usage(context, instance,"},{"line_number":2696,"context_line":"                        \u0027rebuild.error\u0027, fault\u003de)"}],"source_content_type":"text/x-python","patch_set":29,"id":"ba15a1d1_883791af","line":2693,"updated":"2015-09-22 19:37:08.000000000","message":"I usually dislike catching base exceptions, but that\u0027s okay here","commit_id":"dc0221d7240326a2d1b467e2a367bebb7e764e61"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"50db2df0edb8ac32516b005f4dfa74225ba3c9a1","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        return claim"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    @utils.synchronized(COMPUTE_RESOURCE_SEMAPHORE)"},{"line_number":192,"context_line":"    def rebuild_claim(self, context, instance, limits\u003dNone, image_meta\u003dNone,"},{"line_number":193,"context_line":"                      migration\u003dNone):"},{"line_number":194,"context_line":"        \"\"\"Create a claim for a rebuild operation.\"\"\""},{"line_number":195,"context_line":"        instance_type \u003d instance.flavor"}],"source_content_type":"text/x-python","patch_set":27,"id":"ba15a1d1_26e578a7","line":192,"updated":"2015-09-22 09:08:39.000000000","message":"Nit: I wonder if we should call this evacuation_claim?","commit_id":"8863da3253c3c2bc073c11ac8b7fa3da9302d0c4"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"bd692195f42c268fda58e560794340cf784de228","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        return claim"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    @utils.synchronized(COMPUTE_RESOURCE_SEMAPHORE)"},{"line_number":192,"context_line":"    def rebuild_claim(self, context, instance, limits\u003dNone, image_meta\u003dNone,"},{"line_number":193,"context_line":"                      migration\u003dNone):"},{"line_number":194,"context_line":"        \"\"\"Create a claim for a rebuild operation.\"\"\""},{"line_number":195,"context_line":"        instance_type \u003d instance.flavor"}],"source_content_type":"text/x-python","patch_set":27,"id":"ba15a1d1_2c1d5966","line":192,"in_reply_to":"ba15a1d1_26e578a7","updated":"2015-09-22 09:26:35.000000000","message":"yeah - thought about it, but seeing that we want to rename evacuate to \"resurect\" or something I thought I\u0027d stick with what the person reading the code would expect to see.","commit_id":"8863da3253c3c2bc073c11ac8b7fa3da9302d0c4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"86055d735571b21ad4c9c2a08d284246900ca389","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        return claim"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    @utils.synchronized(COMPUTE_RESOURCE_SEMAPHORE)"},{"line_number":192,"context_line":"    def rebuild_claim(self, context, instance, limits\u003dNone, image_meta\u003dNone,"},{"line_number":193,"context_line":"                      migration\u003dNone):"},{"line_number":194,"context_line":"        \"\"\"Create a claim for a rebuild operation.\"\"\""},{"line_number":195,"context_line":"        instance_type \u003d instance.flavor"}],"source_content_type":"text/x-python","patch_set":27,"id":"ba15a1d1_ec5d21ed","line":192,"in_reply_to":"ba15a1d1_2c1d5966","updated":"2015-09-22 09:35:30.000000000","message":"true.","commit_id":"8863da3253c3c2bc073c11ac8b7fa3da9302d0c4"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"4583550c88d47d5fb7dfc451b156ae7b678b493a","unresolved":false,"context_lines":[{"line_number":720,"context_line":"            if (instance[\u0027instance_type_id\u0027] \u003d\u003d"},{"line_number":721,"context_line":"                    migration.old_instance_type_id):"},{"line_number":722,"context_line":"                itype \u003d self._get_instance_type(context, instance, \u0027new_\u0027,"},{"line_number":723,"context_line":"                        migration.new_instance_type_id)"},{"line_number":724,"context_line":"                numa_topology \u003d self._get_migration_context_resource("},{"line_number":725,"context_line":"                    \u0027numa_topology\u0027, instance)"},{"line_number":726,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_af6dd89a","line":723,"updated":"2015-09-22 11:09:15.000000000","message":"For rebuild action, we will get \u0027None\u0027 here and at line 729. But this looks like right. We needn\u0027t consume resource usage for rebuild on the same host. But this is different with evacuate actions. See my next comment","commit_id":"77aa751f7357cb7cd38eb043f632d193991a6236"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"2877dc18243385cd81e6528b00a5b63671c8ae8c","unresolved":false,"context_lines":[{"line_number":720,"context_line":"            if (instance[\u0027instance_type_id\u0027] \u003d\u003d"},{"line_number":721,"context_line":"                    migration.old_instance_type_id):"},{"line_number":722,"context_line":"                itype \u003d self._get_instance_type(context, instance, \u0027new_\u0027,"},{"line_number":723,"context_line":"                        migration.new_instance_type_id)"},{"line_number":724,"context_line":"                numa_topology \u003d self._get_migration_context_resource("},{"line_number":725,"context_line":"                    \u0027numa_topology\u0027, instance)"},{"line_number":726,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_48ad1287","line":723,"in_reply_to":"ba15a1d1_af6dd89a","updated":"2015-09-22 12:11:17.000000000","message":"yes in both cases _get_instance_type should now be smarter than this.","commit_id":"77aa751f7357cb7cd38eb043f632d193991a6236"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"4583550c88d47d5fb7dfc451b156ae7b678b493a","unresolved":false,"context_lines":[{"line_number":740,"context_line":""},{"line_number":741,"context_line":"        elif outbound and not record:"},{"line_number":742,"context_line":"            # instance migrated, but record usage for a possible revert:"},{"line_number":743,"context_line":"            itype \u003d self._get_instance_type(context, instance, \u0027old_\u0027,"},{"line_number":744,"context_line":"                    migration.old_instance_type_id)"},{"line_number":745,"context_line":"            numa_topology \u003d self._get_migration_context_resource("},{"line_number":746,"context_line":"                \u0027numa_topology\u0027, instance, prefix\u003d\u0027old_\u0027)"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_afd87880","line":743,"updated":"2015-09-22 11:09:15.000000000","message":"For evacuate action, we will get \u0027None\u0027 here. Then this claim won\u0027t consuming the resource usage when itype\u003d\u003dNone","commit_id":"77aa751f7357cb7cd38eb043f632d193991a6236"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a9b87ebdd10b6766c29caf9643b087ad8eb3437b","unresolved":false,"context_lines":[{"line_number":740,"context_line":""},{"line_number":741,"context_line":"        elif outbound and not record:"},{"line_number":742,"context_line":"            # instance migrated, but record usage for a possible revert:"},{"line_number":743,"context_line":"            itype \u003d self._get_instance_type(context, instance, \u0027old_\u0027,"},{"line_number":744,"context_line":"                    migration.old_instance_type_id)"},{"line_number":745,"context_line":"            numa_topology \u003d self._get_migration_context_resource("},{"line_number":746,"context_line":"                \u0027numa_topology\u0027, instance, prefix\u003d\u0027old_\u0027)"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_ef0e708b","line":743,"in_reply_to":"ba15a1d1_afd87880","updated":"2015-09-22 11:14:06.000000000","message":"Oops,this comment should at line 737","commit_id":"77aa751f7357cb7cd38eb043f632d193991a6236"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"2877dc18243385cd81e6528b00a5b63671c8ae8c","unresolved":false,"context_lines":[{"line_number":740,"context_line":""},{"line_number":741,"context_line":"        elif outbound and not record:"},{"line_number":742,"context_line":"            # instance migrated, but record usage for a possible revert:"},{"line_number":743,"context_line":"            itype \u003d self._get_instance_type(context, instance, \u0027old_\u0027,"},{"line_number":744,"context_line":"                    migration.old_instance_type_id)"},{"line_number":745,"context_line":"            numa_topology \u003d self._get_migration_context_resource("},{"line_number":746,"context_line":"                \u0027numa_topology\u0027, instance, prefix\u003d\u0027old_\u0027)"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_0d2c0c49","line":743,"in_reply_to":"ba15a1d1_ef0e708b","updated":"2015-09-22 12:11:17.000000000","message":"yep","commit_id":"77aa751f7357cb7cd38eb043f632d193991a6236"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3662ecc1cf0ed64df90a93203bb01a079c96e51d","unresolved":false,"context_lines":[{"line_number":191,"context_line":"    @utils.synchronized(COMPUTE_RESOURCE_SEMAPHORE)"},{"line_number":192,"context_line":"    def rebuild_claim(self, context, instance, limits\u003dNone, image_meta\u003dNone,"},{"line_number":193,"context_line":"                      migration\u003dNone):"},{"line_number":194,"context_line":"        \"\"\"Create a claim for a rebuild operation.\"\"\""},{"line_number":195,"context_line":"        instance_type \u003d instance.flavor"},{"line_number":196,"context_line":"        return self._move_claim(context, instance, instance_type,"},{"line_number":197,"context_line":"                                move_type\u003d\u0027evacuation\u0027, limits\u003dlimits,"}],"source_content_type":"text/x-python","patch_set":29,"id":"ba15a1d1_e88bad66","line":194,"updated":"2015-09-22 19:37:08.000000000","message":"I saw john\u0027s comment on naming it rebuild instead of evacuate, that\u0027s fine.","commit_id":"dc0221d7240326a2d1b467e2a367bebb7e764e61"}],"nova/compute/rpcapi.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"58b27f2065fe5e45b5bda3046aa9379231761876","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2013 Red Hat, Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"},{"line_number":5,"context_line":"#    a copy of the License at"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa1b9901_f3d952f4","side":"PARENT","line":2,"updated":"2015-08-25 14:39:27.000000000","message":"Random whitespace damage","commit_id":"04174e1488e098241c542f08267c97a9b175cfbb"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"73cb482fedb830eef3a5ecc3fe761369d3e9f9bc","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2013 Red Hat, Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"},{"line_number":5,"context_line":"#    a copy of the License at"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa1b9901_bf7b9bbd","side":"PARENT","line":2,"in_reply_to":"fa1b9901_f3d952f4","updated":"2015-08-25 15:40:02.000000000","message":"c*ap","commit_id":"04174e1488e098241c542f08267c97a9b175cfbb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7930dddfa30a76cd3dde77eb2bd51886cebe0684","unresolved":false,"context_lines":[{"line_number":300,"context_line":"        * 4.2  - Add migration argument to live_migration()"},{"line_number":301,"context_line":"        * 4.3  - Added get_mks_console method"},{"line_number":302,"context_line":"        * 4.4  - Make refresh_instance_security_rules send an instance object"},{"line_number":303,"context_line":"        * 4.5  - Add migration, node and limits arguments to rebuild_instance()"},{"line_number":304,"context_line":"    \u0027\u0027\u0027"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"    VERSION_ALIASES \u003d {"}],"source_content_type":"text/x-python","patch_set":19,"id":"da20952f_c0779e00","line":303,"range":{"start_line":303,"start_character":32,"end_line":303,"end_character":36},"updated":"2015-09-03 15:37:22.000000000","message":"This is not the right parameter name, it should be scheduled_node","commit_id":"e99d78e24f81cc41559e477adc1db9a88e0ef746"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"50a05db2399e612b0d08ad1ee9724458efd850fd","unresolved":false,"context_lines":[{"line_number":300,"context_line":"        * 4.2  - Add migration argument to live_migration()"},{"line_number":301,"context_line":"        * 4.3  - Added get_mks_console method"},{"line_number":302,"context_line":"        * 4.4  - Make refresh_instance_security_rules send an instance object"},{"line_number":303,"context_line":"        * 4.5  - Add migration, node and limits arguments to rebuild_instance()"},{"line_number":304,"context_line":"    \u0027\u0027\u0027"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"    VERSION_ALIASES \u003d {"}],"source_content_type":"text/x-python","patch_set":19,"id":"da20952f_d7d685f0","line":303,"in_reply_to":"da20952f_c0779e00","updated":"2015-09-03 16:15:26.000000000","message":"Done","commit_id":"e99d78e24f81cc41559e477adc1db9a88e0ef746"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2279ee19952c844ff35bb4ffa6ae205403b24cc2","unresolved":false,"context_lines":[{"line_number":619,"context_line":"        version \u003d \u00274.5\u0027"},{"line_number":620,"context_line":"        if not self.client.can_send_version(version):"},{"line_number":621,"context_line":"            version \u003d \u00274.0\u0027"},{"line_number":622,"context_line":"            extra.pop(\u0027migration\u0027)"},{"line_number":623,"context_line":"            extra.pop(\u0027node\u0027)"},{"line_number":624,"context_line":"            extra.pop(\u0027limits\u0027)"},{"line_number":625,"context_line":"        cctxt \u003d self.client.prepare(server\u003d_compute_host(host, instance),"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba15a1d1_21498db7","line":622,"updated":"2015-09-17 06:15:34.000000000","message":"should we add , None) to be on the safe side?","commit_id":"e662aeb84048ebe455d969e505ac93d15662d6ed"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"0f7376368d82c060278d9650dc8c37a5eaa1c24b","unresolved":false,"context_lines":[{"line_number":619,"context_line":"        version \u003d \u00274.5\u0027"},{"line_number":620,"context_line":"        if not self.client.can_send_version(version):"},{"line_number":621,"context_line":"            version \u003d \u00274.0\u0027"},{"line_number":622,"context_line":"            extra.pop(\u0027migration\u0027)"},{"line_number":623,"context_line":"            extra.pop(\u0027node\u0027)"},{"line_number":624,"context_line":"            extra.pop(\u0027limits\u0027)"},{"line_number":625,"context_line":"        cctxt \u003d self.client.prepare(server\u003d_compute_host(host, instance),"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba15a1d1_a5aebb7e","line":622,"in_reply_to":"ba15a1d1_21498db7","updated":"2015-09-18 16:44:46.000000000","message":"Well we added it just 3 lines above","commit_id":"e662aeb84048ebe455d969e505ac93d15662d6ed"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"77ce3d5335432c1dcd8b03080d5984bc0be16786","unresolved":false,"context_lines":[{"line_number":620,"context_line":"        if not self.client.can_send_version(version):"},{"line_number":621,"context_line":"            version \u003d \u00274.0\u0027"},{"line_number":622,"context_line":"            extra.pop(\u0027migration\u0027)"},{"line_number":623,"context_line":"            extra.pop(\u0027node\u0027)"},{"line_number":624,"context_line":"            extra.pop(\u0027limits\u0027)"},{"line_number":625,"context_line":"        cctxt \u003d self.client.prepare(server\u003d_compute_host(host, instance),"},{"line_number":626,"context_line":"                version\u003dversion)"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba15a1d1_5303cc0d","line":623,"updated":"2015-09-20 10:39:03.000000000","message":"there should be \u0027extra.pip(\u0027scheduled_node)\u0027","commit_id":"8e5d760dba6a59573d225607faf1eed38f8c2332"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"5411fff97feef9c731943b26e0783355d14fb3b8","unresolved":false,"context_lines":[{"line_number":620,"context_line":"        if not self.client.can_send_version(version):"},{"line_number":621,"context_line":"            version \u003d \u00274.0\u0027"},{"line_number":622,"context_line":"            extra.pop(\u0027migration\u0027)"},{"line_number":623,"context_line":"            extra.pop(\u0027node\u0027)"},{"line_number":624,"context_line":"            extra.pop(\u0027limits\u0027)"},{"line_number":625,"context_line":"        cctxt \u003d self.client.prepare(server\u003d_compute_host(host, instance),"},{"line_number":626,"context_line":"                version\u003dversion)"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba15a1d1_452a1be9","line":623,"in_reply_to":"ba15a1d1_5303cc0d","updated":"2015-09-21 08:07:12.000000000","message":"hmmm I thought that there was a test for this - I guess not.","commit_id":"8e5d760dba6a59573d225607faf1eed38f8c2332"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"35eeeb8ffa3f42f8dc2258e8b453dd49acabe0a8","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2013 Red Hat, Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"},{"line_number":5,"context_line":"#    a copy of the License at"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_a3d3a537","side":"PARENT","line":2,"updated":"2015-09-22 15:25:44.000000000","message":"well, I guess it\u0027s a miss, but if you respin, could you please provide it back ?","commit_id":"1e9c350bdcc83cf4e8926f79b1bd9234d59ae408"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"35eeeb8ffa3f42f8dc2258e8b453dd49acabe0a8","unresolved":false,"context_lines":[{"line_number":614,"context_line":"        # actually send it to compute"},{"line_number":615,"context_line":"        extra \u003d {\u0027preserve_ephemeral\u0027: preserve_ephemeral,"},{"line_number":616,"context_line":"                 \u0027migration\u0027: migration,"},{"line_number":617,"context_line":"                 \u0027scheduled_node\u0027: node,"},{"line_number":618,"context_line":"                 \u0027limits\u0027: limits}"},{"line_number":619,"context_line":"        version \u003d \u00274.5\u0027"},{"line_number":620,"context_line":"        if not self.client.can_send_version(version):"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_63e7cde4","line":617,"range":{"start_line":617,"start_character":17,"end_line":617,"end_character":33},"updated":"2015-09-22 15:25:44.000000000","message":"I\u0027m not super fan of naming a RPC argument different from the provided attribute, but that\u0027s acceptable here IMHO.","commit_id":"77aa751f7357cb7cd38eb043f632d193991a6236"}],"nova/conductor/manager.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"58b27f2065fe5e45b5bda3046aa9379231761876","unresolved":false,"context_lines":[{"line_number":864,"context_line":"                                        \"cannot be rebuilt\"),"},{"line_number":865,"context_line":"                                    instance\u003dinstance)"},{"line_number":866,"context_line":""},{"line_number":867,"context_line":"            # NOTE(ndipanov): In case this was a rebuild there will be a"},{"line_number":868,"context_line":"            # migration record already created by the API service - look it up"},{"line_number":869,"context_line":"            # and pass it along"},{"line_number":870,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa1b9901_b343daae","line":867,"range":{"start_line":867,"start_character":49,"end_line":867,"end_character":56},"updated":"2015-08-25 14:39:27.000000000","message":"Do you mean evacuate here?\n\nMaybe we should just pass it through instead of requiring another db hit?","commit_id":"355f72287be28f5f9d3ae8095d0cf484dd94f7dd"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"49eb6346641d2b43dd8b839ebd29409895546563","unresolved":false,"context_lines":[{"line_number":864,"context_line":"                                        \"cannot be rebuilt\"),"},{"line_number":865,"context_line":"                                    instance\u003dinstance)"},{"line_number":866,"context_line":""},{"line_number":867,"context_line":"            # NOTE(ndipanov): In case this was a rebuild there will be a"},{"line_number":868,"context_line":"            # migration record already created by the API service - look it up"},{"line_number":869,"context_line":"            # and pass it along"},{"line_number":870,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa1b9901_147a77f1","line":867,"in_reply_to":"fa1b9901_9f55771f","updated":"2015-08-26 13:31:48.000000000","message":"Actually we have to have the DB hit here anyway for backwards compat with the code that will never pass it in. As it requires a version bump of the conductor rpc api - maybe we can do it in a separate commit.","commit_id":"355f72287be28f5f9d3ae8095d0cf484dd94f7dd"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"73cb482fedb830eef3a5ecc3fe761369d3e9f9bc","unresolved":false,"context_lines":[{"line_number":864,"context_line":"                                        \"cannot be rebuilt\"),"},{"line_number":865,"context_line":"                                    instance\u003dinstance)"},{"line_number":866,"context_line":""},{"line_number":867,"context_line":"            # NOTE(ndipanov): In case this was a rebuild there will be a"},{"line_number":868,"context_line":"            # migration record already created by the API service - look it up"},{"line_number":869,"context_line":"            # and pass it along"},{"line_number":870,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa1b9901_9f55771f","line":867,"in_reply_to":"fa1b9901_b343daae","updated":"2015-08-25 15:40:02.000000000","message":"Done","commit_id":"355f72287be28f5f9d3ae8095d0cf484dd94f7dd"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7930dddfa30a76cd3dde77eb2bd51886cebe0684","unresolved":false,"context_lines":[{"line_number":867,"context_line":""},{"line_number":868,"context_line":"            # NOTE(ndipanov): In case this was a evacuate there will be a"},{"line_number":869,"context_line":"            # migration record already created by the API service - look it up"},{"line_number":870,"context_line":"            # and pass it along"},{"line_number":871,"context_line":"            try:"},{"line_number":872,"context_line":"                migration \u003d objects.Migration.get_by_instance_and_status("},{"line_number":873,"context_line":"                    context, instance.uuid, \u0027accepted\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"da20952f_a0986a1c","line":870,"updated":"2015-09-03 15:37:22.000000000","message":"This should actually be a FIXME to pass it in too, right? Looking it up right after we create it kinda sucks.","commit_id":"e99d78e24f81cc41559e477adc1db9a88e0ef746"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"50a05db2399e612b0d08ad1ee9724458efd850fd","unresolved":false,"context_lines":[{"line_number":867,"context_line":""},{"line_number":868,"context_line":"            # NOTE(ndipanov): In case this was a evacuate there will be a"},{"line_number":869,"context_line":"            # migration record already created by the API service - look it up"},{"line_number":870,"context_line":"            # and pass it along"},{"line_number":871,"context_line":"            try:"},{"line_number":872,"context_line":"                migration \u003d objects.Migration.get_by_instance_and_status("},{"line_number":873,"context_line":"                    context, instance.uuid, \u0027accepted\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"da20952f_b74991d2","line":870,"in_reply_to":"da20952f_a0986a1c","updated":"2015-09-03 16:15:26.000000000","message":"OK - but it requires a version bump of the conductor/task RPCAPI so needs to stay here until the next major bump after it is acutally done.","commit_id":"e99d78e24f81cc41559e477adc1db9a88e0ef746"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"bc47c43dca6be4915655d72d5209cd143d30e655","unresolved":false,"context_lines":[{"line_number":867,"context_line":""},{"line_number":868,"context_line":"            # NOTE(ndipanov): In case this was a evacuate there will be a"},{"line_number":869,"context_line":"            # migration record already created by the API service - look it up"},{"line_number":870,"context_line":"            # and pass it along"},{"line_number":871,"context_line":"            try:"},{"line_number":872,"context_line":"                migration \u003d objects.Migration.get_by_instance_and_status("},{"line_number":873,"context_line":"                    context, instance.uuid, \u0027accepted\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"da20952f_0347db1d","line":870,"in_reply_to":"da20952f_b74991d2","updated":"2015-09-03 17:21:21.000000000","message":"Yep, like I said, just a FIXME to improve this in the future would be good so we have some record.","commit_id":"e99d78e24f81cc41559e477adc1db9a88e0ef746"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2279ee19952c844ff35bb4ffa6ae205403b24cc2","unresolved":false,"context_lines":[{"line_number":874,"context_line":"                                                            request_spec,"},{"line_number":875,"context_line":"                                                            filter_properties)"},{"line_number":876,"context_line":"                    host_dict \u003d hosts.pop(0)"},{"line_number":877,"context_line":"                    host, node, limits \u003d (host_dict[\u0027host\u0027],"},{"line_number":878,"context_line":"                                          host_dict[\u0027nodename\u0027],"},{"line_number":879,"context_line":"                                          host_dict[\u0027limits\u0027])"},{"line_number":880,"context_line":"                except exception.NoValidHost as ex:"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba15a1d1_c19691ef","line":877,"updated":"2015-09-17 06:15:34.000000000","message":"minor nit - you can move this to line 909 - if there is an exception raised then these variables are not used","commit_id":"e662aeb84048ebe455d969e505ac93d15662d6ed"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"214a82c270d951374916fc1852a201908c6f73b8","unresolved":false,"context_lines":[{"line_number":895,"context_line":"                                        \"cannot be rebuilt\"),"},{"line_number":896,"context_line":"                                    instance\u003dinstance)"},{"line_number":897,"context_line":""},{"line_number":898,"context_line":"            # FIXME(ndipanov): Remove the lookup once we drop support for 3.0"},{"line_number":899,"context_line":"            try:"},{"line_number":900,"context_line":"                migration \u003d objects.Migration.get_by_instance_and_status("},{"line_number":901,"context_line":"                    context, instance.uuid, \u0027accepted\u0027)"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba15a1d1_f9ee9a20","line":898,"range":{"start_line":898,"start_character":74,"end_line":898,"end_character":77},"updated":"2015-09-18 17:59:52.000000000","message":"This should actually be 2.0 ...","commit_id":"93399d34e1cdca827e7990618b7f4875dd333f1a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d0df0b7aa19dacd08c0b19ce741f963bc61c9537","unresolved":false,"context_lines":[{"line_number":895,"context_line":"                                        \"cannot be rebuilt\"),"},{"line_number":896,"context_line":"                                    instance\u003dinstance)"},{"line_number":897,"context_line":""},{"line_number":898,"context_line":"            # FIXME(ndipanov): Remove the lookup once we drop support for 3.0"},{"line_number":899,"context_line":"            try:"},{"line_number":900,"context_line":"                migration \u003d objects.Migration.get_by_instance_and_status("},{"line_number":901,"context_line":"                    context, instance.uuid, \u0027accepted\u0027)"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba15a1d1_f963faae","line":898,"range":{"start_line":898,"start_character":74,"end_line":898,"end_character":77},"in_reply_to":"ba15a1d1_f9ee9a20","updated":"2015-09-18 18:00:39.000000000","message":"Er, actually I guess not, since you\u0027re not actually adding the parameter... So nevermind.","commit_id":"93399d34e1cdca827e7990618b7f4875dd333f1a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1366e2e5e27b02f013ea0bff5d7b043d769302a6","unresolved":false,"context_lines":[{"line_number":895,"context_line":"                                        \"cannot be rebuilt\"),"},{"line_number":896,"context_line":"                                    instance\u003dinstance)"},{"line_number":897,"context_line":""},{"line_number":898,"context_line":"            # FIXME(ndipanov): Remove the lookup once we drop support for 3.0"},{"line_number":899,"context_line":"            try:"},{"line_number":900,"context_line":"                migration \u003d objects.Migration.get_by_instance_and_status("},{"line_number":901,"context_line":"                    context, instance.uuid, \u0027accepted\u0027)"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_c361f9a9","line":898,"updated":"2015-09-22 15:11:48.000000000","message":"discussed by IRC with nikola, that comment is a bit confusing, nikola was wanting to explain that he\u0027s planning to pass in the migration object from the compute API directly (in a later change)","commit_id":"77aa751f7357cb7cd38eb043f632d193991a6236"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"437d3e7809621f176d76d36b02d1fdd34df77209","unresolved":false,"context_lines":[{"line_number":898,"context_line":"            # FIXME(ndipanov): Remove the lookup once we drop support for 3.0"},{"line_number":899,"context_line":"            try:"},{"line_number":900,"context_line":"                migration \u003d objects.Migration.get_by_instance_and_status("},{"line_number":901,"context_line":"                    context, instance.uuid, \u0027accepted\u0027)"},{"line_number":902,"context_line":"            except exception.MigrationNotFoundByStatus:"},{"line_number":903,"context_line":"                LOG.debug(\"No migration record for the rebuild/evacuate \""},{"line_number":904,"context_line":"                          \"request.\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_0f4ac483","line":901,"updated":"2015-09-22 11:20:48.000000000","message":"we should update migration.dest_host and migration.dest_node at here.","commit_id":"77aa751f7357cb7cd38eb043f632d193991a6236"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"2877dc18243385cd81e6528b00a5b63671c8ae8c","unresolved":false,"context_lines":[{"line_number":898,"context_line":"            # FIXME(ndipanov): Remove the lookup once we drop support for 3.0"},{"line_number":899,"context_line":"            try:"},{"line_number":900,"context_line":"                migration \u003d objects.Migration.get_by_instance_and_status("},{"line_number":901,"context_line":"                    context, instance.uuid, \u0027accepted\u0027)"},{"line_number":902,"context_line":"            except exception.MigrationNotFoundByStatus:"},{"line_number":903,"context_line":"                LOG.debug(\"No migration record for the rebuild/evacuate \""},{"line_number":904,"context_line":"                          \"request.\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_68bfb6aa","line":901,"in_reply_to":"ba15a1d1_0f4ac483","updated":"2015-09-22 12:11:17.000000000","message":"That\u0027s done when we do the claim - this would be too early. see _claim_existing_migration in the resource tracker.","commit_id":"77aa751f7357cb7cd38eb043f632d193991a6236"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"aea5222533316c66d3ac162dde06894056fa997f","unresolved":false,"context_lines":[{"line_number":898,"context_line":"            # FIXME(ndipanov): Remove the lookup once we drop support for 3.0"},{"line_number":899,"context_line":"            try:"},{"line_number":900,"context_line":"                migration \u003d objects.Migration.get_by_instance_and_status("},{"line_number":901,"context_line":"                    context, instance.uuid, \u0027accepted\u0027)"},{"line_number":902,"context_line":"            except exception.MigrationNotFoundByStatus:"},{"line_number":903,"context_line":"                LOG.debug(\"No migration record for the rebuild/evacuate \""},{"line_number":904,"context_line":"                          \"request.\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_3e2fb4a2","line":901,"in_reply_to":"ba15a1d1_68bfb6aa","updated":"2015-09-22 12:52:33.000000000","message":"oops, thanks, I missed that.","commit_id":"77aa751f7357cb7cd38eb043f632d193991a6236"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3662ecc1cf0ed64df90a93203bb01a079c96e51d","unresolved":false,"context_lines":[{"line_number":895,"context_line":"                                        \"cannot be rebuilt\"),"},{"line_number":896,"context_line":"                                    instance\u003dinstance)"},{"line_number":897,"context_line":""},{"line_number":898,"context_line":"            try:"},{"line_number":899,"context_line":"                migration \u003d objects.Migration.get_by_instance_and_status("},{"line_number":900,"context_line":"                    context, instance.uuid, \u0027accepted\u0027)"},{"line_number":901,"context_line":"            except exception.MigrationNotFoundByStatus:"}],"source_content_type":"text/x-python","patch_set":29,"id":"ba15a1d1_c8b90930","line":898,"updated":"2015-09-22 19:37:08.000000000","message":"thanks for having removed the comment","commit_id":"dc0221d7240326a2d1b467e2a367bebb7e764e61"}],"nova/objects/service.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"58b27f2065fe5e45b5bda3046aa9379231761876","unresolved":false,"context_lines":[{"line_number":30,"context_line":"SERVICE_VERSION \u003d 1"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"# NOTE(danms): This is our SERVICE_VERSION history. The idea is that any"},{"line_number":34,"context_line":"# time we bump the version, we will put an entry here to record the change,"},{"line_number":35,"context_line":"# along with any pertinent data. For things that we can programatically"},{"line_number":36,"context_line":"# detect that need a bump, we put something in _collect_things() below to"},{"line_number":37,"context_line":"# assemble a dict of things we can check. For example, we pretty much always"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa1b9901_53611e38","line":34,"range":{"start_line":33,"start_character":69,"end_line":34,"end_character":74},"updated":"2015-08-25 14:39:27.000000000","message":"You should only *add* to this list.","commit_id":"355f72287be28f5f9d3ae8095d0cf484dd94f7dd"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"58b27f2065fe5e45b5bda3046aa9379231761876","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    None,"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    # Version 1: Introduction of SERVICE_VERSION"},{"line_number":55,"context_line":"    {\u0027compute_rpc\u0027: \u00274.5\u0027},"},{"line_number":56,"context_line":")"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa1b9901_937496fe","line":55,"updated":"2015-08-25 14:39:27.000000000","message":"You should not be changing this, but adding a new element. See the comments above, and if they\u0027re not clear, we should clarify.","commit_id":"355f72287be28f5f9d3ae8095d0cf484dd94f7dd"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"73cb482fedb830eef3a5ecc3fe761369d3e9f9bc","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    None,"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    # Version 1: Introduction of SERVICE_VERSION"},{"line_number":55,"context_line":"    {\u0027compute_rpc\u0027: \u00274.5\u0027},"},{"line_number":56,"context_line":")"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa1b9901_7f1e6371","line":55,"in_reply_to":"fa1b9901_937496fe","updated":"2015-08-25 15:40:02.000000000","message":"LOL did not read - will do","commit_id":"355f72287be28f5f9d3ae8095d0cf484dd94f7dd"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"14bcf4c59f9d0b5bf1867bfc4545fde2fb067d88","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    # Version 1: Introduction of SERVICE_VERSION"},{"line_number":55,"context_line":"    {\u0027compute_rpc\u0027: \u00274.4\u0027},"},{"line_number":56,"context_line":"    # Version 2: Changes to rebuild_instance signature in the compute_rpc"},{"line_number":57,"context_line":"    {\u0027compute_rpc\u0027: \u00274.5\u0027},"},{"line_number":58,"context_line":")"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"ba15a1d1_23444a48","line":56,"updated":"2015-09-16 16:26:18.000000000","message":"FWIW, I think you can just say \"Compute RPC 4.5\" or something here. If we care what the change was, we can look in rpcapi.py.","commit_id":"e662aeb84048ebe455d969e505ac93d15662d6ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3e8ef53a296eea9989e620c1b7c60fce1acf3588","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    # Version 1: Introduction of SERVICE_VERSION"},{"line_number":55,"context_line":"    {\u0027compute_rpc\u0027: \u00274.4\u0027},"},{"line_number":56,"context_line":"    # Version 2: Changes to rebuild_instance signature in the compute_rpc"},{"line_number":57,"context_line":"    {\u0027compute_rpc\u0027: \u00274.5\u0027},"},{"line_number":58,"context_line":")"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_82ca22a0","line":57,"updated":"2015-09-22 13:28:01.000000000","message":"I wonder if it\u0027s the correct pattern for bumping a new Service version, lemme see the code...","commit_id":"77aa751f7357cb7cd38eb043f632d193991a6236"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"10011c59a3f0f4cd30349ca0c0396dbdeb23148c","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    # Version 1: Introduction of SERVICE_VERSION"},{"line_number":55,"context_line":"    {\u0027compute_rpc\u0027: \u00274.4\u0027},"},{"line_number":56,"context_line":"    # Version 2: Changes to rebuild_instance signature in the compute_rpc"},{"line_number":57,"context_line":"    {\u0027compute_rpc\u0027: \u00274.5\u0027},"},{"line_number":58,"context_line":")"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"ba15a1d1_f62e3cf9","line":57,"in_reply_to":"ba15a1d1_82ca22a0","updated":"2015-09-22 14:45:50.000000000","message":"Okay, that\u0027s fine per se \nhttps://github.com/openstack/nova/blob/0b177f18264ca842e16c2c989a081e773b3d86b7/nova/tests/unit/objects/test_service.py#L299-L310","commit_id":"77aa751f7357cb7cd38eb043f632d193991a6236"}],"nova/tests/unit/compute/test_compute.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2279ee19952c844ff35bb4ffa6ae205403b24cc2","unresolved":false,"context_lines":[{"line_number":11244,"context_line":"            self.assertEqual(0, get_compute_info.call_count)"},{"line_number":11245,"context_line":""},{"line_number":11246,"context_line":"        # Should be on destination host and node set to what was passed in"},{"line_number":11247,"context_line":"        instance \u003d db.instance_get(self.context, self.inst.id)"},{"line_number":11248,"context_line":"        self.assertEqual(instance[\u0027host\u0027], self.compute.host)"},{"line_number":11249,"context_line":"        self.assertEqual(instance[\u0027node\u0027], NODENAME)"},{"line_number":11250,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"ba15a1d1_615d4546","line":11247,"updated":"2015-09-17 06:15:34.000000000","message":"should this not be an instance object?","commit_id":"e662aeb84048ebe455d969e505ac93d15662d6ed"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"0f7376368d82c060278d9650dc8c37a5eaa1c24b","unresolved":false,"context_lines":[{"line_number":11244,"context_line":"            self.assertEqual(0, get_compute_info.call_count)"},{"line_number":11245,"context_line":""},{"line_number":11246,"context_line":"        # Should be on destination host and node set to what was passed in"},{"line_number":11247,"context_line":"        instance \u003d db.instance_get(self.context, self.inst.id)"},{"line_number":11248,"context_line":"        self.assertEqual(instance[\u0027host\u0027], self.compute.host)"},{"line_number":11249,"context_line":"        self.assertEqual(instance[\u0027node\u0027], NODENAME)"},{"line_number":11250,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"ba15a1d1_252e2ba5","line":11247,"in_reply_to":"ba15a1d1_615d4546","updated":"2015-09-18 16:44:46.000000000","message":"well it doesn\u0027t really matter how we check the DB values - I always go for consistency when there is no compelling reason not to.","commit_id":"e662aeb84048ebe455d969e505ac93d15662d6ed"}]}
