)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"8a2f01697bbcad23d7cc8978fdf16ce6aac5cf83","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     LeopardMa \u003cmabao@inspur.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-02-07 10:29:37 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fix paused instance not support shelve"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"fix https://bugs.launchpad.net/nova/+bug/1745529"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fa0c359_b3fa8372","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":38},"updated":"2018-02-08 07:48:01.000000000","message":"after address Takashi\u0027s comment, please also add more info like this is libvirt only chagnes etc ,the reason etc here please","commit_id":"c375087cc3ef338263042198a22c74ca99e831e2"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"8ba4ef9011054362be0c35016fdd2ef91f4730b3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"3fa0c359_dfab9886","line":12,"updated":"2018-02-08 03:28:56.000000000","message":"Add \"Closes-Bug: #1745529\".\nThen remove line 9.","commit_id":"c375087cc3ef338263042198a22c74ca99e831e2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"91529cc3db2bde5959d3b7f98dbbe7f9d4197aec","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     LeopardMa \u003cmabao@inspur.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-02-12 01:53:08 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fix paused instance not support shelve"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"support shelve for paused status instance which uses libvirt driver, in order to the release of resources in this case."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bf659307_f8a23f9a","line":7,"updated":"2018-03-27 14:21:59.000000000","message":"Prefix this with \"libvirt:\" since you\u0027re making a libvirt driver specific change.","commit_id":"941a785b697fef2f0a02ef64c074e70f834db93f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4d81416e51cde9c486bdecf8b6de8999171b12bf","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     LeopardMa \u003cmabao@inspur.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-02-12 01:53:08 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fix paused instance not support shelve"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"support shelve for paused status instance which uses libvirt driver, in order to the release of resources in this case."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bf659307_78794ffa","line":7,"in_reply_to":"bf659307_f8a23f9a","updated":"2018-03-27 14:22:33.000000000","message":"Nevermind this if you move the fix / logic to the compute manager as I suggested.","commit_id":"941a785b697fef2f0a02ef64c074e70f834db93f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"91529cc3db2bde5959d3b7f98dbbe7f9d4197aec","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fix paused instance not support shelve"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"support shelve for paused status instance which uses libvirt driver, in order to the release of resources in this case."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Closes-Bug: #1745529"},{"line_number":12,"context_line":"Change-Id: I8ca25d9847d50001fbe8513a6c1dba8b697c24e4"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bf659307_f87d5f1c","line":9,"updated":"2018-03-27 14:21:59.000000000","message":"This needs to be wrapped at something like 79 characters.","commit_id":"941a785b697fef2f0a02ef64c074e70f834db93f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"91529cc3db2bde5959d3b7f98dbbe7f9d4197aec","unresolved":false,"context_lines":[{"line_number":7,"context_line":"fix paused instance not support shelve"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"support shelve for paused status instance which uses libvirt driver, in order to the release of resources in this case."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Closes-Bug: #1745529"},{"line_number":12,"context_line":"Change-Id: I8ca25d9847d50001fbe8513a6c1dba8b697c24e4"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bf659307_18c7f347","line":10,"updated":"2018-03-27 14:21:59.000000000","message":"Just a note to reviewers, shelving a paused server is apparently supported, but we don\u0027t have a tempest test for it I guess:\n\nhttps://github.com/openstack/nova/blob/88f6c3b7b892f2a05066ac6f0e3353f4ce80f6b0/nova/compute/api.py#L3423","commit_id":"941a785b697fef2f0a02ef64c074e70f834db93f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"af674273636552ddffa808a176c4303b7b15c8a4","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fix paused instance not support shelve"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"support shelve for paused status instance which uses libvirt driver, in order to the release of resources in this case."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Closes-Bug: #1745529"},{"line_number":12,"context_line":"Change-Id: I8ca25d9847d50001fbe8513a6c1dba8b697c24e4"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bf659307_95a84f20","line":9,"updated":"2018-03-30 13:27:21.000000000","message":"This needs to be wrapped at 79 characters as mentioned, and also give more detail about what the bug is and why this fixes it.","commit_id":"4d15af90bdb092f2c23c147f1ec561f7143d7581"},{"author":{"_account_id":27190,"name":"Leopard Ma","email":"mabao@inspur.com","username":"LeopardMa"},"change_message_id":"102f2e9ac08ef7f080ad4cf1d291d79461e1961c","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fix paused instance not support shelve"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"support shelve for paused status instance which uses libvirt driver, in order to the release of resources in this case."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Closes-Bug: #1745529"},{"line_number":12,"context_line":"Change-Id: I8ca25d9847d50001fbe8513a6c1dba8b697c24e4"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9f6a8fd7_79a548a1","line":9,"in_reply_to":"bf659307_95a84f20","updated":"2018-04-25 06:01:46.000000000","message":"Done","commit_id":"4d15af90bdb092f2c23c147f1ec561f7143d7581"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"03de46311b03dfd3b2407b62e34ee4181ae52767","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fix paused instance not support shelve"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"support shelve for paused status instance which uses libvirt driver"},{"line_number":10,"context_line":"Closes-Bug: #1745529"},{"line_number":11,"context_line":"Change-Id: I8ca25d9847d50001fbe8513a6c1dba8b697c24e4"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9f6a8fd7_c08c22d9","line":9,"updated":"2018-05-01 15:58:19.000000000","message":"This doesn\u0027t tell me anything different from the commit message title. I was looking for more information about the actual failure and how this fixes it. Something like, \"It is possible to shelve a paused instance, but in that case the guest is already shutdown, and some hypervisors will fail when trying to perform a clean shutdown of a non-running guest. For example, attempting to shelve a paused libvirt instance will result in this error:\n\n  libvirtError: Requested operation is not valid: domain is not running\n\nTherefore, if the instance is paused, we don\u0027t attempt a clean shutdown while shelving.\"","commit_id":"932abbc879a23680ead2c59aa67e1ba101b9c1a1"}],"nova/compute/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"af674273636552ddffa808a176c4303b7b15c8a4","unresolved":false,"context_lines":[{"line_number":4744,"context_line":"            expected_state \u003d shelving_state_map[expected_state]"},{"line_number":4745,"context_line":"            instance.task_state \u003d task_state"},{"line_number":4746,"context_line":"            instance.save(expected_task_state\u003dexpected_state)"},{"line_number":4747,"context_line":"        if instance.power_state \u003d\u003d power_state.PAUSED:"},{"line_number":4748,"context_line":"            clean_shutdown \u003d False"},{"line_number":4749,"context_line":"        self._power_off_instance(context, instance, clean_shutdown)"},{"line_number":4750,"context_line":"        self.driver.snapshot(context, instance, image_id, update_task_state)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_f5af4b27","line":4747,"updated":"2018-03-30 13:27:21.000000000","message":"Please add a comment here about why we are doing this, that will help with future maintenance, otherwise people have to dig up the change and review comments to figure out why we are doing this.","commit_id":"4d15af90bdb092f2c23c147f1ec561f7143d7581"},{"author":{"_account_id":27190,"name":"Leopard Ma","email":"mabao@inspur.com","username":"LeopardMa"},"change_message_id":"102f2e9ac08ef7f080ad4cf1d291d79461e1961c","unresolved":false,"context_lines":[{"line_number":4744,"context_line":"            expected_state \u003d shelving_state_map[expected_state]"},{"line_number":4745,"context_line":"            instance.task_state \u003d task_state"},{"line_number":4746,"context_line":"            instance.save(expected_task_state\u003dexpected_state)"},{"line_number":4747,"context_line":"        if instance.power_state \u003d\u003d power_state.PAUSED:"},{"line_number":4748,"context_line":"            clean_shutdown \u003d False"},{"line_number":4749,"context_line":"        self._power_off_instance(context, instance, clean_shutdown)"},{"line_number":4750,"context_line":"        self.driver.snapshot(context, instance, image_id, update_task_state)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_f9915848","line":4747,"in_reply_to":"bf659307_f5af4b27","updated":"2018-04-25 06:01:46.000000000","message":"Thank you for your patient guidance.","commit_id":"4d15af90bdb092f2c23c147f1ec561f7143d7581"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"e699924153e31879d9c6b47a0a6007013b49f3e6","unresolved":false,"context_lines":[{"line_number":4744,"context_line":"            expected_state \u003d shelving_state_map[expected_state]"},{"line_number":4745,"context_line":"            instance.task_state \u003d task_state"},{"line_number":4746,"context_line":"            instance.save(expected_task_state\u003dexpected_state)"},{"line_number":4747,"context_line":"        #for skip the clean shutdown flow in the driver,"},{"line_number":4748,"context_line":"        #just go straight to shutting down the guest before we snapshot it."},{"line_number":4749,"context_line":"        if instance.power_state \u003d\u003d power_state.PAUSED:"},{"line_number":4750,"context_line":"            clean_shutdown \u003d False"},{"line_number":4751,"context_line":"        self._power_off_instance(context, instance, clean_shutdown)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_142f2e88","line":4748,"range":{"start_line":4747,"start_character":8,"end_line":4748,"end_character":10},"updated":"2018-04-25 08:23:49.000000000","message":"you need to give space after #. that is pep8 complaining","commit_id":"932abbc879a23680ead2c59aa67e1ba101b9c1a1"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"8a2f01697bbcad23d7cc8978fdf16ce6aac5cf83","unresolved":false,"context_lines":[{"line_number":2768,"context_line":"        if state in SHUTDOWN_STATES:"},{"line_number":2769,"context_line":"            LOG.info(\"Instance already shutdown.\", instance\u003dinstance)"},{"line_number":2770,"context_line":"            return True"},{"line_number":2771,"context_line":"        if state \u003d\u003d power_state.PAUSED and instance.\\"},{"line_number":2772,"context_line":"                task_state \u003d\u003d task_states.SHELVING:"},{"line_number":2773,"context_line":"            LOG.info(\"Instance no need shutdown.\", instance\u003dinstance)"},{"line_number":2774,"context_line":"            return True"},{"line_number":2775,"context_line":"        LOG.debug(\"Shutting down instance from state %s\", state,"},{"line_number":2776,"context_line":"                  instance\u003dinstance)"},{"line_number":2777,"context_line":"        guest.shutdown()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_73495bce","line":2774,"range":{"start_line":2771,"start_character":8,"end_line":2774,"end_character":23},"updated":"2018-02-08 07:48:01.000000000","message":"Not sure why need support SHELVE action when instance paused state, at least, unshelve doesn\u0027t take it back to PAUSED state seems.\n\nso I think we may consider disable shelve when instance in PAUSED state?","commit_id":"c375087cc3ef338263042198a22c74ca99e831e2"},{"author":{"_account_id":27190,"name":"Leopard Ma","email":"mabao@inspur.com","username":"LeopardMa"},"change_message_id":"f6f135698c173bfec027a86c0c30e13a5099544b","unresolved":false,"context_lines":[{"line_number":2768,"context_line":"        if state in SHUTDOWN_STATES:"},{"line_number":2769,"context_line":"            LOG.info(\"Instance already shutdown.\", instance\u003dinstance)"},{"line_number":2770,"context_line":"            return True"},{"line_number":2771,"context_line":"        if state \u003d\u003d power_state.PAUSED and instance.\\"},{"line_number":2772,"context_line":"                task_state \u003d\u003d task_states.SHELVING:"},{"line_number":2773,"context_line":"            LOG.info(\"Instance no need shutdown.\", instance\u003dinstance)"},{"line_number":2774,"context_line":"            return True"},{"line_number":2775,"context_line":"        LOG.debug(\"Shutting down instance from state %s\", state,"},{"line_number":2776,"context_line":"                  instance\u003dinstance)"},{"line_number":2777,"context_line":"        guest.shutdown()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_89739a4d","line":2774,"range":{"start_line":2771,"start_character":8,"end_line":2774,"end_character":23},"in_reply_to":"3fa0c359_73495bce","updated":"2018-02-08 09:28:02.000000000","message":"because,Shelving is for the release of resources,i think the paused state instance should allow the release of resources, and t\nhe following links mention this:\nhttps://developer.openstack.org/api-ref/compute/#shelve-server-shelve-action","commit_id":"c375087cc3ef338263042198a22c74ca99e831e2"},{"author":{"_account_id":14084,"name":"Einst Crazy","email":"yu.changcai@99cloud.net","username":"Einst"},"change_message_id":"a7c34d34cf6c366869bce549d6952d4e30652c2b","unresolved":false,"context_lines":[{"line_number":2771,"context_line":"        if state \u003d\u003d power_state.PAUSED and instance.\\"},{"line_number":2772,"context_line":"                task_state \u003d\u003d task_states.SHELVING:"},{"line_number":2773,"context_line":"            LOG.info(\"Instance no need shutdown.\", instance\u003dinstance)"},{"line_number":2774,"context_line":"            return True"},{"line_number":2775,"context_line":"        LOG.debug(\"Shutting down instance from state %s\", state,"},{"line_number":2776,"context_line":"                  instance\u003dinstance)"},{"line_number":2777,"context_line":"        guest.shutdown()"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_31e864e0","line":2774,"updated":"2018-02-12 03:39:52.000000000","message":"I think as the shelve design. The instance must be shutdown, not stay in the paused status.","commit_id":"941a785b697fef2f0a02ef64c074e70f834db93f"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"cc3dda07477efecbdc86cb012f141618a164ea4f","unresolved":false,"context_lines":[{"line_number":2771,"context_line":"        if state \u003d\u003d power_state.PAUSED and instance.\\"},{"line_number":2772,"context_line":"                task_state \u003d\u003d task_states.SHELVING:"},{"line_number":2773,"context_line":"            LOG.info(\"Instance no need shutdown.\", instance\u003dinstance)"},{"line_number":2774,"context_line":"            return True"},{"line_number":2775,"context_line":"        LOG.debug(\"Shutting down instance from state %s\", state,"},{"line_number":2776,"context_line":"                  instance\u003dinstance)"},{"line_number":2777,"context_line":"        guest.shutdown()"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_dcc27759","line":2774,"in_reply_to":"3fa0c359_31e864e0","updated":"2018-02-12 05:44:39.000000000","message":"I think such a change is necessary, I would like to hear your reasons?","commit_id":"941a785b697fef2f0a02ef64c074e70f834db93f"},{"author":{"_account_id":14084,"name":"Einst Crazy","email":"yu.changcai@99cloud.net","username":"Einst"},"change_message_id":"f3d6dedec5c9870ac87c5a5298a4df0c15a7dd15","unresolved":false,"context_lines":[{"line_number":2771,"context_line":"        if state \u003d\u003d power_state.PAUSED and instance.\\"},{"line_number":2772,"context_line":"                task_state \u003d\u003d task_states.SHELVING:"},{"line_number":2773,"context_line":"            LOG.info(\"Instance no need shutdown.\", instance\u003dinstance)"},{"line_number":2774,"context_line":"            return True"},{"line_number":2775,"context_line":"        LOG.debug(\"Shutting down instance from state %s\", state,"},{"line_number":2776,"context_line":"                  instance\u003dinstance)"},{"line_number":2777,"context_line":"        guest.shutdown()"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_fca9737b","line":2774,"in_reply_to":"3fa0c359_dcc27759","updated":"2018-02-12 05:52:32.000000000","message":"the shelve is designed to release the memory and cpu the instance used. And the paused instance still used the memory. so we need to power off it, so that release the memory.","commit_id":"941a785b697fef2f0a02ef64c074e70f834db93f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"91529cc3db2bde5959d3b7f98dbbe7f9d4197aec","unresolved":false,"context_lines":[{"line_number":2771,"context_line":"        if state \u003d\u003d power_state.PAUSED and instance.\\"},{"line_number":2772,"context_line":"                task_state \u003d\u003d task_states.SHELVING:"},{"line_number":2773,"context_line":"            LOG.info(\"Instance no need shutdown.\", instance\u003dinstance)"},{"line_number":2774,"context_line":"            return True"},{"line_number":2775,"context_line":"        LOG.debug(\"Shutting down instance from state %s\", state,"},{"line_number":2776,"context_line":"                  instance\u003dinstance)"},{"line_number":2777,"context_line":"        guest.shutdown()"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_d843bbae","line":2774,"in_reply_to":"3fa0c359_fca9737b","updated":"2018-03-27 14:21:59.000000000","message":"Rather than do this in the virt driver, why not just check if the instance is PAUSED in the compute manager _shelve_instance method, and if it is, pass clean_shutdown\u003dFalse to ComputeManager._power_off_instance? Then we will skip the clean shutdown flow in the driver that fails here, and just go straight to shutting down the guest before we snapshot it.","commit_id":"941a785b697fef2f0a02ef64c074e70f834db93f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"af674273636552ddffa808a176c4303b7b15c8a4","unresolved":false,"context_lines":[{"line_number":2768,"context_line":"        if state in SHUTDOWN_STATES:"},{"line_number":2769,"context_line":"            LOG.info(\"Instance already shutdown.\", instance\u003dinstance)"},{"line_number":2770,"context_line":"            return True"},{"line_number":2771,"context_line":""},{"line_number":2772,"context_line":"        LOG.debug(\"Shutting down instance from state %s\", state,"},{"line_number":2773,"context_line":"                  instance\u003dinstance)"},{"line_number":2774,"context_line":"        guest.shutdown()"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_b5a55349","side":"PARENT","line":2771,"updated":"2018-03-30 13:27:21.000000000","message":"Remove all changes to this file.","commit_id":"980f5c3343ac33953975db983afd9ea2c798dd49"},{"author":{"_account_id":27190,"name":"Leopard Ma","email":"mabao@inspur.com","username":"LeopardMa"},"change_message_id":"102f2e9ac08ef7f080ad4cf1d291d79461e1961c","unresolved":false,"context_lines":[{"line_number":2768,"context_line":"        if state in SHUTDOWN_STATES:"},{"line_number":2769,"context_line":"            LOG.info(\"Instance already shutdown.\", instance\u003dinstance)"},{"line_number":2770,"context_line":"            return True"},{"line_number":2771,"context_line":""},{"line_number":2772,"context_line":"        LOG.debug(\"Shutting down instance from state %s\", state,"},{"line_number":2773,"context_line":"                  instance\u003dinstance)"},{"line_number":2774,"context_line":"        guest.shutdown()"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f6a8fd7_19a76cbf","side":"PARENT","line":2771,"in_reply_to":"bf659307_b5a55349","updated":"2018-04-25 06:01:46.000000000","message":"Done","commit_id":"980f5c3343ac33953975db983afd9ea2c798dd49"}]}
