)]}'
{"nova/api/openstack/compute/schemas/migrate_server.py":[{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"cc85f2733ee3ae9e1cc6c2f4117544fe672ea857","unresolved":false,"context_lines":[{"line_number":26,"context_line":"        \u0027migrate\u0027: {"},{"line_number":27,"context_line":"            \u0027type\u0027: [\u0027object\u0027, \u0027null\u0027],"},{"line_number":28,"context_line":"            \u0027properties\u0027: {"},{"line_number":29,"context_line":"                \u0027host\u0027: host"},{"line_number":30,"context_line":"            },"},{"line_number":31,"context_line":"            \u0027additionalProperties\u0027: False,"},{"line_number":32,"context_line":"        },"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_6ed389d5","line":29,"range":{"start_line":29,"start_character":17,"end_line":29,"end_character":28},"updated":"2016-09-19 11:09:01.000000000","message":"We should follow migrate_live schema and this should be required, I think. So that we can have consistent APIs for different kinds of migrations","commit_id":"87f190399de76d3ef232db2bcd619991ee6cc297"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"5ac9a22164b9bae355fd7148bbb99f5058fb86e1","unresolved":false,"context_lines":[{"line_number":26,"context_line":"        \u0027migrate\u0027: {"},{"line_number":27,"context_line":"            \u0027type\u0027: [\u0027object\u0027, \u0027null\u0027],"},{"line_number":28,"context_line":"            \u0027properties\u0027: {"},{"line_number":29,"context_line":"                \u0027host\u0027: host"},{"line_number":30,"context_line":"            },"},{"line_number":31,"context_line":"            \u0027additionalProperties\u0027: False,"},{"line_number":32,"context_line":"        },"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_3e862adb","line":29,"range":{"start_line":29,"start_character":17,"end_line":29,"end_character":28},"in_reply_to":"7a8ec9b2_6ed389d5","updated":"2016-10-08 01:45:46.000000000","message":"Done","commit_id":"87f190399de76d3ef232db2bcd619991ee6cc297"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"cc85f2733ee3ae9e1cc6c2f4117544fe672ea857","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                \u0027disk_over_commit\u0027: parameter_types.boolean,"},{"line_number":46,"context_line":"                \u0027host\u0027: host"},{"line_number":47,"context_line":"            },"},{"line_number":48,"context_line":"            \u0027required\u0027: [\u0027block_migration\u0027, \u0027disk_over_commit\u0027, \u0027host\u0027],"},{"line_number":49,"context_line":"            \u0027additionalProperties\u0027: False,"},{"line_number":50,"context_line":"        },"},{"line_number":51,"context_line":"    },"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_4ee7adab","line":48,"range":{"start_line":48,"start_character":64,"end_line":48,"end_character":70},"updated":"2016-09-19 11:09:01.000000000","message":"In live migration action host is required (it can be None so that the scheduler will pick the host), so I think that it should be required in migration action too","commit_id":"87f190399de76d3ef232db2bcd619991ee6cc297"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"5ac9a22164b9bae355fd7148bbb99f5058fb86e1","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                \u0027disk_over_commit\u0027: parameter_types.boolean,"},{"line_number":46,"context_line":"                \u0027host\u0027: host"},{"line_number":47,"context_line":"            },"},{"line_number":48,"context_line":"            \u0027required\u0027: [\u0027block_migration\u0027, \u0027disk_over_commit\u0027, \u0027host\u0027],"},{"line_number":49,"context_line":"            \u0027additionalProperties\u0027: False,"},{"line_number":50,"context_line":"        },"},{"line_number":51,"context_line":"    },"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_5e6f762a","line":48,"range":{"start_line":48,"start_character":64,"end_line":48,"end_character":70},"in_reply_to":"7a8ec9b2_4ee7adab","updated":"2016-10-08 01:45:46.000000000","message":"Done","commit_id":"87f190399de76d3ef232db2bcd619991ee6cc297"}],"nova/api/openstack/rest_api_version_history.rst":[{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"d33729b5936e32ac227e6a4c5f7e31356d5b31a6","unresolved":false,"context_lines":[{"line_number":420,"context_line":"----"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"  Updates the POST request body for the ``migrate`` action to include the"},{"line_number":423,"context_line":"  optional ``host`` string field defaulted to ``None`` and the optional"},{"line_number":424,"context_line":"  ``force`` boolean field defaulted to False."},{"line_number":425,"context_line":"  And gets the ``migrate`` action behaviour to verify a provided host"},{"line_number":426,"context_line":"  by calling the nova scheduler when providing the ``host`` string field"}],"source_content_type":"text/x-rst","patch_set":10,"id":"ba5da102_a0dac576","line":423,"range":{"start_line":423,"start_character":2,"end_line":423,"end_character":19},"updated":"2016-11-01 13:42:19.000000000","message":"\u0027host\u0027 is mandatory in schema.","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"fa9e06ea9e311eb3cfcb1ae861c7f22f874d0311","unresolved":false,"context_lines":[{"line_number":420,"context_line":"----"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"  Updates the POST request body for the ``migrate`` action to include the"},{"line_number":423,"context_line":"  optional ``host`` string field defaulted to ``None`` and the optional"},{"line_number":424,"context_line":"  ``force`` boolean field defaulted to False."},{"line_number":425,"context_line":"  And gets the ``migrate`` action behaviour to verify a provided host"},{"line_number":426,"context_line":"  by calling the nova scheduler when providing the ``host`` string field"}],"source_content_type":"text/x-rst","patch_set":10,"id":"ba5da102_4aacc68b","line":423,"range":{"start_line":423,"start_character":2,"end_line":423,"end_character":19},"in_reply_to":"ba5da102_a0dac576","updated":"2016-11-04 07:16:35.000000000","message":"Done","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"}],"nova/compute/api.py":[{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"cc85f2733ee3ae9e1cc6c2f4117544fe672ea857","unresolved":false,"context_lines":[{"line_number":3027,"context_line":""},{"line_number":3028,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":3029,"context_line":"        if host_name:"},{"line_number":3030,"context_line":"            scheduler_hint.update({\u0027host\u0027: host_name})"},{"line_number":3031,"context_line":""},{"line_number":3032,"context_line":"        self.compute_task_api.resize_instance(context, instance,"},{"line_number":3033,"context_line":"                extra_instance_updates, scheduler_hint\u003dscheduler_hint,"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_b5f3fd71","line":3030,"updated":"2016-09-19 11:09:01.000000000","message":"Requested destination should be added to request_spec instead of using scheduler_hint to pass this information, I think.\n\nYou can base on live migration code to make those changes. We basically do not use scheduler hints in LM to force destination node.\n\nYou need to create Destination object the same way like we create it here:\nhttps://github.com/openstack/nova/blob/ec5f494899029be83105db265cf9b6d2f318de18/nova/compute/api.py#L3632\nNotice that we do set host_name \u003d None in line 3637 so that host_name passed to conductor will be None. Therefore host set inside scheduler_hint will be None here:\nhttps://github.com/openstack/nova/blob/a7f83fc6cec74cc614182b6d931521ded3f54ff2/nova/conductor/api.py#L194\nbut we sill have destination host in request_spec.requested_destination. This object will be used by get_filtered_hosts method in scheduler\u0027s host_manager:\nhttps://github.com/openstack/nova/blob/c51af64dae94ed09a49d0f3db2732ed0daf3fbc3/nova/scheduler/host_manager.py#L535","commit_id":"87f190399de76d3ef232db2bcd619991ee6cc297"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"5ac9a22164b9bae355fd7148bbb99f5058fb86e1","unresolved":false,"context_lines":[{"line_number":3027,"context_line":""},{"line_number":3028,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":3029,"context_line":"        if host_name:"},{"line_number":3030,"context_line":"            scheduler_hint.update({\u0027host\u0027: host_name})"},{"line_number":3031,"context_line":""},{"line_number":3032,"context_line":"        self.compute_task_api.resize_instance(context, instance,"},{"line_number":3033,"context_line":"                extra_instance_updates, scheduler_hint\u003dscheduler_hint,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_bee07a97","line":3030,"in_reply_to":"7a8ec9b2_b5f3fd71","updated":"2016-10-08 01:45:46.000000000","message":"I add Request destination in the following patch in order to to check whether a destination host is in accordance\nwith scheduler rules or not.\n\nhttps://review.openstack.org/#/c/371269/\n\nThis case is for bypassing scheduler rules.","commit_id":"87f190399de76d3ef232db2bcd619991ee6cc297"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"d33729b5936e32ac227e6a4c5f7e31356d5b31a6","unresolved":false,"context_lines":[{"line_number":2949,"context_line":"        # Check whether host exists or not when host_name is specified."},{"line_number":2950,"context_line":"        if host_name is not None:"},{"line_number":2951,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host_name)"},{"line_number":2952,"context_line":"            if not nodes:"},{"line_number":2953,"context_line":"                raise exception.ComputeHostNotFound(host\u003dhost_name)"},{"line_number":2954,"context_line":""},{"line_number":2955,"context_line":"        self._check_auto_disk_config(instance, **extra_instance_updates)"},{"line_number":2956,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_48266bbb","line":2953,"range":{"start_line":2952,"start_character":12,"end_line":2953,"end_character":67},"updated":"2016-11-01 13:42:19.000000000","message":"This code is unreachable as compute_node_get_all_by_host db api [1] itself raises ComputeHostNotFound exception.\n\n[1] https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L685","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"fa9e06ea9e311eb3cfcb1ae861c7f22f874d0311","unresolved":false,"context_lines":[{"line_number":2949,"context_line":"        # Check whether host exists or not when host_name is specified."},{"line_number":2950,"context_line":"        if host_name is not None:"},{"line_number":2951,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host_name)"},{"line_number":2952,"context_line":"            if not nodes:"},{"line_number":2953,"context_line":"                raise exception.ComputeHostNotFound(host\u003dhost_name)"},{"line_number":2954,"context_line":""},{"line_number":2955,"context_line":"        self._check_auto_disk_config(instance, **extra_instance_updates)"},{"line_number":2956,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_aae2c2d2","line":2953,"range":{"start_line":2952,"start_character":12,"end_line":2953,"end_character":67},"in_reply_to":"ba5da102_48266bbb","updated":"2016-11-04 07:16:35.000000000","message":"Done","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"d33729b5936e32ac227e6a4c5f7e31356d5b31a6","unresolved":false,"context_lines":[{"line_number":3055,"context_line":"            # to them, we need to support the old way"},{"line_number":3056,"context_line":"            request_spec \u003d None"},{"line_number":3057,"context_line":""},{"line_number":3058,"context_line":"        if force is False and host_name is not None:"},{"line_number":3059,"context_line":"            host_name \u003d None"},{"line_number":3060,"context_line":"            target \u003d nodes[0]"},{"line_number":3061,"context_line":"            if request_spec:"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_e09e6455","line":3058,"range":{"start_line":3058,"start_character":8,"end_line":3058,"end_character":25},"updated":"2016-11-01 13:42:19.000000000","message":"\u0027if not force\u0027 looks more readable.","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"fa9e06ea9e311eb3cfcb1ae861c7f22f874d0311","unresolved":false,"context_lines":[{"line_number":3055,"context_line":"            # to them, we need to support the old way"},{"line_number":3056,"context_line":"            request_spec \u003d None"},{"line_number":3057,"context_line":""},{"line_number":3058,"context_line":"        if force is False and host_name is not None:"},{"line_number":3059,"context_line":"            host_name \u003d None"},{"line_number":3060,"context_line":"            target \u003d nodes[0]"},{"line_number":3061,"context_line":"            if request_spec:"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_4af12694","line":3058,"range":{"start_line":3058,"start_character":8,"end_line":3058,"end_character":25},"in_reply_to":"ba5da102_e09e6455","updated":"2016-11-04 07:16:35.000000000","message":"Done","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"d33729b5936e32ac227e6a4c5f7e31356d5b31a6","unresolved":false,"context_lines":[{"line_number":3058,"context_line":"        if force is False and host_name is not None:"},{"line_number":3059,"context_line":"            host_name \u003d None"},{"line_number":3060,"context_line":"            target \u003d nodes[0]"},{"line_number":3061,"context_line":"            if request_spec:"},{"line_number":3062,"context_line":"                destination \u003d objects.Destination("},{"line_number":3063,"context_line":"                    host\u003dtarget.host, node\u003dtarget.hypervisor_hostname)"},{"line_number":3064,"context_line":"                request_spec.requested_destination \u003d destination"},{"line_number":3065,"context_line":""},{"line_number":3066,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":3067,"context_line":"        if host_name:"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_c0b080e0","line":3064,"range":{"start_line":3061,"start_character":12,"end_line":3064,"end_character":64},"updated":"2016-11-01 13:42:19.000000000","message":"No need of a new variable. You can do like this:\n\nrequest_spec.requested_destination \u003d objects.Destination(\n                    host\u003dtarget.host, node\u003dtarget.hypervisor_hostname)","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"fa9e06ea9e311eb3cfcb1ae861c7f22f874d0311","unresolved":false,"context_lines":[{"line_number":3058,"context_line":"        if force is False and host_name is not None:"},{"line_number":3059,"context_line":"            host_name \u003d None"},{"line_number":3060,"context_line":"            target \u003d nodes[0]"},{"line_number":3061,"context_line":"            if request_spec:"},{"line_number":3062,"context_line":"                destination \u003d objects.Destination("},{"line_number":3063,"context_line":"                    host\u003dtarget.host, node\u003dtarget.hypervisor_hostname)"},{"line_number":3064,"context_line":"                request_spec.requested_destination \u003d destination"},{"line_number":3065,"context_line":""},{"line_number":3066,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":3067,"context_line":"        if host_name:"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_ea367a4f","line":3064,"range":{"start_line":3061,"start_character":12,"end_line":3064,"end_character":64},"in_reply_to":"ba5da102_c0b080e0","updated":"2016-11-04 07:16:35.000000000","message":"Done","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"}],"nova/compute/manager.py":[{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"cc85f2733ee3ae9e1cc6c2f4117544fe672ea857","unresolved":false,"context_lines":[{"line_number":3692,"context_line":"            except exception.MigrationPreCheckError:"},{"line_number":3693,"context_line":"                raise"},{"line_number":3694,"context_line":"            except Exception:"},{"line_number":3695,"context_line":"                if target_specified:"},{"line_number":3696,"context_line":"                    LOG.exception(_LE(\u0027prep_resize is failed.\u0027),"},{"line_number":3697,"context_line":"                                  instance\u003dinstance)"},{"line_number":3698,"context_line":"                    raise"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_18c78896","line":3695,"updated":"2016-09-19 11:09:01.000000000","message":"Not sure you will need this once you change code to use request_spec.requested_destination instead of scheduler hints","commit_id":"87f190399de76d3ef232db2bcd619991ee6cc297"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"d33729b5936e32ac227e6a4c5f7e31356d5b31a6","unresolved":false,"context_lines":[{"line_number":3695,"context_line":"                raise"},{"line_number":3696,"context_line":"            except Exception:"},{"line_number":3697,"context_line":"                if target_specified:"},{"line_number":3698,"context_line":"                    LOG.exception(_LE(\u0027prep_resize is failed.\u0027),"},{"line_number":3699,"context_line":"                                  instance\u003dinstance)"},{"line_number":3700,"context_line":"                    raise"},{"line_number":3701,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_a81467f5","line":3698,"range":{"start_line":3698,"start_character":51,"end_line":3698,"end_character":53},"updated":"2016-11-01 13:42:19.000000000","message":"s/is/has","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"fa9e06ea9e311eb3cfcb1ae861c7f22f874d0311","unresolved":false,"context_lines":[{"line_number":3695,"context_line":"                raise"},{"line_number":3696,"context_line":"            except Exception:"},{"line_number":3697,"context_line":"                if target_specified:"},{"line_number":3698,"context_line":"                    LOG.exception(_LE(\u0027prep_resize is failed.\u0027),"},{"line_number":3699,"context_line":"                                  instance\u003dinstance)"},{"line_number":3700,"context_line":"                    raise"},{"line_number":3701,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_6a434aaf","line":3698,"range":{"start_line":3698,"start_character":51,"end_line":3698,"end_character":53},"in_reply_to":"ba5da102_a81467f5","updated":"2016-11-04 07:16:35.000000000","message":"Done","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"2cbfbf752310378a964d9c987701050c2ac61e12","unresolved":false,"context_lines":[{"line_number":3755,"context_line":"            except exception.MigrationPreCheckError:"},{"line_number":3756,"context_line":"                raise"},{"line_number":3757,"context_line":"            except Exception:"},{"line_number":3758,"context_line":"                if target_specified:"},{"line_number":3759,"context_line":"                    LOG.exception(_LE(\u0027prep_resize has failed.\u0027),"},{"line_number":3760,"context_line":"                                  instance\u003dinstance)"},{"line_number":3761,"context_line":"                    raise"},{"line_number":3762,"context_line":"                else:"},{"line_number":3763,"context_line":"                    # try to re-schedule the resize elsewhere:"},{"line_number":3764,"context_line":"                    exc_info \u003d sys.exc_info()"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a71b18c_039bf166","line":3761,"range":{"start_line":3758,"start_character":16,"end_line":3761,"end_character":25},"updated":"2016-12-12 10:17:28.000000000","message":"What do you think about removing this if and passing \u0027target_specified\u0027 variable to _reschedule_resize_or_reraise method? So the _reschedule_resize_or_reraise method will take action and reraise original exception. You could also log something like \"Cannot reschedule instance after failed resize, because the target host was specified\" and add instance and host to the error log?","commit_id":"94239b6499f78644b50a613858f7cf894472c033"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"da8afa02aec7892c54f4a8630abb03adc5fa8d92","unresolved":false,"context_lines":[{"line_number":3755,"context_line":"            except exception.MigrationPreCheckError:"},{"line_number":3756,"context_line":"                raise"},{"line_number":3757,"context_line":"            except Exception:"},{"line_number":3758,"context_line":"                if target_specified:"},{"line_number":3759,"context_line":"                    LOG.exception(_LE(\u0027prep_resize has failed.\u0027),"},{"line_number":3760,"context_line":"                                  instance\u003dinstance)"},{"line_number":3761,"context_line":"                    raise"},{"line_number":3762,"context_line":"                else:"},{"line_number":3763,"context_line":"                    # try to re-schedule the resize elsewhere:"},{"line_number":3764,"context_line":"                    exc_info \u003d sys.exc_info()"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_f362d115","line":3761,"range":{"start_line":3758,"start_character":16,"end_line":3761,"end_character":25},"in_reply_to":"3a71b18c_039bf166","updated":"2016-12-13 08:15:34.000000000","message":"Done.\nBut it is not necessary to output \u0027host\u0027 information to the log. Because \u0027host\u0027 can be known by the log file (the \u0027host\u0027 is a host that output the log file).","commit_id":"94239b6499f78644b50a613858f7cf894472c033"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"fa598b4e9a8e70940a7cff017af50917d135ef3d","unresolved":false,"context_lines":[{"line_number":3763,"context_line":"                # try to re-schedule the resize elsewhere:"},{"line_number":3764,"context_line":"                exc_info \u003d sys.exc_info()"},{"line_number":3765,"context_line":"                self._reschedule_resize_or_reraise(context, image,"},{"line_number":3766,"context_line":"                    instance, exc_info, instance_type, quotas,"},{"line_number":3767,"context_line":"                    request_spec, filter_properties, target_specified)"},{"line_number":3768,"context_line":"            finally:"},{"line_number":3769,"context_line":"                extra_usage_info \u003d dict("}],"source_content_type":"text/x-python","patch_set":19,"id":"1a6eadb0_1a09f4dd","line":3766,"range":{"start_line":3766,"start_character":19,"end_line":3766,"end_character":28},"updated":"2016-12-13 21:45:40.000000000","message":"well, you don\u0027t need to modify that, right?","commit_id":"8b99b8dac531a402c4e8014c922deebf38ff20a9"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"7e6350e5a7b56e0d924ad42f097d9f0c50785cce","unresolved":false,"context_lines":[{"line_number":3763,"context_line":"                # try to re-schedule the resize elsewhere:"},{"line_number":3764,"context_line":"                exc_info \u003d sys.exc_info()"},{"line_number":3765,"context_line":"                self._reschedule_resize_or_reraise(context, image,"},{"line_number":3766,"context_line":"                    instance, exc_info, instance_type, quotas,"},{"line_number":3767,"context_line":"                    request_spec, filter_properties, target_specified)"},{"line_number":3768,"context_line":"            finally:"},{"line_number":3769,"context_line":"                extra_usage_info \u003d dict("}],"source_content_type":"text/x-python","patch_set":19,"id":"1a6eadb0_706da497","line":3766,"range":{"start_line":3766,"start_character":19,"end_line":3766,"end_character":28},"in_reply_to":"1a6eadb0_1a09f4dd","updated":"2016-12-14 01:44:56.000000000","message":"Done","commit_id":"8b99b8dac531a402c4e8014c922deebf38ff20a9"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"fa598b4e9a8e70940a7cff017af50917d135ef3d","unresolved":false,"context_lines":[{"line_number":3782,"context_line":"        \"\"\""},{"line_number":3783,"context_line":"        if target_specified:"},{"line_number":3784,"context_line":"            LOG.error(_LE(\"Cannot reschedule instance after failed resize, \""},{"line_number":3785,"context_line":"                          \"because the target host was specified.\"),"},{"line_number":3786,"context_line":"                      instance\u003dinstance)"},{"line_number":3787,"context_line":"            six.reraise(*exc_info)"},{"line_number":3788,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1a6eadb0_bac5603d","line":3785,"updated":"2016-12-13 21:45:40.000000000","message":"Well, when rescheduling below, we\u0027re adding the current node in the retry object and pass it back to the conductor (and then to the scheduler) so that it\u0027s verified by the RetryFilter.\n\nSo, given we could have a requested_destination field set by the admin calling the resize API, a reschedule would then call the scheduler with that specific requested_destination set to the original proposed host but also with that host in the retry object, so that the scheduler would get a False return by the RetryFilter so eventually it would be a NoValidHosts.\n\nTo be clear, my main wonders are whether that \u0027target_specified\u0027 bit should be the right interface or whether we should prefer to deprecate the legacy dicts and pass directly the RequestSpec object to the compute manager.","commit_id":"8b99b8dac531a402c4e8014c922deebf38ff20a9"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"638c6b7a275074eadee4e5bda272ef617aee37e1","unresolved":false,"context_lines":[{"line_number":3782,"context_line":"        \"\"\""},{"line_number":3783,"context_line":"        if target_specified:"},{"line_number":3784,"context_line":"            LOG.error(_LE(\"Cannot reschedule instance after failed resize, \""},{"line_number":3785,"context_line":"                          \"because the target host was specified.\"),"},{"line_number":3786,"context_line":"                      instance\u003dinstance)"},{"line_number":3787,"context_line":"            six.reraise(*exc_info)"},{"line_number":3788,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1a6eadb0_45102ca9","line":3785,"in_reply_to":"1a6eadb0_14ac4433","updated":"2016-12-19 04:32:27.000000000","message":"@Sylvain, Thank you for you comment.\n\nBut now legacy dict has to be used because of oslo.messaging bug(1529084).\nDo I have to fix it at first?\n\nhttps://github.com/openstack/nova/blob/d0df4333a8f6435132ec7bb35f879895f7f3c787/nova/conductor/tasks/migrate.py#L70-L73","commit_id":"8b99b8dac531a402c4e8014c922deebf38ff20a9"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"efa439f696a515e84a33d353d3b0e3c7c82acbd3","unresolved":false,"context_lines":[{"line_number":3782,"context_line":"        \"\"\""},{"line_number":3783,"context_line":"        if target_specified:"},{"line_number":3784,"context_line":"            LOG.error(_LE(\"Cannot reschedule instance after failed resize, \""},{"line_number":3785,"context_line":"                          \"because the target host was specified.\"),"},{"line_number":3786,"context_line":"                      instance\u003dinstance)"},{"line_number":3787,"context_line":"            six.reraise(*exc_info)"},{"line_number":3788,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1a6eadb0_14ac4433","line":3785,"in_reply_to":"1a6eadb0_70c92478","updated":"2016-12-14 14:44:47.000000000","message":"There are 3 possibilities :\n\n#1 the user calls resize without specifiying a destination host, that\u0027s not a problem, if we reschedule, we call again the scheduler\n#2 the user provided a destination without using the force flag, then the RequestSpec object is augmented by having the requested_destination field set and then the scheduler is called. That said, we don\u0027t persist that modified object so a rescheduler wouldn\u0027t find it in the conductor manager.\n#3 the user provided a destination and asked for a force. Then we don\u0027t augment the Spec object, and we just call the compute node object directly without checking the scheduler. If we would reschedule, we would somehow need to know the existing RequestSpec object that was passed down so that we would know whether it was forced or not.\n\nHere are my thoughts : if we want to reschedule, I\u0027d prefer to pass down to the compute the RequestSpec object and deprecate the legacy dicts so that we would call again in ._reschedule() the RequestSpec object (that would help us to not persist that setting).\n\nThat would help us making a consistent experience between all our RPC APIs where we don\u0027t use the legacy dicts but rather the related o.vo object.","commit_id":"8b99b8dac531a402c4e8014c922deebf38ff20a9"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"7e6350e5a7b56e0d924ad42f097d9f0c50785cce","unresolved":false,"context_lines":[{"line_number":3782,"context_line":"        \"\"\""},{"line_number":3783,"context_line":"        if target_specified:"},{"line_number":3784,"context_line":"            LOG.error(_LE(\"Cannot reschedule instance after failed resize, \""},{"line_number":3785,"context_line":"                          \"because the target host was specified.\"),"},{"line_number":3786,"context_line":"                      instance\u003dinstance)"},{"line_number":3787,"context_line":"            six.reraise(*exc_info)"},{"line_number":3788,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1a6eadb0_70c92478","line":3785,"in_reply_to":"1a6eadb0_bac5603d","updated":"2016-12-14 01:44:56.000000000","message":"The \u0027target_specified\u0027 case is \u0027that force\u0027 is true.\nIn the case. it is not used scheduler.\nSo it has to be distinguished between scheduler case and not using scheduler case.","commit_id":"8b99b8dac531a402c4e8014c922deebf38ff20a9"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f4508b8cbab200ac78a601d2d4ebfa6d2bd8bb62","unresolved":false,"context_lines":[{"line_number":3782,"context_line":"        \"\"\""},{"line_number":3783,"context_line":"        if target_specified:"},{"line_number":3784,"context_line":"            LOG.error(_LE(\"Cannot reschedule instance after failed resize, \""},{"line_number":3785,"context_line":"                          \"because the target host was specified.\"),"},{"line_number":3786,"context_line":"                      instance\u003dinstance)"},{"line_number":3787,"context_line":"            six.reraise(*exc_info)"},{"line_number":3788,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"1a6eadb0_34030011","line":3785,"updated":"2016-12-14 14:45:46.000000000","message":"See my elaborated comment on PS19, I\u0027d prefer to pass a RequestSpec object instead of adding yet another boolean.","commit_id":"e7c5493bce2c8b8ae3ca321343cc2e883887b30d"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"0b74190b245771003beb156aecd6f4cf3c3062fe","unresolved":false,"context_lines":[{"line_number":3766,"context_line":"            except exception.MigrationPreCheckError:"},{"line_number":3767,"context_line":"                raise"},{"line_number":3768,"context_line":"            except Exception:"},{"line_number":3769,"context_line":"                # try to re-schedule the resize elsewhere:"},{"line_number":3770,"context_line":"                exc_info \u003d sys.exc_info()"},{"line_number":3771,"context_line":"                self._reschedule_resize_or_reraise(context, image, instance,"},{"line_number":3772,"context_line":"                        exc_info, instance_type, quotas, request_spec,"}],"source_content_type":"text/x-python","patch_set":21,"id":"1a6eadb0_c0113db1","line":3769,"updated":"2016-12-20 12:49:44.000000000","message":"actually the check at line 3789 can be done here","commit_id":"94383244545750cdf6fc8de85d12bd78514f999d"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"0b74190b245771003beb156aecd6f4cf3c3062fe","unresolved":false,"context_lines":[{"line_number":3787,"context_line":"        error out the instance."},{"line_number":3788,"context_line":"        \"\"\""},{"line_number":3789,"context_line":"        if target_specified:"},{"line_number":3790,"context_line":"            LOG.error(_LE(\"Cannot reschedule instance after failed resize, \""},{"line_number":3791,"context_line":"                          \"because the target host was specified.\"),"},{"line_number":3792,"context_line":"                      instance\u003dinstance)"},{"line_number":3793,"context_line":"            six.reraise(*exc_info)"}],"source_content_type":"text/x-python","patch_set":21,"id":"1a6eadb0_c0785dfb","line":3790,"range":{"start_line":3790,"start_character":16,"end_line":3790,"end_character":21},"updated":"2016-12-20 12:49:44.000000000","message":"this is expected? force a host will not cause reschedule? \nso maybe a info should be enough?","commit_id":"94383244545750cdf6fc8de85d12bd78514f999d"}],"nova/compute/rpcapi.py":[{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"a5a5c680b6f24b2af66a790a477e24d92cde4e5e","unresolved":false,"context_lines":[{"line_number":746,"context_line":"                    \u0027target_specified\u0027: target_specified}"},{"line_number":747,"context_line":"        version \u003d \u00274.14\u0027"},{"line_number":748,"context_line":"        client \u003d self.router.by_host(ctxt, host)"},{"line_number":749,"context_line":"        if not client.can_send_version(version):"},{"line_number":750,"context_line":"            version \u003d \u00274.1\u0027"},{"line_number":751,"context_line":"            del msg_args[\u0027target_specified\u0027]"},{"line_number":752,"context_line":"        if not client.can_send_version(version):"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a71b18c_205aee50","line":749,"range":{"start_line":749,"start_character":8,"end_line":749,"end_character":48},"updated":"2016-12-09 07:47:24.000000000","message":"what if the client can\u0027t send target version 4.14, for example during upgrade procedure, when controller nodes are already updated, but computes are in a partial state(some updated/some not). In case of failure during prep_resize from an old compute, resize will be rescheduled, right? I think this case requires at least log.warning, so operator could figure out why force flag didn\u0027t help","commit_id":"5c0f160b08dac7a40482682005f248be6a6034ca"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"cf1e0576c19ba41462617adf4476a062ca48d632","unresolved":false,"context_lines":[{"line_number":746,"context_line":"                    \u0027target_specified\u0027: target_specified}"},{"line_number":747,"context_line":"        version \u003d \u00274.14\u0027"},{"line_number":748,"context_line":"        client \u003d self.router.by_host(ctxt, host)"},{"line_number":749,"context_line":"        if not client.can_send_version(version):"},{"line_number":750,"context_line":"            version \u003d \u00274.1\u0027"},{"line_number":751,"context_line":"            del msg_args[\u0027target_specified\u0027]"},{"line_number":752,"context_line":"        if not client.can_send_version(version):"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a71b18c_9c8a0963","line":749,"range":{"start_line":749,"start_character":8,"end_line":749,"end_character":48},"in_reply_to":"3a71b18c_205aee50","updated":"2016-12-12 05:23:46.000000000","message":"Yes.Done.","commit_id":"5c0f160b08dac7a40482682005f248be6a6034ca"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"2cbfbf752310378a964d9c987701050c2ac61e12","unresolved":false,"context_lines":[{"line_number":748,"context_line":"        client \u003d self.router.by_host(ctxt, host)"},{"line_number":749,"context_line":"        if not client.can_send_version(version):"},{"line_number":750,"context_line":"            if msg_args[\u0027target_specified\u0027]:"},{"line_number":751,"context_line":"                LOG.warning(_LW(\"The version %(version)s message cannot \""},{"line_number":752,"context_line":"                                \"be sent. When an exception occurs in the \""},{"line_number":753,"context_line":"                                \"compute node, it will be rescheduled.\"),"},{"line_number":754,"context_line":"                            {\u0027version\u0027: version})"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a71b18c_a3123db2","line":751,"updated":"2016-12-12 10:17:28.000000000","message":"I wonder whether this should be blocked rather than just logging a warning there. It might be misleading when you cold migrate VM to a particular host and the VM will end up on a completely different compute node.\n\nI\u0027d love to see opinion of nova cores there. Maybe we might want to block this the same way that we block live migrations with \u0027auto\u0027 type specified:\n\nhttps://github.com/openstack/nova/blob/4e747092bcb015303efc2ab13da98ef5ce575ec8/nova/compute/rpcapi.py#L446\n\nHowever, when upgrading OpenStack and cold migrating to a newer version someone might want to specify a target host to be sure that VM will be moved to the newer compute node. But as I mentioned above this behavior might be misleading when it results in a reschedule. It will cause unnecessary move of the VM.","commit_id":"94239b6499f78644b50a613858f7cf894472c033"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"f6ea676a566f4f83f6277d62f619d2c73522841a","unresolved":false,"context_lines":[{"line_number":748,"context_line":"        client \u003d self.router.by_host(ctxt, host)"},{"line_number":749,"context_line":"        if not client.can_send_version(version):"},{"line_number":750,"context_line":"            if msg_args[\u0027target_specified\u0027]:"},{"line_number":751,"context_line":"                LOG.warning(_LW(\"The version %(version)s message cannot \""},{"line_number":752,"context_line":"                                \"be sent. When an exception occurs in the \""},{"line_number":753,"context_line":"                                \"compute node, it will be rescheduled.\"),"},{"line_number":754,"context_line":"                            {\u0027version\u0027: version})"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_c0c7b343","line":751,"in_reply_to":"1a6eadb0_20014caf","updated":"2016-12-13 11:14:41.000000000","message":"There is another option. A current approach is to decide whether migration is needed to be rescheduled on compute node, while, I wonder, could we move this logic to conductor instead? One of  the possible ways to solving this - to record that we specified target host into migration object record, and then check that condition on conductor\u0027s side, so we will not change compute\u0027s code at all. \nI\u0027ve researched that idea, the problem now is that migrations record are created on compute\u0027s side for cold migration. Maybe there are other options, that allows doing such smart rescheduling on conductor\u0027s side?","commit_id":"94239b6499f78644b50a613858f7cf894472c033"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"b833d7f12a28ab6e6cbe40df676c79d961263200","unresolved":false,"context_lines":[{"line_number":748,"context_line":"        client \u003d self.router.by_host(ctxt, host)"},{"line_number":749,"context_line":"        if not client.can_send_version(version):"},{"line_number":750,"context_line":"            if msg_args[\u0027target_specified\u0027]:"},{"line_number":751,"context_line":"                LOG.warning(_LW(\"The version %(version)s message cannot \""},{"line_number":752,"context_line":"                                \"be sent. When an exception occurs in the \""},{"line_number":753,"context_line":"                                \"compute node, it will be rescheduled.\"),"},{"line_number":754,"context_line":"                            {\u0027version\u0027: version})"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_70e84411","line":751,"in_reply_to":"1a6eadb0_c0c7b343","updated":"2016-12-14 00:51:44.000000000","message":"Timofey, Thank you for your comment.\n\nI added raising an exception here in PS19 according to Pawel\u0027s comment.\nIt is consistent with live migration case.","commit_id":"94239b6499f78644b50a613858f7cf894472c033"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"da8afa02aec7892c54f4a8630abb03adc5fa8d92","unresolved":false,"context_lines":[{"line_number":748,"context_line":"        client \u003d self.router.by_host(ctxt, host)"},{"line_number":749,"context_line":"        if not client.can_send_version(version):"},{"line_number":750,"context_line":"            if msg_args[\u0027target_specified\u0027]:"},{"line_number":751,"context_line":"                LOG.warning(_LW(\"The version %(version)s message cannot \""},{"line_number":752,"context_line":"                                \"be sent. When an exception occurs in the \""},{"line_number":753,"context_line":"                                \"compute node, it will be rescheduled.\"),"},{"line_number":754,"context_line":"                            {\u0027version\u0027: version})"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a6eadb0_20014caf","line":751,"in_reply_to":"3a71b18c_a3123db2","updated":"2016-12-13 08:15:34.000000000","message":"Done","commit_id":"94239b6499f78644b50a613858f7cf894472c033"}],"nova/exception.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"0b74190b245771003beb156aecd6f4cf3c3062fe","unresolved":false,"context_lines":[{"line_number":1816,"context_line":""},{"line_number":1817,"context_line":""},{"line_number":1818,"context_line":"class ColdMigrationWithOldNovaNotSupported(NovaException):"},{"line_number":1819,"context_line":"    msg_fmt \u003d _(\"Cold migration with API v2.40 requires all the Ocata \""},{"line_number":1820,"context_line":"                \"upgrade to be complete before it is available.\")"},{"line_number":1821,"context_line":""},{"line_number":1822,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"1a6eadb0_6084e9b0","line":1819,"range":{"start_line":1819,"start_character":44,"end_line":1819,"end_character":46},"updated":"2016-12-20 12:49:44.000000000","message":"this seems to be 2.41? \nI think we don\u0027t need talk about mircoversion in exceptions","commit_id":"94383244545750cdf6fc8de85d12bd78514f999d"}],"nova/tests/unit/api/openstack/compute/test_migrate_server.py":[{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"d33729b5936e32ac227e6a4c5f7e31356d5b31a6","unresolved":false,"context_lines":[{"line_number":488,"context_line":"                \u0027force\u0027: kwargs.get(\u0027force\u0027, False)}"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"    def test_migrate_without_host(self):"},{"line_number":491,"context_line":"        body \u003d self._get_cold_migration_body(host\u003dself.host_name)"},{"line_number":492,"context_line":"        del body[\u0027migrate\u0027][\u0027host\u0027]"},{"line_number":493,"context_line":"        self.assertRaises(self.validation_error,"},{"line_number":494,"context_line":"                          self.controller._migrate,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_20d5d542","line":491,"range":{"start_line":491,"start_character":45,"end_line":491,"end_character":64},"updated":"2016-11-01 13:42:19.000000000","message":"No need to pass host here as we want to test schema without \u0027host\u0027.","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"fa9e06ea9e311eb3cfcb1ae861c7f22f874d0311","unresolved":false,"context_lines":[{"line_number":488,"context_line":"                \u0027force\u0027: kwargs.get(\u0027force\u0027, False)}"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"    def test_migrate_without_host(self):"},{"line_number":491,"context_line":"        body \u003d self._get_cold_migration_body(host\u003dself.host_name)"},{"line_number":492,"context_line":"        del body[\u0027migrate\u0027][\u0027host\u0027]"},{"line_number":493,"context_line":"        self.assertRaises(self.validation_error,"},{"line_number":494,"context_line":"                          self.controller._migrate,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_aa7e42e1","line":491,"range":{"start_line":491,"start_character":45,"end_line":491,"end_character":64},"in_reply_to":"ba5da102_20d5d542","updated":"2016-11-04 07:16:35.000000000","message":"Done","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"d33729b5936e32ac227e6a4c5f7e31356d5b31a6","unresolved":false,"context_lines":[{"line_number":498,"context_line":"        exc_info \u003d exception.ComputeHostNotFound(host\u003d\u0027nonexistent_host\u0027)"},{"line_number":499,"context_line":"        self._test_migrate_exception(exc_info, webob.exc.HTTPBadRequest)"},{"line_number":500,"context_line":""},{"line_number":501,"context_line":"    def test_migrate_with_force_false(self):"},{"line_number":502,"context_line":"        method_translations \u003d {\u0027_migrate\u0027: \u0027resize\u0027}"},{"line_number":503,"context_line":"        body_map \u003d {\u0027_migrate\u0027: self._get_cold_migration_body("},{"line_number":504,"context_line":"                                     host\u003dself.host_name, force\u003dFalse)}"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_c0bed9fe","line":501,"updated":"2016-11-01 13:42:19.000000000","message":"There should be test cases for following cases:\n\n1] to test the schema without \u0027migrate\u0027 object itself.\n2] to test the schema providing additional properties as we are not allowing additional properties.\n3] to test the host parameter length of max 255 characters.","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"fa9e06ea9e311eb3cfcb1ae861c7f22f874d0311","unresolved":false,"context_lines":[{"line_number":498,"context_line":"        exc_info \u003d exception.ComputeHostNotFound(host\u003d\u0027nonexistent_host\u0027)"},{"line_number":499,"context_line":"        self._test_migrate_exception(exc_info, webob.exc.HTTPBadRequest)"},{"line_number":500,"context_line":""},{"line_number":501,"context_line":"    def test_migrate_with_force_false(self):"},{"line_number":502,"context_line":"        method_translations \u003d {\u0027_migrate\u0027: \u0027resize\u0027}"},{"line_number":503,"context_line":"        body_map \u003d {\u0027_migrate\u0027: self._get_cold_migration_body("},{"line_number":504,"context_line":"                                     host\u003dself.host_name, force\u003dFalse)}"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_f80c913d","line":501,"in_reply_to":"ba5da102_c0bed9fe","updated":"2016-11-04 07:16:35.000000000","message":"Done","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"d33729b5936e32ac227e6a4c5f7e31356d5b31a6","unresolved":false,"context_lines":[{"line_number":512,"context_line":"        # \u0027host\u0027 is set, but \u0027force\u0027 does not exist."},{"line_number":513,"context_line":"        method_translations \u003d {\u0027_migrate\u0027: \u0027resize\u0027}"},{"line_number":514,"context_line":"        body \u003d self._get_cold_migration_body(host\u003dself.host_name,"},{"line_number":515,"context_line":"                                             force\u003dself.migrate_force)"},{"line_number":516,"context_line":"        del body[\u0027migrate\u0027][\u0027force\u0027]"},{"line_number":517,"context_line":"        body_map \u003d {\u0027_migrate\u0027: body}"},{"line_number":518,"context_line":"        args_map \u003d {\u0027_migrate\u0027: ((), {\u0027host_name\u0027: self.host_name,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_20cf7c57","line":515,"range":{"start_line":515,"start_character":45,"end_line":515,"end_character":69},"updated":"2016-11-01 13:42:19.000000000","message":"No need to pass \u0027force\u0027 as we are testing schema without passing force option.","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"fa9e06ea9e311eb3cfcb1ae861c7f22f874d0311","unresolved":false,"context_lines":[{"line_number":512,"context_line":"        # \u0027host\u0027 is set, but \u0027force\u0027 does not exist."},{"line_number":513,"context_line":"        method_translations \u003d {\u0027_migrate\u0027: \u0027resize\u0027}"},{"line_number":514,"context_line":"        body \u003d self._get_cold_migration_body(host\u003dself.host_name,"},{"line_number":515,"context_line":"                                             force\u003dself.migrate_force)"},{"line_number":516,"context_line":"        del body[\u0027migrate\u0027][\u0027force\u0027]"},{"line_number":517,"context_line":"        body_map \u003d {\u0027_migrate\u0027: body}"},{"line_number":518,"context_line":"        args_map \u003d {\u0027_migrate\u0027: ((), {\u0027host_name\u0027: self.host_name,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_cacff626","line":515,"range":{"start_line":515,"start_character":45,"end_line":515,"end_character":69},"in_reply_to":"ba5da102_20cf7c57","updated":"2016-11-04 07:16:35.000000000","message":"Done","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"d33729b5936e32ac227e6a4c5f7e31356d5b31a6","unresolved":false,"context_lines":[{"line_number":529,"context_line":"                          self.controller._migrate,"},{"line_number":530,"context_line":"                          self.req, fakes.FAKE_UUID, body\u003dbody)"},{"line_number":531,"context_line":""},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"class MigrateServerPolicyEnforcementV21(test.NoDBTestCase):"},{"line_number":534,"context_line":""},{"line_number":535,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_a009cc97","line":532,"updated":"2016-11-01 13:42:19.000000000","message":"There should be a test case for following case:\n\n1] Values for \u0027force\u0027 flag other than boolean should not be accepted.","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"fa9e06ea9e311eb3cfcb1ae861c7f22f874d0311","unresolved":false,"context_lines":[{"line_number":529,"context_line":"                          self.controller._migrate,"},{"line_number":530,"context_line":"                          self.req, fakes.FAKE_UUID, body\u003dbody)"},{"line_number":531,"context_line":""},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"class MigrateServerPolicyEnforcementV21(test.NoDBTestCase):"},{"line_number":534,"context_line":""},{"line_number":535,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_18122559","line":532,"in_reply_to":"ba5da102_a009cc97","updated":"2016-11-04 07:16:35.000000000","message":"Done","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"}],"nova/tests/unit/compute/test_compute_api.py":[{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"d33729b5936e32ac227e6a4c5f7e31356d5b31a6","unresolved":false,"context_lines":[{"line_number":1907,"context_line":"        self._test_migrate(host_name\u003d\u0027target_host\u0027, force\u003dTrue)"},{"line_number":1908,"context_line":""},{"line_number":1909,"context_line":"    @mock.patch.object(objects.ComputeNodeList, \u0027get_all_by_host\u0027,"},{"line_number":1910,"context_line":"                       return_value\u003d[])"},{"line_number":1911,"context_line":"    def test_migrate_nonexistent_host(self, mock_get_all_by_host):"},{"line_number":1912,"context_line":"        fake_inst \u003d self._create_instance_obj()"},{"line_number":1913,"context_line":"        self.assertRaises(exception.ComputeHostNotFound,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_68cc0f36","line":1910,"range":{"start_line":1910,"start_character":23,"end_line":1910,"end_character":38},"updated":"2016-11-01 13:42:19.000000000","message":"This test case should be changed as \u0027compute_node_get_all_by_host\u0027 db api itself raises ComputeHostNotFound if there is no host found.","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"fa9e06ea9e311eb3cfcb1ae861c7f22f874d0311","unresolved":false,"context_lines":[{"line_number":1907,"context_line":"        self._test_migrate(host_name\u003d\u0027target_host\u0027, force\u003dTrue)"},{"line_number":1908,"context_line":""},{"line_number":1909,"context_line":"    @mock.patch.object(objects.ComputeNodeList, \u0027get_all_by_host\u0027,"},{"line_number":1910,"context_line":"                       return_value\u003d[])"},{"line_number":1911,"context_line":"    def test_migrate_nonexistent_host(self, mock_get_all_by_host):"},{"line_number":1912,"context_line":"        fake_inst \u003d self._create_instance_obj()"},{"line_number":1913,"context_line":"        self.assertRaises(exception.ComputeHostNotFound,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_d8550dfb","line":1910,"range":{"start_line":1910,"start_character":23,"end_line":1910,"end_character":38},"in_reply_to":"ba5da102_68cc0f36","updated":"2016-11-04 07:16:35.000000000","message":"Done","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"}],"nova/tests/unit/conductor/tasks/test_migrate.py":[{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"d33729b5936e32ac227e6a4c5f7e31356d5b31a6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"ba5da102_602b4d31","line":112,"updated":"2016-11-01 13:42:19.000000000","message":"There should be a test case for rollback case like we have at line #96","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"fa9e06ea9e311eb3cfcb1ae861c7f22f874d0311","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"ba5da102_184a2528","line":112,"in_reply_to":"ba5da102_602b4d31","updated":"2016-11-04 07:16:35.000000000","message":"There is a \u0027test_rollback\u0027 method (test case) and it is for \u0027rollback\u0027 method.\nSo IMO, it need not be added.","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"}],"nova/tests/unit/conductor/test_conductor.py":[{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"d33729b5936e32ac227e6a4c5f7e31356d5b31a6","unresolved":false,"context_lines":[{"line_number":399,"context_line":"                            request_spec, reservations, clean_shutdown,"},{"line_number":400,"context_line":"                            host_name_task, compute_rpcapi, scheduler_client):"},{"line_number":401,"context_line":"            self.assertEqual(host_name, host_name_task)"},{"line_number":402,"context_line":"            return None"},{"line_number":403,"context_line":"        migration_task_init.side_effect \u003d check_host_name"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: {}}"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_c01a5917","line":402,"range":{"start_line":402,"start_character":12,"end_line":402,"end_character":23},"updated":"2016-11-01 13:42:19.000000000","message":"Is there a need to return None?\nPlease add one blank line after this.","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"fa9e06ea9e311eb3cfcb1ae861c7f22f874d0311","unresolved":false,"context_lines":[{"line_number":399,"context_line":"                            request_spec, reservations, clean_shutdown,"},{"line_number":400,"context_line":"                            host_name_task, compute_rpcapi, scheduler_client):"},{"line_number":401,"context_line":"            self.assertEqual(host_name, host_name_task)"},{"line_number":402,"context_line":"            return None"},{"line_number":403,"context_line":"        migration_task_init.side_effect \u003d check_host_name"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: {}}"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_1895c587","line":402,"range":{"start_line":402,"start_character":12,"end_line":402,"end_character":23},"in_reply_to":"ba5da102_c01a5917","updated":"2016-11-04 07:16:35.000000000","message":"Done.\n\u0027return\u0027 statement is not necessary. So it is removed.\nAnd one blank line is added.","commit_id":"6d89d3f8772d7722bfb96b71fa5455bd47ad011e"}]}
