)]}'
{"nova/api/openstack/compute/contrib/admin_actions.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4811ada23b73cc49c7438dae0b43a2a70482cae9","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        except (exception.ComputeServiceUnavailable,"},{"line_number":286,"context_line":"                exception.InvalidHypervisorType,"},{"line_number":287,"context_line":"                exception.UnableToMigrateToSelf,"},{"line_number":288,"context_line":"                exception.DestinationHypervisorTooOld) as ex:"},{"line_number":289,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dstr(ex))"},{"line_number":290,"context_line":"        except Exception:"},{"line_number":291,"context_line":"            if host is None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2Fyq4%3D","line":288,"updated":"2013-03-12 14:22:13.000000000","message":"How does this change affect the task_state being reverted after failure? I don\u0027t actually see the task_state being changed anywhere before this...","commit_id":"5f46f6acf3a000c8e65ee6f2574aff518b036d29"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"371eaa6dfbbcc7d68d398a6c089e9e44ec2cdf06","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        except (exception.ComputeServiceUnavailable,"},{"line_number":286,"context_line":"                exception.InvalidHypervisorType,"},{"line_number":287,"context_line":"                exception.UnableToMigrateToSelf,"},{"line_number":288,"context_line":"                exception.DestinationHypervisorTooOld) as ex:"},{"line_number":289,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dstr(ex))"},{"line_number":290,"context_line":"        except Exception:"},{"line_number":291,"context_line":"            if host is None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2FttQ%3D","line":288,"in_reply_to":"AAAAN3%2F%2FxJU%3D","updated":"2013-03-15 14:24:07.000000000","message":"The argument isn\u0027t whether it achieves the desired result, it is whether it does so in a reasonable way.\n\nThat said, I was missing the api-\u003ecompute_api-\u003escheduler-\u003ereset-task-state linkage, which is what I asked in my first comment. After digging that up myself, I\u0027m okay with this now.","commit_id":"5f46f6acf3a000c8e65ee6f2574aff518b036d29"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"e8ea742c996eabf2549f226c99fdc60dd9e026df","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        except (exception.ComputeServiceUnavailable,"},{"line_number":286,"context_line":"                exception.InvalidHypervisorType,"},{"line_number":287,"context_line":"                exception.UnableToMigrateToSelf,"},{"line_number":288,"context_line":"                exception.DestinationHypervisorTooOld) as ex:"},{"line_number":289,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dstr(ex))"},{"line_number":290,"context_line":"        except Exception:"},{"line_number":291,"context_line":"            if host is None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2FxJU%3D","line":288,"in_reply_to":"AAAAN3%2F%2FykI%3D","updated":"2013-03-13 05:38:28.000000000","message":"Yes, actually, these three exceptions can be handled by the below default catch and the state revert is not handled by here(it\u0027s handled in \u003cscheduler\u003e/manager). So the aim I handle these three exceptions explicitly here is to give the end user a better message response. \n\nFor example, without handling exception InvalidHypervisorType explicitly, user will get the message like this:\n--------------------------------------------------------------------------------------------------------\nflwang@flwang-ThinkPad-X230:~/workspace_community/nova/bin$ nova live-migration flwang_test_1 nova-compute-2\nERROR: Live migration of instance fd8046a2-52c2-4d6e-982c-c67e43449c7b to host nova-compute-2 failed (HTTP 400) (Request-ID: req-9df52e2a-2ef3-42be-abb0-01c031eabcb2)\n\nBut with the explicit exception catch, he will see below message:\n---------------------------------------------------------------------------------------------------------\nflwang@flwang-ThinkPad-X230:~/workspace_community/nova/bin$ nova live-migration flwang_test_1 nova-compute-2\nERROR: The supplied hypervisor type of is invalid. (HTTP 400) (Request-ID: req-6217417e-ee81-46b8-a8c4-870f19d7e402)\n\nAfter this change, it looks better, right?","commit_id":"5f46f6acf3a000c8e65ee6f2574aff518b036d29"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8c11bb7323ac07619bea75081125b1425dd07443","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        except (exception.ComputeServiceUnavailable,"},{"line_number":286,"context_line":"                exception.InvalidHypervisorType,"},{"line_number":287,"context_line":"                exception.UnableToMigrateToSelf,"},{"line_number":288,"context_line":"                exception.DestinationHypervisorTooOld) as ex:"},{"line_number":289,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dstr(ex))"},{"line_number":290,"context_line":"        except Exception:"},{"line_number":291,"context_line":"            if host is None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2FykI%3D","line":288,"in_reply_to":"AAAAN3%2F%2FylU%3D","updated":"2013-03-12 15:14:41.000000000","message":"Right, that\u0027s in the call we\u0027re making. You should make _it_ revert the task state, as is done in that file in several other places. It doesn\u0027t belong here, IMHO.","commit_id":"5f46f6acf3a000c8e65ee6f2574aff518b036d29"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"e46240c5af4d1773cbbe156c521c0c2973228b7c","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        except (exception.ComputeServiceUnavailable,"},{"line_number":286,"context_line":"                exception.InvalidHypervisorType,"},{"line_number":287,"context_line":"                exception.UnableToMigrateToSelf,"},{"line_number":288,"context_line":"                exception.DestinationHypervisorTooOld) as ex:"},{"line_number":289,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dstr(ex))"},{"line_number":290,"context_line":"        except Exception:"},{"line_number":291,"context_line":"            if host is None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2FylU%3D","line":288,"in_reply_to":"AAAAN3%2F%2Fyq4%3D","updated":"2013-03-12 15:06:53.000000000","message":"The task_state of instance will be updated as migrating when the API request is handled by compute api. Please refer this: https://github.com/openstack/nova/blob/master/nova/compute/api.py#L2446","commit_id":"5f46f6acf3a000c8e65ee6f2574aff518b036d29"}],"nova/scheduler/manager.py":[{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"e8ea742c996eabf2549f226c99fdc60dd9e026df","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                context, instance, dest,"},{"line_number":97,"context_line":"                block_migration, disk_over_commit)"},{"line_number":98,"context_line":"        except (exception.ComputeServiceUnavailable,"},{"line_number":99,"context_line":"                exception.InvalidHypervisorType,"},{"line_number":100,"context_line":"                exception.UnableToMigrateToSelf,"},{"line_number":101,"context_line":"                exception.DestinationHypervisorTooOld) as ex:"},{"line_number":102,"context_line":"            request_spec \u003d {\u0027instance_properties\u0027: {"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2FxJI%3D","line":99,"updated":"2013-03-13 05:38:28.000000000","message":"The UT code is here.\nhttps://github.com/openstack/nova/blob/master/nova/tests/scheduler/test_scheduler.py#L679","commit_id":"5f46f6acf3a000c8e65ee6f2574aff518b036d29"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"e8ea742c996eabf2549f226c99fdc60dd9e026df","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                block_migration, disk_over_commit)"},{"line_number":98,"context_line":"        except (exception.ComputeServiceUnavailable,"},{"line_number":99,"context_line":"                exception.InvalidHypervisorType,"},{"line_number":100,"context_line":"                exception.UnableToMigrateToSelf,"},{"line_number":101,"context_line":"                exception.DestinationHypervisorTooOld) as ex:"},{"line_number":102,"context_line":"            request_spec \u003d {\u0027instance_properties\u0027: {"},{"line_number":103,"context_line":"                \u0027uuid\u0027: instance[\u0027uuid\u0027], },"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2FxJM%3D","line":100,"updated":"2013-03-13 05:38:28.000000000","message":"The UT code is here.\nhttps://github.com/openstack/nova/blob/master/nova/tests/scheduler/test_scheduler.py#L622","commit_id":"5f46f6acf3a000c8e65ee6f2574aff518b036d29"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"e8ea742c996eabf2549f226c99fdc60dd9e026df","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        except (exception.ComputeServiceUnavailable,"},{"line_number":99,"context_line":"                exception.InvalidHypervisorType,"},{"line_number":100,"context_line":"                exception.UnableToMigrateToSelf,"},{"line_number":101,"context_line":"                exception.DestinationHypervisorTooOld) as ex:"},{"line_number":102,"context_line":"            request_spec \u003d {\u0027instance_properties\u0027: {"},{"line_number":103,"context_line":"                \u0027uuid\u0027: instance[\u0027uuid\u0027], },"},{"line_number":104,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2FxJE%3D","line":101,"updated":"2013-03-13 05:38:28.000000000","message":"The UT code is here.\nhttps://github.com/openstack/nova/blob/master/nova/tests/scheduler/test_scheduler.py#L712","commit_id":"5f46f6acf3a000c8e65ee6f2574aff518b036d29"}]}
