)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"a49a04dd51c9b35cac68e6b3765b6c33f0b42c30","unresolved":false,"context_lines":[{"line_number":10,"context_line":"when cold migrating a VM instance."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This patch modifies a compute API and conductor."},{"line_number":13,"context_line":"A subsequent patch modifies the migration API."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I57568e9a01664ee373ea00a8db3164109c982909"},{"line_number":16,"context_line":"Implements: blueprint cold-migration-with-target-pike"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":47,"id":"df140735_e6b18291","line":13,"updated":"2017-05-30 14:51:25.000000000","message":"+1 on explaining the subsequent","commit_id":"6a81b72941e97a49fe7d3b257998b4b8cdfb514a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b11b2264c8c87353a66a37222f1ceda10d7277a5","unresolved":false,"context_lines":[{"line_number":10,"context_line":"when cold migrating a VM instance."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This patch modifies a compute API and conductor."},{"line_number":13,"context_line":"A subsequent patch modifies the migration API."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I57568e9a01664ee373ea00a8db3164109c982909"},{"line_number":16,"context_line":"Implements: blueprint cold-migration-with-target-pike"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":53,"id":"7f231b9d_4244711b","line":13,"updated":"2017-06-13 15:28:12.000000000","message":"You should explain that you will restrict the API to only be admin-only if you pass a target host, right?","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"799a9239237ec2f76f7ceedc21296b98bceb64b8","unresolved":false,"context_lines":[{"line_number":10,"context_line":"when cold migrating a VM instance."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This patch modifies a compute API and conductor."},{"line_number":13,"context_line":"A subsequent patch modifies the migration API."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I57568e9a01664ee373ea00a8db3164109c982909"},{"line_number":16,"context_line":"Implements: blueprint cold-migration-with-target-pike"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":53,"id":"7f231b9d_7a7483fe","line":13,"in_reply_to":"7f231b9d_4244711b","updated":"2017-06-15 06:41:06.000000000","message":"Done","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"15a541a3d51b9be77f14b012ebd9fa93508ee20a","unresolved":false,"context_lines":[{"line_number":10,"context_line":"when cold migrating a VM instance."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Cold migration operation is allowed to admin users"},{"line_number":13,"context_line":"only by default currently."},{"line_number":14,"context_line":"This patch keeps it in the case that a target host"},{"line_number":15,"context_line":"is specified."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":63,"id":"1f1a1f67_eaf18196","line":13,"updated":"2017-07-19 18:14:03.000000000","message":"\"By default, only admin users may perform a cold migration operation.\"","commit_id":"40e7f7e875cde63be32ad1572c7074285ff67314"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"c4019d93005e86286f4d45dae997173606e2202d","unresolved":false,"context_lines":[{"line_number":10,"context_line":"when cold migrating a VM instance."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Cold migration operation is allowed to admin users"},{"line_number":13,"context_line":"only by default currently."},{"line_number":14,"context_line":"This patch keeps it in the case that a target host"},{"line_number":15,"context_line":"is specified."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":63,"id":"ff346bd7_6dd0eeca","line":13,"in_reply_to":"1f1a1f67_eaf18196","updated":"2017-07-22 08:07:56.000000000","message":"Done","commit_id":"40e7f7e875cde63be32ad1572c7074285ff67314"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"15a541a3d51b9be77f14b012ebd9fa93508ee20a","unresolved":false,"context_lines":[{"line_number":12,"context_line":"Cold migration operation is allowed to admin users"},{"line_number":13,"context_line":"only by default currently."},{"line_number":14,"context_line":"This patch keeps it in the case that a target host"},{"line_number":15,"context_line":"is specified."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This patch modifies a compute API and conductor."},{"line_number":18,"context_line":"A subsequent patch modifies the migration API."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":63,"id":"1f1a1f67_caec85bc","line":15,"updated":"2017-07-19 18:14:03.000000000","message":"\"This patch does not change that policy default.\"","commit_id":"40e7f7e875cde63be32ad1572c7074285ff67314"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"c4019d93005e86286f4d45dae997173606e2202d","unresolved":false,"context_lines":[{"line_number":12,"context_line":"Cold migration operation is allowed to admin users"},{"line_number":13,"context_line":"only by default currently."},{"line_number":14,"context_line":"This patch keeps it in the case that a target host"},{"line_number":15,"context_line":"is specified."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This patch modifies a compute API and conductor."},{"line_number":18,"context_line":"A subsequent patch modifies the migration API."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":63,"id":"ff346bd7_6de90e7f","line":15,"in_reply_to":"1f1a1f67_caec85bc","updated":"2017-07-22 08:07:56.000000000","message":"Done","commit_id":"40e7f7e875cde63be32ad1572c7074285ff67314"}],"nova/compute/api.py":[{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"6c9496a4ccecd6b4aed651275975665ff3d8fd38","unresolved":false,"context_lines":[{"line_number":3021,"context_line":"        be migrated to a new host and resized to the new flavor_id."},{"line_number":3022,"context_line":"        \"\"\""},{"line_number":3023,"context_line":"        # Check whether host exists or not when host_name is specified."},{"line_number":3024,"context_line":"        if host_name is not None:"},{"line_number":3025,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host_name)"},{"line_number":3026,"context_line":""},{"line_number":3027,"context_line":"        self._check_auto_disk_config(instance, **extra_instance_updates)"},{"line_number":3028,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_a0927e49","line":3025,"range":{"start_line":3024,"start_character":8,"end_line":3025,"end_character":79},"updated":"2016-12-09 07:39:16.000000000","message":"what if target host is down? I\u0027d add a some check for that like it\u0027s done here: https://github.com/openstack/nova/blob/1795699bc37b0298138a69836b5d6a797431f6f4/nova/conductor/tasks/live_migrate.py#L85\nIf such check exists already, could you point me please.","commit_id":"9b7a758a9c588cbc207675a7ba80319cb10b3444"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"c00b243b3dbebd3e3f08663cd42e660ca010ca05","unresolved":false,"context_lines":[{"line_number":3021,"context_line":"        be migrated to a new host and resized to the new flavor_id."},{"line_number":3022,"context_line":"        \"\"\""},{"line_number":3023,"context_line":"        # Check whether host exists or not when host_name is specified."},{"line_number":3024,"context_line":"        if host_name is not None:"},{"line_number":3025,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host_name)"},{"line_number":3026,"context_line":""},{"line_number":3027,"context_line":"        self._check_auto_disk_config(instance, **extra_instance_updates)"},{"line_number":3028,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_b7bc3e6d","line":3025,"range":{"start_line":3024,"start_character":8,"end_line":3025,"end_character":79},"in_reply_to":"3a71b18c_a0927e49","updated":"2016-12-12 08:15:30.000000000","message":"I added the check in nova/conductor/tasks/migrate.py in PS2.\nDone.","commit_id":"9b7a758a9c588cbc207675a7ba80319cb10b3444"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"3b5b9bf30ba4d8aa5df074b387e4a39a1dda0b99","unresolved":false,"context_lines":[{"line_number":3142,"context_line":"        if not force and host_name is not None:"},{"line_number":3143,"context_line":"            host_name \u003d None"},{"line_number":3144,"context_line":"            target \u003d nodes[0]"},{"line_number":3145,"context_line":"            if request_spec:"},{"line_number":3146,"context_line":"                request_spec.requested_destination \u003d objects.Destination("},{"line_number":3147,"context_line":"                    host\u003dtarget.host, node\u003dtarget.hypervisor_hostname)"},{"line_number":3148,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"ba5201f7_61087dda","line":3145,"updated":"2017-01-11 09:03:36.000000000","message":"I guess we should have TODO same as this one https://github.com/openstack/nova/blob/master/nova/compute/api.py#L3897\n\nBut really, there is no way to let the end user to know which instance support host parameter. We just ignore it silently.","commit_id":"b62f26b288949fdb7d6741d79b7e9153f47125eb"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"45449f297489f31de6d2217ba87e65f907cb42f2","unresolved":false,"context_lines":[{"line_number":3142,"context_line":"        if not force and host_name is not None:"},{"line_number":3143,"context_line":"            host_name \u003d None"},{"line_number":3144,"context_line":"            target \u003d nodes[0]"},{"line_number":3145,"context_line":"            if request_spec:"},{"line_number":3146,"context_line":"                request_spec.requested_destination \u003d objects.Destination("},{"line_number":3147,"context_line":"                    host\u003dtarget.host, node\u003dtarget.hypervisor_hostname)"},{"line_number":3148,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"ba5201f7_fa2092b2","line":3145,"in_reply_to":"ba5201f7_61087dda","updated":"2017-01-11 09:21:32.000000000","message":"Check with Sylvain, we already have data migration for the request_spec, so all the instances should have request_spec since Newton. So probably we can cleanup the code and comment later.","commit_id":"b62f26b288949fdb7d6741d79b7e9153f47125eb"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"46992d709a5fef0ad00866ccb7d9d414d555c120","unresolved":false,"context_lines":[{"line_number":3142,"context_line":"        if not force and host_name is not None:"},{"line_number":3143,"context_line":"            host_name \u003d None"},{"line_number":3144,"context_line":"            target \u003d nodes[0]"},{"line_number":3145,"context_line":"            if request_spec:"},{"line_number":3146,"context_line":"                request_spec.requested_destination \u003d objects.Destination("},{"line_number":3147,"context_line":"                    host\u003dtarget.host, node\u003dtarget.hypervisor_hostname)"},{"line_number":3148,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_fd0fc585","line":3145,"in_reply_to":"ba5201f7_95fe7769","updated":"2017-01-16 02:33:50.000000000","message":"Done","commit_id":"b62f26b288949fdb7d6741d79b7e9153f47125eb"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2f1ca0a48bbed555063b7eaeee658e120f60810b","unresolved":false,"context_lines":[{"line_number":3142,"context_line":"        if not force and host_name is not None:"},{"line_number":3143,"context_line":"            host_name \u003d None"},{"line_number":3144,"context_line":"            target \u003d nodes[0]"},{"line_number":3145,"context_line":"            if request_spec:"},{"line_number":3146,"context_line":"                request_spec.requested_destination \u003d objects.Destination("},{"line_number":3147,"context_line":"                    host\u003dtarget.host, node\u003dtarget.hypervisor_hostname)"},{"line_number":3148,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"ba5201f7_95fe7769","line":3145,"in_reply_to":"ba5201f7_fa2092b2","updated":"2017-01-11 09:34:50.000000000","message":"Yeah, all the instances now have an attached RequestSpec (even the ones created before Newton) so I think you can just remove this conditional.","commit_id":"b62f26b288949fdb7d6741d79b7e9153f47125eb"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"3b5b9bf30ba4d8aa5df074b387e4a39a1dda0b99","unresolved":false,"context_lines":[{"line_number":3148,"context_line":""},{"line_number":3149,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":3150,"context_line":"        if host_name:"},{"line_number":3151,"context_line":"            scheduler_hint.update({\u0027host\u0027: host_name})"},{"line_number":3152,"context_line":""},{"line_number":3153,"context_line":"        self.compute_task_api.resize_instance(context, instance,"},{"line_number":3154,"context_line":"                extra_instance_updates, scheduler_hint\u003dscheduler_hint,"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba5201f7_a1a8a5dc","line":3151,"updated":"2017-01-11 09:03:36.000000000","message":"Maybe worth a comment to say when we force to a host, we use scheduler hint.","commit_id":"b62f26b288949fdb7d6741d79b7e9153f47125eb"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"46992d709a5fef0ad00866ccb7d9d414d555c120","unresolved":false,"context_lines":[{"line_number":3148,"context_line":""},{"line_number":3149,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":3150,"context_line":"        if host_name:"},{"line_number":3151,"context_line":"            scheduler_hint.update({\u0027host\u0027: host_name})"},{"line_number":3152,"context_line":""},{"line_number":3153,"context_line":"        self.compute_task_api.resize_instance(context, instance,"},{"line_number":3154,"context_line":"                extra_instance_updates, scheduler_hint\u003dscheduler_hint,"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_034c2e41","line":3151,"in_reply_to":"ba5201f7_354a2bad","updated":"2017-01-16 02:33:50.000000000","message":"It is not used as a scheduler hint.\njust because I don\u0027t want to change the method(compute_task_api.resize_instance) signature.\n\nSo it is poped(deleted) from scheduler hints before scheduler hints are passed to the scheduler.\nSee line 273 in https://review.openstack.org/#/c/408955/11/nova/conductor/manager.py .","commit_id":"b62f26b288949fdb7d6741d79b7e9153f47125eb"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2f1ca0a48bbed555063b7eaeee658e120f60810b","unresolved":false,"context_lines":[{"line_number":3148,"context_line":""},{"line_number":3149,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":3150,"context_line":"        if host_name:"},{"line_number":3151,"context_line":"            scheduler_hint.update({\u0027host\u0027: host_name})"},{"line_number":3152,"context_line":""},{"line_number":3153,"context_line":"        self.compute_task_api.resize_instance(context, instance,"},{"line_number":3154,"context_line":"                extra_instance_updates, scheduler_hint\u003dscheduler_hint,"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba5201f7_354a2bad","line":3151,"in_reply_to":"ba5201f7_a1a8a5dc","updated":"2017-01-11 09:34:50.000000000","message":"The scheduler hints dictionary is a legacy attribute. Instead, those hints should be provided within the RequestSpec.hints field.","commit_id":"b62f26b288949fdb7d6741d79b7e9153f47125eb"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"1928906b0ed17987aa97b97150c9df528f9acf8e","unresolved":false,"context_lines":[{"line_number":3144,"context_line":"            request_spec \u003d None"},{"line_number":3145,"context_line":""},{"line_number":3146,"context_line":"        # If \u0027host\u0027 is not specified,"},{"line_number":3147,"context_line":"        # clear the \u0027requested_destination\u0027 field of the RequestSpec."},{"line_number":3148,"context_line":"        # All instances have request specs after Newton release,"},{"line_number":3149,"context_line":"        # so request_spec is not checked here."},{"line_number":3150,"context_line":"        if host_name is None:"},{"line_number":3151,"context_line":"            request_spec.requested_destination \u003d None"},{"line_number":3152,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a3c09a3_7b303a02","line":3149,"range":{"start_line":3147,"start_character":8,"end_line":3149,"end_character":46},"updated":"2017-01-16 06:06:39.000000000","message":"accordingly to this, maybe clean up above logic and if it\u0027s None, just raise Excpetion?","commit_id":"b64480a80c0f3346a5b076ac8ef2650c1a6c9253"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"e5f02b06bcac208516f63f8f2f38eaeccf2c80b1","unresolved":false,"context_lines":[{"line_number":3144,"context_line":"            request_spec \u003d None"},{"line_number":3145,"context_line":""},{"line_number":3146,"context_line":"        # If \u0027host\u0027 is not specified,"},{"line_number":3147,"context_line":"        # clear the \u0027requested_destination\u0027 field of the RequestSpec."},{"line_number":3148,"context_line":"        # All instances have request specs after Newton release,"},{"line_number":3149,"context_line":"        # so request_spec is not checked here."},{"line_number":3150,"context_line":"        if host_name is None:"},{"line_number":3151,"context_line":"            request_spec.requested_destination \u003d None"},{"line_number":3152,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a3c09a3_7e04a8bf","line":3149,"range":{"start_line":3147,"start_character":8,"end_line":3149,"end_character":46},"in_reply_to":"7a3c09a3_7b303a02","updated":"2017-01-16 06:23:34.000000000","message":"It should be done in another patch.\nIt is not related with \u0027cold-migration-with-ocata\u0027.","commit_id":"b64480a80c0f3346a5b076ac8ef2650c1a6c9253"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"c33022556a5f99c3a67c20f18b721ea25d88ccd1","unresolved":false,"context_lines":[{"line_number":3144,"context_line":"            request_spec \u003d None"},{"line_number":3145,"context_line":""},{"line_number":3146,"context_line":"        # If \u0027host\u0027 is not specified,"},{"line_number":3147,"context_line":"        # clear the \u0027requested_destination\u0027 field of the RequestSpec."},{"line_number":3148,"context_line":"        # All instances have request specs after Newton release,"},{"line_number":3149,"context_line":"        # so request_spec is not checked here."},{"line_number":3150,"context_line":"        if host_name is None:"},{"line_number":3151,"context_line":"            request_spec.requested_destination \u003d None"},{"line_number":3152,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a3c09a3_9eedd4f1","line":3149,"range":{"start_line":3147,"start_character":8,"end_line":3149,"end_character":46},"in_reply_to":"7a3c09a3_7e04a8bf","updated":"2017-01-16 06:29:02.000000000","message":"yes, but IMHO this might need to be done before this patch","commit_id":"b64480a80c0f3346a5b076ac8ef2650c1a6c9253"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"a90250a993335be0614f592e527d62d34a22bdb6","unresolved":false,"context_lines":[{"line_number":3144,"context_line":"            request_spec \u003d None"},{"line_number":3145,"context_line":""},{"line_number":3146,"context_line":"        # If \u0027host\u0027 is not specified,"},{"line_number":3147,"context_line":"        # clear the \u0027requested_destination\u0027 field of the RequestSpec."},{"line_number":3148,"context_line":"        # All instances have request specs after Newton release,"},{"line_number":3149,"context_line":"        # so request_spec is not checked here."},{"line_number":3150,"context_line":"        if host_name is None:"},{"line_number":3151,"context_line":"            request_spec.requested_destination \u003d None"},{"line_number":3152,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a3c09a3_7057efc9","line":3149,"range":{"start_line":3147,"start_character":8,"end_line":3149,"end_character":46},"in_reply_to":"7a3c09a3_9eedd4f1","updated":"2017-01-18 10:15:05.000000000","message":"Done","commit_id":"b64480a80c0f3346a5b076ac8ef2650c1a6c9253"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"88b8076b3d1648f8e77c2b273fde6d1fb13c09ee","unresolved":false,"context_lines":[{"line_number":3148,"context_line":"        # All instances have request specs after Newton release,"},{"line_number":3149,"context_line":"        # so request_spec is not checked here."},{"line_number":3150,"context_line":"        if host_name is None:"},{"line_number":3151,"context_line":"            request_spec.requested_destination \u003d None"},{"line_number":3152,"context_line":""},{"line_number":3153,"context_line":"        if not force and host_name is not None:"},{"line_number":3154,"context_line":"            host_name \u003d None"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a3c09a3_3b5f9242","line":3151,"range":{"start_line":3151,"start_character":12,"end_line":3151,"end_character":24},"updated":"2017-01-16 06:05:10.000000000","message":"I knew patch set #11 has some comments on this, but if you take a look at 3144, there is possibility that it can be None, so this kind of change will confuse reader anyway...\n\nmaybe first consider cleanup line 3144 logic?","commit_id":"b64480a80c0f3346a5b076ac8ef2650c1a6c9253"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"e5f02b06bcac208516f63f8f2f38eaeccf2c80b1","unresolved":false,"context_lines":[{"line_number":3148,"context_line":"        # All instances have request specs after Newton release,"},{"line_number":3149,"context_line":"        # so request_spec is not checked here."},{"line_number":3150,"context_line":"        if host_name is None:"},{"line_number":3151,"context_line":"            request_spec.requested_destination \u003d None"},{"line_number":3152,"context_line":""},{"line_number":3153,"context_line":"        if not force and host_name is not None:"},{"line_number":3154,"context_line":"            host_name \u003d None"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a3c09a3_be0530c3","line":3151,"range":{"start_line":3151,"start_character":12,"end_line":3151,"end_character":24},"in_reply_to":"7a3c09a3_3b5f9242","updated":"2017-01-16 06:23:34.000000000","message":"In PS11, Sylvain said:\n\u003e Yeah, all the instances now have an attached RequestSpec (even the ones created before Newton) so I think you can just remove this conditional.\n\nSo currently request_spec does not become None.","commit_id":"b64480a80c0f3346a5b076ac8ef2650c1a6c9253"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"a90250a993335be0614f592e527d62d34a22bdb6","unresolved":false,"context_lines":[{"line_number":3148,"context_line":"        # All instances have request specs after Newton release,"},{"line_number":3149,"context_line":"        # so request_spec is not checked here."},{"line_number":3150,"context_line":"        if host_name is None:"},{"line_number":3151,"context_line":"            request_spec.requested_destination \u003d None"},{"line_number":3152,"context_line":""},{"line_number":3153,"context_line":"        if not force and host_name is not None:"},{"line_number":3154,"context_line":"            host_name \u003d None"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a3c09a3_f06bdf82","line":3151,"range":{"start_line":3151,"start_character":12,"end_line":3151,"end_character":24},"in_reply_to":"7a3c09a3_9e9b1472","updated":"2017-01-18 10:15:05.000000000","message":"Done","commit_id":"b64480a80c0f3346a5b076ac8ef2650c1a6c9253"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"c33022556a5f99c3a67c20f18b721ea25d88ccd1","unresolved":false,"context_lines":[{"line_number":3148,"context_line":"        # All instances have request specs after Newton release,"},{"line_number":3149,"context_line":"        # so request_spec is not checked here."},{"line_number":3150,"context_line":"        if host_name is None:"},{"line_number":3151,"context_line":"            request_spec.requested_destination \u003d None"},{"line_number":3152,"context_line":""},{"line_number":3153,"context_line":"        if not force and host_name is not None:"},{"line_number":3154,"context_line":"            host_name \u003d None"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a3c09a3_9e9b1472","line":3151,"range":{"start_line":3151,"start_character":12,"end_line":3151,"end_character":24},"in_reply_to":"7a3c09a3_be0530c3","updated":"2017-01-16 06:29:02.000000000","message":"yes, I already saw that.. that\u0027s the reason I suggest to add a patch first","commit_id":"b64480a80c0f3346a5b076ac8ef2650c1a6c9253"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"ead1aab97542faaf8102a77c4847cbaab8dbdeb4","unresolved":false,"context_lines":[{"line_number":3140,"context_line":""},{"line_number":3141,"context_line":"        # If \u0027host\u0027 is not specified,"},{"line_number":3142,"context_line":"        # clear the \u0027requested_destination\u0027 field of the RequestSpec."},{"line_number":3143,"context_line":"        if host_name is None:"},{"line_number":3144,"context_line":"            request_spec.requested_destination \u003d None"},{"line_number":3145,"context_line":""},{"line_number":3146,"context_line":"        if not force and host_name is not None:"},{"line_number":3147,"context_line":"            host_name \u003d None"},{"line_number":3148,"context_line":"            target \u003d nodes[0]"},{"line_number":3149,"context_line":"            request_spec.requested_destination \u003d objects.Destination("},{"line_number":3150,"context_line":"                host\u003dtarget.host, node\u003dtarget.hypervisor_hostname)"},{"line_number":3151,"context_line":""},{"line_number":3152,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":3153,"context_line":"        if host_name:"},{"line_number":3154,"context_line":"            scheduler_hint.update({\u0027host\u0027: host_name})"},{"line_number":3155,"context_line":""},{"line_number":3156,"context_line":"        self.compute_task_api.resize_instance(context, instance,"},{"line_number":3157,"context_line":"                extra_instance_updates, scheduler_hint\u003dscheduler_hint,"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a3905b3_1785ce58","line":3154,"range":{"start_line":3143,"start_character":0,"end_line":3154,"end_character":54},"updated":"2017-01-24 00:54:30.000000000","message":"I was a little confused the combination of these conditions.\nHere just wants to change request_spec and scheduler_hints based on users\u0027 request I think.\n\nSO how about\n\n if host_name is None:\n     request_spec.requested_destination \u003d None\n elif not force:\n     request_spec.requested_destination \u003d objects.Destination(\n         host\u003dnodes[0].host, node\u003dtarget.hypervisor_hostname)\n else:\n     scheduler_hint.update({\u0027host\u0027: host_name})\n\n scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}\n\n?","commit_id":"cf6ce618a569e79a031485e1bd35d45350a5a1ca"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"4e0851c13b95aab15d1c6a3c8fa3a6fef0a2d7d7","unresolved":false,"context_lines":[{"line_number":3140,"context_line":""},{"line_number":3141,"context_line":"        # If \u0027host\u0027 is not specified,"},{"line_number":3142,"context_line":"        # clear the \u0027requested_destination\u0027 field of the RequestSpec."},{"line_number":3143,"context_line":"        if host_name is None:"},{"line_number":3144,"context_line":"            request_spec.requested_destination \u003d None"},{"line_number":3145,"context_line":""},{"line_number":3146,"context_line":"        if not force and host_name is not None:"},{"line_number":3147,"context_line":"            host_name \u003d None"},{"line_number":3148,"context_line":"            target \u003d nodes[0]"},{"line_number":3149,"context_line":"            request_spec.requested_destination \u003d objects.Destination("},{"line_number":3150,"context_line":"                host\u003dtarget.host, node\u003dtarget.hypervisor_hostname)"},{"line_number":3151,"context_line":""},{"line_number":3152,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":3153,"context_line":"        if host_name:"},{"line_number":3154,"context_line":"            scheduler_hint.update({\u0027host\u0027: host_name})"},{"line_number":3155,"context_line":""},{"line_number":3156,"context_line":"        self.compute_task_api.resize_instance(context, instance,"},{"line_number":3157,"context_line":"                extra_instance_updates, scheduler_hint\u003dscheduler_hint,"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a3905b3_fd1ae1c4","line":3154,"range":{"start_line":3143,"start_character":0,"end_line":3154,"end_character":54},"in_reply_to":"5a3905b3_1785ce58","updated":"2017-01-24 02:34:39.000000000","message":"Done","commit_id":"cf6ce618a569e79a031485e1bd35d45350a5a1ca"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"04fa996765c084e9fbd927c68edccfe1105d6c69","unresolved":false,"context_lines":[{"line_number":3312,"context_line":"            self._record_action_start(context, instance,"},{"line_number":3313,"context_line":"                                      instance_actions.RESIZE)"},{"line_number":3314,"context_line":""},{"line_number":3315,"context_line":"        # NOTE(sbauza): The migration script we provided in Newton should make"},{"line_number":3316,"context_line":"        # sure that all our instances are currently migrated to have an"},{"line_number":3317,"context_line":"        # attached RequestSpec object but let\u0027s consider that the operator only"},{"line_number":3318,"context_line":"        # half migrated all their instances in the meantime."},{"line_number":3319,"context_line":"        try:"},{"line_number":3320,"context_line":"            request_spec \u003d objects.RequestSpec.get_by_instance_uuid("},{"line_number":3321,"context_line":"                context, instance.uuid)"},{"line_number":3322,"context_line":"            request_spec.ignore_hosts \u003d filter_properties[\u0027ignore_hosts\u0027]"}],"source_content_type":"text/x-python","patch_set":33,"id":"1a1ced50_76b74886","side":"PARENT","line":3319,"range":{"start_line":3315,"start_character":0,"end_line":3319,"end_character":12},"updated":"2017-03-21 01:17:56.000000000","message":"I guess we don\u0027t need to remove this part in *this* patch for the scope ..","commit_id":"edf51119fa59ff8a3337abb9107a06fa33d3c68f"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"2b49e64762f7af89405a24eefe247ce5308df574","unresolved":false,"context_lines":[{"line_number":3312,"context_line":"            self._record_action_start(context, instance,"},{"line_number":3313,"context_line":"                                      instance_actions.RESIZE)"},{"line_number":3314,"context_line":""},{"line_number":3315,"context_line":"        # NOTE(sbauza): The migration script we provided in Newton should make"},{"line_number":3316,"context_line":"        # sure that all our instances are currently migrated to have an"},{"line_number":3317,"context_line":"        # attached RequestSpec object but let\u0027s consider that the operator only"},{"line_number":3318,"context_line":"        # half migrated all their instances in the meantime."},{"line_number":3319,"context_line":"        try:"},{"line_number":3320,"context_line":"            request_spec \u003d objects.RequestSpec.get_by_instance_uuid("},{"line_number":3321,"context_line":"                context, instance.uuid)"},{"line_number":3322,"context_line":"            request_spec.ignore_hosts \u003d filter_properties[\u0027ignore_hosts\u0027]"}],"source_content_type":"text/x-python","patch_set":33,"id":"ffe62b97_91d2d85b","side":"PARENT","line":3319,"range":{"start_line":3315,"start_character":0,"end_line":3319,"end_character":12},"in_reply_to":"1a1ced50_76b74886","updated":"2017-03-27 04:56:14.000000000","message":"After Newton, all VM instances have request specs.\nSo we don\u0027t have to consider the RequestSpecNotFound case.\nSo this comment can be removed.\n\nhttps://review.openstack.org/#/c/408955/11/nova/compute/api.py@3145","commit_id":"edf51119fa59ff8a3337abb9107a06fa33d3c68f"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"04fa996765c084e9fbd927c68edccfe1105d6c69","unresolved":false,"context_lines":[{"line_number":3224,"context_line":"        \"\"\""},{"line_number":3225,"context_line":"        # Check whether host exists or not when host_name is specified."},{"line_number":3226,"context_line":"        if host_name is not None:"},{"line_number":3227,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host_name)"},{"line_number":3228,"context_line":""},{"line_number":3229,"context_line":"        self._check_auto_disk_config(instance, **extra_instance_updates)"},{"line_number":3230,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"1a1ced50_5635ecf4","line":3227,"range":{"start_line":3227,"start_character":12,"end_line":3227,"end_character":79},"updated":"2017-03-21 01:17:56.000000000","message":"This *nodes* is used at line 3331, so can we move this into the block of 3331?\nOr is here intentionally checking the existence of the specified host_name for line 3333 case also ?","commit_id":"00615e0d4beffd9080b0d601e11f85442039d661"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"2b49e64762f7af89405a24eefe247ce5308df574","unresolved":false,"context_lines":[{"line_number":3224,"context_line":"        \"\"\""},{"line_number":3225,"context_line":"        # Check whether host exists or not when host_name is specified."},{"line_number":3226,"context_line":"        if host_name is not None:"},{"line_number":3227,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host_name)"},{"line_number":3228,"context_line":""},{"line_number":3229,"context_line":"        self._check_auto_disk_config(instance, **extra_instance_updates)"},{"line_number":3230,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"ffe62b97_f1a924dd","line":3227,"range":{"start_line":3227,"start_character":12,"end_line":3227,"end_character":79},"in_reply_to":"1a1ced50_5635ecf4","updated":"2017-03-27 04:56:14.000000000","message":"\u003e is here intentionally checking the existence of the specified host_name\n\nYes.","commit_id":"00615e0d4beffd9080b0d601e11f85442039d661"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"04fa996765c084e9fbd927c68edccfe1105d6c69","unresolved":false,"context_lines":[{"line_number":3225,"context_line":"        # Check whether host exists or not when host_name is specified."},{"line_number":3226,"context_line":"        if host_name is not None:"},{"line_number":3227,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host_name)"},{"line_number":3228,"context_line":""},{"line_number":3229,"context_line":"        self._check_auto_disk_config(instance, **extra_instance_updates)"},{"line_number":3230,"context_line":""},{"line_number":3231,"context_line":"        current_instance_type \u003d instance.get_flavor()"}],"source_content_type":"text/x-python","patch_set":33,"id":"1a1ced50_96168453","line":3228,"updated":"2017-03-21 01:17:56.000000000","message":"Don\u0027t we need to handle multiple nodes case by this searching (get_all_by_host() call) ?","commit_id":"00615e0d4beffd9080b0d601e11f85442039d661"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"2b49e64762f7af89405a24eefe247ce5308df574","unresolved":false,"context_lines":[{"line_number":3225,"context_line":"        # Check whether host exists or not when host_name is specified."},{"line_number":3226,"context_line":"        if host_name is not None:"},{"line_number":3227,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host_name)"},{"line_number":3228,"context_line":""},{"line_number":3229,"context_line":"        self._check_auto_disk_config(instance, **extra_instance_updates)"},{"line_number":3230,"context_line":""},{"line_number":3231,"context_line":"        current_instance_type \u003d instance.get_flavor()"}],"source_content_type":"text/x-python","patch_set":33,"id":"ffe62b97_d16d0099","line":3228,"in_reply_to":"1a1ced50_96168453","updated":"2017-03-27 04:56:14.000000000","message":"See live migration case.\nSo add a comment.\n\nhttps://github.com/openstack/nova/blob/a3df985a6e966069b366c7fd170832422ccda33e/nova/compute/api.py#L3962","commit_id":"00615e0d4beffd9080b0d601e11f85442039d661"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"cd1aff0d8f9a149252f3c69bf9451ff32d3a1729","unresolved":false,"context_lines":[{"line_number":3233,"context_line":"        be migrated to a new host and resized to the new flavor_id."},{"line_number":3234,"context_line":"        \"\"\""},{"line_number":3235,"context_line":"        # Check whether host exists or not when host_name is specified."},{"line_number":3236,"context_line":"        if host_name is not None:"},{"line_number":3237,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host_name)"},{"line_number":3238,"context_line":""},{"line_number":3239,"context_line":"            # Check whether the service is up or not."}],"source_content_type":"text/x-python","patch_set":39,"id":"bff0334d_3413f35e","line":3236,"range":{"start_line":3236,"start_character":0,"end_line":3236,"end_character":33},"updated":"2017-04-07 09:05:45.000000000","message":"I was thinking we could check all these in case force is false but its better to fail early if dest host is not good in both case","commit_id":"d94961b81fad7be83cf870a382b2090452ad3d25"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e2dd2214f83cc763a8f5ed068f915b7c50d1b004","unresolved":false,"context_lines":[{"line_number":3344,"context_line":"        if host_name is None:"},{"line_number":3345,"context_line":"            # If \u0027host\u0027 is not specified,"},{"line_number":3346,"context_line":"            # clear the \u0027requested_destination\u0027 field of the RequestSpec."},{"line_number":3347,"context_line":"            request_spec.requested_destination \u003d None"},{"line_number":3348,"context_line":"        elif not force:"},{"line_number":3349,"context_line":"            request_spec.requested_destination \u003d objects.Destination("},{"line_number":3350,"context_line":"                host\u003dnodes[0].host, node\u003dnodes[0].hypervisor_hostname)"}],"source_content_type":"text/x-python","patch_set":39,"id":"bff0334d_2a093cdc","line":3347,"updated":"2017-04-07 16:30:07.000000000","message":"This will clobber a destination already set, which will be there to limit the cell that the scheduler selects a host from.","commit_id":"d94961b81fad7be83cf870a382b2090452ad3d25"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"27be48238d0b11f07d20ab024900cc7af4641994","unresolved":false,"context_lines":[{"line_number":3344,"context_line":"        if host_name is None:"},{"line_number":3345,"context_line":"            # If \u0027host\u0027 is not specified,"},{"line_number":3346,"context_line":"            # clear the \u0027requested_destination\u0027 field of the RequestSpec."},{"line_number":3347,"context_line":"            request_spec.requested_destination \u003d None"},{"line_number":3348,"context_line":"        elif not force:"},{"line_number":3349,"context_line":"            request_spec.requested_destination \u003d objects.Destination("},{"line_number":3350,"context_line":"                host\u003dnodes[0].host, node\u003dnodes[0].hypervisor_hostname)"}],"source_content_type":"text/x-python","patch_set":39,"id":"bff0334d_4bc9ff23","line":3347,"in_reply_to":"bff0334d_2a093cdc","updated":"2017-04-10 11:08:34.000000000","message":"Once cold migration (\u0027host\u0027 is specified and force\u003dfalse) is performed, requested_destination is saved.\nNext time, cold migration (\u0027host\u0027 is not specified) is performed, the request spec is got from DB, so it has \u0027requested_destination\u0027 which has been saved before.\nIf \u0027requested_destination\u0027 is not cleared, it is same as the destination is specified.\nSo it should be ensured that \u0027requested_destination\u0027 is not set.","commit_id":"d94961b81fad7be83cf870a382b2090452ad3d25"},{"author":{"_account_id":23630,"name":"Tovin Seven","email":"tovin07@gmail.com","username":"tovin07"},"change_message_id":"b9e09134b79b88a689ffbcd49e1120ac108178e1","unresolved":false,"context_lines":[{"line_number":3269,"context_line":"            instance_mapping \u003d objects.InstanceMapping.get_by_instance_uuid("},{"line_number":3270,"context_line":"                context, instance.uuid)"},{"line_number":3271,"context_line":"            if (host_mapping.cell_mapping.identity !\u003d"},{"line_number":3272,"context_line":"                instance_mapping.cell_mapping.identity):"},{"line_number":3273,"context_line":"                raise exception.HostInDifferentCell("},{"line_number":3274,"context_line":"                    host\u003dhost_name, instance_uuid\u003dinstance.uuid)"},{"line_number":3275,"context_line":""}],"source_content_type":"text/x-python","patch_set":51,"id":"df140735_27f799d7","line":3272,"updated":"2017-06-07 02:26:24.000000000","message":"please add 4 spaces to indent","commit_id":"d417298118f1f77cd9fab70ba064320d3319f847"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"1cd4b6e4c15f3a75df016d15cb67e1abf7618870","unresolved":false,"context_lines":[{"line_number":3269,"context_line":"            instance_mapping \u003d objects.InstanceMapping.get_by_instance_uuid("},{"line_number":3270,"context_line":"                context, instance.uuid)"},{"line_number":3271,"context_line":"            if (host_mapping.cell_mapping.identity !\u003d"},{"line_number":3272,"context_line":"                instance_mapping.cell_mapping.identity):"},{"line_number":3273,"context_line":"                raise exception.HostInDifferentCell("},{"line_number":3274,"context_line":"                    host\u003dhost_name, instance_uuid\u003dinstance.uuid)"},{"line_number":3275,"context_line":""}],"source_content_type":"text/x-python","patch_set":51,"id":"df140735_eab3a54c","line":3272,"in_reply_to":"df140735_27f799d7","updated":"2017-06-07 03:36:09.000000000","message":"Done","commit_id":"d417298118f1f77cd9fab70ba064320d3319f847"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8dcbff327c294e0a0e00cb0ae3e57108a60df65b","unresolved":false,"context_lines":[{"line_number":3349,"context_line":"            self._record_action_start(context, instance,"},{"line_number":3350,"context_line":"                                      instance_actions.RESIZE)"},{"line_number":3351,"context_line":""},{"line_number":3352,"context_line":"        # NOTE(sbauza): The migration script we provided in Newton should make"},{"line_number":3353,"context_line":"        # sure that all our instances are currently migrated to have an"},{"line_number":3354,"context_line":"        # attached RequestSpec object but let\u0027s consider that the operator only"},{"line_number":3355,"context_line":"        # half migrated all their instances in the meantime."}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_527e8e6b","side":"PARENT","line":3352,"updated":"2017-06-13 10:48:56.000000000","message":"its tempting to say I would like to see this as a separate change, as its almost unrelated to this feature, but I think I see why you removed this, for consistency with live-migration.","commit_id":"6e64cb032e56b279acdbee7ae9a0404e7aea99f2"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b11b2264c8c87353a66a37222f1ceda10d7277a5","unresolved":false,"context_lines":[{"line_number":3349,"context_line":"            self._record_action_start(context, instance,"},{"line_number":3350,"context_line":"                                      instance_actions.RESIZE)"},{"line_number":3351,"context_line":""},{"line_number":3352,"context_line":"        # NOTE(sbauza): The migration script we provided in Newton should make"},{"line_number":3353,"context_line":"        # sure that all our instances are currently migrated to have an"},{"line_number":3354,"context_line":"        # attached RequestSpec object but let\u0027s consider that the operator only"},{"line_number":3355,"context_line":"        # half migrated all their instances in the meantime."}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_c2a761a7","side":"PARENT","line":3352,"in_reply_to":"7f231b9d_527e8e6b","updated":"2017-06-13 15:28:12.000000000","message":"Agreed, see my comment","commit_id":"6e64cb032e56b279acdbee7ae9a0404e7aea99f2"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"799a9239237ec2f76f7ceedc21296b98bceb64b8","unresolved":false,"context_lines":[{"line_number":3349,"context_line":"            self._record_action_start(context, instance,"},{"line_number":3350,"context_line":"                                      instance_actions.RESIZE)"},{"line_number":3351,"context_line":""},{"line_number":3352,"context_line":"        # NOTE(sbauza): The migration script we provided in Newton should make"},{"line_number":3353,"context_line":"        # sure that all our instances are currently migrated to have an"},{"line_number":3354,"context_line":"        # attached RequestSpec object but let\u0027s consider that the operator only"},{"line_number":3355,"context_line":"        # half migrated all their instances in the meantime."}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_48c0dd2a","side":"PARENT","line":3352,"in_reply_to":"7f231b9d_c2a761a7","updated":"2017-06-15 06:41:06.000000000","message":"I restored them.\nDone.","commit_id":"6e64cb032e56b279acdbee7ae9a0404e7aea99f2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8dcbff327c294e0a0e00cb0ae3e57108a60df65b","unresolved":false,"context_lines":[{"line_number":3263,"context_line":"        if host_name is not None:"},{"line_number":3264,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host_name)"},{"line_number":3265,"context_line":""},{"line_number":3266,"context_line":"            # Check whether the destination host is in the same cell"},{"line_number":3267,"context_line":"            # as the instance."},{"line_number":3268,"context_line":"            host_mapping \u003d objects.HostMapping.get_by_host(context, host_name)"},{"line_number":3269,"context_line":"            instance_mapping \u003d objects.InstanceMapping.get_by_instance_uuid("},{"line_number":3270,"context_line":"                context, instance.uuid)"},{"line_number":3271,"context_line":"            if (host_mapping.cell_mapping.identity !\u003d"},{"line_number":3272,"context_line":"                    instance_mapping.cell_mapping.identity):"},{"line_number":3273,"context_line":"                raise exception.HostInDifferentCell("},{"line_number":3274,"context_line":"                    host\u003dhost_name, instance_uuid\u003dinstance.uuid)"},{"line_number":3275,"context_line":""},{"line_number":3276,"context_line":"            # Check whether the service is up or not."},{"line_number":3277,"context_line":"            # FIXME(takashin): Since only Ironic driver uses more than one"}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_5241ee0a","line":3274,"range":{"start_line":3266,"start_character":12,"end_line":3274,"end_character":64},"updated":"2017-06-13 10:48:56.000000000","message":"Do we not have a helper function for that kind of thing already? Probably easier to test that way too.","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"799a9239237ec2f76f7ceedc21296b98bceb64b8","unresolved":false,"context_lines":[{"line_number":3263,"context_line":"        if host_name is not None:"},{"line_number":3264,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host_name)"},{"line_number":3265,"context_line":""},{"line_number":3266,"context_line":"            # Check whether the destination host is in the same cell"},{"line_number":3267,"context_line":"            # as the instance."},{"line_number":3268,"context_line":"            host_mapping \u003d objects.HostMapping.get_by_host(context, host_name)"},{"line_number":3269,"context_line":"            instance_mapping \u003d objects.InstanceMapping.get_by_instance_uuid("},{"line_number":3270,"context_line":"                context, instance.uuid)"},{"line_number":3271,"context_line":"            if (host_mapping.cell_mapping.identity !\u003d"},{"line_number":3272,"context_line":"                    instance_mapping.cell_mapping.identity):"},{"line_number":3273,"context_line":"                raise exception.HostInDifferentCell("},{"line_number":3274,"context_line":"                    host\u003dhost_name, instance_uuid\u003dinstance.uuid)"},{"line_number":3275,"context_line":""},{"line_number":3276,"context_line":"            # Check whether the service is up or not."},{"line_number":3277,"context_line":"            # FIXME(takashin): Since only Ironic driver uses more than one"}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_3deba513","line":3274,"range":{"start_line":3266,"start_character":12,"end_line":3274,"end_character":64},"in_reply_to":"7f231b9d_270e273b","updated":"2017-06-15 06:41:06.000000000","message":"\u003e We don\u0027t really do this verification for the other move operations, right? AFAIK, evacuate and live-migrate don\u0027t verify whether the provided target is already in the same cell.\n\nIn live migration case, it is not verified.\nSo removed this code.\nDone.","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b11b2264c8c87353a66a37222f1ceda10d7277a5","unresolved":false,"context_lines":[{"line_number":3263,"context_line":"        if host_name is not None:"},{"line_number":3264,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host_name)"},{"line_number":3265,"context_line":""},{"line_number":3266,"context_line":"            # Check whether the destination host is in the same cell"},{"line_number":3267,"context_line":"            # as the instance."},{"line_number":3268,"context_line":"            host_mapping \u003d objects.HostMapping.get_by_host(context, host_name)"},{"line_number":3269,"context_line":"            instance_mapping \u003d objects.InstanceMapping.get_by_instance_uuid("},{"line_number":3270,"context_line":"                context, instance.uuid)"},{"line_number":3271,"context_line":"            if (host_mapping.cell_mapping.identity !\u003d"},{"line_number":3272,"context_line":"                    instance_mapping.cell_mapping.identity):"},{"line_number":3273,"context_line":"                raise exception.HostInDifferentCell("},{"line_number":3274,"context_line":"                    host\u003dhost_name, instance_uuid\u003dinstance.uuid)"},{"line_number":3275,"context_line":""},{"line_number":3276,"context_line":"            # Check whether the service is up or not."},{"line_number":3277,"context_line":"            # FIXME(takashin): Since only Ironic driver uses more than one"}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_270e273b","line":3274,"range":{"start_line":3266,"start_character":12,"end_line":3274,"end_character":64},"in_reply_to":"7f231b9d_5241ee0a","updated":"2017-06-13 15:28:12.000000000","message":"We don\u0027t really do this verification for the other move operations, right?\nAFAIK, evacuate and live-migrate don\u0027t verify whether the provided target is already in the same cell.\n\nWe could actually do that in the scheduler code as we would pass the requested target as a RequestedDestination field for the RequestSpec and I\u0027d prefer that way which would be the same for all the move operations providing a possible target.","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8dcbff327c294e0a0e00cb0ae3e57108a60df65b","unresolved":false,"context_lines":[{"line_number":3275,"context_line":""},{"line_number":3276,"context_line":"            # Check whether the service is up or not."},{"line_number":3277,"context_line":"            # FIXME(takashin): Since only Ironic driver uses more than one"},{"line_number":3278,"context_line":"            # compute per service but doesn\u0027t support evacuations,"},{"line_number":3279,"context_line":"            # let\u0027s provide the first one."},{"line_number":3280,"context_line":"            service \u003d objects.Service.get_by_compute_host(context,"},{"line_number":3281,"context_line":"                                                          nodes[0].host)"}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_924d4674","line":3278,"range":{"start_line":3278,"start_character":54,"end_line":3278,"end_character":65},"updated":"2017-06-13 10:48:56.000000000","message":"You mean resize or migrate I assume? Evacuate is a very different Nova API.","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b11b2264c8c87353a66a37222f1ceda10d7277a5","unresolved":false,"context_lines":[{"line_number":3275,"context_line":""},{"line_number":3276,"context_line":"            # Check whether the service is up or not."},{"line_number":3277,"context_line":"            # FIXME(takashin): Since only Ironic driver uses more than one"},{"line_number":3278,"context_line":"            # compute per service but doesn\u0027t support evacuations,"},{"line_number":3279,"context_line":"            # let\u0027s provide the first one."},{"line_number":3280,"context_line":"            service \u003d objects.Service.get_by_compute_host(context,"},{"line_number":3281,"context_line":"                                                          nodes[0].host)"}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_e776ef06","line":3278,"range":{"start_line":3278,"start_character":54,"end_line":3278,"end_character":65},"in_reply_to":"7f231b9d_924d4674","updated":"2017-06-13 15:28:12.000000000","message":"It\u0027s a wrong copy/paste I think. Resize API is not using the same conductor API methods than evacuate and rebuild, so we can\u0027t really say the above like we did for evacuate.\n\nThat said, looks that Ironic doesn\u0027t support resizes too https://docs.openstack.org/developer/nova/support-matrix.html#operation_resize","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"799a9239237ec2f76f7ceedc21296b98bceb64b8","unresolved":false,"context_lines":[{"line_number":3275,"context_line":""},{"line_number":3276,"context_line":"            # Check whether the service is up or not."},{"line_number":3277,"context_line":"            # FIXME(takashin): Since only Ironic driver uses more than one"},{"line_number":3278,"context_line":"            # compute per service but doesn\u0027t support evacuations,"},{"line_number":3279,"context_line":"            # let\u0027s provide the first one."},{"line_number":3280,"context_line":"            service \u003d objects.Service.get_by_compute_host(context,"},{"line_number":3281,"context_line":"                                                          nodes[0].host)"}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_1d67c9bf","line":3278,"range":{"start_line":3278,"start_character":54,"end_line":3278,"end_character":65},"in_reply_to":"7f231b9d_e776ef06","updated":"2017-06-15 06:41:06.000000000","message":"Done","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8dcbff327c294e0a0e00cb0ae3e57108a60df65b","unresolved":false,"context_lines":[{"line_number":3277,"context_line":"            # FIXME(takashin): Since only Ironic driver uses more than one"},{"line_number":3278,"context_line":"            # compute per service but doesn\u0027t support evacuations,"},{"line_number":3279,"context_line":"            # let\u0027s provide the first one."},{"line_number":3280,"context_line":"            service \u003d objects.Service.get_by_compute_host(context,"},{"line_number":3281,"context_line":"                                                          nodes[0].host)"},{"line_number":3282,"context_line":"            if not self.servicegroup_api.service_is_up(service):"},{"line_number":3283,"context_line":"                raise exception.ComputeServiceUnavailable(host\u003dnodes[0].host)"},{"line_number":3284,"context_line":""}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_32cf92b1","line":3281,"range":{"start_line":3280,"start_character":58,"end_line":3281,"end_character":72},"updated":"2017-06-13 10:48:56.000000000","message":"Are you sure you can\u0027t skip get_all_by_host and just do something like this? On large ironic systems that can be quite a expensive call, I know its not supported, but nice to avoid the expense.\n\n  objects.Service.get_by_compute_host(context, host_name)","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b11b2264c8c87353a66a37222f1ceda10d7277a5","unresolved":false,"context_lines":[{"line_number":3277,"context_line":"            # FIXME(takashin): Since only Ironic driver uses more than one"},{"line_number":3278,"context_line":"            # compute per service but doesn\u0027t support evacuations,"},{"line_number":3279,"context_line":"            # let\u0027s provide the first one."},{"line_number":3280,"context_line":"            service \u003d objects.Service.get_by_compute_host(context,"},{"line_number":3281,"context_line":"                                                          nodes[0].host)"},{"line_number":3282,"context_line":"            if not self.servicegroup_api.service_is_up(service):"},{"line_number":3283,"context_line":"                raise exception.ComputeServiceUnavailable(host\u003dnodes[0].host)"},{"line_number":3284,"context_line":""}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_4281114a","line":3281,"range":{"start_line":3280,"start_character":58,"end_line":3281,"end_character":72},"in_reply_to":"7f231b9d_32cf92b1","updated":"2017-06-13 15:28:12.000000000","message":"If you call the scheduler like what this change is trying to do, you don\u0027t need to verify the service itself, given it will be done by the scheduler if ComputeFilter is enabled.\n\nIf the operator (because passing a target node should only be for admins) uses the force flag with that target, then it\u0027s their concerns if they pass a target that is not running.","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"799a9239237ec2f76f7ceedc21296b98bceb64b8","unresolved":false,"context_lines":[{"line_number":3277,"context_line":"            # FIXME(takashin): Since only Ironic driver uses more than one"},{"line_number":3278,"context_line":"            # compute per service but doesn\u0027t support evacuations,"},{"line_number":3279,"context_line":"            # let\u0027s provide the first one."},{"line_number":3280,"context_line":"            service \u003d objects.Service.get_by_compute_host(context,"},{"line_number":3281,"context_line":"                                                          nodes[0].host)"},{"line_number":3282,"context_line":"            if not self.servicegroup_api.service_is_up(service):"},{"line_number":3283,"context_line":"                raise exception.ComputeServiceUnavailable(host\u003dnodes[0].host)"},{"line_number":3284,"context_line":""}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_63ee1aee","line":3281,"range":{"start_line":3280,"start_character":58,"end_line":3281,"end_character":72},"in_reply_to":"7f231b9d_4281114a","updated":"2017-06-15 06:41:06.000000000","message":"\u0027get_all_by_host\u0027 call is required for line 3387 (to get nodes[0].hypervisor_hostname).\nI changed the check to be done only in the case that the target host is specified and force is true.","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b11b2264c8c87353a66a37222f1ceda10d7277a5","unresolved":false,"context_lines":[{"line_number":3279,"context_line":"            # let\u0027s provide the first one."},{"line_number":3280,"context_line":"            service \u003d objects.Service.get_by_compute_host(context,"},{"line_number":3281,"context_line":"                                                          nodes[0].host)"},{"line_number":3282,"context_line":"            if not self.servicegroup_api.service_is_up(service):"},{"line_number":3283,"context_line":"                raise exception.ComputeServiceUnavailable(host\u003dnodes[0].host)"},{"line_number":3284,"context_line":""},{"line_number":3285,"context_line":"        self._check_auto_disk_config(instance, **extra_instance_updates)"},{"line_number":3286,"context_line":""}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_a29b45c7","line":3283,"range":{"start_line":3282,"start_character":0,"end_line":3283,"end_character":77},"updated":"2017-06-13 15:28:12.000000000","message":"I disagree with the above. You\u0027re adding a specific user experience different from what\u0027s already possible. Here, you specifically verify whether the compute service is available or not, while we don\u0027t do that in the current code.","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"799a9239237ec2f76f7ceedc21296b98bceb64b8","unresolved":false,"context_lines":[{"line_number":3279,"context_line":"            # let\u0027s provide the first one."},{"line_number":3280,"context_line":"            service \u003d objects.Service.get_by_compute_host(context,"},{"line_number":3281,"context_line":"                                                          nodes[0].host)"},{"line_number":3282,"context_line":"            if not self.servicegroup_api.service_is_up(service):"},{"line_number":3283,"context_line":"                raise exception.ComputeServiceUnavailable(host\u003dnodes[0].host)"},{"line_number":3284,"context_line":""},{"line_number":3285,"context_line":"        self._check_auto_disk_config(instance, **extra_instance_updates)"},{"line_number":3286,"context_line":""}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_c8a18d48","line":3283,"range":{"start_line":3282,"start_character":0,"end_line":3283,"end_character":77},"in_reply_to":"7f231b9d_a29b45c7","updated":"2017-06-15 06:41:06.000000000","message":"In live migration case, if the target host is specified and force is true, this check is done.\nSo I changed it to be done only in the case that the target host is specified and force is true.\n\nhttps://github.com/openstack/nova/blob/28769f999041ac1d4b24a2a34d23575b12a6291f/nova/conductor/tasks/live_migrate.py#L85-L89","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b11b2264c8c87353a66a37222f1ceda10d7277a5","unresolved":false,"context_lines":[{"line_number":3372,"context_line":"            self._record_action_start(context, instance,"},{"line_number":3373,"context_line":"                                      instance_actions.RESIZE)"},{"line_number":3374,"context_line":""},{"line_number":3375,"context_line":"        # All instances have request specs after Newton release."},{"line_number":3376,"context_line":"        request_spec \u003d objects.RequestSpec.get_by_instance_uuid("},{"line_number":3377,"context_line":"            context, instance.uuid)"},{"line_number":3378,"context_line":"        request_spec.ignore_hosts \u003d filter_properties[\u0027ignore_hosts\u0027]"}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_87173ba4","line":3375,"updated":"2017-06-13 15:28:12.000000000","message":"That\u0027s untrue. We finally considered that given the migration script we provided for Newton was only verifying a specific DB, cells v1 instances could possibly not having RequestSpec records if they were created before Mitaka.\n\nOf course, a cellsv1 operator could try to run the data migrations for each cell DB, but we can also keep to be conservative until we definitely stop to support Cells V1.","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"799a9239237ec2f76f7ceedc21296b98bceb64b8","unresolved":false,"context_lines":[{"line_number":3372,"context_line":"            self._record_action_start(context, instance,"},{"line_number":3373,"context_line":"                                      instance_actions.RESIZE)"},{"line_number":3374,"context_line":""},{"line_number":3375,"context_line":"        # All instances have request specs after Newton release."},{"line_number":3376,"context_line":"        request_spec \u003d objects.RequestSpec.get_by_instance_uuid("},{"line_number":3377,"context_line":"            context, instance.uuid)"},{"line_number":3378,"context_line":"        request_spec.ignore_hosts \u003d filter_properties[\u0027ignore_hosts\u0027]"}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_28dfe10d","line":3375,"in_reply_to":"7f231b9d_87173ba4","updated":"2017-06-15 06:41:06.000000000","message":"I restored them.\nDone.","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b11b2264c8c87353a66a37222f1ceda10d7277a5","unresolved":false,"context_lines":[{"line_number":3386,"context_line":"            request_spec.requested_destination \u003d objects.Destination("},{"line_number":3387,"context_line":"                host\u003dnodes[0].host, node\u003dnodes[0].hypervisor_hostname)"},{"line_number":3388,"context_line":"        else:"},{"line_number":3389,"context_line":"            scheduler_hint.update({\u0027host\u0027: host_name})"},{"line_number":3390,"context_line":""},{"line_number":3391,"context_line":"        self.compute_task_api.resize_instance(context, instance,"},{"line_number":3392,"context_line":"                extra_instance_updates, scheduler_hint\u003dscheduler_hint,"}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_62352d46","line":3389,"range":{"start_line":3389,"start_character":35,"end_line":3389,"end_character":53},"updated":"2017-06-13 15:28:12.000000000","message":"I\u0027m not liking to use a legacy dictionary for passing a specific host key which would be confusing with what the RequestSpec.requested_destination field provides.\n\nI\u0027d rather propose to mimic the API parameters of evacuate and live-migrate that add a specific host parameter to their conductor API methods so we could be very clear in the docstring that the \"host\" parameter is only for forced resizes.","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8dcbff327c294e0a0e00cb0ae3e57108a60df65b","unresolved":false,"context_lines":[{"line_number":3378,"context_line":"        request_spec.ignore_hosts \u003d filter_properties[\u0027ignore_hosts\u0027]"},{"line_number":3379,"context_line":""},{"line_number":3380,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":3381,"context_line":"        if host_name is None:"},{"line_number":3382,"context_line":"            # If \u0027host\u0027 is not specified,"},{"line_number":3383,"context_line":"            # clear the \u0027requested_destination\u0027 field of the RequestSpec."},{"line_number":3384,"context_line":"            request_spec.requested_destination \u003d None"},{"line_number":3385,"context_line":"        elif not force:"},{"line_number":3386,"context_line":"            request_spec.requested_destination \u003d objects.Destination("},{"line_number":3387,"context_line":"                host\u003dnodes[0].host, node\u003dnodes[0].hypervisor_hostname)"},{"line_number":3388,"context_line":"        else:"},{"line_number":3389,"context_line":"            scheduler_hint.update({\u0027host\u0027: host_name})"},{"line_number":3390,"context_line":""},{"line_number":3391,"context_line":"        self.compute_task_api.resize_instance(context, instance,"},{"line_number":3392,"context_line":"                extra_instance_updates, scheduler_hint\u003dscheduler_hint,"}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_32eaf2ab","line":3389,"range":{"start_line":3381,"start_character":7,"end_line":3389,"end_character":54},"updated":"2017-06-13 10:48:56.000000000","message":"It would be nice if we could share more code with logic here, rather than just cut an paste a bit of it:\nhttps://github.com/openstack/nova/blob/master/nova/compute/api.py#L3991\n\nAlthough I am a bit confused how the force host works for live-migration now.","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b11b2264c8c87353a66a37222f1ceda10d7277a5","unresolved":false,"context_lines":[{"line_number":3378,"context_line":"        request_spec.ignore_hosts \u003d filter_properties[\u0027ignore_hosts\u0027]"},{"line_number":3379,"context_line":""},{"line_number":3380,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":3381,"context_line":"        if host_name is None:"},{"line_number":3382,"context_line":"            # If \u0027host\u0027 is not specified,"},{"line_number":3383,"context_line":"            # clear the \u0027requested_destination\u0027 field of the RequestSpec."},{"line_number":3384,"context_line":"            request_spec.requested_destination \u003d None"},{"line_number":3385,"context_line":"        elif not force:"},{"line_number":3386,"context_line":"            request_spec.requested_destination \u003d objects.Destination("},{"line_number":3387,"context_line":"                host\u003dnodes[0].host, node\u003dnodes[0].hypervisor_hostname)"},{"line_number":3388,"context_line":"        else:"},{"line_number":3389,"context_line":"            scheduler_hint.update({\u0027host\u0027: host_name})"},{"line_number":3390,"context_line":""},{"line_number":3391,"context_line":"        self.compute_task_api.resize_instance(context, instance,"},{"line_number":3392,"context_line":"                extra_instance_updates, scheduler_hint\u003dscheduler_hint,"}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_2295f540","line":3389,"range":{"start_line":3381,"start_character":7,"end_line":3389,"end_character":54},"in_reply_to":"7f231b9d_32eaf2ab","updated":"2017-06-13 15:28:12.000000000","message":"@John, the logic is :\n- either the admin-only passes a target without using the force flag, and then we verify the scheduler for that specific target by amending the RequestSpec with a new RequestedDestination field.\n- or the admin-only provided a target with the force flag too (explicitly set to True from an API perspective), and then we directly call the compute service without verifying the scheduler.\n\nOf course, for evacuate and live-migrate, we have a legacy behaviour to support (ie. if the microversion call is older, then we directly call the compute service even if the force flag is unset), but given that API action will only support providing targets with the new logic, there is no reason to write compat code.","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"799a9239237ec2f76f7ceedc21296b98bceb64b8","unresolved":false,"context_lines":[{"line_number":3386,"context_line":"            request_spec.requested_destination \u003d objects.Destination("},{"line_number":3387,"context_line":"                host\u003dnodes[0].host, node\u003dnodes[0].hypervisor_hostname)"},{"line_number":3388,"context_line":"        else:"},{"line_number":3389,"context_line":"            scheduler_hint.update({\u0027host\u0027: host_name})"},{"line_number":3390,"context_line":""},{"line_number":3391,"context_line":"        self.compute_task_api.resize_instance(context, instance,"},{"line_number":3392,"context_line":"                extra_instance_updates, scheduler_hint\u003dscheduler_hint,"}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_2e9da9bb","line":3389,"range":{"start_line":3389,"start_character":35,"end_line":3389,"end_character":53},"in_reply_to":"7f231b9d_62352d46","updated":"2017-06-15 06:41:06.000000000","message":"\u003e I\u0027d rather propose to mimic the API parameters of evacuate and live-migrate that add a specific host parameter to their conductor API methods so we could be very clear in the docstring that the \"host\" parameter is only for forced resizes.\n\nIf arguments of \u0027resize_instance\u0027 method of conductor API is changed, the following method (cell v1) have to be changed.\n\n* resize_instance in nova/cells/manager.py\n* resize_instance in nova/cells/messaging.py\n* resize_instance in nova/cells/rpcapi.py\n\nI would like to avoid the change about cell v1 code because cell v1 is \u0027frozen\u0027.\nSo I utilize scheduler_hints dict.","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a54cf93105cb0ad9e86b1fda3fa504707e80ae4d","unresolved":false,"context_lines":[{"line_number":3310,"context_line":"        be migrated to a new host and resized to the new flavor_id."},{"line_number":3311,"context_line":"        \"\"\""},{"line_number":3312,"context_line":"        # Check whether host exists or not when host_name is specified."},{"line_number":3313,"context_line":"        if host_name is not None:"},{"line_number":3314,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host_name)"},{"line_number":3315,"context_line":""},{"line_number":3316,"context_line":"            if force:"}],"source_content_type":"text/x-python","patch_set":63,"id":"1f1a1f67_02582b53","line":3313,"updated":"2017-07-19 16:24:14.000000000","message":"Do we really need to check this here? If the host doesn\u0027t exist, the rpc cast will fail anyway, right?\n\nAnother thing to consider is that we don\u0027t support migrating between cells, so even if the host is specified and exists, we can\u0027t migrate the instance from cell1 to cell2 in a multi-cell deployment. Conductor/Scheduler may already take care of that validation, but we\u0027d need to check. We probably need a functional test that tries to do that (sets up 2 cells with 1 host each, and try to cold migrate the instance from one cell to the other with the target host set and make sure it fails).","commit_id":"40e7f7e875cde63be32ad1572c7074285ff67314"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"152379a613caac49fc01a55c9a6e7255409c4ffb","unresolved":false,"context_lines":[{"line_number":3310,"context_line":"        be migrated to a new host and resized to the new flavor_id."},{"line_number":3311,"context_line":"        \"\"\""},{"line_number":3312,"context_line":"        # Check whether host exists or not when host_name is specified."},{"line_number":3313,"context_line":"        if host_name is not None:"},{"line_number":3314,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host_name)"},{"line_number":3315,"context_line":""},{"line_number":3316,"context_line":"            if force:"}],"source_content_type":"text/x-python","patch_set":63,"id":"1f1a1f67_88db194e","line":3313,"in_reply_to":"1f1a1f67_02582b53","updated":"2017-07-20 13:35:37.000000000","message":"I will change it like live migration case.\n\n    if force is False and host_name:\n\nhttps://github.com/openstack/nova/blob/b529c32ca0923b6b180d252306f4c39033d2cd43/nova/compute/api.py#L3864","commit_id":"40e7f7e875cde63be32ad1572c7074285ff67314"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"15a541a3d51b9be77f14b012ebd9fa93508ee20a","unresolved":false,"context_lines":[{"line_number":3313,"context_line":"        if host_name is not None:"},{"line_number":3314,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host_name)"},{"line_number":3315,"context_line":""},{"line_number":3316,"context_line":"            if force:"},{"line_number":3317,"context_line":"                # Check whether the service is up or not."},{"line_number":3318,"context_line":"                # FIXME(takashin): Since only Ironic driver uses more than one"},{"line_number":3319,"context_line":"                # compute per service but doesn\u0027t support resize and"}],"source_content_type":"text/x-python","patch_set":63,"id":"1f1a1f67_aa2dc9fe","line":3316,"updated":"2017-07-19 18:14:03.000000000","message":"I don\u0027t understand why we\u0027d check if the service was up if the force option is True? Seems backwards, no? Wouldn\u0027t we ignore the service being disabled if the force option is True?\n\nNever mind... I see the force option is only to avoid scheduling, not to do with actually forcing the migration to occur. :(","commit_id":"40e7f7e875cde63be32ad1572c7074285ff67314"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"152379a613caac49fc01a55c9a6e7255409c4ffb","unresolved":false,"context_lines":[{"line_number":3313,"context_line":"        if host_name is not None:"},{"line_number":3314,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host_name)"},{"line_number":3315,"context_line":""},{"line_number":3316,"context_line":"            if force:"},{"line_number":3317,"context_line":"                # Check whether the service is up or not."},{"line_number":3318,"context_line":"                # FIXME(takashin): Since only Ironic driver uses more than one"},{"line_number":3319,"context_line":"                # compute per service but doesn\u0027t support resize and"}],"source_content_type":"text/x-python","patch_set":63,"id":"1f1a1f67_886e79c7","line":3316,"in_reply_to":"1f1a1f67_aa2dc9fe","updated":"2017-07-20 13:35:37.000000000","message":"It is for consistency with live migration case.\n\nhttps://github.com/openstack/nova/blob/b529c32ca0923b6b180d252306f4c39033d2cd43/nova/conductor/tasks/live_migrate.py#L85-L89\n\nPlease see Ken\u0027ichi\u0027s comment.\n\nhttps://review.openstack.org/#/c/408955/33/nova/conductor/tasks/migrate.py@55","commit_id":"40e7f7e875cde63be32ad1572c7074285ff67314"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a54cf93105cb0ad9e86b1fda3fa504707e80ae4d","unresolved":false,"context_lines":[{"line_number":3314,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host_name)"},{"line_number":3315,"context_line":""},{"line_number":3316,"context_line":"            if force:"},{"line_number":3317,"context_line":"                # Check whether the service is up or not."},{"line_number":3318,"context_line":"                # FIXME(takashin): Since only Ironic driver uses more than one"},{"line_number":3319,"context_line":"                # compute per service but doesn\u0027t support resize and"},{"line_number":3320,"context_line":"                # cold migration, let\u0027s provide the first one."}],"source_content_type":"text/x-python","patch_set":63,"id":"1f1a1f67_623c7fe0","line":3317,"updated":"2017-07-19 16:24:14.000000000","message":"Again, won\u0027t the rpc cast fail if the service is not up?","commit_id":"40e7f7e875cde63be32ad1572c7074285ff67314"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"152379a613caac49fc01a55c9a6e7255409c4ffb","unresolved":false,"context_lines":[{"line_number":3314,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host_name)"},{"line_number":3315,"context_line":""},{"line_number":3316,"context_line":"            if force:"},{"line_number":3317,"context_line":"                # Check whether the service is up or not."},{"line_number":3318,"context_line":"                # FIXME(takashin): Since only Ironic driver uses more than one"},{"line_number":3319,"context_line":"                # compute per service but doesn\u0027t support resize and"},{"line_number":3320,"context_line":"                # cold migration, let\u0027s provide the first one."}],"source_content_type":"text/x-python","patch_set":63,"id":"1f1a1f67_88f1d904","line":3317,"in_reply_to":"1f1a1f67_623c7fe0","updated":"2017-07-20 13:35:37.000000000","message":"It is for consistency with live migration case.\n\nhttps://github.com/openstack/nova/blob/b529c32ca0923b6b180d252306f4c39033d2cd43/nova/conductor/tasks/live_migrate.py#L85-L89\n\nPlease see Ken\u0027ichi\u0027s comment.\n\nhttps://review.openstack.org/#/c/408955/33/nova/conductor/tasks/migrate.py@55","commit_id":"40e7f7e875cde63be32ad1572c7074285ff67314"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"db02ccbab2977bcf33d1dd3853bf06f736efd7e6","unresolved":false,"context_lines":[{"line_number":3314,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host_name)"},{"line_number":3315,"context_line":""},{"line_number":3316,"context_line":"            if force:"},{"line_number":3317,"context_line":"                # Check whether the service is up or not."},{"line_number":3318,"context_line":"                # FIXME(takashin): Since only Ironic driver uses more than one"},{"line_number":3319,"context_line":"                # compute per service but doesn\u0027t support resize and"},{"line_number":3320,"context_line":"                # cold migration, let\u0027s provide the first one."}],"source_content_type":"text/x-python","patch_set":63,"id":"1f1a1f67_1d864aba","line":3317,"in_reply_to":"1f1a1f67_623c7fe0","updated":"2017-07-23 12:46:10.000000000","message":"Nevermind, we call conductor to manage the task, but the compute task api does an rpc call to migrate_server which doesn\u0027t actually rpc cast until it hits the compute and casts to prep_resize - so we can probably do the validation for the host/cell stuff within conductor rather than here in the API - the failure there will come back on the rpc call and we can raise it back as a 400 error.","commit_id":"40e7f7e875cde63be32ad1572c7074285ff67314"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"db02ccbab2977bcf33d1dd3853bf06f736efd7e6","unresolved":false,"context_lines":[{"line_number":3314,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host_name)"},{"line_number":3315,"context_line":""},{"line_number":3316,"context_line":"            if force:"},{"line_number":3317,"context_line":"                # Check whether the service is up or not."},{"line_number":3318,"context_line":"                # FIXME(takashin): Since only Ironic driver uses more than one"},{"line_number":3319,"context_line":"                # compute per service but doesn\u0027t support resize and"},{"line_number":3320,"context_line":"                # cold migration, let\u0027s provide the first one."}],"source_content_type":"text/x-python","patch_set":63,"id":"ff346bd7_cf2a278f","line":3317,"in_reply_to":"1f1a1f67_88f1d904","updated":"2017-07-23 12:46:10.000000000","message":"I don\u0027t really understand Ken\u0027ichi\u0027s comment - why does he want the validation done here rather than in conductor? Because it\u0027s an RPC call to conductor so the error is going to come back up either way.","commit_id":"40e7f7e875cde63be32ad1572c7074285ff67314"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a54cf93105cb0ad9e86b1fda3fa504707e80ae4d","unresolved":false,"context_lines":[{"line_number":3432,"context_line":"            # If \u0027host\u0027 is not specified,"},{"line_number":3433,"context_line":"            # clear the \u0027requested_destination\u0027 field of the RequestSpec."},{"line_number":3434,"context_line":"            if request_spec:"},{"line_number":3435,"context_line":"                request_spec.requested_destination \u003d None"},{"line_number":3436,"context_line":"        elif not force:"},{"line_number":3437,"context_line":"            if request_spec:"},{"line_number":3438,"context_line":"                request_spec.requested_destination \u003d objects.Destination("}],"source_content_type":"text/x-python","patch_set":63,"id":"1f1a1f67_dd15723e","line":3435,"range":{"start_line":3435,"start_character":16,"end_line":3435,"end_character":57},"updated":"2017-07-19 16:24:14.000000000","message":"Hmm, we set a cell on the requested_destination from the original request spec when the instance was created, so should we leave that intact? I\u0027m not entirely sure how this is going to be used. In other words, why is this a problem? Since you can\u0027t specify host_name already today, and we don\u0027t do this, why is it needed now?","commit_id":"40e7f7e875cde63be32ad1572c7074285ff67314"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"152379a613caac49fc01a55c9a6e7255409c4ffb","unresolved":false,"context_lines":[{"line_number":3432,"context_line":"            # If \u0027host\u0027 is not specified,"},{"line_number":3433,"context_line":"            # clear the \u0027requested_destination\u0027 field of the RequestSpec."},{"line_number":3434,"context_line":"            if request_spec:"},{"line_number":3435,"context_line":"                request_spec.requested_destination \u003d None"},{"line_number":3436,"context_line":"        elif not force:"},{"line_number":3437,"context_line":"            if request_spec:"},{"line_number":3438,"context_line":"                request_spec.requested_destination \u003d objects.Destination("}],"source_content_type":"text/x-python","patch_set":63,"id":"1f1a1f67_05fc943c","line":3435,"range":{"start_line":3435,"start_character":16,"end_line":3435,"end_character":57},"in_reply_to":"1f1a1f67_dd15723e","updated":"2017-07-20 13:35:37.000000000","message":"If requested_destination (host and node) is set,\nthe scheduler use the information (host and node).\nSo it should be cleared before the request spec is passed to the scheduler.\n\nI will change it as follows:\n\nrequest_spec.requested_destination.host \u003d None\nrequest_spec.requested_destination.node \u003d None","commit_id":"40e7f7e875cde63be32ad1572c7074285ff67314"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5afe9ff37cab7992df1b1c7a5e561bb710d5ad03","unresolved":false,"context_lines":[{"line_number":3117,"context_line":"        \"\"\""},{"line_number":3118,"context_line":"        # Check whether host exists or not when host_name is specified."},{"line_number":3119,"context_line":"        if host_name is not None:"},{"line_number":3120,"context_line":"            if force:"},{"line_number":3121,"context_line":"                # Check whether the destination host is in the same cell"},{"line_number":3122,"context_line":"                # as the instance."},{"line_number":3123,"context_line":"                host_mapping \u003d objects.HostMapping.get_by_host(context,"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_9a51ff11","line":3120,"range":{"start_line":3120,"start_character":12,"end_line":3120,"end_character":21},"updated":"2017-07-23 13:19:38.000000000","message":"Can we leave a comment about what force means? If I specify host_name, does the scheduler still validate it? But if I specify host_name and force, does that mean bypass the scheduler and just directly send my request to that host? This has already tripped up me and Jay, so we should document that the flags and combinations mean.","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"93cb8b5018b7dfeda7bf46f75e6690b847f6242b","unresolved":false,"context_lines":[{"line_number":3117,"context_line":"        \"\"\""},{"line_number":3118,"context_line":"        # Check whether host exists or not when host_name is specified."},{"line_number":3119,"context_line":"        if host_name is not None:"},{"line_number":3120,"context_line":"            if force:"},{"line_number":3121,"context_line":"                # Check whether the destination host is in the same cell"},{"line_number":3122,"context_line":"                # as the instance."},{"line_number":3123,"context_line":"                host_mapping \u003d objects.HostMapping.get_by_host(context,"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_e240520a","line":3120,"range":{"start_line":3120,"start_character":12,"end_line":3120,"end_character":21},"in_reply_to":"ff346bd7_31ab51d7","updated":"2017-07-24 09:35:14.000000000","message":"Yup, the force flag means we avoid the scheduler call.","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"5813b086a994a7a802eba2ca727359cc12a733f8","unresolved":false,"context_lines":[{"line_number":3117,"context_line":"        \"\"\""},{"line_number":3118,"context_line":"        # Check whether host exists or not when host_name is specified."},{"line_number":3119,"context_line":"        if host_name is not None:"},{"line_number":3120,"context_line":"            if force:"},{"line_number":3121,"context_line":"                # Check whether the destination host is in the same cell"},{"line_number":3122,"context_line":"                # as the instance."},{"line_number":3123,"context_line":"                host_mapping \u003d objects.HostMapping.get_by_host(context,"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_31ab51d7","line":3120,"range":{"start_line":3120,"start_character":12,"end_line":3120,"end_character":21},"in_reply_to":"ff346bd7_9a51ff11","updated":"2017-07-24 07:57:25.000000000","message":"Done","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5afe9ff37cab7992df1b1c7a5e561bb710d5ad03","unresolved":false,"context_lines":[{"line_number":3125,"context_line":"                instance_mapping \u003d ("},{"line_number":3126,"context_line":"                    objects.InstanceMapping.get_by_instance_uuid("},{"line_number":3127,"context_line":"                        context, instance.uuid))"},{"line_number":3128,"context_line":"                if (host_mapping.cell_mapping.identity !\u003d"},{"line_number":3129,"context_line":"                    instance_mapping.cell_mapping.identity):"},{"line_number":3130,"context_line":"                    raise exception.HostInDifferentCell("},{"line_number":3131,"context_line":"                        host\u003dhost_name, instance_uuid\u003dinstance.uuid)"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_fa492b60","line":3128,"range":{"start_line":3128,"start_character":46,"end_line":3128,"end_character":54},"updated":"2017-07-23 13:19:38.000000000","message":"Use the uuid field, the identity field is more or less just a __repr__.","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"5813b086a994a7a802eba2ca727359cc12a733f8","unresolved":false,"context_lines":[{"line_number":3125,"context_line":"                instance_mapping \u003d ("},{"line_number":3126,"context_line":"                    objects.InstanceMapping.get_by_instance_uuid("},{"line_number":3127,"context_line":"                        context, instance.uuid))"},{"line_number":3128,"context_line":"                if (host_mapping.cell_mapping.identity !\u003d"},{"line_number":3129,"context_line":"                    instance_mapping.cell_mapping.identity):"},{"line_number":3130,"context_line":"                    raise exception.HostInDifferentCell("},{"line_number":3131,"context_line":"                        host\u003dhost_name, instance_uuid\u003dinstance.uuid)"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_d1e88517","line":3128,"range":{"start_line":3128,"start_character":46,"end_line":3128,"end_character":54},"in_reply_to":"ff346bd7_fa492b60","updated":"2017-07-24 07:57:25.000000000","message":"Done","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5afe9ff37cab7992df1b1c7a5e561bb710d5ad03","unresolved":false,"context_lines":[{"line_number":3127,"context_line":"                        context, instance.uuid))"},{"line_number":3128,"context_line":"                if (host_mapping.cell_mapping.identity !\u003d"},{"line_number":3129,"context_line":"                    instance_mapping.cell_mapping.identity):"},{"line_number":3130,"context_line":"                    raise exception.HostInDifferentCell("},{"line_number":3131,"context_line":"                        host\u003dhost_name, instance_uuid\u003dinstance.uuid)"},{"line_number":3132,"context_line":"                # Check whether the service is up or not."},{"line_number":3133,"context_line":"                # FIXME(takashin): Since only Ironic driver uses more than one"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_5a74b799","line":3130,"range":{"start_line":3130,"start_character":36,"end_line":3130,"end_character":55},"updated":"2017-07-23 13:19:38.000000000","message":"I don\u0027t know if this is leaking too much information about the deployment or not. The end user shouldn\u0027t need to know that the hosts are in different cells, however, this is an admin-only API by default, and the admin could have an understanding about the cells that the hosts are in. It gets more complicated when you have a hosted OpenStack deployment where one set of global admins know the deployment topology and another set of admins are just project admins and don\u0027t know what the underlying topology is. I could be over-thinking this, but I\u0027d ask Dan Smith what he thinks about leaking these details. If we didn\u0027t mention the cell restriction, then I\u0027m not sure what we\u0027d say in the error message that would still make sense.\n\nAnd if/when we do support migrating between cells, we\u0027d have to lift this restriction but would that also mean we\u0027d do a microversion bump for the capability? Might be worth asking for thoughts in the mailing list. I don\u0027t think a microversion probably makes sense since you could have a multi-cell deployment that supports migrating between cells, and if someone requested an older microversion we\u0027d have to put a fake restriction in place to maintain the old behavior.","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"6e61649e23510fa48e8ccb0e8ffa9f78c8b23b71","unresolved":false,"context_lines":[{"line_number":3127,"context_line":"                        context, instance.uuid))"},{"line_number":3128,"context_line":"                if (host_mapping.cell_mapping.identity !\u003d"},{"line_number":3129,"context_line":"                    instance_mapping.cell_mapping.identity):"},{"line_number":3130,"context_line":"                    raise exception.HostInDifferentCell("},{"line_number":3131,"context_line":"                        host\u003dhost_name, instance_uuid\u003dinstance.uuid)"},{"line_number":3132,"context_line":"                # Check whether the service is up or not."},{"line_number":3133,"context_line":"                # FIXME(takashin): Since only Ironic driver uses more than one"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_5df023ca","line":3130,"range":{"start_line":3130,"start_character":36,"end_line":3130,"end_character":55},"in_reply_to":"ff346bd7_020a36d1","updated":"2017-07-24 10:13:50.000000000","message":"In case that HostInDifferentCell is raised, 400 is returned.\n\nhttps://review.openstack.org/#/c/408964/70/nova/api/openstack/compute/migrate_server.py@73","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"93cb8b5018b7dfeda7bf46f75e6690b847f6242b","unresolved":false,"context_lines":[{"line_number":3127,"context_line":"                        context, instance.uuid))"},{"line_number":3128,"context_line":"                if (host_mapping.cell_mapping.identity !\u003d"},{"line_number":3129,"context_line":"                    instance_mapping.cell_mapping.identity):"},{"line_number":3130,"context_line":"                    raise exception.HostInDifferentCell("},{"line_number":3131,"context_line":"                        host\u003dhost_name, instance_uuid\u003dinstance.uuid)"},{"line_number":3132,"context_line":"                # Check whether the service is up or not."},{"line_number":3133,"context_line":"                # FIXME(takashin): Since only Ironic driver uses more than one"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_020a36d1","line":3130,"range":{"start_line":3130,"start_character":36,"end_line":3130,"end_character":55},"in_reply_to":"ff346bd7_5121354d","updated":"2017-07-24 09:35:14.000000000","message":"Agreed with Matt, we could just provide a HTTP40x instead of providing the above exception.","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"5813b086a994a7a802eba2ca727359cc12a733f8","unresolved":false,"context_lines":[{"line_number":3127,"context_line":"                        context, instance.uuid))"},{"line_number":3128,"context_line":"                if (host_mapping.cell_mapping.identity !\u003d"},{"line_number":3129,"context_line":"                    instance_mapping.cell_mapping.identity):"},{"line_number":3130,"context_line":"                    raise exception.HostInDifferentCell("},{"line_number":3131,"context_line":"                        host\u003dhost_name, instance_uuid\u003dinstance.uuid)"},{"line_number":3132,"context_line":"                # Check whether the service is up or not."},{"line_number":3133,"context_line":"                # FIXME(takashin): Since only Ironic driver uses more than one"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_5121354d","line":3130,"range":{"start_line":3130,"start_character":36,"end_line":3130,"end_character":55},"in_reply_to":"ff346bd7_5a74b799","updated":"2017-07-24 07:57:25.000000000","message":"IMO, a microversion bump is not necessary when we do support migrating between cells.\nBut I agree that it is worth asking for thoughts in the mailing list.\n\nhttps://docs.openstack.org/nova/latest/api_microversion_dev.html#when-do-i-need-a-new-microversion","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5afe9ff37cab7992df1b1c7a5e561bb710d5ad03","unresolved":false,"context_lines":[{"line_number":3237,"context_line":"                request_spec.requested_destination):"},{"line_number":3238,"context_line":"                if (\u0027cell\u0027 in request_spec.requested_destination and"},{"line_number":3239,"context_line":"                    request_spec.requested_destination.cell):"},{"line_number":3240,"context_line":"                    request_spec.requested_destination \u003d objects.Destination("},{"line_number":3241,"context_line":"                        cell\u003drequest_spec.requested_destination.cell)"},{"line_number":3242,"context_line":"                else:"},{"line_number":3243,"context_line":"                    request_spec.requested_destination \u003d None"},{"line_number":3244,"context_line":"        elif not force:"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_1a94ef8a","line":3241,"range":{"start_line":3240,"start_character":20,"end_line":3241,"end_character":69},"updated":"2017-07-23 13:19:38.000000000","message":"The comment above:\n\n\"clear the \u0027requested_destination\u0027 field of the RequestSpec.\"\n\nDoesn\u0027t match this code - so we need some different documentation here. I think the point of this is to enforce the migration happens to the same cell, but to remove the host/node fields from the requested_destination, yes?\n\nWhy don\u0027t we do this in conductor? We already have code like this in conductor and we\u0027re doing an RPC call to conductor, so doing the request spec stuff in there seems cleaner, it would at least abstract it out of the API - where this method is already getting quite large and complicated.","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"5813b086a994a7a802eba2ca727359cc12a733f8","unresolved":false,"context_lines":[{"line_number":3237,"context_line":"                request_spec.requested_destination):"},{"line_number":3238,"context_line":"                if (\u0027cell\u0027 in request_spec.requested_destination and"},{"line_number":3239,"context_line":"                    request_spec.requested_destination.cell):"},{"line_number":3240,"context_line":"                    request_spec.requested_destination \u003d objects.Destination("},{"line_number":3241,"context_line":"                        cell\u003drequest_spec.requested_destination.cell)"},{"line_number":3242,"context_line":"                else:"},{"line_number":3243,"context_line":"                    request_spec.requested_destination \u003d None"},{"line_number":3244,"context_line":"        elif not force:"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_31f6b191","line":3241,"range":{"start_line":3240,"start_character":20,"end_line":3241,"end_character":69},"in_reply_to":"ff346bd7_1a94ef8a","updated":"2017-07-24 07:57:25.000000000","message":"\u003e Doesn\u0027t match this code - so we need some different documentation here.\n\nDone.\n\n\u003e Why don\u0027t we do this in conductor?\n\nIt has to be done here to distinguish the following cases.\n\n* host_name is not None (specified) and force is False\n  - host is not set in scheduler_hint\n  - host and node are set in requested_destination\n\n* host_name is None (not specified) \n  - host is not set in scheduler_hint\n  - host and node are not set (cleared) in requested_destination\n\nIn the latter, if the destination of the previous operation remains and they are not cleared here,\nthe conductor cannot distinguish above two cases.","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5afe9ff37cab7992df1b1c7a5e561bb710d5ad03","unresolved":false,"context_lines":[{"line_number":3241,"context_line":"                        cell\u003drequest_spec.requested_destination.cell)"},{"line_number":3242,"context_line":"                else:"},{"line_number":3243,"context_line":"                    request_spec.requested_destination \u003d None"},{"line_number":3244,"context_line":"        elif not force:"},{"line_number":3245,"context_line":"            if request_spec:"},{"line_number":3246,"context_line":"                request_spec.requested_destination \u003d objects.Destination("},{"line_number":3247,"context_line":"                    host\u003dnodes[0].host, node\u003dnodes[0].hypervisor_hostname)"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_7af2db08","line":3244,"updated":"2017-07-23 13:19:38.000000000","message":"Please leave a comment for this block. I think it just means, set the host/node so that the scheduler will validate them.","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"5813b086a994a7a802eba2ca727359cc12a733f8","unresolved":false,"context_lines":[{"line_number":3241,"context_line":"                        cell\u003drequest_spec.requested_destination.cell)"},{"line_number":3242,"context_line":"                else:"},{"line_number":3243,"context_line":"                    request_spec.requested_destination \u003d None"},{"line_number":3244,"context_line":"        elif not force:"},{"line_number":3245,"context_line":"            if request_spec:"},{"line_number":3246,"context_line":"                request_spec.requested_destination \u003d objects.Destination("},{"line_number":3247,"context_line":"                    host\u003dnodes[0].host, node\u003dnodes[0].hypervisor_hostname)"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_f1726911","line":3244,"in_reply_to":"ff346bd7_7af2db08","updated":"2017-07-24 07:57:25.000000000","message":"Done","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5afe9ff37cab7992df1b1c7a5e561bb710d5ad03","unresolved":false,"context_lines":[{"line_number":3249,"context_line":"                scheduler_hint.update({\u0027host\u0027: nodes[0].host,"},{"line_number":3250,"context_line":"                                       \u0027node\u0027: nodes[0].hypervisor_hostname})"},{"line_number":3251,"context_line":"        else:"},{"line_number":3252,"context_line":"            scheduler_hint.update({\u0027host\u0027: host_name})"},{"line_number":3253,"context_line":""},{"line_number":3254,"context_line":"        self.compute_task_api.resize_instance(context, instance,"},{"line_number":3255,"context_line":"                extra_instance_updates, scheduler_hint\u003dscheduler_hint,"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_1ad98f82","line":3252,"updated":"2017-07-23 13:19:38.000000000","message":"Need a comment here - this is the case that host is specified and force is True, yes? So I thought in this case we bypass the scheduler and should try to send the request directly to that host, but couldn\u0027t there still be an old request spec from above?","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"5813b086a994a7a802eba2ca727359cc12a733f8","unresolved":false,"context_lines":[{"line_number":3249,"context_line":"                scheduler_hint.update({\u0027host\u0027: nodes[0].host,"},{"line_number":3250,"context_line":"                                       \u0027node\u0027: nodes[0].hypervisor_hostname})"},{"line_number":3251,"context_line":"        else:"},{"line_number":3252,"context_line":"            scheduler_hint.update({\u0027host\u0027: host_name})"},{"line_number":3253,"context_line":""},{"line_number":3254,"context_line":"        self.compute_task_api.resize_instance(context, instance,"},{"line_number":3255,"context_line":"                extra_instance_updates, scheduler_hint\u003dscheduler_hint,"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_7160b933","line":3252,"in_reply_to":"ff346bd7_1ad98f82","updated":"2017-07-24 07:57:25.000000000","message":"\u003e Need a comment here\n\nDone.\n\n\u003e  this is the case that host is specified and force is True, yes?\n\nYes.\n\n\u003e but couldn\u0027t there still be an old request spec from above?\n\nThe request spec is sent to the conductor.\nBut it will not be used.","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"6438f16f86f603fecf3b4480a613b56ebefef6c1","unresolved":false,"context_lines":[{"line_number":3116,"context_line":"        be migrated to a new host and resized to the new flavor_id."},{"line_number":3117,"context_line":"        \"\"\""},{"line_number":3118,"context_line":"        if host_name is not None:"},{"line_number":3119,"context_line":"            # If force is True, it bypasses the scheduler check and"},{"line_number":3120,"context_line":"            # just directly send the request to the host."},{"line_number":3121,"context_line":"            # If force is False, the host (host_name) is verified"},{"line_number":3122,"context_line":"            # by the scheduler."}],"source_content_type":"text/x-python","patch_set":65,"id":"ff346bd7_a2cb6a51","line":3119,"range":{"start_line":3119,"start_character":32,"end_line":3119,"end_character":35},"updated":"2017-07-24 09:43:48.000000000","message":"nit: \u0027it\u0027 means \"the conductor\", not \"the API\". That comment could be confusing.","commit_id":"91ca36a1e67d265c724470e36e9b857e1bacf3ca"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"0a3ab09a4ab25a527625c2278df85dff91d49c80","unresolved":false,"context_lines":[{"line_number":3116,"context_line":"        be migrated to a new host and resized to the new flavor_id."},{"line_number":3117,"context_line":"        \"\"\""},{"line_number":3118,"context_line":"        if host_name is not None:"},{"line_number":3119,"context_line":"            # If force is True, it bypasses the scheduler check and"},{"line_number":3120,"context_line":"            # just directly send the request to the host."},{"line_number":3121,"context_line":"            # If force is False, the host (host_name) is verified"},{"line_number":3122,"context_line":"            # by the scheduler."}],"source_content_type":"text/x-python","patch_set":65,"id":"ff346bd7_08eed721","line":3119,"range":{"start_line":3119,"start_character":32,"end_line":3119,"end_character":35},"in_reply_to":"ff346bd7_a2cb6a51","updated":"2017-07-24 13:22:41.000000000","message":"Done","commit_id":"91ca36a1e67d265c724470e36e9b857e1bacf3ca"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"6438f16f86f603fecf3b4480a613b56ebefef6c1","unresolved":false,"context_lines":[{"line_number":3122,"context_line":"            # by the scheduler."},{"line_number":3123,"context_line":"            if force:"},{"line_number":3124,"context_line":"                # Check whether the destination host is in the same cell"},{"line_number":3125,"context_line":"                # as the instance."},{"line_number":3126,"context_line":"                host_mapping \u003d objects.HostMapping.get_by_host(context,"},{"line_number":3127,"context_line":"                                                               host_name)"},{"line_number":3128,"context_line":"                instance_mapping \u003d ("}],"source_content_type":"text/x-python","patch_set":65,"id":"ff346bd7_62da2218","line":3125,"updated":"2017-07-24 09:43:48.000000000","message":"FWIW, I don\u0027t think we verify that for live-migrate and evacuate. Possibly a bug for them ?","commit_id":"91ca36a1e67d265c724470e36e9b857e1bacf3ca"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"0a3ab09a4ab25a527625c2278df85dff91d49c80","unresolved":false,"context_lines":[{"line_number":3122,"context_line":"            # by the scheduler."},{"line_number":3123,"context_line":"            if force:"},{"line_number":3124,"context_line":"                # Check whether the destination host is in the same cell"},{"line_number":3125,"context_line":"                # as the instance."},{"line_number":3126,"context_line":"                host_mapping \u003d objects.HostMapping.get_by_host(context,"},{"line_number":3127,"context_line":"                                                               host_name)"},{"line_number":3128,"context_line":"                instance_mapping \u003d ("}],"source_content_type":"text/x-python","patch_set":65,"id":"ff346bd7_aee6b0e7","line":3125,"in_reply_to":"ff346bd7_62da2218","updated":"2017-07-24 13:22:41.000000000","message":"I don\u0027t know that.","commit_id":"91ca36a1e67d265c724470e36e9b857e1bacf3ca"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"6438f16f86f603fecf3b4480a613b56ebefef6c1","unresolved":false,"context_lines":[{"line_number":3131,"context_line":"                if (host_mapping.cell_mapping.uuid !\u003d"},{"line_number":3132,"context_line":"                    instance_mapping.cell_mapping.uuid):"},{"line_number":3133,"context_line":"                    raise exception.HostInDifferentCell("},{"line_number":3134,"context_line":"                        host\u003dhost_name, instance_uuid\u003dinstance.uuid)"},{"line_number":3135,"context_line":"                # Check whether the service is up or not."},{"line_number":3136,"context_line":"                service \u003d objects.Service.get_by_compute_host(context,"},{"line_number":3137,"context_line":"                                                              host_name)"}],"source_content_type":"text/x-python","patch_set":65,"id":"ff346bd7_e25bb284","line":3134,"updated":"2017-07-24 09:43:48.000000000","message":"Honestly, like I said in PS64, I\u0027d prefer just to provide a HTTP40x (possibly HTTP409 Conflict given it\u0027s for admins who know cells) if we do that and want to tell the user that\u0027s the destination is not in the same cell, or HTTP400 if we don\u0027t want it to be explicit.","commit_id":"91ca36a1e67d265c724470e36e9b857e1bacf3ca"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"d276dbff68d09c4439c24e233b7abaed227e0915","unresolved":false,"context_lines":[{"line_number":3131,"context_line":"                if (host_mapping.cell_mapping.uuid !\u003d"},{"line_number":3132,"context_line":"                    instance_mapping.cell_mapping.uuid):"},{"line_number":3133,"context_line":"                    raise exception.HostInDifferentCell("},{"line_number":3134,"context_line":"                        host\u003dhost_name, instance_uuid\u003dinstance.uuid)"},{"line_number":3135,"context_line":"                # Check whether the service is up or not."},{"line_number":3136,"context_line":"                service \u003d objects.Service.get_by_compute_host(context,"},{"line_number":3137,"context_line":"                                                              host_name)"}],"source_content_type":"text/x-python","patch_set":65,"id":"ff346bd7_7d3be737","line":3134,"in_reply_to":"ff346bd7_e25bb284","updated":"2017-07-24 10:17:24.000000000","message":"400 is returned.\nSee my comment in PS64.","commit_id":"91ca36a1e67d265c724470e36e9b857e1bacf3ca"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"6438f16f86f603fecf3b4480a613b56ebefef6c1","unresolved":false,"context_lines":[{"line_number":3261,"context_line":"            # The \u0027host_name\u0027 is specified and \u0027force\u0027 is True."},{"line_number":3262,"context_line":"            # It bypasses the scheduler and send the request directly"},{"line_number":3263,"context_line":"            # to the specified host."},{"line_number":3264,"context_line":"            scheduler_hint.update({\u0027host\u0027: host_name})"},{"line_number":3265,"context_line":""},{"line_number":3266,"context_line":"        self.compute_task_api.resize_instance(context, instance,"},{"line_number":3267,"context_line":"                extra_instance_updates, scheduler_hint\u003dscheduler_hint,"}],"source_content_type":"text/x-python","patch_set":65,"id":"ff346bd7_22953ae5","line":3264,"updated":"2017-07-24 09:43:48.000000000","message":"I still don\u0027t understand why you need to touch the scheduler_hints dict. Is that because you don\u0027t have an explicit host attribute in the RPC API ? If so, I\u0027d rather propose to use another RequestSpec field for our purposes rather than just tweaking an existing dictionary which is not versioned.\nHonestly, we already have forced_hosts in the Spec object and we could potentially use that spec to fix the big problem we have with that attribute, which is really useless IMHO at the moment.","commit_id":"91ca36a1e67d265c724470e36e9b857e1bacf3ca"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"0a3ab09a4ab25a527625c2278df85dff91d49c80","unresolved":false,"context_lines":[{"line_number":3261,"context_line":"            # The \u0027host_name\u0027 is specified and \u0027force\u0027 is True."},{"line_number":3262,"context_line":"            # It bypasses the scheduler and send the request directly"},{"line_number":3263,"context_line":"            # to the specified host."},{"line_number":3264,"context_line":"            scheduler_hint.update({\u0027host\u0027: host_name})"},{"line_number":3265,"context_line":""},{"line_number":3266,"context_line":"        self.compute_task_api.resize_instance(context, instance,"},{"line_number":3267,"context_line":"                extra_instance_updates, scheduler_hint\u003dscheduler_hint,"}],"source_content_type":"text/x-python","patch_set":65,"id":"ff346bd7_ae8230c7","line":3264,"in_reply_to":"ff346bd7_22953ae5","updated":"2017-07-24 13:22:41.000000000","message":"If \u0027forced_hosts\u0027 is used to set the target host,\nthere is an issue in the following case.\n\n* nova-api(ocata) calls nova-conductor(pike, this patch) and\n* The previous operation set \u0027forced_hosts\u0027 of the RequestSpec.\n\nSo a new field is added to a RequestSpec object.\n\nDone.","commit_id":"91ca36a1e67d265c724470e36e9b857e1bacf3ca"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3213e96eee089f9f4fa69080341f788353d80be9","unresolved":false,"context_lines":[{"line_number":3133,"context_line":"                    raise exception.HostInDifferentCell("},{"line_number":3134,"context_line":"                        host\u003dhost_name, instance_uuid\u003dinstance.uuid)"},{"line_number":3135,"context_line":"                # Check whether the service is up or not."},{"line_number":3136,"context_line":"                service \u003d objects.Service.get_by_compute_host(context,"},{"line_number":3137,"context_line":"                                                              host_name)"},{"line_number":3138,"context_line":"                if not self.servicegroup_api.service_is_up(service):"},{"line_number":3139,"context_line":"                    raise exception.ComputeServiceUnavailable("},{"line_number":3140,"context_line":"                        host\u003dhost_name)"},{"line_number":3141,"context_line":"            else:"},{"line_number":3142,"context_line":"                # Check whether host exists or not."},{"line_number":3143,"context_line":"                nodes \u003d objects.ComputeNodeList.get_all_by_host(context,"}],"source_content_type":"text/x-python","patch_set":67,"id":"ff346bd7_b16da505","line":3140,"range":{"start_line":3136,"start_character":0,"end_line":3140,"end_character":39},"updated":"2017-07-26 13:00:06.000000000","message":"Well, the main reason why I provided a \"force\" flag is because operators wanted to have a possibility to move instances to a specific host very quickly in case for example of a performance problem with the source host.\n\nIf we add a call for verifying whether the service is up, it could add a bit more time for something operators already know (and could possibly give them problems). After all, it\u0027s quite very known that if you uses \u0027force\u0027, you need to make sure it will work.","commit_id":"1073e67b275e7aeb2521f85f68bffcc0669bde80"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"b0e69bb27c915e30d4a021bf2a47889668b29ba6","unresolved":false,"context_lines":[{"line_number":3133,"context_line":"                    raise exception.HostInDifferentCell("},{"line_number":3134,"context_line":"                        host\u003dhost_name, instance_uuid\u003dinstance.uuid)"},{"line_number":3135,"context_line":"                # Check whether the service is up or not."},{"line_number":3136,"context_line":"                service \u003d objects.Service.get_by_compute_host(context,"},{"line_number":3137,"context_line":"                                                              host_name)"},{"line_number":3138,"context_line":"                if not self.servicegroup_api.service_is_up(service):"},{"line_number":3139,"context_line":"                    raise exception.ComputeServiceUnavailable("},{"line_number":3140,"context_line":"                        host\u003dhost_name)"},{"line_number":3141,"context_line":"            else:"},{"line_number":3142,"context_line":"                # Check whether host exists or not."},{"line_number":3143,"context_line":"                nodes \u003d objects.ComputeNodeList.get_all_by_host(context,"}],"source_content_type":"text/x-python","patch_set":67,"id":"ff346bd7_abe9a9b7","line":3140,"range":{"start_line":3136,"start_character":0,"end_line":3140,"end_character":39},"in_reply_to":"ff346bd7_b16da505","updated":"2017-07-26 16:25:48.000000000","message":"I removed it.\nDone.","commit_id":"1073e67b275e7aeb2521f85f68bffcc0669bde80"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3213e96eee089f9f4fa69080341f788353d80be9","unresolved":false,"context_lines":[{"line_number":3230,"context_line":"                context, instance.uuid, image,"},{"line_number":3231,"context_line":"                new_instance_type, instance.numa_topology,"},{"line_number":3232,"context_line":"                instance.pci_requests, filter_properties, None,"},{"line_number":3233,"context_line":"                instance.availability_zone)"},{"line_number":3234,"context_line":""},{"line_number":3235,"context_line":"        # TODO(melwitt): We\u0027re not rechecking for strict quota here to guard"},{"line_number":3236,"context_line":"        # against going over quota during a race at this time because the"}],"source_content_type":"text/x-python","patch_set":67,"id":"ff346bd7_74ddeb6e","line":3233,"updated":"2017-07-26 13:00:06.000000000","message":"Well, I understand why you add this now, but I\u0027d have preferred to have it in a dependent change honestly.\n\nTBC, you\u0027re hydrating a fake RequestSpec anyway in the API (while previously we only did that in conductor) because you want to pass a requested_destination field, right?\n\nHonestly, the only case now why a single instance wouldn\u0027t have an attached RequestSpec is because of cells v1. Not sure we should just add more tech debt code just because of cells v1. After all, is your patch working with it ?\n\nMaybe just amending comment L3326 by explaining that cells v1 instances wouldn\u0027t work for it looks fine with me.","commit_id":"1073e67b275e7aeb2521f85f68bffcc0669bde80"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"b0e69bb27c915e30d4a021bf2a47889668b29ba6","unresolved":false,"context_lines":[{"line_number":3230,"context_line":"                context, instance.uuid, image,"},{"line_number":3231,"context_line":"                new_instance_type, instance.numa_topology,"},{"line_number":3232,"context_line":"                instance.pci_requests, filter_properties, None,"},{"line_number":3233,"context_line":"                instance.availability_zone)"},{"line_number":3234,"context_line":""},{"line_number":3235,"context_line":"        # TODO(melwitt): We\u0027re not rechecking for strict quota here to guard"},{"line_number":3236,"context_line":"        # against going over quota during a race at this time because the"}],"source_content_type":"text/x-python","patch_set":67,"id":"ff346bd7_11d5861c","line":3233,"in_reply_to":"ff346bd7_74ddeb6e","updated":"2017-07-26 16:25:48.000000000","message":"Done","commit_id":"1073e67b275e7aeb2521f85f68bffcc0669bde80"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c6f71f04b455044497dc334f780c381d8c6d91ad","unresolved":false,"context_lines":[{"line_number":3230,"context_line":""},{"line_number":3231,"context_line":"        if request_spec:"},{"line_number":3232,"context_line":"            # Clear \u0027forced_destination\u0027 field of the RequestSpec."},{"line_number":3233,"context_line":"            request_spec.forced_destination \u003d None"},{"line_number":3234,"context_line":"            if host_name is None:"},{"line_number":3235,"context_line":"                # If \u0027host_name\u0027 is not specified,"},{"line_number":3236,"context_line":"                # clear the \u0027host\u0027 and \u0027node\u0027 fields of"}],"source_content_type":"text/x-python","patch_set":68,"id":"ff346bd7_d99959c4","line":3233,"updated":"2017-07-26 22:18:16.000000000","message":"not sure why you need that. Is that because you want the field to be set ? Or is it because you want to clean up what the original RequestSpec record was having ? If the latter, we already have an helper method for that.","commit_id":"134a230abca43f931f7bea27c80be9a3254e601b"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"0e7928ae5edb6c30ae7b01cffc7d6b9940cfd437","unresolved":false,"context_lines":[{"line_number":3230,"context_line":""},{"line_number":3231,"context_line":"        if request_spec:"},{"line_number":3232,"context_line":"            # Clear \u0027forced_destination\u0027 field of the RequestSpec."},{"line_number":3233,"context_line":"            request_spec.forced_destination \u003d None"},{"line_number":3234,"context_line":"            if host_name is None:"},{"line_number":3235,"context_line":"                # If \u0027host_name\u0027 is not specified,"},{"line_number":3236,"context_line":"                # clear the \u0027host\u0027 and \u0027node\u0027 fields of"}],"source_content_type":"text/x-python","patch_set":68,"id":"ff346bd7_d768fdb9","line":3233,"in_reply_to":"ff346bd7_d99959c4","updated":"2017-07-27 04:57:33.000000000","message":"Done","commit_id":"134a230abca43f931f7bea27c80be9a3254e601b"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c6f71f04b455044497dc334f780c381d8c6d91ad","unresolved":false,"context_lines":[{"line_number":3235,"context_line":"                # If \u0027host_name\u0027 is not specified,"},{"line_number":3236,"context_line":"                # clear the \u0027host\u0027 and \u0027node\u0027 fields of"},{"line_number":3237,"context_line":"                # \u0027requested_destination\u0027 of the RequestSpec."},{"line_number":3238,"context_line":"                if (\u0027requested_destination\u0027 in request_spec and"},{"line_number":3239,"context_line":"                        request_spec.requested_destination):"},{"line_number":3240,"context_line":"                    if (\u0027cell\u0027 in request_spec.requested_destination and"},{"line_number":3241,"context_line":"                            request_spec.requested_destination.cell):"}],"source_content_type":"text/x-python","patch_set":68,"id":"ff346bd7_79e14d2a","line":3238,"range":{"start_line":3238,"start_character":20,"end_line":3238,"end_character":59},"updated":"2017-07-26 22:18:16.000000000","message":"well, not sure why you need to verify that.","commit_id":"134a230abca43f931f7bea27c80be9a3254e601b"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"0e7928ae5edb6c30ae7b01cffc7d6b9940cfd437","unresolved":false,"context_lines":[{"line_number":3235,"context_line":"                # If \u0027host_name\u0027 is not specified,"},{"line_number":3236,"context_line":"                # clear the \u0027host\u0027 and \u0027node\u0027 fields of"},{"line_number":3237,"context_line":"                # \u0027requested_destination\u0027 of the RequestSpec."},{"line_number":3238,"context_line":"                if (\u0027requested_destination\u0027 in request_spec and"},{"line_number":3239,"context_line":"                        request_spec.requested_destination):"},{"line_number":3240,"context_line":"                    if (\u0027cell\u0027 in request_spec.requested_destination and"},{"line_number":3241,"context_line":"                            request_spec.requested_destination.cell):"}],"source_content_type":"text/x-python","patch_set":68,"id":"ff346bd7_373f4988","line":3238,"range":{"start_line":3238,"start_character":20,"end_line":3238,"end_character":59},"in_reply_to":"ff346bd7_79e14d2a","updated":"2017-07-27 04:57:33.000000000","message":"It is not necessary to check it. It was removed. Done.","commit_id":"134a230abca43f931f7bea27c80be9a3254e601b"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c6f71f04b455044497dc334f780c381d8c6d91ad","unresolved":false,"context_lines":[{"line_number":3243,"context_line":"                            objects.Destination("},{"line_number":3244,"context_line":"                                cell\u003drequest_spec.requested_destination.cell))"},{"line_number":3245,"context_line":"                    else:"},{"line_number":3246,"context_line":"                        request_spec.requested_destination \u003d None"},{"line_number":3247,"context_line":"            elif not force:"},{"line_number":3248,"context_line":"                # Set the host and the node so that the scheduler will"},{"line_number":3249,"context_line":"                # validate them."}],"source_content_type":"text/x-python","patch_set":68,"id":"ff346bd7_79ba6d0a","line":3246,"updated":"2017-07-26 22:18:16.000000000","message":"You should just make sure we don\u0027t persist those both fields (requested and forced) when calling RequestSpec.save() method IMO so you wouldn\u0027t need to clean-up this way.","commit_id":"134a230abca43f931f7bea27c80be9a3254e601b"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"0e7928ae5edb6c30ae7b01cffc7d6b9940cfd437","unresolved":false,"context_lines":[{"line_number":3243,"context_line":"                            objects.Destination("},{"line_number":3244,"context_line":"                                cell\u003drequest_spec.requested_destination.cell))"},{"line_number":3245,"context_line":"                    else:"},{"line_number":3246,"context_line":"                        request_spec.requested_destination \u003d None"},{"line_number":3247,"context_line":"            elif not force:"},{"line_number":3248,"context_line":"                # Set the host and the node so that the scheduler will"},{"line_number":3249,"context_line":"                # validate them."}],"source_content_type":"text/x-python","patch_set":68,"id":"ff346bd7_1712050a","line":3246,"in_reply_to":"ff346bd7_79ba6d0a","updated":"2017-07-27 04:57:33.000000000","message":"I checked it in my devstack environment.\nThe \u0027forced_destination\u0027 and \u0027requested_destination\u0027 are stored in the database table. So It should be cleared.\n\nhttp://paste.openstack.org/show/616654/","commit_id":"134a230abca43f931f7bea27c80be9a3254e601b"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c6f71f04b455044497dc334f780c381d8c6d91ad","unresolved":false,"context_lines":[{"line_number":3249,"context_line":"                # validate them."},{"line_number":3250,"context_line":"                # FIXME(takashin): Since only Ironic driver uses more than one"},{"line_number":3251,"context_line":"                # compute per service but doesn\u0027t support resize and"},{"line_number":3252,"context_line":"                # cold migration, let\u0027s provide the first one."},{"line_number":3253,"context_line":"                request_spec.requested_destination \u003d objects.Destination("},{"line_number":3254,"context_line":"                    host\u003dnodes[0].host, node\u003dnodes[0].hypervisor_hostname)"},{"line_number":3255,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":68,"id":"ff346bd7_f99bfd62","line":3252,"updated":"2017-07-26 22:18:16.000000000","message":"correct, ironic driver doesn\u0027t implement migrate_disk_and_power_off()","commit_id":"134a230abca43f931f7bea27c80be9a3254e601b"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"0e7928ae5edb6c30ae7b01cffc7d6b9940cfd437","unresolved":false,"context_lines":[{"line_number":3249,"context_line":"                # validate them."},{"line_number":3250,"context_line":"                # FIXME(takashin): Since only Ironic driver uses more than one"},{"line_number":3251,"context_line":"                # compute per service but doesn\u0027t support resize and"},{"line_number":3252,"context_line":"                # cold migration, let\u0027s provide the first one."},{"line_number":3253,"context_line":"                request_spec.requested_destination \u003d objects.Destination("},{"line_number":3254,"context_line":"                    host\u003dnodes[0].host, node\u003dnodes[0].hypervisor_hostname)"},{"line_number":3255,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":68,"id":"ff346bd7_3726296a","line":3252,"in_reply_to":"ff346bd7_f99bfd62","updated":"2017-07-27 04:57:33.000000000","message":"Yes.","commit_id":"134a230abca43f931f7bea27c80be9a3254e601b"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c6f71f04b455044497dc334f780c381d8c6d91ad","unresolved":false,"context_lines":[{"line_number":3257,"context_line":"                # It bypasses the scheduler and send the request directly"},{"line_number":3258,"context_line":"                # to the specified host."},{"line_number":3259,"context_line":"                request_spec.forced_destination \u003d objects.Destination("},{"line_number":3260,"context_line":"                    host\u003dhost_name, node\u003dNone)"},{"line_number":3261,"context_line":""},{"line_number":3262,"context_line":"        self.compute_task_api.resize_instance(context, instance,"},{"line_number":3263,"context_line":"                extra_instance_updates, scheduler_hint\u003dscheduler_hint,"}],"source_content_type":"text/x-python","patch_set":68,"id":"ff346bd7_5908c990","line":3260,"updated":"2017-07-26 22:18:16.000000000","message":"I\u0027m torn here in between trying to verify the compute node even for force (yeah, I know, I told you it\u0027s not good in the previous PS) or just accepting to provide a false Destination object because node value really depends on the virt driver but AFAIK, all drivers provide it.","commit_id":"134a230abca43f931f7bea27c80be9a3254e601b"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"0e7928ae5edb6c30ae7b01cffc7d6b9940cfd437","unresolved":false,"context_lines":[{"line_number":3257,"context_line":"                # It bypasses the scheduler and send the request directly"},{"line_number":3258,"context_line":"                # to the specified host."},{"line_number":3259,"context_line":"                request_spec.forced_destination \u003d objects.Destination("},{"line_number":3260,"context_line":"                    host\u003dhost_name, node\u003dNone)"},{"line_number":3261,"context_line":""},{"line_number":3262,"context_line":"        self.compute_task_api.resize_instance(context, instance,"},{"line_number":3263,"context_line":"                extra_instance_updates, scheduler_hint\u003dscheduler_hint,"}],"source_content_type":"text/x-python","patch_set":68,"id":"ff346bd7_2b20009b","line":3260,"in_reply_to":"ff346bd7_5908c990","updated":"2017-07-27 04:57:33.000000000","message":"If the host does not exist, the HostMappingNotFound is raised in line 3126.\nIf the nova-compute in the target host is marked as down but the nova-compute process is running,\nit is no problem because the nova-compute can handle the request.\nIf the nova-compute process is down actually, the server is stuck in the \u0027RESIZE\u0027 state and the \u0027resize_prep\u0027 task state.\nBut if the nova-compute process is started again, the nova-compute can handle the request and continue the resize process.\nSo it is no problem.\nTherefore, IMO, it is not necessary to verify the compute node in this case.","commit_id":"134a230abca43f931f7bea27c80be9a3254e601b"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"a43ad9b9f878fe9b9d9445552f13c705a4bb5b8d","unresolved":false,"context_lines":[{"line_number":3119,"context_line":"            # If force is True, the conductor bypasses the scheduler check and"},{"line_number":3120,"context_line":"            # just directly send the request to the host."},{"line_number":3121,"context_line":"            # If force is False, the host (host_name) is verified"},{"line_number":3122,"context_line":"            # by the scheduler."},{"line_number":3123,"context_line":"            if force:"},{"line_number":3124,"context_line":"                # Check whether the destination host is in the same cell"},{"line_number":3125,"context_line":"                # as the instance."}],"source_content_type":"text/x-python","patch_set":76,"id":"9f436f4f_56dde6dd","line":3122,"updated":"2017-08-16 12:46:24.000000000","message":"The comment isn\u0027t really explaining what\u0027s happening in this code. What\u0027s happening here is that if force is True we need to verify that that the target is in the same cell as where the instance is now. If force is False, the scheduler will be used, and the scheduler will do the same-cell verification.\n\nSo where the comment is misleading is on what type of verification is being done here.","commit_id":"90cee64fecef865e080e8f96e4eb799468a52f79"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"d378ef5061187b3ecb754643cf0dbc564c43f32f","unresolved":false,"context_lines":[{"line_number":3119,"context_line":"            # If force is True, the conductor bypasses the scheduler check and"},{"line_number":3120,"context_line":"            # just directly send the request to the host."},{"line_number":3121,"context_line":"            # If force is False, the host (host_name) is verified"},{"line_number":3122,"context_line":"            # by the scheduler."},{"line_number":3123,"context_line":"            if force:"},{"line_number":3124,"context_line":"                # Check whether the destination host is in the same cell"},{"line_number":3125,"context_line":"                # as the instance."}],"source_content_type":"text/x-python","patch_set":76,"id":"9f436f4f_f1704d74","line":3122,"in_reply_to":"9f436f4f_56dde6dd","updated":"2017-08-17 07:44:37.000000000","message":"Done","commit_id":"90cee64fecef865e080e8f96e4eb799468a52f79"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"51baf28eeb604d431bbb02936b08ef1790aac227","unresolved":false,"context_lines":[{"line_number":3110,"context_line":"    @check_instance_cell"},{"line_number":3111,"context_line":"    @check_instance_state(vm_state\u003d[vm_states.ACTIVE, vm_states.STOPPED])"},{"line_number":3112,"context_line":"    def resize(self, context, instance, flavor_id\u003dNone, clean_shutdown\u003dTrue,"},{"line_number":3113,"context_line":"               host_name\u003dNone, force\u003dFalse, **extra_instance_updates):"},{"line_number":3114,"context_line":"        \"\"\"Resize (ie, migrate) a running instance."},{"line_number":3115,"context_line":""},{"line_number":3116,"context_line":"        If flavor_id is None, the process is considered a migration, keeping"}],"source_content_type":"text/x-python","patch_set":78,"id":"7f287b81_ebbb0d0c","line":3113,"range":{"start_line":3113,"start_character":30,"end_line":3113,"end_character":45},"updated":"2017-09-07 15:48:40.000000000","message":"the consensus now is to not allow cold migrations to have a force flag as per the ML threads. Could you please remove that ? Thanks.","commit_id":"0a5989fc2e05e6862c21a97e0ebd26c64e28e578"},{"author":{"_account_id":19156,"name":"Leehom Li","email":"feli5_li@163.com","username":"leehom"},"change_message_id":"4ee9f7700e05c6d7fd46609a2a46ad5a1ed7c6e8","unresolved":false,"context_lines":[{"line_number":3214,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":3215,"context_line":""},{"line_number":3216,"context_line":"        if request_spec:"},{"line_number":3217,"context_line":"            if host_name is None:"},{"line_number":3218,"context_line":"                # If \u0027host_name\u0027 is not specified,"},{"line_number":3219,"context_line":"                # clear the \u0027host\u0027 and \u0027node\u0027 fields of"},{"line_number":3220,"context_line":"                # \u0027requested_destination\u0027 of the RequestSpec."},{"line_number":3221,"context_line":"                if request_spec.requested_destination:"},{"line_number":3222,"context_line":"                    if (\u0027cell\u0027 in request_spec.requested_destination and"},{"line_number":3223,"context_line":"                            request_spec.requested_destination.cell):"},{"line_number":3224,"context_line":"                        request_spec.requested_destination \u003d ("},{"line_number":3225,"context_line":"                            objects.Destination("},{"line_number":3226,"context_line":"                                cell\u003drequest_spec.requested_destination.cell))"},{"line_number":3227,"context_line":"                    else:"},{"line_number":3228,"context_line":"                        request_spec.requested_destination \u003d None"},{"line_number":3229,"context_line":"            else:"},{"line_number":3230,"context_line":"                # Set the host and the node so that the scheduler will"},{"line_number":3231,"context_line":"                # validate them."},{"line_number":3232,"context_line":"                # FIXME(takashin): Since only Ironic driver uses more than one"}],"source_content_type":"text/x-python","patch_set":79,"id":"5f2577a7_ab21eeb6","line":3229,"range":{"start_line":3217,"start_character":0,"end_line":3229,"end_character":17},"updated":"2017-09-12 08:43:47.000000000","message":"I\u0027m confused about why we need to add this part of operation. \nWe add a new parameter host_name, if it\u0027s not provided, in my mind, we do not need to do any change.\n\nIf so, I think we can move above changes to the else branch.\nCorrect me, if I\u0027m wrong.","commit_id":"092543876861070858e067826835e56ed10cbd31"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"5ed5caec7013ea35ecb7f33758fb2be8de11e2d4","unresolved":false,"context_lines":[{"line_number":3214,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":3215,"context_line":""},{"line_number":3216,"context_line":"        if request_spec:"},{"line_number":3217,"context_line":"            if host_name is None:"},{"line_number":3218,"context_line":"                # If \u0027host_name\u0027 is not specified,"},{"line_number":3219,"context_line":"                # clear the \u0027host\u0027 and \u0027node\u0027 fields of"},{"line_number":3220,"context_line":"                # \u0027requested_destination\u0027 of the RequestSpec."},{"line_number":3221,"context_line":"                if request_spec.requested_destination:"},{"line_number":3222,"context_line":"                    if (\u0027cell\u0027 in request_spec.requested_destination and"},{"line_number":3223,"context_line":"                            request_spec.requested_destination.cell):"},{"line_number":3224,"context_line":"                        request_spec.requested_destination \u003d ("},{"line_number":3225,"context_line":"                            objects.Destination("},{"line_number":3226,"context_line":"                                cell\u003drequest_spec.requested_destination.cell))"},{"line_number":3227,"context_line":"                    else:"},{"line_number":3228,"context_line":"                        request_spec.requested_destination \u003d None"},{"line_number":3229,"context_line":"            else:"},{"line_number":3230,"context_line":"                # Set the host and the node so that the scheduler will"},{"line_number":3231,"context_line":"                # validate them."},{"line_number":3232,"context_line":"                # FIXME(takashin): Since only Ironic driver uses more than one"}],"source_content_type":"text/x-python","patch_set":79,"id":"5f2577a7_e59efe61","line":3229,"range":{"start_line":3217,"start_character":0,"end_line":3229,"end_character":17},"in_reply_to":"5f2577a7_ab21eeb6","updated":"2017-09-12 15:00:45.000000000","message":"Once cold migration is performed with target host, the target host is saved in the request spec.\nSo it should be cleared.\n\nhttps://github.com/openstack/nova/blob/3f6447120b121c955711b3cf102b5063e4315fef/nova/conductor/manager.py#L349","commit_id":"092543876861070858e067826835e56ed10cbd31"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2835b9d1f617e0768a06f59c74ac5cc44505a130","unresolved":false,"context_lines":[{"line_number":3081,"context_line":"        the original flavor_id. If flavor_id is not None, the instance should"},{"line_number":3082,"context_line":"        be migrated to a new host and resized to the new flavor_id."},{"line_number":3083,"context_line":"        \"\"\""},{"line_number":3084,"context_line":"        if host_name is not None:"},{"line_number":3085,"context_line":"            # Check whether host exists or not."},{"line_number":3086,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context,"},{"line_number":3087,"context_line":"                                                            host_name)"}],"source_content_type":"text/x-python","patch_set":86,"id":"7f515b1d_d53fcd22","line":3084,"updated":"2017-10-09 13:27:32.000000000","message":"Where do you check that the specified host is in the same cell that the instance is in? That would be a 400 response. Or does this just result in a NoValidHost during scheduling because the specified host won\u0027t be in the same cell as the instance, and the scheduler just won\u0027t find the host since it won\u0027t query for it in that cell? Since we\u0027re doing an RPC call all the way down to select_destinations in the scheduler, if that raises NoValidHost then it will raise all the way back to the API and return a 400:\n\nhttps://github.com/openstack/nova/blob/9ed0838da3556425b75d5e041a5236c04386bac4/nova/api/openstack/compute/migrate_server.py#L60\n\nSo I guess we\u0027re OK here, but the error might not be obvious that the issue is the specified host isn\u0027t in the same cell as the instance.","commit_id":"af54867fce26e64f7b7c1d62bdb2c167d41ed396"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2835b9d1f617e0768a06f59c74ac5cc44505a130","unresolved":false,"context_lines":[{"line_number":3083,"context_line":"        \"\"\""},{"line_number":3084,"context_line":"        if host_name is not None:"},{"line_number":3085,"context_line":"            # Check whether host exists or not."},{"line_number":3086,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context,"},{"line_number":3087,"context_line":"                                                            host_name)"},{"line_number":3088,"context_line":""},{"line_number":3089,"context_line":"        self._check_auto_disk_config(instance, **extra_instance_updates)"}],"source_content_type":"text/x-python","patch_set":86,"id":"7f515b1d_f529a936","line":3086,"range":{"start_line":3086,"start_character":44,"end_line":3086,"end_character":59},"updated":"2017-10-09 13:27:32.000000000","message":"nit: could specify use_slave\u003dTrue since this isn\u0027t a performance critical query.","commit_id":"af54867fce26e64f7b7c1d62bdb2c167d41ed396"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"a2a3f69e6e794a0bba437fade105c84cdd5f341e","unresolved":false,"context_lines":[{"line_number":3083,"context_line":"        \"\"\""},{"line_number":3084,"context_line":"        if host_name is not None:"},{"line_number":3085,"context_line":"            # Check whether host exists or not."},{"line_number":3086,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context,"},{"line_number":3087,"context_line":"                                                            host_name)"},{"line_number":3088,"context_line":""},{"line_number":3089,"context_line":"        self._check_auto_disk_config(instance, **extra_instance_updates)"}],"source_content_type":"text/x-python","patch_set":86,"id":"5f4e5783_bf060720","line":3086,"range":{"start_line":3086,"start_character":44,"end_line":3086,"end_character":59},"in_reply_to":"7f515b1d_f529a936","updated":"2017-10-11 09:44:49.000000000","message":"Done","commit_id":"af54867fce26e64f7b7c1d62bdb2c167d41ed396"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2835b9d1f617e0768a06f59c74ac5cc44505a130","unresolved":false,"context_lines":[{"line_number":3165,"context_line":"                context, instance.uuid)"},{"line_number":3166,"context_line":"            request_spec.ignore_hosts \u003d filter_properties[\u0027ignore_hosts\u0027]"},{"line_number":3167,"context_line":"        except exception.RequestSpecNotFound:"},{"line_number":3168,"context_line":"            # NOTE(takashin): The cells v1 instances still have"},{"line_number":3169,"context_line":"            # no RequestSpec object attached to them."},{"line_number":3170,"context_line":"            # So the cells v1 instances wouldn\u0027t work for cold migrating"},{"line_number":3171,"context_line":"            # with target host."},{"line_number":3172,"context_line":"            request_spec \u003d None"},{"line_number":3173,"context_line":""},{"line_number":3174,"context_line":"        # TODO(melwitt): We\u0027re not rechecking for strict quota here to guard"},{"line_number":3175,"context_line":"        # against going over quota during a race at this time because the"}],"source_content_type":"text/x-python","patch_set":86,"id":"7f515b1d_75ea59d8","line":3172,"range":{"start_line":3168,"start_character":12,"end_line":3172,"end_character":31},"updated":"2017-10-09 13:27:32.000000000","message":"If this is true, we should probably make sure to note this in the docs. However, I\u0027m not sure I believe this assertion because we create the RequestSpec when we create the instance, regardless of cells v1 or not.\n\nAnother thing here is if the user specified a host but we didn\u0027t honor that because we didn\u0027t find an existing request spec, we\u0027re silently failing.\n\nIf you passed the specified host through to conductor, it could be used here when building a temporary request spec:\n\nhttps://github.com/openstack/nova/blob/9ed0838da3556425b75d5e041a5236c04386bac4/nova/conductor/manager.py#L294\n\nI guess we don\u0027t honor the specified host if no request spec is found when live migrating either:\n\nhttps://github.com/openstack/nova/blob/9ed0838da3556425b75d5e041a5236c04386bac4/nova/compute/api.py#L3827\n\nBut I consider that a bug and technical debt, and I\u0027d rather not add new technical debt.\n\nSo if the user specifies a host and we can\u0027t find a request spec, we need to create one and make sure the specified host gets through to the scheduler.","commit_id":"af54867fce26e64f7b7c1d62bdb2c167d41ed396"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2065a1fa6b3dd9a7bae25b1039c70c36cc31498a","unresolved":false,"context_lines":[{"line_number":3165,"context_line":"                context, instance.uuid)"},{"line_number":3166,"context_line":"            request_spec.ignore_hosts \u003d filter_properties[\u0027ignore_hosts\u0027]"},{"line_number":3167,"context_line":"        except exception.RequestSpecNotFound:"},{"line_number":3168,"context_line":"            # NOTE(takashin): The cells v1 instances still have"},{"line_number":3169,"context_line":"            # no RequestSpec object attached to them."},{"line_number":3170,"context_line":"            # So the cells v1 instances wouldn\u0027t work for cold migrating"},{"line_number":3171,"context_line":"            # with target host."},{"line_number":3172,"context_line":"            request_spec \u003d None"},{"line_number":3173,"context_line":""},{"line_number":3174,"context_line":"        # TODO(melwitt): We\u0027re not rechecking for strict quota here to guard"},{"line_number":3175,"context_line":"        # against going over quota during a race at this time because the"}],"source_content_type":"text/x-python","patch_set":86,"id":"3f4b6375_c6e4c90f","line":3172,"range":{"start_line":3168,"start_character":12,"end_line":3172,"end_character":31},"in_reply_to":"5f4e5783_c047761d","updated":"2017-11-02 19:27:19.000000000","message":"\u003e But in that case the target host is not set. It is same as the case that the target host is not specified.\n\nSure, and I consider that a bug, as noted above:\n\n\"But I consider that a bug and technical debt, and I\u0027d rather not add new technical debt.\"\n\nIn other words, I think we should fail in the API if the user is requesting a specific host and we can\u0027t find a request spec - the request can\u0027t be honored and shouldn\u0027t be repeated, it\u0027s a 400 error.","commit_id":"af54867fce26e64f7b7c1d62bdb2c167d41ed396"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"a2a3f69e6e794a0bba437fade105c84cdd5f341e","unresolved":false,"context_lines":[{"line_number":3165,"context_line":"                context, instance.uuid)"},{"line_number":3166,"context_line":"            request_spec.ignore_hosts \u003d filter_properties[\u0027ignore_hosts\u0027]"},{"line_number":3167,"context_line":"        except exception.RequestSpecNotFound:"},{"line_number":3168,"context_line":"            # NOTE(takashin): The cells v1 instances still have"},{"line_number":3169,"context_line":"            # no RequestSpec object attached to them."},{"line_number":3170,"context_line":"            # So the cells v1 instances wouldn\u0027t work for cold migrating"},{"line_number":3171,"context_line":"            # with target host."},{"line_number":3172,"context_line":"            request_spec \u003d None"},{"line_number":3173,"context_line":""},{"line_number":3174,"context_line":"        # TODO(melwitt): We\u0027re not rechecking for strict quota here to guard"},{"line_number":3175,"context_line":"        # against going over quota during a race at this time because the"}],"source_content_type":"text/x-python","patch_set":86,"id":"5f4e5783_c047761d","line":3172,"range":{"start_line":3168,"start_character":12,"end_line":3172,"end_character":31},"in_reply_to":"7f515b1d_75ea59d8","updated":"2017-10-11 09:44:49.000000000","message":"If request_spec is None (not found), a request spec is created in the conductor.\n\nhttps://github.com/openstack/nova/blob/7be101a9572154e3c3f010e9a1bc483a02a21904/nova/conductor/manager.py#L294-L300\n\nBut in that case the target host is not set. It is same as the case that the target host is not specified.","commit_id":"af54867fce26e64f7b7c1d62bdb2c167d41ed396"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2835b9d1f617e0768a06f59c74ac5cc44505a130","unresolved":false,"context_lines":[{"line_number":3179,"context_line":""},{"line_number":3180,"context_line":"        if request_spec:"},{"line_number":3181,"context_line":"            if host_name is None:"},{"line_number":3182,"context_line":"                # If \u0027host_name\u0027 is not specified,"},{"line_number":3183,"context_line":"                # clear the \u0027host\u0027 and \u0027node\u0027 fields of"},{"line_number":3184,"context_line":"                # \u0027requested_destination\u0027 of the RequestSpec."},{"line_number":3185,"context_line":"                if request_spec.requested_destination:"},{"line_number":3186,"context_line":"                    if (\u0027cell\u0027 in request_spec.requested_destination and"},{"line_number":3187,"context_line":"                            request_spec.requested_destination.cell):"}],"source_content_type":"text/x-python","patch_set":86,"id":"7f515b1d_75713944","line":3184,"range":{"start_line":3182,"start_character":16,"end_line":3184,"end_character":61},"updated":"2017-10-09 13:27:32.000000000","message":"You\u0027re not actually doing this, plus it already does happen in conductor:\n\nhttps://github.com/openstack/nova/blob/9ed0838da3556425b75d5e041a5236c04386bac4/nova/conductor/tasks/migrate.py#L49","commit_id":"af54867fce26e64f7b7c1d62bdb2c167d41ed396"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"a2a3f69e6e794a0bba437fade105c84cdd5f341e","unresolved":false,"context_lines":[{"line_number":3179,"context_line":""},{"line_number":3180,"context_line":"        if request_spec:"},{"line_number":3181,"context_line":"            if host_name is None:"},{"line_number":3182,"context_line":"                # If \u0027host_name\u0027 is not specified,"},{"line_number":3183,"context_line":"                # clear the \u0027host\u0027 and \u0027node\u0027 fields of"},{"line_number":3184,"context_line":"                # \u0027requested_destination\u0027 of the RequestSpec."},{"line_number":3185,"context_line":"                if request_spec.requested_destination:"},{"line_number":3186,"context_line":"                    if (\u0027cell\u0027 in request_spec.requested_destination and"},{"line_number":3187,"context_line":"                            request_spec.requested_destination.cell):"}],"source_content_type":"text/x-python","patch_set":86,"id":"5f4e5783_9ff90b4f","line":3184,"range":{"start_line":3182,"start_character":16,"end_line":3184,"end_character":61},"in_reply_to":"7f515b1d_75713944","updated":"2017-10-11 09:44:49.000000000","message":"In conductor, just set \u0027cell\u0027 of objects.Destination.\n\u0027host\u0027 and \u0027node\u0027 are not cleared.\nHere clearing \u0027host\u0027 and \u0027node\u0027.","commit_id":"af54867fce26e64f7b7c1d62bdb2c167d41ed396"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2835b9d1f617e0768a06f59c74ac5cc44505a130","unresolved":false,"context_lines":[{"line_number":3182,"context_line":"                # If \u0027host_name\u0027 is not specified,"},{"line_number":3183,"context_line":"                # clear the \u0027host\u0027 and \u0027node\u0027 fields of"},{"line_number":3184,"context_line":"                # \u0027requested_destination\u0027 of the RequestSpec."},{"line_number":3185,"context_line":"                if request_spec.requested_destination:"},{"line_number":3186,"context_line":"                    if (\u0027cell\u0027 in request_spec.requested_destination and"},{"line_number":3187,"context_line":"                            request_spec.requested_destination.cell):"},{"line_number":3188,"context_line":"                        request_spec.requested_destination \u003d ("},{"line_number":3189,"context_line":"                            objects.Destination("},{"line_number":3190,"context_line":"                                cell\u003drequest_spec.requested_destination.cell))"},{"line_number":3191,"context_line":"                    else:"},{"line_number":3192,"context_line":"                        request_spec.requested_destination \u003d None"},{"line_number":3193,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":86,"id":"7f515b1d_95c27533","line":3190,"range":{"start_line":3185,"start_character":16,"end_line":3190,"end_character":78},"updated":"2017-10-09 13:27:32.000000000","message":"This check already happens in conductor:\n\nhttps://github.com/openstack/nova/blob/9ed0838da3556425b75d5e041a5236c04386bac4/nova/conductor/tasks/migrate.py#L61","commit_id":"af54867fce26e64f7b7c1d62bdb2c167d41ed396"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"a1cc72fed9ed8604f3db829563d4f290ea67df06","unresolved":false,"context_lines":[{"line_number":3182,"context_line":"                # If \u0027host_name\u0027 is not specified,"},{"line_number":3183,"context_line":"                # clear the \u0027host\u0027 and \u0027node\u0027 fields of"},{"line_number":3184,"context_line":"                # \u0027requested_destination\u0027 of the RequestSpec."},{"line_number":3185,"context_line":"                if request_spec.requested_destination:"},{"line_number":3186,"context_line":"                    if (\u0027cell\u0027 in request_spec.requested_destination and"},{"line_number":3187,"context_line":"                            request_spec.requested_destination.cell):"},{"line_number":3188,"context_line":"                        request_spec.requested_destination \u003d ("},{"line_number":3189,"context_line":"                            objects.Destination("},{"line_number":3190,"context_line":"                                cell\u003drequest_spec.requested_destination.cell))"},{"line_number":3191,"context_line":"                    else:"},{"line_number":3192,"context_line":"                        request_spec.requested_destination \u003d None"},{"line_number":3193,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":86,"id":"3f4b6375_d6fb33bb","line":3190,"range":{"start_line":3185,"start_character":16,"end_line":3190,"end_character":78},"in_reply_to":"3f4b6375_26fddd6d","updated":"2017-11-04 07:32:14.000000000","message":"\u0027requested_destination\u0027 is not cleared in https://review.openstack.org/#/c/505771/. So this code is required.","commit_id":"af54867fce26e64f7b7c1d62bdb2c167d41ed396"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2065a1fa6b3dd9a7bae25b1039c70c36cc31498a","unresolved":false,"context_lines":[{"line_number":3182,"context_line":"                # If \u0027host_name\u0027 is not specified,"},{"line_number":3183,"context_line":"                # clear the \u0027host\u0027 and \u0027node\u0027 fields of"},{"line_number":3184,"context_line":"                # \u0027requested_destination\u0027 of the RequestSpec."},{"line_number":3185,"context_line":"                if request_spec.requested_destination:"},{"line_number":3186,"context_line":"                    if (\u0027cell\u0027 in request_spec.requested_destination and"},{"line_number":3187,"context_line":"                            request_spec.requested_destination.cell):"},{"line_number":3188,"context_line":"                        request_spec.requested_destination \u003d ("},{"line_number":3189,"context_line":"                            objects.Destination("},{"line_number":3190,"context_line":"                                cell\u003drequest_spec.requested_destination.cell))"},{"line_number":3191,"context_line":"                    else:"},{"line_number":3192,"context_line":"                        request_spec.requested_destination \u003d None"},{"line_number":3193,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":86,"id":"3f4b6375_26fddd6d","line":3190,"range":{"start_line":3185,"start_character":16,"end_line":3190,"end_character":78},"in_reply_to":"5f4e5783_7fbd2f67","updated":"2017-11-02 19:27:19.000000000","message":"I don\u0027t see why this is needed. I don\u0027t believe we persist the request spec with the requested_destination, and if we did, we should probably handle that in RequestSpec.reset_forced_destinations() rather than here in the API code. It makes tracing this very confusing.","commit_id":"af54867fce26e64f7b7c1d62bdb2c167d41ed396"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"a2a3f69e6e794a0bba437fade105c84cdd5f341e","unresolved":false,"context_lines":[{"line_number":3182,"context_line":"                # If \u0027host_name\u0027 is not specified,"},{"line_number":3183,"context_line":"                # clear the \u0027host\u0027 and \u0027node\u0027 fields of"},{"line_number":3184,"context_line":"                # \u0027requested_destination\u0027 of the RequestSpec."},{"line_number":3185,"context_line":"                if request_spec.requested_destination:"},{"line_number":3186,"context_line":"                    if (\u0027cell\u0027 in request_spec.requested_destination and"},{"line_number":3187,"context_line":"                            request_spec.requested_destination.cell):"},{"line_number":3188,"context_line":"                        request_spec.requested_destination \u003d ("},{"line_number":3189,"context_line":"                            objects.Destination("},{"line_number":3190,"context_line":"                                cell\u003drequest_spec.requested_destination.cell))"},{"line_number":3191,"context_line":"                    else:"},{"line_number":3192,"context_line":"                        request_spec.requested_destination \u003d None"},{"line_number":3193,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":86,"id":"5f4e5783_7fbd2f67","line":3190,"range":{"start_line":3185,"start_character":16,"end_line":3190,"end_character":78},"in_reply_to":"7f515b1d_95c27533","updated":"2017-10-11 09:44:49.000000000","message":"It\u0027s not check, it is clearing \u0027host\u0027 and \u0027node\u0027.","commit_id":"af54867fce26e64f7b7c1d62bdb2c167d41ed396"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2835b9d1f617e0768a06f59c74ac5cc44505a130","unresolved":false,"context_lines":[{"line_number":3193,"context_line":"            else:"},{"line_number":3194,"context_line":"                # Set the host and the node so that the scheduler will"},{"line_number":3195,"context_line":"                # validate them."},{"line_number":3196,"context_line":"                # FIXME(takashin): Since only Ironic driver uses more than one"},{"line_number":3197,"context_line":"                # compute per service but doesn\u0027t support resize and"},{"line_number":3198,"context_line":"                # cold migration, let\u0027s provide the first one."},{"line_number":3199,"context_line":"                request_spec.requested_destination \u003d objects.Destination("}],"source_content_type":"text/x-python","patch_set":86,"id":"7f515b1d_b5f7b18b","line":3196,"range":{"start_line":3196,"start_character":18,"end_line":3196,"end_character":33},"updated":"2017-10-09 13:27:32.000000000","message":"This could be removed, I don\u0027t think this will change - the code you\u0027re copying it from hasn\u0027t \"fixed\" this in years.\n\nAlternatively, just lookup the compute node above using:\n\nComputeNode.get_first_node_by_host_for_old_compat","commit_id":"af54867fce26e64f7b7c1d62bdb2c167d41ed396"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"a2a3f69e6e794a0bba437fade105c84cdd5f341e","unresolved":false,"context_lines":[{"line_number":3193,"context_line":"            else:"},{"line_number":3194,"context_line":"                # Set the host and the node so that the scheduler will"},{"line_number":3195,"context_line":"                # validate them."},{"line_number":3196,"context_line":"                # FIXME(takashin): Since only Ironic driver uses more than one"},{"line_number":3197,"context_line":"                # compute per service but doesn\u0027t support resize and"},{"line_number":3198,"context_line":"                # cold migration, let\u0027s provide the first one."},{"line_number":3199,"context_line":"                request_spec.requested_destination \u003d objects.Destination("}],"source_content_type":"text/x-python","patch_set":86,"id":"5f4e5783_04aeebe6","line":3196,"range":{"start_line":3196,"start_character":18,"end_line":3196,"end_character":33},"in_reply_to":"7f515b1d_b5f7b18b","updated":"2017-10-11 09:44:49.000000000","message":"It is not copied.\nBut use ComputeNode.get_first_node_by_host_for_old_compat.\nDone.","commit_id":"af54867fce26e64f7b7c1d62bdb2c167d41ed396"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"2c5c466bac761484fa8cf52f75112b2098c33707","unresolved":false,"context_lines":[{"line_number":3072,"context_line":"        \"\"\""},{"line_number":3073,"context_line":"        if host_name is not None:"},{"line_number":3074,"context_line":"            # Check whether host exists or not."},{"line_number":3075,"context_line":"            node \u003d objects.ComputeNode.get_first_node_by_host_for_old_compat("},{"line_number":3076,"context_line":"                context, host_name, use_slave\u003dTrue)"},{"line_number":3077,"context_line":""},{"line_number":3078,"context_line":"        self._check_auto_disk_config(instance, **extra_instance_updates)"},{"line_number":3079,"context_line":""}],"source_content_type":"text/x-python","patch_set":92,"id":"3f4b6375_83ce8660","line":3076,"range":{"start_line":3075,"start_character":0,"end_line":3076,"end_character":51},"updated":"2017-10-26 09:22:07.000000000","message":"This method seems to be marked as deprecated and to be removed in next major version bump","commit_id":"dc39e7cebaef3783f318a57c409493c5f4613b43"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6eff7b1146c55af7576de279b1d9412fab5f587","unresolved":false,"context_lines":[{"line_number":3072,"context_line":"        \"\"\""},{"line_number":3073,"context_line":"        if host_name is not None:"},{"line_number":3074,"context_line":"            # Check whether host exists or not."},{"line_number":3075,"context_line":"            node \u003d objects.ComputeNode.get_first_node_by_host_for_old_compat("},{"line_number":3076,"context_line":"                context, host_name, use_slave\u003dTrue)"},{"line_number":3077,"context_line":""},{"line_number":3078,"context_line":"        self._check_auto_disk_config(instance, **extra_instance_updates)"},{"line_number":3079,"context_line":""}],"source_content_type":"text/x-python","patch_set":92,"id":"3f4b6375_6868e2f3","line":3076,"range":{"start_line":3075,"start_character":0,"end_line":3076,"end_character":51},"in_reply_to":"3f4b6375_83ce8660","updated":"2017-10-27 13:40:33.000000000","message":"I wouldn\u0027t worry about this - this is used in lots of places and it\u0027s fine unless you\u0027re doing something that needs to support ironic (which is 1:M with host:node), and today we don\u0027t support cold migrate/resize with ironic.","commit_id":"dc39e7cebaef3783f318a57c409493c5f4613b43"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f5b7ebb7b9b1f3875a8607d0b57ad11bf1b7b0f5","unresolved":false,"context_lines":[{"line_number":3154,"context_line":"                context, instance.uuid)"},{"line_number":3155,"context_line":"            request_spec.ignore_hosts \u003d filter_properties[\u0027ignore_hosts\u0027]"},{"line_number":3156,"context_line":"        except exception.RequestSpecNotFound:"},{"line_number":3157,"context_line":"            # NOTE(takashin): The cells v1 instances still have"},{"line_number":3158,"context_line":"            # no RequestSpec object attached to them."},{"line_number":3159,"context_line":"            # So the cells v1 instances wouldn\u0027t work for cold migrating"},{"line_number":3160,"context_line":"            # with target host."},{"line_number":3161,"context_line":"            request_spec \u003d None"},{"line_number":3162,"context_line":""},{"line_number":3163,"context_line":"        # TODO(melwitt): We\u0027re not rechecking for strict quota here to guard"}],"source_content_type":"text/x-python","patch_set":93,"id":"3f4b6375_210ca7ea","line":3160,"range":{"start_line":3157,"start_character":12,"end_line":3160,"end_character":31},"updated":"2017-11-02 20:03:47.000000000","message":"Two things:\n\n1. Let\u0027s undo the change to the comment.\n\n2. Add a check such that if host_name is not None, we raise an exception which is handled in the REST API controller code and returned as a 409 conflict to the user. The error message should say something like, \"Unable to resize instance with a destination host specified. Retry without specifying a host.\".\n\nThe message would have to tailor the \"resize\" or \"migrate\" wording based on if flavor_id is provided, e.g.:\n\nif host_name is None:\n   # If there is no request spec we cannot honor the request\n   # and we need to fail.\n   if flavor_id:\n      raise exception.UnableToResizeWithTargetHost()\n   else:\n      raise exception.UnableToMigrateWithTargetHost()","commit_id":"4f0cb7d6145fa3db9adf100764e197ecc2ddd73c"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"a1cc72fed9ed8604f3db829563d4f290ea67df06","unresolved":false,"context_lines":[{"line_number":3154,"context_line":"                context, instance.uuid)"},{"line_number":3155,"context_line":"            request_spec.ignore_hosts \u003d filter_properties[\u0027ignore_hosts\u0027]"},{"line_number":3156,"context_line":"        except exception.RequestSpecNotFound:"},{"line_number":3157,"context_line":"            # NOTE(takashin): The cells v1 instances still have"},{"line_number":3158,"context_line":"            # no RequestSpec object attached to them."},{"line_number":3159,"context_line":"            # So the cells v1 instances wouldn\u0027t work for cold migrating"},{"line_number":3160,"context_line":"            # with target host."},{"line_number":3161,"context_line":"            request_spec \u003d None"},{"line_number":3162,"context_line":""},{"line_number":3163,"context_line":"        # TODO(melwitt): We\u0027re not rechecking for strict quota here to guard"}],"source_content_type":"text/x-python","patch_set":93,"id":"3f4b6375_3641673a","line":3160,"range":{"start_line":3157,"start_character":12,"end_line":3160,"end_character":31},"in_reply_to":"3f4b6375_210ca7ea","updated":"2017-11-04 07:32:14.000000000","message":"\u003e 1. Let\u0027s undo the change to the comment.\n\nDone.\n\nIn \u0027resize\u0027 case, host_name is always None.\nSo There is no need to raise the exception.\nDone.","commit_id":"4f0cb7d6145fa3db9adf100764e197ecc2ddd73c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f5b7ebb7b9b1f3875a8607d0b57ad11bf1b7b0f5","unresolved":false,"context_lines":[{"line_number":3168,"context_line":""},{"line_number":3169,"context_line":"        if request_spec:"},{"line_number":3170,"context_line":"            if host_name is None:"},{"line_number":3171,"context_line":"                # If \u0027host_name\u0027 is not specified,"},{"line_number":3172,"context_line":"                # clear the \u0027host\u0027 and \u0027node\u0027 fields of"},{"line_number":3173,"context_line":"                # \u0027requested_destination\u0027 of the RequestSpec."},{"line_number":3174,"context_line":"                if request_spec.requested_destination:"},{"line_number":3175,"context_line":"                    if (\u0027cell\u0027 in request_spec.requested_destination and"},{"line_number":3176,"context_line":"                            request_spec.requested_destination.cell):"},{"line_number":3177,"context_line":"                        request_spec.requested_destination \u003d ("},{"line_number":3178,"context_line":"                            objects.Destination("},{"line_number":3179,"context_line":"                                cell\u003drequest_spec.requested_destination.cell))"},{"line_number":3180,"context_line":"                    else:"},{"line_number":3181,"context_line":"                        request_spec.requested_destination \u003d None"},{"line_number":3182,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":93,"id":"3f4b6375_41c2035b","line":3179,"range":{"start_line":3171,"start_character":16,"end_line":3179,"end_character":78},"updated":"2017-11-02 20:03:47.000000000","message":"I don\u0027t really understand why you have to do this - maybe the comment needs more explanation?\n\nAre you worried that someone could cold migrate an instance and specify a host, which would persist that in requested_destination, and then cold migrate the instance again without specifying a host, and without this check we\u0027d try to migrate the instance to the same host it\u0027s already on?\n\nThis basically seems like an unrelated change to me otherwise, or at the very least is something that we should be handling in RequestSpec.reset_forced_destinations() because that\u0027s where we handle stuff like this.\n\nLike this change: https://review.openstack.org/#/c/505771/","commit_id":"4f0cb7d6145fa3db9adf100764e197ecc2ddd73c"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"a1cc72fed9ed8604f3db829563d4f290ea67df06","unresolved":false,"context_lines":[{"line_number":3168,"context_line":""},{"line_number":3169,"context_line":"        if request_spec:"},{"line_number":3170,"context_line":"            if host_name is None:"},{"line_number":3171,"context_line":"                # If \u0027host_name\u0027 is not specified,"},{"line_number":3172,"context_line":"                # clear the \u0027host\u0027 and \u0027node\u0027 fields of"},{"line_number":3173,"context_line":"                # \u0027requested_destination\u0027 of the RequestSpec."},{"line_number":3174,"context_line":"                if request_spec.requested_destination:"},{"line_number":3175,"context_line":"                    if (\u0027cell\u0027 in request_spec.requested_destination and"},{"line_number":3176,"context_line":"                            request_spec.requested_destination.cell):"},{"line_number":3177,"context_line":"                        request_spec.requested_destination \u003d ("},{"line_number":3178,"context_line":"                            objects.Destination("},{"line_number":3179,"context_line":"                                cell\u003drequest_spec.requested_destination.cell))"},{"line_number":3180,"context_line":"                    else:"},{"line_number":3181,"context_line":"                        request_spec.requested_destination \u003d None"},{"line_number":3182,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":93,"id":"3f4b6375_766c7fcf","line":3179,"range":{"start_line":3171,"start_character":16,"end_line":3179,"end_character":78},"in_reply_to":"3f4b6375_41c2035b","updated":"2017-11-04 07:32:14.000000000","message":"\u003e Are you worried that someone could cold migrate an instance and specify a host, which would persist that in requested_destination, and then cold migrate the instance again without specifying a host, and without this check we\u0027d try to migrate the instance to the same host it\u0027s already on?\n\nYes. I\u0027m worrying about it.\n\n\u003e This basically seems like an unrelated change to me otherwise, or at the very least is something that we should be handling in RequestSpec.reset_forced_destinations() because that\u0027s where we handle stuff like this.\n\n\u003e Like this change: https://review.openstack.org/#/c/505771/\n\nBut \u0027requested_destination\u0027 is not cleared in https://review.openstack.org/#/c/505771/.\nSo this code is required.","commit_id":"4f0cb7d6145fa3db9adf100764e197ecc2ddd73c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8c2c8760ffb8d846f082bf9f1795328ac0dab9c3","unresolved":false,"context_lines":[{"line_number":3168,"context_line":""},{"line_number":3169,"context_line":"        if request_spec:"},{"line_number":3170,"context_line":"            if host_name is None:"},{"line_number":3171,"context_line":"                # If \u0027host_name\u0027 is not specified,"},{"line_number":3172,"context_line":"                # clear the \u0027host\u0027 and \u0027node\u0027 fields of"},{"line_number":3173,"context_line":"                # \u0027requested_destination\u0027 of the RequestSpec."},{"line_number":3174,"context_line":"                if request_spec.requested_destination:"},{"line_number":3175,"context_line":"                    if (\u0027cell\u0027 in request_spec.requested_destination and"},{"line_number":3176,"context_line":"                            request_spec.requested_destination.cell):"},{"line_number":3177,"context_line":"                        request_spec.requested_destination \u003d ("},{"line_number":3178,"context_line":"                            objects.Destination("},{"line_number":3179,"context_line":"                                cell\u003drequest_spec.requested_destination.cell))"},{"line_number":3180,"context_line":"                    else:"},{"line_number":3181,"context_line":"                        request_spec.requested_destination \u003d None"},{"line_number":3182,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":93,"id":"ff82abbf_c47a3c87","line":3179,"range":{"start_line":3171,"start_character":16,"end_line":3179,"end_character":78},"in_reply_to":"3f4b6375_766c7fcf","updated":"2017-11-20 19:15:26.000000000","message":"\u003e But \u0027requested_destination\u0027 is not cleared in https://review.openstack.org/#/c/505771/. So this code is required.\n\nCorrect, I said \"like this change\" so we\u0027d do something similar for requested_destination as to what I\u0027m doing with \u0027retry\u0027.","commit_id":"4f0cb7d6145fa3db9adf100764e197ecc2ddd73c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f5b7ebb7b9b1f3875a8607d0b57ad11bf1b7b0f5","unresolved":false,"context_lines":[{"line_number":3180,"context_line":"                    else:"},{"line_number":3181,"context_line":"                        request_spec.requested_destination \u003d None"},{"line_number":3182,"context_line":"            else:"},{"line_number":3183,"context_line":"                # Set the host and the node so that the scheduler will"},{"line_number":3184,"context_line":"                # validate them."},{"line_number":3185,"context_line":"                request_spec.requested_destination \u003d objects.Destination("},{"line_number":3186,"context_line":"                    host\u003dnode.host, node\u003dnode.hypervisor_hostname)"},{"line_number":3187,"context_line":""},{"line_number":3188,"context_line":"        self.compute_task_api.resize_instance(context, instance,"},{"line_number":3189,"context_line":"                extra_instance_updates, scheduler_hint\u003dscheduler_hint,"}],"source_content_type":"text/x-python","patch_set":93,"id":"3f4b6375_41be83b4","line":3186,"range":{"start_line":3183,"start_character":16,"end_line":3186,"end_character":66},"updated":"2017-11-02 20:03:47.000000000","message":"I think this is the only thing you\u0027d need in this API code, just like for live migrate and evacuate with a specified host.\n\nWe could also do this in an else block on the try/except above that gets the request spec.","commit_id":"4f0cb7d6145fa3db9adf100764e197ecc2ddd73c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8c2c8760ffb8d846f082bf9f1795328ac0dab9c3","unresolved":false,"context_lines":[{"line_number":3086,"context_line":"    @check_instance_cell"},{"line_number":3087,"context_line":"    @check_instance_state(vm_state\u003d[vm_states.ACTIVE, vm_states.STOPPED])"},{"line_number":3088,"context_line":"    def resize(self, context, instance, flavor_id\u003dNone, clean_shutdown\u003dTrue,"},{"line_number":3089,"context_line":"               host_name\u003dNone, **extra_instance_updates):"},{"line_number":3090,"context_line":"        \"\"\"Resize (ie, migrate) a running instance."},{"line_number":3091,"context_line":""},{"line_number":3092,"context_line":"        If flavor_id is None, the process is considered a migration, keeping"}],"source_content_type":"text/x-python","patch_set":97,"id":"ff82abbf_9fdc8119","line":3089,"range":{"start_line":3089,"start_character":15,"end_line":3089,"end_character":24},"updated":"2017-11-20 19:15:26.000000000","message":"Please document when this would be not None in the docstring below. We need good documentation for this resize method since it\u0027s very easy to get confused when we\u0027re dealing with a resize vs when we\u0027re dealing with a cold migrate.","commit_id":"d35764b1362ae495d605aaa810947b7025fd8979"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"77f09d63afe163303ef4fd0609ee169b8376f31b","unresolved":false,"context_lines":[{"line_number":3086,"context_line":"    @check_instance_cell"},{"line_number":3087,"context_line":"    @check_instance_state(vm_state\u003d[vm_states.ACTIVE, vm_states.STOPPED])"},{"line_number":3088,"context_line":"    def resize(self, context, instance, flavor_id\u003dNone, clean_shutdown\u003dTrue,"},{"line_number":3089,"context_line":"               host_name\u003dNone, **extra_instance_updates):"},{"line_number":3090,"context_line":"        \"\"\"Resize (ie, migrate) a running instance."},{"line_number":3091,"context_line":""},{"line_number":3092,"context_line":"        If flavor_id is None, the process is considered a migration, keeping"}],"source_content_type":"text/x-python","patch_set":97,"id":"ff82abbf_94cd2d5f","line":3089,"range":{"start_line":3089,"start_character":15,"end_line":3089,"end_character":24},"in_reply_to":"ff82abbf_9fdc8119","updated":"2017-11-21 14:28:05.000000000","message":"Done","commit_id":"d35764b1362ae495d605aaa810947b7025fd8979"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8c2c8760ffb8d846f082bf9f1795328ac0dab9c3","unresolved":false,"context_lines":[{"line_number":3093,"context_line":"        the original flavor_id. If flavor_id is not None, the instance should"},{"line_number":3094,"context_line":"        be migrated to a new host and resized to the new flavor_id."},{"line_number":3095,"context_line":"        \"\"\""},{"line_number":3096,"context_line":"        if host_name is not None:"},{"line_number":3097,"context_line":"            # Check whether host exists or not."},{"line_number":3098,"context_line":"            node \u003d objects.ComputeNode.get_first_node_by_host_for_old_compat("},{"line_number":3099,"context_line":"                context, host_name, use_slave\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":97,"id":"ff82abbf_843f54d5","line":3096,"updated":"2017-11-20 19:15:26.000000000","message":"Shouldn\u0027t we also restrict the specified host_name from being the instance.host? You can resize to the same host today when you\u0027re changing the flavor (and the compute is configured for resize to the same host), but migrating to the same host without a flavor change seems pointless.","commit_id":"d35764b1362ae495d605aaa810947b7025fd8979"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"77f09d63afe163303ef4fd0609ee169b8376f31b","unresolved":false,"context_lines":[{"line_number":3093,"context_line":"        the original flavor_id. If flavor_id is not None, the instance should"},{"line_number":3094,"context_line":"        be migrated to a new host and resized to the new flavor_id."},{"line_number":3095,"context_line":"        \"\"\""},{"line_number":3096,"context_line":"        if host_name is not None:"},{"line_number":3097,"context_line":"            # Check whether host exists or not."},{"line_number":3098,"context_line":"            node \u003d objects.ComputeNode.get_first_node_by_host_for_old_compat("},{"line_number":3099,"context_line":"                context, host_name, use_slave\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":97,"id":"ff82abbf_f461193b","line":3096,"in_reply_to":"ff82abbf_843f54d5","updated":"2017-11-21 14:28:05.000000000","message":"Done","commit_id":"d35764b1362ae495d605aaa810947b7025fd8979"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8c2c8760ffb8d846f082bf9f1795328ac0dab9c3","unresolved":false,"context_lines":[{"line_number":3197,"context_line":"                # clear the \u0027host\u0027 and \u0027node\u0027 fields of"},{"line_number":3198,"context_line":"                # \u0027requested_destination\u0027 of the RequestSpec."},{"line_number":3199,"context_line":"                if request_spec.requested_destination:"},{"line_number":3200,"context_line":"                    if (\u0027cell\u0027 in request_spec.requested_destination and"},{"line_number":3201,"context_line":"                            request_spec.requested_destination.cell):"},{"line_number":3202,"context_line":"                        request_spec.requested_destination \u003d ("},{"line_number":3203,"context_line":"                            objects.Destination("},{"line_number":3204,"context_line":"                                cell\u003drequest_spec.requested_destination.cell))"},{"line_number":3205,"context_line":"                    else:"},{"line_number":3206,"context_line":"                        request_spec.requested_destination \u003d None"},{"line_number":3207,"context_line":"            else:"},{"line_number":3208,"context_line":"                # Set the host and the node so that the scheduler will"}],"source_content_type":"text/x-python","patch_set":97,"id":"ff82abbf_1f3b91d1","line":3205,"range":{"start_line":3200,"start_character":20,"end_line":3205,"end_character":25},"updated":"2017-11-20 19:15:26.000000000","message":"We don\u0027t really need this, we can just set request_spec.requested_destination \u003d None always in this case. The conductor code will enforce that we go to the same cell.\n\nhttps://review.openstack.org/#/c/408955/97/nova/conductor/tasks/migrate.py@238\n\nYou can also call:\n\nrequest_spec.obj_reset_changes([\u0027requested_destination\u0027]) if you want to keep from persisting this change, or do something like this:\n\ndel request_spec.id\n\nWhich will make RequestSpec.save() blow up if some other code tries to persist this later.","commit_id":"d35764b1362ae495d605aaa810947b7025fd8979"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"77f09d63afe163303ef4fd0609ee169b8376f31b","unresolved":false,"context_lines":[{"line_number":3197,"context_line":"                # clear the \u0027host\u0027 and \u0027node\u0027 fields of"},{"line_number":3198,"context_line":"                # \u0027requested_destination\u0027 of the RequestSpec."},{"line_number":3199,"context_line":"                if request_spec.requested_destination:"},{"line_number":3200,"context_line":"                    if (\u0027cell\u0027 in request_spec.requested_destination and"},{"line_number":3201,"context_line":"                            request_spec.requested_destination.cell):"},{"line_number":3202,"context_line":"                        request_spec.requested_destination \u003d ("},{"line_number":3203,"context_line":"                            objects.Destination("},{"line_number":3204,"context_line":"                                cell\u003drequest_spec.requested_destination.cell))"},{"line_number":3205,"context_line":"                    else:"},{"line_number":3206,"context_line":"                        request_spec.requested_destination \u003d None"},{"line_number":3207,"context_line":"            else:"},{"line_number":3208,"context_line":"                # Set the host and the node so that the scheduler will"}],"source_content_type":"text/x-python","patch_set":97,"id":"ff82abbf_14683df3","line":3205,"range":{"start_line":3200,"start_character":20,"end_line":3205,"end_character":25},"in_reply_to":"ff82abbf_1f3b91d1","updated":"2017-11-21 14:28:05.000000000","message":"Done","commit_id":"d35764b1362ae495d605aaa810947b7025fd8979"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8c2c8760ffb8d846f082bf9f1795328ac0dab9c3","unresolved":false,"context_lines":[{"line_number":3207,"context_line":"            else:"},{"line_number":3208,"context_line":"                # Set the host and the node so that the scheduler will"},{"line_number":3209,"context_line":"                # validate them."},{"line_number":3210,"context_line":"                request_spec.requested_destination \u003d objects.Destination("},{"line_number":3211,"context_line":"                    host\u003dnode.host, node\u003dnode.hypervisor_hostname)"},{"line_number":3212,"context_line":""},{"line_number":3213,"context_line":"        self.compute_task_api.resize_instance(context, instance,"}],"source_content_type":"text/x-python","patch_set":97,"id":"ff82abbf_7f2c1d47","line":3210,"updated":"2017-11-20 19:15:26.000000000","message":"I\u0027ve pointed this out before, but if the user specifies a host which is not in the same cell as the instance, eventually select_destinations will raise a NoValidHost which will turn into a 400 response to the user:\n\nhttps://review.openstack.org/#/c/408964/106/nova/api/openstack/compute/migrate_server.py@68\n\nHowever, I think that is going to be quite confusing as to why it failed. It would be much more clear if we just checked that the specified host is within the same cell as the instance, and if not, raise a specific error message that is clear to the caller, e.g. \"Unable to migrate with target host which is not in the same cell as the instance.\".\n\nI guess you could argue that for live migrate today, you can specify a host and we don\u0027t raise a pretty error message if that host is in a different cell, so maybe leave a TODO to clean this up later?","commit_id":"d35764b1362ae495d605aaa810947b7025fd8979"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"77f09d63afe163303ef4fd0609ee169b8376f31b","unresolved":false,"context_lines":[{"line_number":3207,"context_line":"            else:"},{"line_number":3208,"context_line":"                # Set the host and the node so that the scheduler will"},{"line_number":3209,"context_line":"                # validate them."},{"line_number":3210,"context_line":"                request_spec.requested_destination \u003d objects.Destination("},{"line_number":3211,"context_line":"                    host\u003dnode.host, node\u003dnode.hypervisor_hostname)"},{"line_number":3212,"context_line":""},{"line_number":3213,"context_line":"        self.compute_task_api.resize_instance(context, instance,"}],"source_content_type":"text/x-python","patch_set":97,"id":"ff82abbf_ef2702b6","line":3210,"in_reply_to":"ff82abbf_7f2c1d47","updated":"2017-11-21 14:28:05.000000000","message":"Done","commit_id":"d35764b1362ae495d605aaa810947b7025fd8979"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f738a1120e70d27ebbaafd309d83a657fcd4f88e","unresolved":false,"context_lines":[{"line_number":3092,"context_line":"            node \u003d objects.ComputeNode.get_first_node_by_host_for_old_compat("},{"line_number":3093,"context_line":"                context, host_name, use_slave\u003dTrue)"},{"line_number":3094,"context_line":""},{"line_number":3095,"context_line":"            # Cannot migrate to the host where the instance exists"},{"line_number":3096,"context_line":"            # because it is useless."},{"line_number":3097,"context_line":"            if host_name \u003d\u003d instance.host:"},{"line_number":3098,"context_line":"                raise exception.CannotMigrateToSameHost()"},{"line_number":3099,"context_line":""},{"line_number":3100,"context_line":"        self._check_auto_disk_config(instance, **extra_instance_updates)"},{"line_number":3101,"context_line":""}],"source_content_type":"text/x-python","patch_set":99,"id":"ff82abbf_4668cdb7","line":3098,"range":{"start_line":3095,"start_character":12,"end_line":3098,"end_character":57},"updated":"2017-11-28 02:27:49.000000000","message":"nit: we should do this check before we pull the compute node out of the database, just for performance.","commit_id":"81ffd2065de22810f0d2e3f965763b70a6d48636"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ab8ff51094a38cb9220727f02ae3b813b04da9f9","unresolved":false,"context_lines":[{"line_number":3092,"context_line":"            node \u003d objects.ComputeNode.get_first_node_by_host_for_old_compat("},{"line_number":3093,"context_line":"                context, host_name, use_slave\u003dTrue)"},{"line_number":3094,"context_line":""},{"line_number":3095,"context_line":"            # Cannot migrate to the host where the instance exists"},{"line_number":3096,"context_line":"            # because it is useless."},{"line_number":3097,"context_line":"            if host_name \u003d\u003d instance.host:"},{"line_number":3098,"context_line":"                raise exception.CannotMigrateToSameHost()"},{"line_number":3099,"context_line":""},{"line_number":3100,"context_line":"        self._check_auto_disk_config(instance, **extra_instance_updates)"},{"line_number":3101,"context_line":""}],"source_content_type":"text/x-python","patch_set":99,"id":"9fdfeff1_3e2f27a2","line":3098,"range":{"start_line":3095,"start_character":12,"end_line":3098,"end_character":57},"in_reply_to":"9fdfeff1_ef17b850","updated":"2019-01-25 13:23:37.000000000","message":"I left a comment in the bug. I think there is some confusion about when you can specify a host in this code (only for cold migrate, not resize).","commit_id":"81ffd2065de22810f0d2e3f965763b70a6d48636"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"7f77a6c4cf5905e6d161d57981d4bf9dfe8e6cfa","unresolved":false,"context_lines":[{"line_number":3092,"context_line":"            node \u003d objects.ComputeNode.get_first_node_by_host_for_old_compat("},{"line_number":3093,"context_line":"                context, host_name, use_slave\u003dTrue)"},{"line_number":3094,"context_line":""},{"line_number":3095,"context_line":"            # Cannot migrate to the host where the instance exists"},{"line_number":3096,"context_line":"            # because it is useless."},{"line_number":3097,"context_line":"            if host_name \u003d\u003d instance.host:"},{"line_number":3098,"context_line":"                raise exception.CannotMigrateToSameHost()"},{"line_number":3099,"context_line":""},{"line_number":3100,"context_line":"        self._check_auto_disk_config(instance, **extra_instance_updates)"},{"line_number":3101,"context_line":""}],"source_content_type":"text/x-python","patch_set":99,"id":"9fdfeff1_ef17b850","line":3098,"range":{"start_line":3095,"start_character":12,"end_line":3098,"end_character":57},"in_reply_to":"ff82abbf_4668cdb7","updated":"2019-01-25 01:57:59.000000000","message":"Reported in a relatively new bug [1], it looks like this change may have introduced a problem that causes the CONF.allow_resize_to_same_host \u003d True setting not to be honored.\n\nI notice the docstring says that host_name will be none \"in the resize case\" and will only be set for \"cold migration\", which I assume means it will only be set if the user has specified a target host.\n\nSo the bug reporter must be specifying a target host of self and setting CONF.allow_resize_to_same_host \u003d True and failing.\n\n[1] https://bugs.launchpad.net/nova/+bug/1811235","commit_id":"81ffd2065de22810f0d2e3f965763b70a6d48636"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f738a1120e70d27ebbaafd309d83a657fcd4f88e","unresolved":false,"context_lines":[{"line_number":3194,"context_line":"            if host_name is None:"},{"line_number":3195,"context_line":"                # If \u0027host_name\u0027 is not specified,"},{"line_number":3196,"context_line":"                # clear the \u0027requested_destination\u0027 field of the RequestSpec."},{"line_number":3197,"context_line":"                request_spec.requested_destination \u003d None"},{"line_number":3198,"context_line":"            else:"},{"line_number":3199,"context_line":"                # Set the host and the node so that the scheduler will"},{"line_number":3200,"context_line":"                # validate them."}],"source_content_type":"text/x-python","patch_set":99,"id":"ff82abbf_a685195c","line":3197,"updated":"2017-11-28 02:27:49.000000000","message":"Did you want to do either:\n\n  request_spec.obj_reset_changes([\u0027requested_destination\u0027])\n\nor:\n\n  del request_spec.id\n\nso that a later request_spec.save() will fail?","commit_id":"81ffd2065de22810f0d2e3f965763b70a6d48636"}],"nova/conductor/manager.py":[{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"6c9496a4ccecd6b4aed651275975665ff3d8fd38","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        else:"},{"line_number":224,"context_line":"            raise NotImplementedError()"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    def _cold_migrate(self, context, instance, flavor, filter_properties,"},{"line_number":227,"context_line":"                      reservations, clean_shutdown, request_spec, host_name):"},{"line_number":228,"context_line":"        image \u003d utils.get_image_from_system_metadata("},{"line_number":229,"context_line":"            instance.system_metadata)"},{"line_number":230,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_60c0662b","line":227,"range":{"start_line":226,"start_character":4,"end_line":227,"end_character":77},"updated":"2016-12-09 07:39:16.000000000","message":"let\u0027s just add scheduler_hint as param here, it will remove 2 args from the list(filter_properties, host_name)","commit_id":"9b7a758a9c588cbc207675a7ba80319cb10b3444"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"c00b243b3dbebd3e3f08663cd42e660ca010ca05","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        else:"},{"line_number":224,"context_line":"            raise NotImplementedError()"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    def _cold_migrate(self, context, instance, flavor, filter_properties,"},{"line_number":227,"context_line":"                      reservations, clean_shutdown, request_spec, host_name):"},{"line_number":228,"context_line":"        image \u003d utils.get_image_from_system_metadata("},{"line_number":229,"context_line":"            instance.system_metadata)"},{"line_number":230,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_7752a6df","line":227,"range":{"start_line":226,"start_character":4,"end_line":227,"end_character":77},"in_reply_to":"3a71b18c_60c0662b","updated":"2016-12-12 08:15:30.000000000","message":"Done","commit_id":"9b7a758a9c588cbc207675a7ba80319cb10b3444"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"3c446697511997a97bd2b312022cf63cf2102924","unresolved":false,"context_lines":[{"line_number":316,"context_line":"                                              updates, ex, legacy_spec)"},{"line_number":317,"context_line":"        # NOTE(takashin)"},{"line_number":318,"context_line":"        # \u0027retry\u0027 should be cleared for next request."},{"line_number":319,"context_line":"        request_spec.retry \u003d None"},{"line_number":320,"context_line":"        # NOTE(sbauza): Make sure we persist the new flavor in case we had"},{"line_number":321,"context_line":"        # a successful scheduler call if and only if nothing bad happened"},{"line_number":322,"context_line":"        if request_spec.obj_what_changed():"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_db076cc7","line":319,"range":{"start_line":319,"start_character":29,"end_line":319,"end_character":33},"updated":"2016-12-20 12:58:30.000000000","message":"just curious, why need clean this? will it affect further retry logic with/without host?","commit_id":"c1807ebf6e72000949ec43280670aeb95fc4086e"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"033accdaf782e95d6e43c3af64dd4faee3da639a","unresolved":false,"context_lines":[{"line_number":316,"context_line":"                                              updates, ex, legacy_spec)"},{"line_number":317,"context_line":"        # NOTE(takashin)"},{"line_number":318,"context_line":"        # \u0027retry\u0027 should be cleared for next request."},{"line_number":319,"context_line":"        request_spec.retry \u003d None"},{"line_number":320,"context_line":"        # NOTE(sbauza): Make sure we persist the new flavor in case we had"},{"line_number":321,"context_line":"        # a successful scheduler call if and only if nothing bad happened"},{"line_number":322,"context_line":"        if request_spec.obj_what_changed():"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_f8aebb2c","line":319,"range":{"start_line":319,"start_character":29,"end_line":319,"end_character":33},"in_reply_to":"1a6eadb0_db076cc7","updated":"2016-12-21 11:27:21.000000000","message":"Just for next request(operation).","commit_id":"c1807ebf6e72000949ec43280670aeb95fc4086e"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"f69224e236bd1402d0dfb3b244447e8b95f1c5af","unresolved":false,"context_lines":[{"line_number":313,"context_line":"                                              \u0027migrate_server\u0027,"},{"line_number":314,"context_line":"                                              updates, ex, legacy_spec)"},{"line_number":315,"context_line":"        # NOTE(takashin)"},{"line_number":316,"context_line":"        # \u0027retry\u0027 should be cleared for next request."},{"line_number":317,"context_line":"        request_spec.retry \u003d None"},{"line_number":318,"context_line":"        # NOTE(sbauza): Make sure we persist the new flavor in case we had"},{"line_number":319,"context_line":"        # a successful scheduler call if and only if nothing bad happened"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba5201f7_0a5baf2f","line":316,"updated":"2017-01-09 11:40:30.000000000","message":"nit: this can be just one line","commit_id":"b62f26b288949fdb7d6741d79b7e9153f47125eb"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"46992d709a5fef0ad00866ccb7d9d414d555c120","unresolved":false,"context_lines":[{"line_number":313,"context_line":"                                              \u0027migrate_server\u0027,"},{"line_number":314,"context_line":"                                              updates, ex, legacy_spec)"},{"line_number":315,"context_line":"        # NOTE(takashin)"},{"line_number":316,"context_line":"        # \u0027retry\u0027 should be cleared for next request."},{"line_number":317,"context_line":"        request_spec.retry \u003d None"},{"line_number":318,"context_line":"        # NOTE(sbauza): Make sure we persist the new flavor in case we had"},{"line_number":319,"context_line":"        # a successful scheduler call if and only if nothing bad happened"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_9d04017f","line":316,"in_reply_to":"ba5201f7_0a5baf2f","updated":"2017-01-16 02:33:50.000000000","message":"Done","commit_id":"b62f26b288949fdb7d6741d79b7e9153f47125eb"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"ead1aab97542faaf8102a77c4847cbaab8dbdeb4","unresolved":false,"context_lines":[{"line_number":314,"context_line":"                self._set_vm_state_and_notify(context, instance.uuid,"},{"line_number":315,"context_line":"                                              \u0027migrate_server\u0027,"},{"line_number":316,"context_line":"                                              updates, ex, legacy_spec)"},{"line_number":317,"context_line":"        # NOTE(takashin): \u0027retry\u0027 should be cleared for next request."},{"line_number":318,"context_line":"        request_spec.retry \u003d None"},{"line_number":319,"context_line":"        # NOTE(sbauza): Make sure we persist the new flavor in case we had"},{"line_number":320,"context_line":"        # a successful scheduler call if and only if nothing bad happened"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a3905b3_77437213","line":317,"range":{"start_line":317,"start_character":26,"end_line":317,"end_character":69},"updated":"2017-01-24 00:54:30.000000000","message":"It is nice to describe the reason why we need to clear it.","commit_id":"cf6ce618a569e79a031485e1bd35d45350a5a1ca"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"4e0851c13b95aab15d1c6a3c8fa3a6fef0a2d7d7","unresolved":false,"context_lines":[{"line_number":314,"context_line":"                self._set_vm_state_and_notify(context, instance.uuid,"},{"line_number":315,"context_line":"                                              \u0027migrate_server\u0027,"},{"line_number":316,"context_line":"                                              updates, ex, legacy_spec)"},{"line_number":317,"context_line":"        # NOTE(takashin): \u0027retry\u0027 should be cleared for next request."},{"line_number":318,"context_line":"        request_spec.retry \u003d None"},{"line_number":319,"context_line":"        # NOTE(sbauza): Make sure we persist the new flavor in case we had"},{"line_number":320,"context_line":"        # a successful scheduler call if and only if nothing bad happened"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a3905b3_38a717be","line":317,"range":{"start_line":317,"start_character":26,"end_line":317,"end_character":69},"in_reply_to":"5a3905b3_77437213","updated":"2017-01-24 02:34:39.000000000","message":"This code is unnecessary now.\nSo I removed it.","commit_id":"cf6ce618a569e79a031485e1bd35d45350a5a1ca"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8dcbff327c294e0a0e00cb0ae3e57108a60df65b","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"        # NOTE(sbauza): If a reschedule occurs when prep_resize(), then"},{"line_number":291,"context_line":"        # it only provides filter_properties legacy dict back to the"},{"line_number":292,"context_line":"        # conductor with no RequestSpec part of the payload."},{"line_number":293,"context_line":"        if not request_spec:"},{"line_number":294,"context_line":"            # Make sure we hydrate a new RequestSpec object with the new flavor"},{"line_number":295,"context_line":"            # and not the nested one from the instance"}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_92be6663","line":292,"updated":"2017-06-13 10:48:56.000000000","message":"Are we not now loosing the host information if we trigger a reschedule? How do we avoid that case, I guess I need to keep reading to find out...","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"799a9239237ec2f76f7ceedc21296b98bceb64b8","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"        # NOTE(sbauza): If a reschedule occurs when prep_resize(), then"},{"line_number":291,"context_line":"        # it only provides filter_properties legacy dict back to the"},{"line_number":292,"context_line":"        # conductor with no RequestSpec part of the payload."},{"line_number":293,"context_line":"        if not request_spec:"},{"line_number":294,"context_line":"            # Make sure we hydrate a new RequestSpec object with the new flavor"},{"line_number":295,"context_line":"            # and not the nested one from the instance"}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_ae29b9e6","line":292,"in_reply_to":"7f231b9d_92be6663","updated":"2017-06-15 06:41:06.000000000","message":"If a target host is specified, reschedule is not occurred (disable). Please See nova/conductor/tasks/migrate.py in PS54.\nSo it is no problem.","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8dcbff327c294e0a0e00cb0ae3e57108a60df65b","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            # the right one and not the original flavor"},{"line_number":305,"context_line":"            request_spec.flavor \u003d flavor"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        host_name \u003d scheduler_hint.pop(\u0027host\u0027, None)"},{"line_number":308,"context_line":"        task \u003d self._build_cold_migrate_task(context, instance, flavor,"},{"line_number":309,"context_line":"                                             request_spec,"},{"line_number":310,"context_line":"                                             reservations, clean_shutdown,"}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_92f0a669","line":307,"updated":"2017-06-13 10:48:56.000000000","message":"This seems odd, request_spec.requested_destination is what holds the host_name? Why are we using the scheduler_hint here?","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b11b2264c8c87353a66a37222f1ceda10d7277a5","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            # the right one and not the original flavor"},{"line_number":305,"context_line":"            request_spec.flavor \u003d flavor"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        host_name \u003d scheduler_hint.pop(\u0027host\u0027, None)"},{"line_number":308,"context_line":"        task \u003d self._build_cold_migrate_task(context, instance, flavor,"},{"line_number":309,"context_line":"                                             request_spec,"},{"line_number":310,"context_line":"                                             reservations, clean_shutdown,"}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_a21465a1","line":307,"in_reply_to":"7f231b9d_153c80c6","updated":"2017-06-13 15:28:12.000000000","message":"I disagree with what we use to signal a forced resize, see my comments on the compute.api module.","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"50a1d4f8097865f65dc6cc363b7447293a679e0b","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            # the right one and not the original flavor"},{"line_number":305,"context_line":"            request_spec.flavor \u003d flavor"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        host_name \u003d scheduler_hint.pop(\u0027host\u0027, None)"},{"line_number":308,"context_line":"        task \u003d self._build_cold_migrate_task(context, instance, flavor,"},{"line_number":309,"context_line":"                                             request_spec,"},{"line_number":310,"context_line":"                                             reservations, clean_shutdown,"}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_153c80c6","line":307,"in_reply_to":"7f231b9d_92f0a669","updated":"2017-06-13 10:49:45.000000000","message":"I guess I see where you set it in the compute.api, hmm, still reading through all this.","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"799a9239237ec2f76f7ceedc21296b98bceb64b8","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            # the right one and not the original flavor"},{"line_number":305,"context_line":"            request_spec.flavor \u003d flavor"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        host_name \u003d scheduler_hint.pop(\u0027host\u0027, None)"},{"line_number":308,"context_line":"        task \u003d self._build_cold_migrate_task(context, instance, flavor,"},{"line_number":309,"context_line":"                                             request_spec,"},{"line_number":310,"context_line":"                                             reservations, clean_shutdown,"}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_8ea15d97","line":307,"in_reply_to":"7f231b9d_a21465a1","updated":"2017-06-15 06:41:06.000000000","message":"\u003e I guess I see where you set it in the compute.api\n\nYes.\nSee my comment in nova/compute/api.py.\nTo avid a change in cell v1 code.","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a54cf93105cb0ad9e86b1fda3fa504707e80ae4d","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            # Set a target host to \u0027requested_destination\u0027"},{"line_number":302,"context_line":"            # in the case that a target host is specified and force is false."},{"line_number":303,"context_line":"            if \u0027node\u0027 in scheduler_hint:"},{"line_number":304,"context_line":"                request_spec.requested_destination \u003d objects.Destination("},{"line_number":305,"context_line":"                    host\u003dscheduler_hint.pop(\u0027host\u0027),"},{"line_number":306,"context_line":"                    node\u003dscheduler_hint.pop(\u0027node\u0027))"},{"line_number":307,"context_line":"        else:"},{"line_number":308,"context_line":"            # NOTE(sbauza): Resizes means new flavor, so we need to update the"},{"line_number":309,"context_line":"            # original RequestSpec object for make sure the scheduler verifies"}],"source_content_type":"text/x-python","patch_set":63,"id":"1f1a1f67_ddb1f245","line":306,"range":{"start_line":304,"start_character":16,"end_line":306,"end_character":52},"updated":"2017-07-19 16:24:14.000000000","message":"The requested_destination also needs to have the cell mapping set on it, I\u0027m not sure if that happens later or not. The point being, we can\u0027t migrate to another cell.\n\n(later)\n\nThe cell gets set on the requested_destination in the migrate task:\n\nhttps://github.com/openstack/nova/blob/master/nova/conductor/tasks/migrate.py#L65","commit_id":"40e7f7e875cde63be32ad1572c7074285ff67314"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"152379a613caac49fc01a55c9a6e7255409c4ffb","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            # Set a target host to \u0027requested_destination\u0027"},{"line_number":302,"context_line":"            # in the case that a target host is specified and force is false."},{"line_number":303,"context_line":"            if \u0027node\u0027 in scheduler_hint:"},{"line_number":304,"context_line":"                request_spec.requested_destination \u003d objects.Destination("},{"line_number":305,"context_line":"                    host\u003dscheduler_hint.pop(\u0027host\u0027),"},{"line_number":306,"context_line":"                    node\u003dscheduler_hint.pop(\u0027node\u0027))"},{"line_number":307,"context_line":"        else:"},{"line_number":308,"context_line":"            # NOTE(sbauza): Resizes means new flavor, so we need to update the"},{"line_number":309,"context_line":"            # original RequestSpec object for make sure the scheduler verifies"}],"source_content_type":"text/x-python","patch_set":63,"id":"1f1a1f67_653ea8db","line":306,"range":{"start_line":304,"start_character":16,"end_line":306,"end_character":52},"in_reply_to":"1f1a1f67_ddb1f245","updated":"2017-07-20 13:35:37.000000000","message":"It is done later.\nIn line 322.\n\nhttps://review.openstack.org/#/c/408955/63/nova/conductor/tasks/migrate.py@76","commit_id":"40e7f7e875cde63be32ad1572c7074285ff67314"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5afe9ff37cab7992df1b1c7a5e561bb710d5ad03","unresolved":false,"context_lines":[{"line_number":298,"context_line":"                flavor, instance.numa_topology, instance.pci_requests,"},{"line_number":299,"context_line":"                scheduler_hint[\u0027filter_properties\u0027], None,"},{"line_number":300,"context_line":"                instance.availability_zone)"},{"line_number":301,"context_line":"            # Set a target host to \u0027requested_destination\u0027"},{"line_number":302,"context_line":"            # in the case that a target host is specified and force is false."},{"line_number":303,"context_line":"            if \u0027node\u0027 in scheduler_hint:"},{"line_number":304,"context_line":"                request_spec.requested_destination \u003d objects.Destination("},{"line_number":305,"context_line":"                    host\u003dscheduler_hint.pop(\u0027host\u0027),"},{"line_number":306,"context_line":"                    node\u003dscheduler_hint.pop(\u0027node\u0027))"},{"line_number":307,"context_line":"        else:"},{"line_number":308,"context_line":"            # NOTE(sbauza): Resizes means new flavor, so we need to update the"},{"line_number":309,"context_line":"            # original RequestSpec object for make sure the scheduler verifies"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_3ac5738f","line":306,"range":{"start_line":301,"start_character":12,"end_line":306,"end_character":52},"updated":"2017-07-23 13:19:38.000000000","message":"OK I think this is what I was asking about in the API code. It\u0027s confusing me that we do some request spec mangling in the API code and then some in the conductor code. I\u0027d prefer that we just handle it in one place, but the issue you\u0027d have in conductor is you don\u0027t have the force flag...so basically you have to adjust the request spec in the API because of implicit tightly coupled knowledge of how the conductor code is going to work, which makes me said - I really dislike tight coupling between services like this, it makes debugging harder than it should be. Since we\u0027re doing all of the other request spec logic already in the API, can we just do this there too?\n\n(later)\n\nOK I\u0027ve been asking how you know if host and force is specified in the API, and now I realize force is assumed to be True if the node is set in the scheduler hint, otherwise force is assumed to be False. And a host is specified as long as the scheduler hint has \u0027host\u0027 set in it.\n\nI really dislike how host/node in the scheduler hint dict is used to tell in conductor if the force flag was set in the API.\n\nAlso, in this block of code where a new request spec is being created, the Destination in the request spec has no cell restriction set in it, and it won\u0027t get set here either:\n\nhttps://review.openstack.org/#/c/408955/64/nova/conductor/tasks/migrate.py@72\n\nThis is why I keep asking that we try and centralize this stuff in the API or in conductor, and at this point it seems cleaner to centralize it in conductor where we\u0027re already dealing with the cell mapping stuff. But that would also mean passing the host/force flags to conductor.\n\nMaybe I\u0027m missing something, but this is just really complicated and tightly coupled in non-obvious ways, and I think it\u0027s very easy to miss something, like what I just pointed out with a cell destination not being set here.","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"6e61649e23510fa48e8ccb0e8ffa9f78c8b23b71","unresolved":false,"context_lines":[{"line_number":298,"context_line":"                flavor, instance.numa_topology, instance.pci_requests,"},{"line_number":299,"context_line":"                scheduler_hint[\u0027filter_properties\u0027], None,"},{"line_number":300,"context_line":"                instance.availability_zone)"},{"line_number":301,"context_line":"            # Set a target host to \u0027requested_destination\u0027"},{"line_number":302,"context_line":"            # in the case that a target host is specified and force is false."},{"line_number":303,"context_line":"            if \u0027node\u0027 in scheduler_hint:"},{"line_number":304,"context_line":"                request_spec.requested_destination \u003d objects.Destination("},{"line_number":305,"context_line":"                    host\u003dscheduler_hint.pop(\u0027host\u0027),"},{"line_number":306,"context_line":"                    node\u003dscheduler_hint.pop(\u0027node\u0027))"},{"line_number":307,"context_line":"        else:"},{"line_number":308,"context_line":"            # NOTE(sbauza): Resizes means new flavor, so we need to update the"},{"line_number":309,"context_line":"            # original RequestSpec object for make sure the scheduler verifies"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_7df64792","line":306,"range":{"start_line":301,"start_character":12,"end_line":306,"end_character":52},"in_reply_to":"ff346bd7_02947636","updated":"2017-07-24 10:13:50.000000000","message":"In live migration case, \u0027host\u0027 is set in scheduler_hint.\n\nhttps://github.com/openstack/nova/blob/d2dbd4f5475fda95deba99809cfc085c7e44e1c5/nova/conductor/api.py#L103","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"93cb8b5018b7dfeda7bf46f75e6690b847f6242b","unresolved":false,"context_lines":[{"line_number":298,"context_line":"                flavor, instance.numa_topology, instance.pci_requests,"},{"line_number":299,"context_line":"                scheduler_hint[\u0027filter_properties\u0027], None,"},{"line_number":300,"context_line":"                instance.availability_zone)"},{"line_number":301,"context_line":"            # Set a target host to \u0027requested_destination\u0027"},{"line_number":302,"context_line":"            # in the case that a target host is specified and force is false."},{"line_number":303,"context_line":"            if \u0027node\u0027 in scheduler_hint:"},{"line_number":304,"context_line":"                request_spec.requested_destination \u003d objects.Destination("},{"line_number":305,"context_line":"                    host\u003dscheduler_hint.pop(\u0027host\u0027),"},{"line_number":306,"context_line":"                    node\u003dscheduler_hint.pop(\u0027node\u0027))"},{"line_number":307,"context_line":"        else:"},{"line_number":308,"context_line":"            # NOTE(sbauza): Resizes means new flavor, so we need to update the"},{"line_number":309,"context_line":"            # original RequestSpec object for make sure the scheduler verifies"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_02947636","line":306,"range":{"start_line":301,"start_character":12,"end_line":306,"end_character":52},"in_reply_to":"ff346bd7_1114ca9f","updated":"2017-07-24 09:35:14.000000000","message":"For live-migrate and evacuations, we didn\u0027t modified the scheduler_hinsts dict. Rather we were just passing a Requestspec object as a RPC attribute which was either having a requested_destination field set or not. \nThat way, it was clear that knowing whether host and/or force are set are just for the API, and the conductor only looks at the RequestSpec, that\u0027s it.","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"5813b086a994a7a802eba2ca727359cc12a733f8","unresolved":false,"context_lines":[{"line_number":298,"context_line":"                flavor, instance.numa_topology, instance.pci_requests,"},{"line_number":299,"context_line":"                scheduler_hint[\u0027filter_properties\u0027], None,"},{"line_number":300,"context_line":"                instance.availability_zone)"},{"line_number":301,"context_line":"            # Set a target host to \u0027requested_destination\u0027"},{"line_number":302,"context_line":"            # in the case that a target host is specified and force is false."},{"line_number":303,"context_line":"            if \u0027node\u0027 in scheduler_hint:"},{"line_number":304,"context_line":"                request_spec.requested_destination \u003d objects.Destination("},{"line_number":305,"context_line":"                    host\u003dscheduler_hint.pop(\u0027host\u0027),"},{"line_number":306,"context_line":"                    node\u003dscheduler_hint.pop(\u0027node\u0027))"},{"line_number":307,"context_line":"        else:"},{"line_number":308,"context_line":"            # NOTE(sbauza): Resizes means new flavor, so we need to update the"},{"line_number":309,"context_line":"            # original RequestSpec object for make sure the scheduler verifies"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_1114ca9f","line":306,"range":{"start_line":301,"start_character":12,"end_line":306,"end_character":52},"in_reply_to":"ff346bd7_3ac5738f","updated":"2017-07-24 07:57:25.000000000","message":"\u003e This is why I keep asking that we try and centralize this stuff in the API or in conductor\n\nI move this stuff to the API because it is not necessary to pass the node information to the conductor.\nDone.\n\n\u003e I just pointed out with a cell destination not being set here.\n\nThe cell destination will be set in nova/conductor/tasks/migrate.py.\nSo it is no problem.","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5afe9ff37cab7992df1b1c7a5e561bb710d5ad03","unresolved":false,"context_lines":[{"line_number":310,"context_line":"            # the right one and not the original flavor"},{"line_number":311,"context_line":"            request_spec.flavor \u003d flavor"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"        host_name \u003d scheduler_hint.pop(\u0027host\u0027, None)"},{"line_number":314,"context_line":"        task \u003d self._build_cold_migrate_task(context, instance, flavor,"},{"line_number":315,"context_line":"                                             request_spec,"},{"line_number":316,"context_line":"                                             reservations, clean_shutdown,"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_dabb070c","line":313,"range":{"start_line":313,"start_character":8,"end_line":313,"end_character":52},"updated":"2017-07-23 13:19:38.000000000","message":"So this is the way we avoid an RPC version change on the conductor RPC API, by setting things in the scheduler hints dict in the compute API and then checking for them in conductor. This is another example of sneaky tight coupling that is not obvious and hard to debug later. Why not just pass the host over the RPC API interface and default it to None?","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"5813b086a994a7a802eba2ca727359cc12a733f8","unresolved":false,"context_lines":[{"line_number":310,"context_line":"            # the right one and not the original flavor"},{"line_number":311,"context_line":"            request_spec.flavor \u003d flavor"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"        host_name \u003d scheduler_hint.pop(\u0027host\u0027, None)"},{"line_number":314,"context_line":"        task \u003d self._build_cold_migrate_task(context, instance, flavor,"},{"line_number":315,"context_line":"                                             request_spec,"},{"line_number":316,"context_line":"                                             reservations, clean_shutdown,"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_ac7a4685","line":313,"range":{"start_line":313,"start_character":8,"end_line":313,"end_character":52},"in_reply_to":"ff346bd7_dabb070c","updated":"2017-07-24 07:57:25.000000000","message":"It is to avoid changing the method signature related to cell v1 (in nova/cells/*).\nThe code related cell v1 code is frozen (cannot be modified/not to be modified), right?","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3213e96eee089f9f4fa69080341f788353d80be9","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        if not request_spec:"},{"line_number":292,"context_line":"            # This case (request_spec is None) is for nova-api of Ocata."},{"line_number":293,"context_line":"            image \u003d utils.get_image_from_system_metadata("},{"line_number":294,"context_line":"                instance.system_metadata)"},{"line_number":295,"context_line":"            # Make sure we hydrate a new RequestSpec object with the new flavor"},{"line_number":296,"context_line":"            # and not the nested one from the instance"},{"line_number":297,"context_line":"            request_spec \u003d objects.RequestSpec.from_components("}],"source_content_type":"text/x-python","patch_set":67,"id":"ff346bd7_657773d6","line":294,"updated":"2017-07-26 13:00:06.000000000","message":"see, maybe it\u0027s not needed to support your feature for cells v1 ?","commit_id":"1073e67b275e7aeb2521f85f68bffcc0669bde80"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"b0e69bb27c915e30d4a021bf2a47889668b29ba6","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        if not request_spec:"},{"line_number":292,"context_line":"            # This case (request_spec is None) is for nova-api of Ocata."},{"line_number":293,"context_line":"            image \u003d utils.get_image_from_system_metadata("},{"line_number":294,"context_line":"                instance.system_metadata)"},{"line_number":295,"context_line":"            # Make sure we hydrate a new RequestSpec object with the new flavor"},{"line_number":296,"context_line":"            # and not the nested one from the instance"},{"line_number":297,"context_line":"            request_spec \u003d objects.RequestSpec.from_components("}],"source_content_type":"text/x-python","patch_set":67,"id":"ff346bd7_c89cf30f","line":294,"in_reply_to":"ff346bd7_657773d6","updated":"2017-07-26 16:25:48.000000000","message":"I understand it.\nBut \"not request_spec\" case is still needed for reschedule case as noted in line 288-290.","commit_id":"1073e67b275e7aeb2521f85f68bffcc0669bde80"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3213e96eee089f9f4fa69080341f788353d80be9","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            # the right one and not the original flavor"},{"line_number":305,"context_line":"            request_spec.flavor \u003d flavor"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        # Get the target host from \u0027force_hosts\u0027 in the RequestSpec"},{"line_number":308,"context_line":"        if \u0027host_to_migrate\u0027 in request_spec and request_spec.host_to_migrate:"},{"line_number":309,"context_line":"            host_name \u003d request_spec.host_to_migrate"},{"line_number":310,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":67,"id":"ff346bd7_4520efb0","line":307,"range":{"start_line":307,"start_character":10,"end_line":307,"end_character":67},"updated":"2017-07-26 13:00:06.000000000","message":"no, RequestSpec.force_hosts is a different field that is still for calling the scheduler, just not calling filters.","commit_id":"1073e67b275e7aeb2521f85f68bffcc0669bde80"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"b0e69bb27c915e30d4a021bf2a47889668b29ba6","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            # the right one and not the original flavor"},{"line_number":305,"context_line":"            request_spec.flavor \u003d flavor"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        # Get the target host from \u0027force_hosts\u0027 in the RequestSpec"},{"line_number":308,"context_line":"        if \u0027host_to_migrate\u0027 in request_spec and request_spec.host_to_migrate:"},{"line_number":309,"context_line":"            host_name \u003d request_spec.host_to_migrate"},{"line_number":310,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":67,"id":"ff346bd7_8bcdc567","line":307,"range":{"start_line":307,"start_character":10,"end_line":307,"end_character":67},"in_reply_to":"ff346bd7_4520efb0","updated":"2017-07-26 16:25:48.000000000","message":"I removed lie 307-311 because \u0027forced_destination\u0027 is set to the request spec object and it is passed to MigrationTask by setting it in the request spec object.","commit_id":"1073e67b275e7aeb2521f85f68bffcc0669bde80"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3213e96eee089f9f4fa69080341f788353d80be9","unresolved":false,"context_lines":[{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        # Get the target host from \u0027force_hosts\u0027 in the RequestSpec"},{"line_number":308,"context_line":"        if \u0027host_to_migrate\u0027 in request_spec and request_spec.host_to_migrate:"},{"line_number":309,"context_line":"            host_name \u003d request_spec.host_to_migrate"},{"line_number":310,"context_line":"        else:"},{"line_number":311,"context_line":"            host_name \u003d None"},{"line_number":312,"context_line":""}],"source_content_type":"text/x-python","patch_set":67,"id":"ff346bd7_c54f3f90","line":309,"range":{"start_line":309,"start_character":37,"end_line":309,"end_character":52},"updated":"2017-07-26 13:00:06.000000000","message":"maybe \u0027forced_destinations\u0027 nope ?","commit_id":"1073e67b275e7aeb2521f85f68bffcc0669bde80"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"b0e69bb27c915e30d4a021bf2a47889668b29ba6","unresolved":false,"context_lines":[{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        # Get the target host from \u0027force_hosts\u0027 in the RequestSpec"},{"line_number":308,"context_line":"        if \u0027host_to_migrate\u0027 in request_spec and request_spec.host_to_migrate:"},{"line_number":309,"context_line":"            host_name \u003d request_spec.host_to_migrate"},{"line_number":310,"context_line":"        else:"},{"line_number":311,"context_line":"            host_name \u003d None"},{"line_number":312,"context_line":""}],"source_content_type":"text/x-python","patch_set":67,"id":"ff346bd7_4bc35d39","line":309,"range":{"start_line":309,"start_character":37,"end_line":309,"end_character":52},"in_reply_to":"ff346bd7_c54f3f90","updated":"2017-07-26 16:25:48.000000000","message":"ditto","commit_id":"1073e67b275e7aeb2521f85f68bffcc0669bde80"}],"nova/conductor/tasks/migrate.py":[{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"64ef80e8f54720d8d5733f58bc896fc1fa1a5dc4","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        scheduler_utils.populate_retry(legacy_props,"},{"line_number":46,"context_line":"                                       self.instance.uuid)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        # TODO(sbauza): Remove that RequestSpec rehydratation once"},{"line_number":49,"context_line":"        # scheduler.utils methods use directly the NovaObject."},{"line_number":50,"context_line":"        self.request_spec \u003d objects.RequestSpec.from_components("},{"line_number":51,"context_line":"            self.context, self.instance.uuid, image,"},{"line_number":52,"context_line":"            self.flavor, self.instance.numa_topology,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5201f7_e80c1e3d","side":"PARENT","line":49,"range":{"start_line":48,"start_character":8,"end_line":49,"end_character":62},"updated":"2017-01-05 10:54:47.000000000","message":"This seems wrong to me. You removed this TODO and request_spec rehydration, but scheduler_utils still accept dict instead of NovaObject. Am I missing something there?","commit_id":"1bcf3b553ae8665dc6308d1bd11898efb75d3a41"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"ce15a1e8d3c0caca73cdc0c41b17f9be98ebeadf","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        scheduler_utils.populate_retry(legacy_props,"},{"line_number":46,"context_line":"                                       self.instance.uuid)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        # TODO(sbauza): Remove that RequestSpec rehydratation once"},{"line_number":49,"context_line":"        # scheduler.utils methods use directly the NovaObject."},{"line_number":50,"context_line":"        self.request_spec \u003d objects.RequestSpec.from_components("},{"line_number":51,"context_line":"            self.context, self.instance.uuid, image,"},{"line_number":52,"context_line":"            self.flavor, self.instance.numa_topology,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5201f7_7b3293a8","side":"PARENT","line":49,"range":{"start_line":48,"start_character":8,"end_line":49,"end_character":62},"in_reply_to":"ba5201f7_e80c1e3d","updated":"2017-01-06 05:46:25.000000000","message":"I undid this code in PS9.\nAnd requestted_destination is set here in PS9.\nDone.","commit_id":"1bcf3b553ae8665dc6308d1bd11898efb75d3a41"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"f69224e236bd1402d0dfb3b244447e8b95f1c5af","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        if self.destination:"},{"line_number":48,"context_line":"            host \u003d self.destination"},{"line_number":49,"context_line":"            node \u003d None"},{"line_number":50,"context_line":"            # make sure that reschdule will not occur"},{"line_number":51,"context_line":"            legacy_props.pop(\u0027retry\u0027, None)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"            service \u003d objects.Service.get_by_compute_host(self.context, host)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba5201f7_ea558bfa","line":50,"range":{"start_line":50,"start_character":29,"end_line":50,"end_character":38},"updated":"2017-01-09 11:40:30.000000000","message":"nit: s/reschdule/reschedule","commit_id":"b62f26b288949fdb7d6741d79b7e9153f47125eb"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"46992d709a5fef0ad00866ccb7d9d414d555c120","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        if self.destination:"},{"line_number":48,"context_line":"            host \u003d self.destination"},{"line_number":49,"context_line":"            node \u003d None"},{"line_number":50,"context_line":"            # make sure that reschdule will not occur"},{"line_number":51,"context_line":"            legacy_props.pop(\u0027retry\u0027, None)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"            service \u003d objects.Service.get_by_compute_host(self.context, host)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_bd07fd7f","line":50,"range":{"start_line":50,"start_character":29,"end_line":50,"end_character":38},"in_reply_to":"ba5201f7_ea558bfa","updated":"2017-01-16 02:33:50.000000000","message":"Done","commit_id":"b62f26b288949fdb7d6741d79b7e9153f47125eb"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"3b5b9bf30ba4d8aa5df074b387e4a39a1dda0b99","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"            service \u003d objects.Service.get_by_compute_host(self.context, host)"},{"line_number":54,"context_line":"            if not self.servicegroup_api.service_is_up(service):"},{"line_number":55,"context_line":"                raise exception.ComputeServiceUnavailable(host\u003dhost)"},{"line_number":56,"context_line":"        else:"},{"line_number":57,"context_line":"            scheduler_utils.setup_instance_group(self.context, legacy_spec,"},{"line_number":58,"context_line":"                                                 legacy_props)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba5201f7_01aed184","line":55,"updated":"2017-01-11 09:03:36.000000000","message":"why we don\u0027t check this early?","commit_id":"b62f26b288949fdb7d6741d79b7e9153f47125eb"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"46992d709a5fef0ad00866ccb7d9d414d555c120","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"            service \u003d objects.Service.get_by_compute_host(self.context, host)"},{"line_number":54,"context_line":"            if not self.servicegroup_api.service_is_up(service):"},{"line_number":55,"context_line":"                raise exception.ComputeServiceUnavailable(host\u003dhost)"},{"line_number":56,"context_line":"        else:"},{"line_number":57,"context_line":"            scheduler_utils.setup_instance_group(self.context, legacy_spec,"},{"line_number":58,"context_line":"                                                 legacy_props)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_c36ea6c8","line":55,"in_reply_to":"ba5201f7_01aed184","updated":"2017-01-16 02:33:50.000000000","message":"Because of consistency with live migration.\nSee the following code.\n\nhttps://github.com/openstack/nova/blob/46b8cdfd0096c5d673209da303795e06cfbb2529/nova/conductor/tasks/live_migrate.py#L86-L89","commit_id":"b62f26b288949fdb7d6741d79b7e9153f47125eb"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"04fa996765c084e9fbd927c68edccfe1105d6c69","unresolved":false,"context_lines":[{"line_number":50,"context_line":"            # make sure that reschedule will not occur"},{"line_number":51,"context_line":"            legacy_props.pop(\u0027retry\u0027, None)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"            service \u003d objects.Service.get_by_compute_host(self.context, host)"},{"line_number":54,"context_line":"            if not self.servicegroup_api.service_is_up(service):"},{"line_number":55,"context_line":"                raise exception.ComputeServiceUnavailable(host\u003dhost)"},{"line_number":56,"context_line":"        else:"},{"line_number":57,"context_line":"            scheduler_utils.setup_instance_group(self.context, legacy_spec,"},{"line_number":58,"context_line":"                                                 legacy_props)"}],"source_content_type":"text/x-python","patch_set":33,"id":"1a1ced50_aacb1452","line":55,"range":{"start_line":53,"start_character":0,"end_line":55,"end_character":68},"updated":"2017-03-21 01:17:56.000000000","message":"Can we move this check into the part of nova/compute/api.py ?\nevacuate() does at the module it and this case is only for specified host case. So the code would be readable I guess.","commit_id":"00615e0d4beffd9080b0d601e11f85442039d661"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"2b49e64762f7af89405a24eefe247ce5308df574","unresolved":false,"context_lines":[{"line_number":50,"context_line":"            # make sure that reschedule will not occur"},{"line_number":51,"context_line":"            legacy_props.pop(\u0027retry\u0027, None)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"            service \u003d objects.Service.get_by_compute_host(self.context, host)"},{"line_number":54,"context_line":"            if not self.servicegroup_api.service_is_up(service):"},{"line_number":55,"context_line":"                raise exception.ComputeServiceUnavailable(host\u003dhost)"},{"line_number":56,"context_line":"        else:"},{"line_number":57,"context_line":"            scheduler_utils.setup_instance_group(self.context, legacy_spec,"},{"line_number":58,"context_line":"                                                 legacy_props)"}],"source_content_type":"text/x-python","patch_set":33,"id":"ffe62b97_11afe8e3","line":55,"range":{"start_line":53,"start_character":0,"end_line":55,"end_character":68},"in_reply_to":"1a1ced50_aacb1452","updated":"2017-03-27 04:56:14.000000000","message":"Done","commit_id":"00615e0d4beffd9080b0d601e11f85442039d661"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"3de1074b598e63ecb5285c9b70e2bcc60e604394","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        scheduler_utils.populate_filter_properties(legacy_props,"},{"line_number":77,"context_line":"                                                   host_state)"},{"line_number":78,"context_line":"        # context is not serializable"},{"line_number":79,"context_line":"        legacy_props.pop(\u0027context\u0027, None)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        (host, node) \u003d (host_state[\u0027host\u0027], host_state[\u0027nodename\u0027])"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"5ff73747_09d97520","side":"PARENT","line":79,"range":{"start_line":78,"start_character":0,"end_line":79,"end_character":41},"updated":"2017-05-01 04:58:33.000000000","message":"Here.","commit_id":"6103ec7c113121866344cdca2fbbbf7b80dfa975"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cc85fb50457681e27eaa8772dfe5358e4026cc49","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            host \u003d self.destination"},{"line_number":50,"context_line":"            node \u003d None"},{"line_number":51,"context_line":"            # make sure that reschedule will not occur"},{"line_number":52,"context_line":"            legacy_props.pop(\u0027retry\u0027, None)"},{"line_number":53,"context_line":"        else:"},{"line_number":54,"context_line":"            scheduler_utils.setup_instance_group(self.context, legacy_spec,"},{"line_number":55,"context_line":"                                                 legacy_props)"}],"source_content_type":"text/x-python","patch_set":39,"id":"5ff73747_fd017a6b","line":52,"updated":"2017-04-28 18:50:11.000000000","message":"This skips the same-cell validation that is now below and was here before. Even if they specify a host, you cannot allow them to specify one that is in a different cell.","commit_id":"d94961b81fad7be83cf870a382b2090452ad3d25"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"3de1074b598e63ecb5285c9b70e2bcc60e604394","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            host \u003d self.destination"},{"line_number":50,"context_line":"            node \u003d None"},{"line_number":51,"context_line":"            # make sure that reschedule will not occur"},{"line_number":52,"context_line":"            legacy_props.pop(\u0027retry\u0027, None)"},{"line_number":53,"context_line":"        else:"},{"line_number":54,"context_line":"            scheduler_utils.setup_instance_group(self.context, legacy_spec,"},{"line_number":55,"context_line":"                                                 legacy_props)"}],"source_content_type":"text/x-python","patch_set":39,"id":"5ff73747_e9be49ac","line":52,"in_reply_to":"5ff73747_fd017a6b","updated":"2017-05-01 04:58:33.000000000","message":"I will add the same cell check (the cell where the instance is \u003d\u003d the cell where the destination host is) in the case that the destination host is specified and force is True.","commit_id":"d94961b81fad7be83cf870a382b2090452ad3d25"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e2dd2214f83cc763a8f5ed068f915b7c50d1b004","unresolved":false,"context_lines":[{"line_number":90,"context_line":"                self.context, host))"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        # context is not serializable"},{"line_number":93,"context_line":"        legacy_props.pop(\u0027context\u0027, None)"},{"line_number":94,"context_line":"        # FIXME(sbauza): Serialize/Unserialize the legacy dict because of"},{"line_number":95,"context_line":"        # oslo.messaging #1529084 to transform datetime values into strings."},{"line_number":96,"context_line":"        # tl;dr: datetimes in dicts are not accepted as correct values by the"}],"source_content_type":"text/x-python","patch_set":39,"id":"bff0334d_2aa5bcb5","line":93,"updated":"2017-04-07 16:30:07.000000000","message":"Why is this here?","commit_id":"d94961b81fad7be83cf870a382b2090452ad3d25"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"3de1074b598e63ecb5285c9b70e2bcc60e604394","unresolved":false,"context_lines":[{"line_number":90,"context_line":"                self.context, host))"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        # context is not serializable"},{"line_number":93,"context_line":"        legacy_props.pop(\u0027context\u0027, None)"},{"line_number":94,"context_line":"        # FIXME(sbauza): Serialize/Unserialize the legacy dict because of"},{"line_number":95,"context_line":"        # oslo.messaging #1529084 to transform datetime values into strings."},{"line_number":96,"context_line":"        # tl;dr: datetimes in dicts are not accepted as correct values by the"}],"source_content_type":"text/x-python","patch_set":39,"id":"5ff73747_29ce7159","line":93,"in_reply_to":"5ff73747_1db1c6e1","updated":"2017-05-01 04:58:33.000000000","message":"The code has already been there before this change.\nSee line 79 in the old code.","commit_id":"d94961b81fad7be83cf870a382b2090452ad3d25"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"27be48238d0b11f07d20ab024900cc7af4641994","unresolved":false,"context_lines":[{"line_number":90,"context_line":"                self.context, host))"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        # context is not serializable"},{"line_number":93,"context_line":"        legacy_props.pop(\u0027context\u0027, None)"},{"line_number":94,"context_line":"        # FIXME(sbauza): Serialize/Unserialize the legacy dict because of"},{"line_number":95,"context_line":"        # oslo.messaging #1529084 to transform datetime values into strings."},{"line_number":96,"context_line":"        # tl;dr: datetimes in dicts are not accepted as correct values by the"}],"source_content_type":"text/x-python","patch_set":39,"id":"bff0334d_e1da3949","line":93,"in_reply_to":"bff0334d_2aa5bcb5","updated":"2017-04-10 11:08:34.000000000","message":"The context is not serializable.\nSo it should be removed before RPC call.\nRemoving the context should be done in both the case host is specified and the case the host is not specified (including host is not None and force\u003dfalse case).","commit_id":"d94961b81fad7be83cf870a382b2090452ad3d25"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cc85fb50457681e27eaa8772dfe5358e4026cc49","unresolved":false,"context_lines":[{"line_number":90,"context_line":"                self.context, host))"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        # context is not serializable"},{"line_number":93,"context_line":"        legacy_props.pop(\u0027context\u0027, None)"},{"line_number":94,"context_line":"        # FIXME(sbauza): Serialize/Unserialize the legacy dict because of"},{"line_number":95,"context_line":"        # oslo.messaging #1529084 to transform datetime values into strings."},{"line_number":96,"context_line":"        # tl;dr: datetimes in dicts are not accepted as correct values by the"}],"source_content_type":"text/x-python","patch_set":39,"id":"5ff73747_1db1c6e1","line":93,"in_reply_to":"bff0334d_e1da3949","updated":"2017-04-28 18:50:11.000000000","message":"But what change have you made that requires this in this patch? Is this just cleanup that should be in a separate patch?","commit_id":"d94961b81fad7be83cf870a382b2090452ad3d25"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7b6ee99e48cde77c4b8dda8bc1bbd0cf3b772161","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            host \u003d self.destination"},{"line_number":50,"context_line":"            node \u003d None"},{"line_number":51,"context_line":"            # make sure that reschedule will not occur"},{"line_number":52,"context_line":"            legacy_props.pop(\u0027retry\u0027, None)"},{"line_number":53,"context_line":"        else:"},{"line_number":54,"context_line":"            scheduler_utils.setup_instance_group(self.context, legacy_spec,"},{"line_number":55,"context_line":"                                                 legacy_props)"}],"source_content_type":"text/x-python","patch_set":43,"id":"5ff73747_bd3c122f","line":52,"updated":"2017-04-28 18:50:54.000000000","message":"Same comment here.","commit_id":"960c5f87c4cd6e9c25140b6ca35601f7101cf2d1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7b6ee99e48cde77c4b8dda8bc1bbd0cf3b772161","unresolved":false,"context_lines":[{"line_number":90,"context_line":"                self.context, host))"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        # context is not serializable"},{"line_number":93,"context_line":"        legacy_props.pop(\u0027context\u0027, None)"},{"line_number":94,"context_line":"        # FIXME(sbauza): Serialize/Unserialize the legacy dict because of"},{"line_number":95,"context_line":"        # oslo.messaging #1529084 to transform datetime values into strings."},{"line_number":96,"context_line":"        # tl;dr: datetimes in dicts are not accepted as correct values by the"}],"source_content_type":"text/x-python","patch_set":43,"id":"5ff73747_7d420aad","line":93,"updated":"2017-04-28 18:50:54.000000000","message":"Same concern here.","commit_id":"960c5f87c4cd6e9c25140b6ca35601f7101cf2d1"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b11b2264c8c87353a66a37222f1ceda10d7277a5","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        if self.destination:"},{"line_number":49,"context_line":"            host \u003d self.destination"},{"line_number":50,"context_line":"            node \u003d None"},{"line_number":51,"context_line":"            # make sure that reschedule will not occur"},{"line_number":52,"context_line":"            legacy_props.pop(\u0027retry\u0027, None)"},{"line_number":53,"context_line":"        else:"},{"line_number":54,"context_line":"            scheduler_utils.setup_instance_group(self.context, legacy_spec,"}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_028439b0","line":51,"updated":"2017-06-13 15:28:12.000000000","message":"Huh, that\u0027s a big deal but I understand it. You should possibly explain more in a comment *why* we don\u0027t want to trigger reschedules by the compute service in case the instance has some problems when resizing on the compute side.\n\nThat\u0027s pretty important because I guess some operators could have concerns with that, given they would expect to see rescheduling in case of resize problems like we already have.\nOf course, the reason why we would disable retries would be because the final destination for the resize could be something different from what the user asked and forced to.","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"799a9239237ec2f76f7ceedc21296b98bceb64b8","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        if self.destination:"},{"line_number":49,"context_line":"            host \u003d self.destination"},{"line_number":50,"context_line":"            node \u003d None"},{"line_number":51,"context_line":"            # make sure that reschedule will not occur"},{"line_number":52,"context_line":"            legacy_props.pop(\u0027retry\u0027, None)"},{"line_number":53,"context_line":"        else:"},{"line_number":54,"context_line":"            scheduler_utils.setup_instance_group(self.context, legacy_spec,"}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_ee96913e","line":51,"in_reply_to":"7f231b9d_028439b0","updated":"2017-06-15 06:41:06.000000000","message":"Done","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b11b2264c8c87353a66a37222f1ceda10d7277a5","unresolved":false,"context_lines":[{"line_number":50,"context_line":"            node \u003d None"},{"line_number":51,"context_line":"            # make sure that reschedule will not occur"},{"line_number":52,"context_line":"            legacy_props.pop(\u0027retry\u0027, None)"},{"line_number":53,"context_line":"        else:"},{"line_number":54,"context_line":"            scheduler_utils.setup_instance_group(self.context, legacy_spec,"},{"line_number":55,"context_line":"                                                 legacy_props)"},{"line_number":56,"context_line":"            scheduler_utils.populate_retry(legacy_props,"}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_a24c659e","line":53,"updated":"2017-06-13 15:28:12.000000000","message":"The above point remains. What if a user provides a destination (without forcing to it) ? Should we expect to trigger reschedulers like we did in the past ?\nI tend to say no also to reschedules (after all, the user restricted the possibilities to only one specific compute), but then you also need to disable the retry logic here.","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"799a9239237ec2f76f7ceedc21296b98bceb64b8","unresolved":false,"context_lines":[{"line_number":50,"context_line":"            node \u003d None"},{"line_number":51,"context_line":"            # make sure that reschedule will not occur"},{"line_number":52,"context_line":"            legacy_props.pop(\u0027retry\u0027, None)"},{"line_number":53,"context_line":"        else:"},{"line_number":54,"context_line":"            scheduler_utils.setup_instance_group(self.context, legacy_spec,"},{"line_number":55,"context_line":"                                                 legacy_props)"},{"line_number":56,"context_line":"            scheduler_utils.populate_retry(legacy_props,"}],"source_content_type":"text/x-python","patch_set":53,"id":"7f231b9d_ce9bd563","line":53,"in_reply_to":"7f231b9d_a24c659e","updated":"2017-06-15 06:41:06.000000000","message":"Done","commit_id":"56cd0884efe2b659d54b9c5259f916545f2fe44f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a54cf93105cb0ad9e86b1fda3fa504707e80ae4d","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                  instance\u003dself.instance)"},{"line_number":63,"context_line":"        if (\u0027requested_destination\u0027 in self.request_spec and"},{"line_number":64,"context_line":"                self.request_spec.requested_destination):"},{"line_number":65,"context_line":"            self.request_spec.requested_destination.cell \u003d ("},{"line_number":66,"context_line":"                instance_mapping.cell_mapping)"},{"line_number":67,"context_line":"        else:"},{"line_number":68,"context_line":"            self.request_spec.requested_destination \u003d objects.Destination("},{"line_number":69,"context_line":"                cell\u003dinstance_mapping.cell_mapping)"}],"source_content_type":"text/x-python","patch_set":63,"id":"1f1a1f67_3dd22629","side":"PARENT","line":66,"range":{"start_line":65,"start_character":12,"end_line":66,"end_character":46},"updated":"2017-07-19 16:24:14.000000000","message":"This is what I was talking about before.","commit_id":"776df5c759f1fc0ceb80fa7294b1c891817bb504"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a54cf93105cb0ad9e86b1fda3fa504707e80ae4d","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        legacy_spec \u003d self.request_spec.to_legacy_request_spec_dict()"},{"line_number":46,"context_line":"        legacy_props \u003d self.request_spec.to_legacy_filter_properties_dict()"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        if self.destination:"},{"line_number":49,"context_line":"            host \u003d self.destination"},{"line_number":50,"context_line":"            node \u003d None"},{"line_number":51,"context_line":"            # NOTE(takashin): In the case that the target host is specified and"},{"line_number":52,"context_line":"            # the force flag is true, if the cold migration is failed,"},{"line_number":53,"context_line":"            # it is not necessary to retry the cold migration to the same host."},{"line_number":54,"context_line":"            # So make sure that reschedule will not occur."},{"line_number":55,"context_line":"            legacy_props.pop(\u0027retry\u0027, None)"},{"line_number":56,"context_line":"        else:"},{"line_number":57,"context_line":"            scheduler_utils.setup_instance_group(self.context,"},{"line_number":58,"context_line":"                                                 self.request_spec)"}],"source_content_type":"text/x-python","patch_set":63,"id":"1f1a1f67_7d82de01","line":55,"range":{"start_line":48,"start_character":8,"end_line":55,"end_character":43},"updated":"2017-07-19 16:24:14.000000000","message":"This bypasses the restriction that the instance is migrated to a host in the same cell - that\u0027s going to have to be checked somewhere. It could happen in the API I guess.","commit_id":"40e7f7e875cde63be32ad1572c7074285ff67314"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"152379a613caac49fc01a55c9a6e7255409c4ffb","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        legacy_spec \u003d self.request_spec.to_legacy_request_spec_dict()"},{"line_number":46,"context_line":"        legacy_props \u003d self.request_spec.to_legacy_filter_properties_dict()"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        if self.destination:"},{"line_number":49,"context_line":"            host \u003d self.destination"},{"line_number":50,"context_line":"            node \u003d None"},{"line_number":51,"context_line":"            # NOTE(takashin): In the case that the target host is specified and"},{"line_number":52,"context_line":"            # the force flag is true, if the cold migration is failed,"},{"line_number":53,"context_line":"            # it is not necessary to retry the cold migration to the same host."},{"line_number":54,"context_line":"            # So make sure that reschedule will not occur."},{"line_number":55,"context_line":"            legacy_props.pop(\u0027retry\u0027, None)"},{"line_number":56,"context_line":"        else:"},{"line_number":57,"context_line":"            scheduler_utils.setup_instance_group(self.context,"},{"line_number":58,"context_line":"                                                 self.request_spec)"}],"source_content_type":"text/x-python","patch_set":63,"id":"1f1a1f67_0875c9fa","line":55,"range":{"start_line":48,"start_character":8,"end_line":55,"end_character":43},"in_reply_to":"1f1a1f67_7d82de01","updated":"2017-07-20 13:35:37.000000000","message":"In PS 44, I added the same cell check. Should it be added again?\n\nhttps://review.openstack.org/#/c/408955/44/nova/compute/api.py@3243","commit_id":"40e7f7e875cde63be32ad1572c7074285ff67314"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5afe9ff37cab7992df1b1c7a5e561bb710d5ad03","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        self.request_spec \u003d request_spec"},{"line_number":31,"context_line":"        self.reservations \u003d reservations"},{"line_number":32,"context_line":"        self.flavor \u003d flavor"},{"line_number":33,"context_line":"        self.destination \u003d host_name"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"        self.compute_rpcapi \u003d compute_rpcapi"},{"line_number":36,"context_line":"        self.scheduler_client \u003d scheduler_client"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_7a409b08","line":33,"range":{"start_line":33,"start_character":13,"end_line":33,"end_character":24},"updated":"2017-07-23 13:19:38.000000000","message":"Can we call this host or host_name? self.destination sounds too much like RequestSpec.requested_destination.","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"5813b086a994a7a802eba2ca727359cc12a733f8","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        self.request_spec \u003d request_spec"},{"line_number":31,"context_line":"        self.reservations \u003d reservations"},{"line_number":32,"context_line":"        self.flavor \u003d flavor"},{"line_number":33,"context_line":"        self.destination \u003d host_name"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"        self.compute_rpcapi \u003d compute_rpcapi"},{"line_number":36,"context_line":"        self.scheduler_client \u003d scheduler_client"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_00047916","line":33,"range":{"start_line":33,"start_character":13,"end_line":33,"end_character":24},"in_reply_to":"ff346bd7_7a409b08","updated":"2017-07-24 07:57:25.000000000","message":"Done","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5afe9ff37cab7992df1b1c7a5e561bb710d5ad03","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            host \u003d self.destination"},{"line_number":46,"context_line":"            node \u003d None"},{"line_number":47,"context_line":"            # NOTE(takashin): In the case that the target host is specified and"},{"line_number":48,"context_line":"            # the force flag is true, if the cold migration is failed,"},{"line_number":49,"context_line":"            # it is not necessary to retry the cold migration to the same host."},{"line_number":50,"context_line":"            # So make sure that reschedule will not occur."},{"line_number":51,"context_line":"            legacy_props.pop(\u0027retry\u0027, None)"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_ba5f23e4","line":48,"range":{"start_line":48,"start_character":18,"end_line":48,"end_character":36},"updated":"2017-07-23 13:19:38.000000000","message":"How do we know the force flag is true at this point in conductor?","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"5813b086a994a7a802eba2ca727359cc12a733f8","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            host \u003d self.destination"},{"line_number":46,"context_line":"            node \u003d None"},{"line_number":47,"context_line":"            # NOTE(takashin): In the case that the target host is specified and"},{"line_number":48,"context_line":"            # the force flag is true, if the cold migration is failed,"},{"line_number":49,"context_line":"            # it is not necessary to retry the cold migration to the same host."},{"line_number":50,"context_line":"            # So make sure that reschedule will not occur."},{"line_number":51,"context_line":"            legacy_props.pop(\u0027retry\u0027, None)"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_6ca33e51","line":48,"range":{"start_line":48,"start_character":18,"end_line":48,"end_character":36},"in_reply_to":"ff346bd7_ba5f23e4","updated":"2017-07-24 07:57:25.000000000","message":"(1) If \u0027self.destination\u0027 is set, the target host is specified and \u0027force\u0027 is True.\n\n(2) If \u0027self.destination\u0027 is not set, but the \u0027host\u0027 and \u0027node\u0027 are set in \u0027requested_destination\u0027 of the RequestSpec, the target host is specified (in API) and \u0027force\u0027 is False.\n\n(3) If \u0027self.destination\u0027 is not set and the \u0027host\u0027 and \u0027node\u0027 are not set in \u0027requested_destination\u0027 of the RequestSpec,\nthe target host is not specified (in API).","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5afe9ff37cab7992df1b1c7a5e561bb710d5ad03","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                    self.request_spec.requested_destination):"},{"line_number":72,"context_line":"                self.request_spec.requested_destination.cell \u003d ("},{"line_number":73,"context_line":"                    instance_mapping.cell_mapping)"},{"line_number":74,"context_line":"                # NOTE(takashin): In the case that the target host is"},{"line_number":75,"context_line":"                # specified and the force flag is false, if the migration is"},{"line_number":76,"context_line":"                # failed, it is not necessary to retry the cold migration to"},{"line_number":77,"context_line":"                # the same host. So make sure that reschedule will not occur."},{"line_number":78,"context_line":"                legacy_props.pop(\u0027retry\u0027, None)"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_da50a7d7","line":75,"range":{"start_line":74,"start_character":34,"end_line":75,"end_character":55},"updated":"2017-07-23 13:19:38.000000000","message":"How do we know here that that\u0027s the case? There is no force flag passed through to conductor.","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"5813b086a994a7a802eba2ca727359cc12a733f8","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                    self.request_spec.requested_destination):"},{"line_number":72,"context_line":"                self.request_spec.requested_destination.cell \u003d ("},{"line_number":73,"context_line":"                    instance_mapping.cell_mapping)"},{"line_number":74,"context_line":"                # NOTE(takashin): In the case that the target host is"},{"line_number":75,"context_line":"                # specified and the force flag is false, if the migration is"},{"line_number":76,"context_line":"                # failed, it is not necessary to retry the cold migration to"},{"line_number":77,"context_line":"                # the same host. So make sure that reschedule will not occur."},{"line_number":78,"context_line":"                legacy_props.pop(\u0027retry\u0027, None)"}],"source_content_type":"text/x-python","patch_set":64,"id":"ff346bd7_ec8e0ecf","line":75,"range":{"start_line":74,"start_character":34,"end_line":75,"end_character":55},"in_reply_to":"ff346bd7_da50a7d7","updated":"2017-07-24 07:57:25.000000000","message":"ditto","commit_id":"91144cc057e382347a90e27f0d26fd868175e8cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c6f71f04b455044497dc334f780c381d8c6d91ad","unresolved":false,"context_lines":[{"line_number":48,"context_line":"            # the force flag is true, if the cold migration is failed,"},{"line_number":49,"context_line":"            # it is not necessary to retry the cold migration to the same host."},{"line_number":50,"context_line":"            # So make sure that reschedule will not occur."},{"line_number":51,"context_line":"            legacy_props.pop(\u0027retry\u0027, None)"},{"line_number":52,"context_line":"        else:"},{"line_number":53,"context_line":"            scheduler_utils.setup_instance_group(self.context,"},{"line_number":54,"context_line":"                                                 self.request_spec)"}],"source_content_type":"text/x-python","patch_set":68,"id":"ff346bd7_79eeedb4","line":51,"updated":"2017-07-26 22:18:16.000000000","message":"you should also clean-up the RequestSpec.retry field IMHO.","commit_id":"134a230abca43f931f7bea27c80be9a3254e601b"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"0e7928ae5edb6c30ae7b01cffc7d6b9940cfd437","unresolved":false,"context_lines":[{"line_number":48,"context_line":"            # the force flag is true, if the cold migration is failed,"},{"line_number":49,"context_line":"            # it is not necessary to retry the cold migration to the same host."},{"line_number":50,"context_line":"            # So make sure that reschedule will not occur."},{"line_number":51,"context_line":"            legacy_props.pop(\u0027retry\u0027, None)"},{"line_number":52,"context_line":"        else:"},{"line_number":53,"context_line":"            scheduler_utils.setup_instance_group(self.context,"},{"line_number":54,"context_line":"                                                 self.request_spec)"}],"source_content_type":"text/x-python","patch_set":68,"id":"ff346bd7_5f71c90b","line":51,"in_reply_to":"ff346bd7_79eeedb4","updated":"2017-07-27 04:57:33.000000000","message":"Done","commit_id":"134a230abca43f931f7bea27c80be9a3254e601b"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c6f71f04b455044497dc334f780c381d8c6d91ad","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                # the same host. So make sure that reschedule will not occur."},{"line_number":78,"context_line":"                if (\u0027host\u0027 in self.request_spec.requested_destination and"},{"line_number":79,"context_line":"                        self.request_spec.requested_destination.host):"},{"line_number":80,"context_line":"                    legacy_props.pop(\u0027retry\u0027, None)"},{"line_number":81,"context_line":"            else:"},{"line_number":82,"context_line":"                self.request_spec.requested_destination \u003d objects.Destination("},{"line_number":83,"context_line":"                    cell\u003dinstance_mapping.cell_mapping)"}],"source_content_type":"text/x-python","patch_set":68,"id":"ff346bd7_3932a560","line":80,"updated":"2017-07-26 22:18:16.000000000","message":"ditto","commit_id":"134a230abca43f931f7bea27c80be9a3254e601b"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"0e7928ae5edb6c30ae7b01cffc7d6b9940cfd437","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                # the same host. So make sure that reschedule will not occur."},{"line_number":78,"context_line":"                if (\u0027host\u0027 in self.request_spec.requested_destination and"},{"line_number":79,"context_line":"                        self.request_spec.requested_destination.host):"},{"line_number":80,"context_line":"                    legacy_props.pop(\u0027retry\u0027, None)"},{"line_number":81,"context_line":"            else:"},{"line_number":82,"context_line":"                self.request_spec.requested_destination \u003d objects.Destination("},{"line_number":83,"context_line":"                    cell\u003dinstance_mapping.cell_mapping)"}],"source_content_type":"text/x-python","patch_set":68,"id":"ff346bd7_3f64c549","line":80,"in_reply_to":"ff346bd7_3932a560","updated":"2017-07-27 04:57:33.000000000","message":"Done","commit_id":"134a230abca43f931f7bea27c80be9a3254e601b"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"51baf28eeb604d431bbb02936b08ef1790aac227","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        scheduler_utils.setup_instance_group(self.context, self.request_spec)"},{"line_number":43,"context_line":"        scheduler_utils.populate_retry(legacy_props,"},{"line_number":44,"context_line":"                                       self.instance.uuid)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        # NOTE(sbauza): Force_hosts/nodes needs to be reset"},{"line_number":47,"context_line":"        # if we want to make sure that the next destination"},{"line_number":48,"context_line":"        # is not forced to be the original host"}],"source_content_type":"text/x-python","patch_set":78,"id":"7f287b81_8b7b698a","side":"PARENT","line":45,"updated":"2017-09-07 15:48:40.000000000","message":"unnecessary removal","commit_id":"08ec8a1ad3f3492b99db48d9e8fa132cb1bb3e8c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"51baf28eeb604d431bbb02936b08ef1790aac227","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                if (\u0027host\u0027 in self.request_spec.requested_destination and"},{"line_number":79,"context_line":"                        self.request_spec.requested_destination.host):"},{"line_number":80,"context_line":"                    legacy_props.pop(\u0027retry\u0027, None)"},{"line_number":81,"context_line":"                    self.request_spec.retry \u003d None"},{"line_number":82,"context_line":"            else:"},{"line_number":83,"context_line":"                self.request_spec.requested_destination \u003d objects.Destination("},{"line_number":84,"context_line":"                    cell\u003dinstance_mapping.cell_mapping)"}],"source_content_type":"text/x-python","patch_set":78,"id":"7f287b81_eb466d50","line":81,"updated":"2017-09-07 15:48:40.000000000","message":"good point, I mentioned in the spec that we should disable retries in case of a requested destination but I see you already implemented that.","commit_id":"0a5989fc2e05e6862c21a97e0ebd26c64e28e578"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2835b9d1f617e0768a06f59c74ac5cc44505a130","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        legacy_spec \u003d self.request_spec.to_legacy_request_spec_dict()"},{"line_number":41,"context_line":"        legacy_props \u003d self.request_spec.to_legacy_filter_properties_dict()"},{"line_number":42,"context_line":"        scheduler_utils.setup_instance_group(self.context, self.request_spec)"},{"line_number":43,"context_line":"        scheduler_utils.populate_retry(legacy_props,"},{"line_number":44,"context_line":"                                       self.instance.uuid)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        # NOTE(sbauza): Force_hosts/nodes needs to be reset"}],"source_content_type":"text/x-python","patch_set":86,"id":"7f515b1d_5563dd42","line":43,"updated":"2017-10-09 13:27:32.000000000","message":"How about we just don\u0027t do this if a destination is specified? Then you don\u0027t need to undo it later.","commit_id":"af54867fce26e64f7b7c1d62bdb2c167d41ed396"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"a2a3f69e6e794a0bba437fade105c84cdd5f341e","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        legacy_spec \u003d self.request_spec.to_legacy_request_spec_dict()"},{"line_number":41,"context_line":"        legacy_props \u003d self.request_spec.to_legacy_filter_properties_dict()"},{"line_number":42,"context_line":"        scheduler_utils.setup_instance_group(self.context, self.request_spec)"},{"line_number":43,"context_line":"        scheduler_utils.populate_retry(legacy_props,"},{"line_number":44,"context_line":"                                       self.instance.uuid)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        # NOTE(sbauza): Force_hosts/nodes needs to be reset"}],"source_content_type":"text/x-python","patch_set":86,"id":"5f4e5783_400a66d2","line":43,"in_reply_to":"7f515b1d_5563dd42","updated":"2017-10-11 09:44:49.000000000","message":"Done\nBut keep line 67-70 because of the case that saved previous request spec has retry value.","commit_id":"af54867fce26e64f7b7c1d62bdb2c167d41ed396"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f5b7ebb7b9b1f3875a8607d0b57ad11bf1b7b0f5","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        legacy_spec \u003d self.request_spec.to_legacy_request_spec_dict()"},{"line_number":203,"context_line":"        legacy_props \u003d self.request_spec.to_legacy_filter_properties_dict()"},{"line_number":204,"context_line":"        scheduler_utils.setup_instance_group(self.context, self.request_spec)"},{"line_number":205,"context_line":"        if not (\u0027requested_destination\u0027 in self.request_spec and"},{"line_number":206,"context_line":"                    self.request_spec.requested_destination and"},{"line_number":207,"context_line":"                        \u0027host\u0027 in self.request_spec.requested_destination and"},{"line_number":208,"context_line":"                            self.request_spec.requested_destination.host):"}],"source_content_type":"text/x-python","patch_set":93,"id":"3f4b6375_2159478d","line":205,"updated":"2017-11-02 20:03:47.000000000","message":"Please add a comment about why we are doing this check.","commit_id":"4f0cb7d6145fa3db9adf100764e197ecc2ddd73c"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"a1cc72fed9ed8604f3db829563d4f290ea67df06","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        legacy_spec \u003d self.request_spec.to_legacy_request_spec_dict()"},{"line_number":203,"context_line":"        legacy_props \u003d self.request_spec.to_legacy_filter_properties_dict()"},{"line_number":204,"context_line":"        scheduler_utils.setup_instance_group(self.context, self.request_spec)"},{"line_number":205,"context_line":"        if not (\u0027requested_destination\u0027 in self.request_spec and"},{"line_number":206,"context_line":"                    self.request_spec.requested_destination and"},{"line_number":207,"context_line":"                        \u0027host\u0027 in self.request_spec.requested_destination and"},{"line_number":208,"context_line":"                            self.request_spec.requested_destination.host):"}],"source_content_type":"text/x-python","patch_set":93,"id":"3f4b6375_96d7fb4b","line":205,"in_reply_to":"3f4b6375_2159478d","updated":"2017-11-04 07:32:14.000000000","message":"Done","commit_id":"4f0cb7d6145fa3db9adf100764e197ecc2ddd73c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f5b7ebb7b9b1f3875a8607d0b57ad11bf1b7b0f5","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        if not (\u0027requested_destination\u0027 in self.request_spec and"},{"line_number":206,"context_line":"                    self.request_spec.requested_destination and"},{"line_number":207,"context_line":"                        \u0027host\u0027 in self.request_spec.requested_destination and"},{"line_number":208,"context_line":"                            self.request_spec.requested_destination.host):"},{"line_number":209,"context_line":"            scheduler_utils.populate_retry(legacy_props,"},{"line_number":210,"context_line":"                                           self.instance.uuid)"},{"line_number":211,"context_line":""}],"source_content_type":"text/x-python","patch_set":93,"id":"3f4b6375_c16a7318","line":208,"range":{"start_line":208,"start_character":28,"end_line":208,"end_character":72},"updated":"2017-11-02 20:03:47.000000000","message":"Destination.host is not nullable, so if \u0027host\u0027 is in self.request_spec.requested_destination then it has to be set, so this check is redundant.","commit_id":"4f0cb7d6145fa3db9adf100764e197ecc2ddd73c"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"a1cc72fed9ed8604f3db829563d4f290ea67df06","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        if not (\u0027requested_destination\u0027 in self.request_spec and"},{"line_number":206,"context_line":"                    self.request_spec.requested_destination and"},{"line_number":207,"context_line":"                        \u0027host\u0027 in self.request_spec.requested_destination and"},{"line_number":208,"context_line":"                            self.request_spec.requested_destination.host):"},{"line_number":209,"context_line":"            scheduler_utils.populate_retry(legacy_props,"},{"line_number":210,"context_line":"                                           self.instance.uuid)"},{"line_number":211,"context_line":""}],"source_content_type":"text/x-python","patch_set":93,"id":"3f4b6375_36c6079c","line":208,"range":{"start_line":208,"start_character":28,"end_line":208,"end_character":72},"in_reply_to":"3f4b6375_c16a7318","updated":"2017-11-04 07:32:14.000000000","message":"Done","commit_id":"4f0cb7d6145fa3db9adf100764e197ecc2ddd73c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f5b7ebb7b9b1f3875a8607d0b57ad11bf1b7b0f5","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        # NOTE(sbauza): Force_hosts/nodes needs to be reset"},{"line_number":213,"context_line":"        # if we want to make sure that the next destination"},{"line_number":214,"context_line":"        # is not forced to be the original host"},{"line_number":215,"context_line":"        self.request_spec.reset_forced_destinations()"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"        # NOTE(danms): Right now we only support migrate to the same"},{"line_number":218,"context_line":"        # cell as the current instance, so request that the scheduler"}],"source_content_type":"text/x-python","patch_set":93,"id":"3f4b6375_81d47bea","line":215,"updated":"2017-11-02 20:03:47.000000000","message":"This is where we should set retry\u003dNone, see:\n\nhttps://review.openstack.org/#/c/505771/","commit_id":"4f0cb7d6145fa3db9adf100764e197ecc2ddd73c"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"a1cc72fed9ed8604f3db829563d4f290ea67df06","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        # NOTE(sbauza): Force_hosts/nodes needs to be reset"},{"line_number":213,"context_line":"        # if we want to make sure that the next destination"},{"line_number":214,"context_line":"        # is not forced to be the original host"},{"line_number":215,"context_line":"        self.request_spec.reset_forced_destinations()"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"        # NOTE(danms): Right now we only support migrate to the same"},{"line_number":218,"context_line":"        # cell as the current instance, so request that the scheduler"}],"source_content_type":"text/x-python","patch_set":93,"id":"3f4b6375_f6506fd7","line":215,"in_reply_to":"3f4b6375_81d47bea","updated":"2017-11-04 07:32:14.000000000","message":"In cold migration without target host case, retry is needed.\nSo in that case it is not good to clear retry setting.","commit_id":"4f0cb7d6145fa3db9adf100764e197ecc2ddd73c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f5b7ebb7b9b1f3875a8607d0b57ad11bf1b7b0f5","unresolved":false,"context_lines":[{"line_number":226,"context_line":"                self.request_spec.requested_destination):"},{"line_number":227,"context_line":"            self.request_spec.requested_destination.cell \u003d ("},{"line_number":228,"context_line":"                instance_mapping.cell_mapping)"},{"line_number":229,"context_line":"            # NOTE(takashin): In the case that the target host is specified,"},{"line_number":230,"context_line":"            # if the migration is failed, it is not necessary to retry"},{"line_number":231,"context_line":"            # the cold migration to the same host. So make sure that"},{"line_number":232,"context_line":"            # reschedule will not occur."},{"line_number":233,"context_line":"            if (\u0027host\u0027 in self.request_spec.requested_destination and"},{"line_number":234,"context_line":"                    self.request_spec.requested_destination.host):"},{"line_number":235,"context_line":"                legacy_props.pop(\u0027retry\u0027, None)"},{"line_number":236,"context_line":"                self.request_spec.retry \u003d None"},{"line_number":237,"context_line":"        else:"},{"line_number":238,"context_line":"            self.request_spec.requested_destination \u003d objects.Destination("},{"line_number":239,"context_line":"                cell\u003dinstance_mapping.cell_mapping)"}],"source_content_type":"text/x-python","patch_set":93,"id":"3f4b6375_bc679ce9","line":236,"range":{"start_line":229,"start_character":12,"end_line":236,"end_character":46},"updated":"2017-11-02 20:03:47.000000000","message":"We should definitely have a functional test with 3 compute services and verify this behavior that we don\u0027t attempt to reschedule to another compute if the specified target host failed.","commit_id":"4f0cb7d6145fa3db9adf100764e197ecc2ddd73c"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"a1cc72fed9ed8604f3db829563d4f290ea67df06","unresolved":false,"context_lines":[{"line_number":226,"context_line":"                self.request_spec.requested_destination):"},{"line_number":227,"context_line":"            self.request_spec.requested_destination.cell \u003d ("},{"line_number":228,"context_line":"                instance_mapping.cell_mapping)"},{"line_number":229,"context_line":"            # NOTE(takashin): In the case that the target host is specified,"},{"line_number":230,"context_line":"            # if the migration is failed, it is not necessary to retry"},{"line_number":231,"context_line":"            # the cold migration to the same host. So make sure that"},{"line_number":232,"context_line":"            # reschedule will not occur."},{"line_number":233,"context_line":"            if (\u0027host\u0027 in self.request_spec.requested_destination and"},{"line_number":234,"context_line":"                    self.request_spec.requested_destination.host):"},{"line_number":235,"context_line":"                legacy_props.pop(\u0027retry\u0027, None)"},{"line_number":236,"context_line":"                self.request_spec.retry \u003d None"},{"line_number":237,"context_line":"        else:"},{"line_number":238,"context_line":"            self.request_spec.requested_destination \u003d objects.Destination("},{"line_number":239,"context_line":"                cell\u003dinstance_mapping.cell_mapping)"}],"source_content_type":"text/x-python","patch_set":93,"id":"3f4b6375_16678beb","line":236,"range":{"start_line":229,"start_character":12,"end_line":236,"end_character":46},"in_reply_to":"3f4b6375_bc679ce9","updated":"2017-11-04 07:32:14.000000000","message":"I will add it in https://review.openstack.org/#/c/408964/ (a subsequent patch).","commit_id":"4f0cb7d6145fa3db9adf100764e197ecc2ddd73c"}],"nova/exception.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8c2c8760ffb8d846f082bf9f1795328ac0dab9c3","unresolved":false,"context_lines":[{"line_number":2186,"context_line":""},{"line_number":2187,"context_line":""},{"line_number":2188,"context_line":"class CannotMigrateWithTargetHost(NovaException):"},{"line_number":2189,"context_line":"    msg_fmt \u003d _(\"Cannot migrate with target host because the request spec is \""},{"line_number":2190,"context_line":"                \"not found.\")"}],"source_content_type":"text/x-python","patch_set":97,"id":"ff82abbf_042b4494","line":2190,"range":{"start_line":2189,"start_character":49,"end_line":2190,"end_character":27},"updated":"2017-11-20 19:15:26.000000000","message":"This isn\u0027t really something that the API user can fix. I think it would be better to say something like:\n\n\"Unable to migrate with target host. Retry without a host specified.\"","commit_id":"d35764b1362ae495d605aaa810947b7025fd8979"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"77f09d63afe163303ef4fd0609ee169b8376f31b","unresolved":false,"context_lines":[{"line_number":2186,"context_line":""},{"line_number":2187,"context_line":""},{"line_number":2188,"context_line":"class CannotMigrateWithTargetHost(NovaException):"},{"line_number":2189,"context_line":"    msg_fmt \u003d _(\"Cannot migrate with target host because the request spec is \""},{"line_number":2190,"context_line":"                \"not found.\")"}],"source_content_type":"text/x-python","patch_set":97,"id":"ff82abbf_f4bb59e2","line":2190,"range":{"start_line":2189,"start_character":49,"end_line":2190,"end_character":27},"in_reply_to":"ff82abbf_042b4494","updated":"2017-11-21 14:28:05.000000000","message":"Done","commit_id":"d35764b1362ae495d605aaa810947b7025fd8979"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f738a1120e70d27ebbaafd309d83a657fcd4f88e","unresolved":false,"context_lines":[{"line_number":2191,"context_line":""},{"line_number":2192,"context_line":""},{"line_number":2193,"context_line":"class CannotMigrateToSameHost(NovaException):"},{"line_number":2194,"context_line":"    msg_fmt \u003d _(\"Cannot migrate to the host where the server exists.\")"}],"source_content_type":"text/x-python","patch_set":99,"id":"ff82abbf_e6bc8107","line":2194,"updated":"2017-11-28 02:27:49.000000000","message":"I wonder if this is too much detail. Since it\u0027s an admin API by default, the user should be able to see which host the instance is already running on, so it\u0027s probably not an issue. CannotMigrateWithTargetHost would be nice and generic for both cases.","commit_id":"81ffd2065de22810f0d2e3f965763b70a6d48636"}],"nova/objects/request_spec.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3213e96eee089f9f4fa69080341f788353d80be9","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        \u0027scheduler_hints\u0027: fields.DictOfListOfStringsField(nullable\u003dTrue),"},{"line_number":77,"context_line":"        \u0027instance_uuid\u0027: fields.UUIDField(),"},{"line_number":78,"context_line":"        \u0027security_groups\u0027: fields.ObjectField(\u0027SecurityGroupList\u0027),"},{"line_number":79,"context_line":"        \u0027host_to_migrate\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":80,"context_line":"    }"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def obj_make_compatible(self, primitive, target_version):"}],"source_content_type":"text/x-python","patch_set":67,"id":"ff346bd7_4037bde4","line":79,"updated":"2017-07-26 13:00:06.000000000","message":"We already do have :\n* force_hosts, which is for nova boot just calling the scheduler without verifying the filters\n* requested_destination, which is for evacuate/live_mig (and possibly cold_mig) verifying the scheduler and filters only for those destinations\n\nSo I think you should rather provide a forced_destination having a specific Destination field.\n\nLater, we could then deprecate force_hosts/nodes and use that field (just needing a new microversion tho).","commit_id":"1073e67b275e7aeb2521f85f68bffcc0669bde80"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"b0e69bb27c915e30d4a021bf2a47889668b29ba6","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        \u0027scheduler_hints\u0027: fields.DictOfListOfStringsField(nullable\u003dTrue),"},{"line_number":77,"context_line":"        \u0027instance_uuid\u0027: fields.UUIDField(),"},{"line_number":78,"context_line":"        \u0027security_groups\u0027: fields.ObjectField(\u0027SecurityGroupList\u0027),"},{"line_number":79,"context_line":"        \u0027host_to_migrate\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":80,"context_line":"    }"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def obj_make_compatible(self, primitive, target_version):"}],"source_content_type":"text/x-python","patch_set":67,"id":"ff346bd7_e83d778f","line":79,"in_reply_to":"ff346bd7_4037bde4","updated":"2017-07-26 16:25:48.000000000","message":"Done","commit_id":"1073e67b275e7aeb2521f85f68bffcc0669bde80"}],"nova/tests/unit/compute/test_compute_api.py":[{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"6c9496a4ccecd6b4aed651275975665ff3d8fd38","unresolved":false,"context_lines":[{"line_number":1901,"context_line":""},{"line_number":1902,"context_line":"    def test_migrate_different_project_id(self):"},{"line_number":1903,"context_line":"        self._test_migrate(project_id\u003d\u0027different\u0027)"},{"line_number":1904,"context_line":""},{"line_number":1905,"context_line":"    def test_migrate_with_host_name(self):"},{"line_number":1906,"context_line":"        self._test_migrate(host_name\u003d\u0027target_host\u0027)"},{"line_number":1907,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_20690e26","line":1904,"updated":"2016-12-09 07:39:16.000000000","message":"could you also add a test for the case, when target is specified, but is disabled.","commit_id":"9b7a758a9c588cbc207675a7ba80319cb10b3444"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"c00b243b3dbebd3e3f08663cd42e660ca010ca05","unresolved":false,"context_lines":[{"line_number":1901,"context_line":""},{"line_number":1902,"context_line":"    def test_migrate_different_project_id(self):"},{"line_number":1903,"context_line":"        self._test_migrate(project_id\u003d\u0027different\u0027)"},{"line_number":1904,"context_line":""},{"line_number":1905,"context_line":"    def test_migrate_with_host_name(self):"},{"line_number":1906,"context_line":"        self._test_migrate(host_name\u003d\u0027target_host\u0027)"},{"line_number":1907,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_0fe87ae1","line":1904,"in_reply_to":"3a71b18c_20690e26","updated":"2016-12-12 08:15:30.000000000","message":"Done","commit_id":"9b7a758a9c588cbc207675a7ba80319cb10b3444"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"3b5b9bf30ba4d8aa5df074b387e4a39a1dda0b99","unresolved":false,"context_lines":[{"line_number":1835,"context_line":"                    flavor\u003dmox.IsA(objects.Flavor),"},{"line_number":1836,"context_line":"                    reservations\u003dexpected_reservations,"},{"line_number":1837,"context_line":"                    clean_shutdown\u003dclean_shutdown,"},{"line_number":1838,"context_line":"                    request_spec\u003dfake_spec)"},{"line_number":1839,"context_line":""},{"line_number":1840,"context_line":"        self.mox.ReplayAll()"},{"line_number":1841,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"ba5201f7_ffc9647a","line":1838,"updated":"2017-01-11 09:03:36.000000000","message":"is there any way to ensure the request spec obj have correct value for \u0027requested_destination\u0027?","commit_id":"b62f26b288949fdb7d6741d79b7e9153f47125eb"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"46992d709a5fef0ad00866ccb7d9d414d555c120","unresolved":false,"context_lines":[{"line_number":1835,"context_line":"                    flavor\u003dmox.IsA(objects.Flavor),"},{"line_number":1836,"context_line":"                    reservations\u003dexpected_reservations,"},{"line_number":1837,"context_line":"                    clean_shutdown\u003dclean_shutdown,"},{"line_number":1838,"context_line":"                    request_spec\u003dfake_spec)"},{"line_number":1839,"context_line":""},{"line_number":1840,"context_line":"        self.mox.ReplayAll()"},{"line_number":1841,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_c809652e","line":1838,"in_reply_to":"ba5201f7_ffc9647a","updated":"2017-01-16 02:33:50.000000000","message":"Done","commit_id":"b62f26b288949fdb7d6741d79b7e9153f47125eb"}],"nova/tests/unit/conductor/tasks/test_migrate.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4873605ebf02e7fa38581ea10a42f9f65cd0b0c0","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        task._migration.create.assert_called_once_with()"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        if requested_destination:"},{"line_number":155,"context_line":"            self.assertIsNone(self.request_spec.retry)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def test_execute(self):"},{"line_number":158,"context_line":"        self._test_execute()"}],"source_content_type":"text/x-python","patch_set":99,"id":"ff82abbf_89c1cb56","line":155,"updated":"2017-11-30 00:17:02.000000000","message":"We should assert that the requested_destination is targeted to the same cell that the instance was created in, since that\u0027s not asserted in the patch that made that change:\n\nIc6dc46183676a91cf9037726316b677a29e2d342","commit_id":"81ffd2065de22810f0d2e3f965763b70a6d48636"}],"nova/tests/unit/conductor/test_conductor.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e2dd2214f83cc763a8f5ed068f915b7c50d1b004","unresolved":false,"context_lines":[{"line_number":332,"context_line":""},{"line_number":333,"context_line":"        return rebuild_args, compute_rebuild_args"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    @mock.patch.object(migrate.MigrationTask, \u0027__init__\u0027)"},{"line_number":336,"context_line":"    @mock.patch.object(objects.InstanceMapping, \u0027get_by_instance_uuid\u0027)"},{"line_number":337,"context_line":"    @mock.patch.object(objects.RequestSpec, \u0027save\u0027)"},{"line_number":338,"context_line":"    @mock.patch.object(migrate.MigrationTask, \u0027execute\u0027)"}],"source_content_type":"text/x-python","patch_set":39,"id":"bff0334d_caa3f09d","line":335,"updated":"2017-04-07 16:30:07.000000000","message":"This is kinda nasty. Just mock out the whole task if you want to make sure it was called. Otherwise you\u0027re cutting out initialization of the object but leaving it functional.","commit_id":"d94961b81fad7be83cf870a382b2090452ad3d25"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"27be48238d0b11f07d20ab024900cc7af4641994","unresolved":false,"context_lines":[{"line_number":332,"context_line":""},{"line_number":333,"context_line":"        return rebuild_args, compute_rebuild_args"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    @mock.patch.object(migrate.MigrationTask, \u0027__init__\u0027)"},{"line_number":336,"context_line":"    @mock.patch.object(objects.InstanceMapping, \u0027get_by_instance_uuid\u0027)"},{"line_number":337,"context_line":"    @mock.patch.object(objects.RequestSpec, \u0027save\u0027)"},{"line_number":338,"context_line":"    @mock.patch.object(migrate.MigrationTask, \u0027execute\u0027)"}],"source_content_type":"text/x-python","patch_set":39,"id":"bff0334d_8baa676e","line":335,"in_reply_to":"bff0334d_caa3f09d","updated":"2017-04-10 11:08:34.000000000","message":"Done","commit_id":"d94961b81fad7be83cf870a382b2090452ad3d25"}]}
