)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c1c9b30d588d090471ff6fec1a4898b9273f1ea3","unresolved":false,"context_lines":[{"line_number":2674,"context_line":"        # the instance\u0027s host and node properties to reflect it\u0027s"},{"line_number":2675,"context_line":"        # destination node for the recreate."},{"line_number":2676,"context_line":"        if not scheduled_node:"},{"line_number":2677,"context_line":"            if recreate:"},{"line_number":2678,"context_line":"                try:"},{"line_number":2679,"context_line":"                    compute_node \u003d self._get_compute_info(context, self.host)"},{"line_number":2680,"context_line":"                    scheduled_node \u003d compute_node.hypervisor_hostname"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f1d235d_0837704f","side":"PARENT","line":2677,"updated":"2017-07-05 14:20:37.000000000","message":"I think you could leave this hunk here, right? If we resolved it above due to the change here, we should never need to run this. I know it kinda orphans this, but it\u0027s less change. You could add a comment to that effect without disturbing the code. I know you could argue less change vs. making the code internally more consistent, but I think I tend to prefer the former.","commit_id":"9d299ae50ea52c63811eba11ee974643c17079ad"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b7a9e04bf9805d870edd06ec2518ce62424bdd3c","unresolved":false,"context_lines":[{"line_number":2674,"context_line":"        # the instance\u0027s host and node properties to reflect it\u0027s"},{"line_number":2675,"context_line":"        # destination node for the recreate."},{"line_number":2676,"context_line":"        if not scheduled_node:"},{"line_number":2677,"context_line":"            if recreate:"},{"line_number":2678,"context_line":"                try:"},{"line_number":2679,"context_line":"                    compute_node \u003d self._get_compute_info(context, self.host)"},{"line_number":2680,"context_line":"                    scheduled_node \u003d compute_node.hypervisor_hostname"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f1d235d_439c290d","side":"PARENT","line":2677,"in_reply_to":"3f1d235d_0837704f","updated":"2017-07-05 14:49:29.000000000","message":"Correct, the reason I changed this is because with the change above this block becomes dead code.","commit_id":"9d299ae50ea52c63811eba11ee974643c17079ad"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c1c9b30d588d090471ff6fec1a4898b9273f1ea3","unresolved":false,"context_lines":[{"line_number":2675,"context_line":"        # For scenarios #2 and #3, we must do rebuild claim as server is"},{"line_number":2676,"context_line":"        # being evacuated to a different node."},{"line_number":2677,"context_line":"        if recreate or scheduled_node is not None:"},{"line_number":2678,"context_line":"            if scheduled_node is None:"},{"line_number":2679,"context_line":"                # NOTE(mriedem): On a recreate (evacuate), we need to update"},{"line_number":2680,"context_line":"                # the instance\u0027s host and node properties to reflect it\u0027s"},{"line_number":2681,"context_line":"                # destination node for the recreate, and to make a rebuild"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f1d235d_88d4a0ea","line":2678,"updated":"2017-07-05 14:20:37.000000000","message":"So this is if we\u0027re recreating and scheduled_node _is_ None. It\u0027s a bit confusing to follow this logic. Is there any reason not to just resolve scheduled_node above this, if it\u0027s None so that we don\u0027t have this nested conditional block? I think that would look like less change to me as well.\n\nHmm, maybe not because we\u0027d then not take the branch at L2694 to just use instance.node? I wonder if that\u0027s actually any different?\n\nAnyway, I guess the point is, this is confusing.","commit_id":"0f2d87416eff1e96c0fbf0f4b08bf6b6b22246d5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b7a9e04bf9805d870edd06ec2518ce62424bdd3c","unresolved":false,"context_lines":[{"line_number":2675,"context_line":"        # For scenarios #2 and #3, we must do rebuild claim as server is"},{"line_number":2676,"context_line":"        # being evacuated to a different node."},{"line_number":2677,"context_line":"        if recreate or scheduled_node is not None:"},{"line_number":2678,"context_line":"            if scheduled_node is None:"},{"line_number":2679,"context_line":"                # NOTE(mriedem): On a recreate (evacuate), we need to update"},{"line_number":2680,"context_line":"                # the instance\u0027s host and node properties to reflect it\u0027s"},{"line_number":2681,"context_line":"                # destination node for the recreate, and to make a rebuild"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f1d235d_e32215b9","line":2678,"in_reply_to":"3f1d235d_88d4a0ea","updated":"2017-07-05 14:49:29.000000000","message":"Yeah this is the is #3 scenario described above, where the admin is forcing the evacuate to a specific target. So recreate is True and scheduled_node is None, and we need to determine the scheduled_node here so we can get the rt variable to do the claim. Waiting until around L2694 below is too late since we need the rt here.\n\nAnd yes, it\u0027s confusing. I tried to describe the weirdness as clearly as possible in the commit message but it\u0027s still confusing.","commit_id":"0f2d87416eff1e96c0fbf0f4b08bf6b6b22246d5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5d615566c804e1de869139400d14607161464206","unresolved":false,"context_lines":[{"line_number":2675,"context_line":"        # For scenarios #2 and #3, we must do rebuild claim as server is"},{"line_number":2676,"context_line":"        # being evacuated to a different node."},{"line_number":2677,"context_line":"        if recreate or scheduled_node is not None:"},{"line_number":2678,"context_line":"            if scheduled_node is None:"},{"line_number":2679,"context_line":"                # NOTE(mriedem): On a recreate (evacuate), we need to update"},{"line_number":2680,"context_line":"                # the instance\u0027s host and node properties to reflect it\u0027s"},{"line_number":2681,"context_line":"                # destination node for the recreate, and to make a rebuild"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f1d235d_5e8abe69","line":2678,"in_reply_to":"3f1d235d_e32215b9","updated":"2017-07-05 14:50:55.000000000","message":"Alternatively, we move all of this code that gets the rt claim object below the code block in L2694, but either way we\u0027re getting a gorpy confusing backport.","commit_id":"0f2d87416eff1e96c0fbf0f4b08bf6b6b22246d5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b7a9e04bf9805d870edd06ec2518ce62424bdd3c","unresolved":false,"context_lines":[{"line_number":2691,"context_line":"        if image_ref:"},{"line_number":2692,"context_line":"            image_meta \u003d self.image_api.get(context, image_ref)"},{"line_number":2693,"context_line":""},{"line_number":2694,"context_line":"        if not scheduled_node:"},{"line_number":2695,"context_line":"            scheduled_node \u003d instance.node"},{"line_number":2696,"context_line":""},{"line_number":2697,"context_line":"        with self._error_out_instance_on_exception(context, instance):"},{"line_number":2698,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f1d235d_e30b3527","line":2695,"range":{"start_line":2694,"start_character":8,"end_line":2695,"end_character":42},"updated":"2017-07-05 14:49:29.000000000","message":"The only time we get here is for scenario #1 described above - that is rebuild (not evacuate) on the same host. In that case we are doing the noop claim above since we\u0027ve already claimed resources for this instance on this host/node.","commit_id":"0f2d87416eff1e96c0fbf0f4b08bf6b6b22246d5"}]}
