)]}'
{"nova/compute/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"00958d6591efbf7dec164a0aaba6a924f8905407","unresolved":false,"context_lines":[{"line_number":3245,"context_line":"            self.compute_rpcapi.shelve_instance(context, instance\u003dinstance,"},{"line_number":3246,"context_line":"                    image_id\u003dimage_id, clean_shutdown\u003dclean_shutdown)"},{"line_number":3247,"context_line":"        else:"},{"line_number":3248,"context_line":"            self.compute_rpcapi.shelve_offload_instance(context,"},{"line_number":3249,"context_line":"                    instance\u003dinstance, clean_shutdown\u003dclean_shutdown)"},{"line_number":3250,"context_line":""},{"line_number":3251,"context_line":"    @check_instance_lock"},{"line_number":3252,"context_line":"    @check_instance_state(vm_state\u003d[vm_states.SHELVED])"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_dd79d5c4","line":3249,"range":{"start_line":3248,"start_character":12,"end_line":3249,"end_character":69},"updated":"2017-11-29 21:41:59.000000000","message":"We also shelve offload in this case, but we\u0027ve already recorded an action for shelve above regardless of whether or not we offload.","commit_id":"b6dc11cbf3aa2725fe59eb3802a93ff95a373a44"}],"nova/compute/instance_actions.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f7429db04f33e44683049ddb6337d4f038378002","unresolved":false,"context_lines":[{"line_number":47,"context_line":"UNRESCUE \u003d \u0027unrescue\u0027"},{"line_number":48,"context_line":"CHANGE_PASSWORD \u003d \u0027changePassword\u0027"},{"line_number":49,"context_line":"SHELVE \u003d \u0027shelve\u0027"},{"line_number":50,"context_line":"SHELVE_OFFLOAD \u003d \u0027shelve_offload\u0027"},{"line_number":51,"context_line":"UNSHELVE \u003d \u0027unshelve\u0027"},{"line_number":52,"context_line":"LIVE_MIGRATION \u003d \u0027live-migration\u0027"},{"line_number":53,"context_line":"LIVE_MIGRATION_CANCEL \u003d \u0027live_migration_cancel\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"df87a7cf_50b6a7fc","line":50,"range":{"start_line":50,"start_character":18,"end_line":50,"end_character":32},"updated":"2017-12-05 18:39:09.000000000","message":"This should be \"shelveOffload\" to match the action name in the REST API:\n\nhttps://developer.openstack.org/api-ref/compute/#shelf-offload-remove-server-shelveoffload-action","commit_id":"e032aba5c1fcf18b020008d67ec4bb9b75c85e23"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4f38e2c07b00ec4c6e1b52df2e1c6f1f4fa8aef1","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\"Possible actions on an instance."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Actions should probably match a user intention at the API level.  Because they"},{"line_number":19,"context_line":"can be user visible that should help to avoid confusion.  For that reason they"},{"line_number":20,"context_line":"tend to maintain the casing sent to the API."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Maintaining a list of actions here should protect against inconsistencies when"},{"line_number":23,"context_line":"they are used."}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_f8457944","line":20,"range":{"start_line":18,"start_character":0,"end_line":20,"end_character":44},"updated":"2017-12-23 14:18:43.000000000","message":"and this","commit_id":"1d88440eb421929438e77c637caf502075b43f56"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0428e2a2de8f9a041f09133c4b2814855f4a9ff3","unresolved":false,"context_lines":[{"line_number":47,"context_line":"UNRESCUE \u003d \u0027unrescue\u0027"},{"line_number":48,"context_line":"CHANGE_PASSWORD \u003d \u0027changePassword\u0027"},{"line_number":49,"context_line":"SHELVE \u003d \u0027shelve\u0027"},{"line_number":50,"context_line":"SHELVE_OFFLOAD \u003d \u0027shelveOffload\u0027"},{"line_number":51,"context_line":"UNSHELVE \u003d \u0027unshelve\u0027"},{"line_number":52,"context_line":"LIVE_MIGRATION \u003d \u0027live-migration\u0027"},{"line_number":53,"context_line":"LIVE_MIGRATION_CANCEL \u003d \u0027live_migration_cancel\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_c373f27f","line":50,"range":{"start_line":50,"start_character":18,"end_line":50,"end_character":31},"updated":"2017-12-22 17:07:14.000000000","message":"Why camelCase instead of dash-separated?\n\nEDIT: Wait, I see mriedem\u0027s comment. Fair","commit_id":"1d88440eb421929438e77c637caf502075b43f56"}],"nova/compute/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"00958d6591efbf7dec164a0aaba6a924f8905407","unresolved":false,"context_lines":[{"line_number":6610,"context_line":"            try:"},{"line_number":6611,"context_line":"                instance.task_state \u003d task_states.SHELVING_OFFLOADING"},{"line_number":6612,"context_line":"                instance.save(expected_task_state\u003d(None,))"},{"line_number":6613,"context_line":"                self.shelve_offload_instance(context, instance,"},{"line_number":6614,"context_line":"                                             clean_shutdown\u003dFalse)"},{"line_number":6615,"context_line":"            except Exception:"},{"line_number":6616,"context_line":"                LOG.exception(\u0027Periodic task failed to offload instance.\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_a8b60d3d","line":6613,"range":{"start_line":6613,"start_character":16,"end_line":6613,"end_character":44},"updated":"2017-11-29 21:41:59.000000000","message":"Hmm, in this case we\u0027ll attempt to record an instance action event but we\u0027re coming from a periodic task, and the context here isn\u0027t going to have a request id that will find an action to record the event:\n\nhttps://github.com/openstack/nova/blob/faacfeb07646115e7c8c91584d0e467a3e0064d7/nova/db/sqlalchemy/api.py#L6278\n\nshelved_offload_time defaults to 0 so in our CI we wouldn\u0027t see this, and even if we hit it, we\u0027d just be logging exceptions in the n-cpu logs but not doing anything, but anyone that sets shelved_offload_time\u003e0 is likely to hit this failure.\n\nThis periodic task should most likely be calling _shelve_offload_instance instead of the top-level method where the decorators are, so you should probably make that change, but do it in a separate patch below this one in the series.","commit_id":"b6dc11cbf3aa2725fe59eb3802a93ff95a373a44"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ef834857511e0ca34d90f621b97ddf4bdbccb433","unresolved":false,"context_lines":[{"line_number":6610,"context_line":"            try:"},{"line_number":6611,"context_line":"                instance.task_state \u003d task_states.SHELVING_OFFLOADING"},{"line_number":6612,"context_line":"                instance.save(expected_task_state\u003d(None,))"},{"line_number":6613,"context_line":"                self.shelve_offload_instance(context, instance,"},{"line_number":6614,"context_line":"                                             clean_shutdown\u003dFalse)"},{"line_number":6615,"context_line":"            except Exception:"},{"line_number":6616,"context_line":"                LOG.exception(\u0027Periodic task failed to offload instance.\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_c72d5747","line":6613,"range":{"start_line":6613,"start_character":16,"end_line":6613,"end_character":44},"in_reply_to":"ff82abbf_2549915f","updated":"2017-12-03 17:02:24.000000000","message":"See the patch below this in the series.","commit_id":"b6dc11cbf3aa2725fe59eb3802a93ff95a373a44"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"5a405abdf262be107e702d75ee56373c4347ce4d","unresolved":false,"context_lines":[{"line_number":6610,"context_line":"            try:"},{"line_number":6611,"context_line":"                instance.task_state \u003d task_states.SHELVING_OFFLOADING"},{"line_number":6612,"context_line":"                instance.save(expected_task_state\u003d(None,))"},{"line_number":6613,"context_line":"                self.shelve_offload_instance(context, instance,"},{"line_number":6614,"context_line":"                                             clean_shutdown\u003dFalse)"},{"line_number":6615,"context_line":"            except Exception:"},{"line_number":6616,"context_line":"                LOG.exception(\u0027Periodic task failed to offload instance.\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_2549915f","line":6613,"range":{"start_line":6613,"start_character":16,"end_line":6613,"end_character":44},"in_reply_to":"ff82abbf_5b394aa1","updated":"2017-12-01 13:21:36.000000000","message":"Is it OK not to record the instance_event for offload if that offload happened from a periodic task? Or it is just about to solve this issue separately later and here focus on only the offload initiated from the REST API?\nIf the later then I think we should open a bug report for the missing event so that we will not forget to add that later.","commit_id":"b6dc11cbf3aa2725fe59eb3802a93ff95a373a44"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"121bef195abc46ffb4dd061041db0ba964d377ad","unresolved":false,"context_lines":[{"line_number":6610,"context_line":"            try:"},{"line_number":6611,"context_line":"                instance.task_state \u003d task_states.SHELVING_OFFLOADING"},{"line_number":6612,"context_line":"                instance.save(expected_task_state\u003d(None,))"},{"line_number":6613,"context_line":"                self.shelve_offload_instance(context, instance,"},{"line_number":6614,"context_line":"                                             clean_shutdown\u003dFalse)"},{"line_number":6615,"context_line":"            except Exception:"},{"line_number":6616,"context_line":"                LOG.exception(\u0027Periodic task failed to offload instance.\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_5b394aa1","line":6613,"range":{"start_line":6613,"start_character":16,"end_line":6613,"end_character":44},"in_reply_to":"ff82abbf_a8b60d3d","updated":"2017-11-30 01:20:35.000000000","message":"OK, I will do it","commit_id":"b6dc11cbf3aa2725fe59eb3802a93ff95a373a44"}]}
