)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"e2523604f5601b34007aa38b52e6d3f25e3a8656","unresolved":false,"context_lines":[{"line_number":14,"context_line":"1) Add periodic task _cleanup_instances_stuck_in_deleting_task"},{"line_number":15,"context_line":"to delete instances stuck in ``DELETING`` or ``SOFT_DELETING``"},{"line_number":16,"context_line":"task_state. The periodic interval is"},{"line_number":17,"context_line":"``running_deleted_instance_poll_interval`` conf option."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"2) Soft delete instance when nova-compute restart if the"},{"line_number":20,"context_line":"instance\u0027s task_state is ``SOFT_DELETING``."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"3f79a3b5_475a59f4","line":17,"range":{"start_line":17,"start_character":2,"end_line":17,"end_character":40},"updated":"2018-12-17 15:25:08.000000000","message":"IMO this requires release note.","commit_id":"ae4a6f7b383a0c174e2dc8e4dad6181dbcf20647"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"517627e10146392edfd4c27bc80dc3f4974c7e55","unresolved":false,"context_lines":[{"line_number":14,"context_line":"1) Add periodic task _cleanup_instances_stuck_in_deleting_task"},{"line_number":15,"context_line":"to delete instances stuck in ``DELETING`` or ``SOFT_DELETING``"},{"line_number":16,"context_line":"task_state. The periodic interval is"},{"line_number":17,"context_line":"``running_deleted_instance_poll_interval`` conf option."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"2) Soft delete instance when nova-compute restart if the"},{"line_number":20,"context_line":"instance\u0027s task_state is ``SOFT_DELETING``."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"3f79a3b5_754b747f","line":17,"range":{"start_line":17,"start_character":2,"end_line":17,"end_character":40},"in_reply_to":"3f79a3b5_475a59f4","updated":"2018-12-17 22:24:59.000000000","message":"Agreed, I think this additional behavior is worthy of a release note.","commit_id":"ae4a6f7b383a0c174e2dc8e4dad6181dbcf20647"}],"nova/compute/manager.py":[{"author":{"_account_id":25562,"name":"Chen","email":"dstbtgagt@foxmail.com","username":"chenn2"},"change_message_id":"85a745ca705a912bff074129b1b7172506a43807","unresolved":false,"context_lines":[{"line_number":868,"context_line":"            return"},{"line_number":869,"context_line":""},{"line_number":870,"context_line":"        if instance.task_state \u003d\u003d task_states.SOFT_DELETING and \\"},{"line_number":871,"context_line":"                        instance.vm_state !\u003d vm_states.SOFT_DELETED:"},{"line_number":872,"context_line":"            self.soft_delete_instance(context, instance)"},{"line_number":873,"context_line":"            return"},{"line_number":874,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_5f8afcbb","line":871,"range":{"start_line":871,"start_character":24,"end_line":871,"end_character":67},"updated":"2018-09-17 13:09:41.000000000","message":"Why does vm_state have to be checked for soft_delete but not for delete like above? Plus, if we want to add soft_delete to the consideration, we might as well at force_delete too, and deal with them in a common block or method with regular delete.","commit_id":"01e23a530866c7c74d9e3175bab38db1f2e0db2f"},{"author":{"_account_id":26286,"name":"huanhongda","email":"hongda.xun@easystack.cn","username":"huanhongda"},"change_message_id":"7d26faed29c3459fb2c6ca36396d3fb187015b0d","unresolved":false,"context_lines":[{"line_number":868,"context_line":"            return"},{"line_number":869,"context_line":""},{"line_number":870,"context_line":"        if instance.task_state \u003d\u003d task_states.SOFT_DELETING and \\"},{"line_number":871,"context_line":"                        instance.vm_state !\u003d vm_states.SOFT_DELETED:"},{"line_number":872,"context_line":"            self.soft_delete_instance(context, instance)"},{"line_number":873,"context_line":"            return"},{"line_number":874,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_d9b49af3","line":871,"range":{"start_line":871,"start_character":24,"end_line":871,"end_character":67},"in_reply_to":"3f79a3b5_5f8afcbb","updated":"2018-09-20 13:09:58.000000000","message":"Done","commit_id":"01e23a530866c7c74d9e3175bab38db1f2e0db2f"},{"author":{"_account_id":25562,"name":"Chen","email":"dstbtgagt@foxmail.com","username":"chenn2"},"change_message_id":"85a745ca705a912bff074129b1b7172506a43807","unresolved":false,"context_lines":[{"line_number":7786,"context_line":""},{"line_number":7787,"context_line":"        # Delete instance from nova-compute if the deletion takes more than"},{"line_number":7788,"context_line":"        # 2 times the instance_delete_interval."},{"line_number":7789,"context_line":"        timeout \u003d CONF.instance_delete_interval * 2"},{"line_number":7790,"context_line":""},{"line_number":7791,"context_line":"        for instance in instances_in_deleting:"},{"line_number":7792,"context_line":"            if timeutils.is_older_than("}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_3ae14e2c","line":7789,"range":{"start_line":7789,"start_character":8,"end_line":7789,"end_character":51},"updated":"2018-09-17 13:09:41.000000000","message":"So basically after doing _run_pending_deletes twice and if instance is still being deleted, consider it is getting stuck. That\u0027s 2*300s\u003d10min at default. But I don\u0027t see how this timeout is dependent on instance_delete_interval. How about adding a new config option and periodic task so it can be set as freely as one might want.","commit_id":"01e23a530866c7c74d9e3175bab38db1f2e0db2f"},{"author":{"_account_id":26286,"name":"huanhongda","email":"hongda.xun@easystack.cn","username":"huanhongda"},"change_message_id":"7d26faed29c3459fb2c6ca36396d3fb187015b0d","unresolved":false,"context_lines":[{"line_number":7786,"context_line":""},{"line_number":7787,"context_line":"        # Delete instance from nova-compute if the deletion takes more than"},{"line_number":7788,"context_line":"        # 2 times the instance_delete_interval."},{"line_number":7789,"context_line":"        timeout \u003d CONF.instance_delete_interval * 2"},{"line_number":7790,"context_line":""},{"line_number":7791,"context_line":"        for instance in instances_in_deleting:"},{"line_number":7792,"context_line":"            if timeutils.is_older_than("}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_f9bdd667","line":7789,"range":{"start_line":7789,"start_character":8,"end_line":7789,"end_character":51},"in_reply_to":"3f79a3b5_3ae14e2c","updated":"2018-09-20 13:09:58.000000000","message":"Maybe we can use running_deleted_instance_poll_interval option as periodic task interval, and to calculate the time out period. Since _cleanup_running_deleted_instances method did the similar thing as this patch done.","commit_id":"01e23a530866c7c74d9e3175bab38db1f2e0db2f"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"cf542576516325471b884014c348f578098bf6ab","unresolved":false,"context_lines":[{"line_number":7850,"context_line":"        timeout \u003d CONF.running_deleted_instance_poll_interval * 2"},{"line_number":7851,"context_line":""},{"line_number":7852,"context_line":"        for instance in instances_in_deleting:"},{"line_number":7853,"context_line":"            if timeutils.is_older_than("},{"line_number":7854,"context_line":"                    instance.system_metadata.get("},{"line_number":7855,"context_line":"                        \u0027last_deleted_at\u0027, timeutils.utcnow()), timeout):"},{"line_number":7856,"context_line":"                LOG.info(\u0027Deleting instance that be stuck in deleting task\u0027,"},{"line_number":7857,"context_line":"                         instance\u003dinstance)"},{"line_number":7858,"context_line":"                self._delete_instance_stuck_in_deleting_task(context, instance)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_229915cf","line":7855,"range":{"start_line":7853,"start_character":15,"end_line":7855,"end_character":73},"updated":"2018-09-30 03:59:20.000000000","message":"I\u0027m not sure I like this way.\n\nEven in this way, the end user may trigger another delete action from the rest API.\n\nSo the best way is that we can make the methods self._delete_instance and self.soft_delete_instance idempotent.","commit_id":"2b8236bec5f5558b31d5d769edcfeed383eb3817"},{"author":{"_account_id":26286,"name":"huanhongda","email":"hongda.xun@easystack.cn","username":"huanhongda"},"change_message_id":"f05247b29ac4ca2f57df6ad672bc3c0c650dcf6f","unresolved":false,"context_lines":[{"line_number":7850,"context_line":"        timeout \u003d CONF.running_deleted_instance_poll_interval * 2"},{"line_number":7851,"context_line":""},{"line_number":7852,"context_line":"        for instance in instances_in_deleting:"},{"line_number":7853,"context_line":"            if timeutils.is_older_than("},{"line_number":7854,"context_line":"                    instance.system_metadata.get("},{"line_number":7855,"context_line":"                        \u0027last_deleted_at\u0027, timeutils.utcnow()), timeout):"},{"line_number":7856,"context_line":"                LOG.info(\u0027Deleting instance that be stuck in deleting task\u0027,"},{"line_number":7857,"context_line":"                         instance\u003dinstance)"},{"line_number":7858,"context_line":"                self._delete_instance_stuck_in_deleting_task(context, instance)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_d53cd2c1","line":7855,"range":{"start_line":7853,"start_character":15,"end_line":7855,"end_character":73},"in_reply_to":"3f79a3b5_229915cf","updated":"2018-10-10 03:32:32.000000000","message":"Thanks for your reply.\nThe DELETE API is already idempotent.\nhttps://github.com/openstack/nova/blob/6bf11e1dc14afad78b11d980c2544a3dc41579ff/nova/compute/api.py#L1974-L1979","commit_id":"2b8236bec5f5558b31d5d769edcfeed383eb3817"},{"author":{"_account_id":26286,"name":"huanhongda","email":"hongda.xun@easystack.cn","username":"huanhongda"},"change_message_id":"516105a10d6cc5b7bc77f2a6319d764eb7cf1664","unresolved":false,"context_lines":[{"line_number":7850,"context_line":"        timeout \u003d CONF.running_deleted_instance_poll_interval * 2"},{"line_number":7851,"context_line":""},{"line_number":7852,"context_line":"        for instance in instances_in_deleting:"},{"line_number":7853,"context_line":"            if timeutils.is_older_than("},{"line_number":7854,"context_line":"                    instance.system_metadata.get("},{"line_number":7855,"context_line":"                        \u0027last_deleted_at\u0027, timeutils.utcnow()), timeout):"},{"line_number":7856,"context_line":"                LOG.info(\u0027Deleting instance that be stuck in deleting task\u0027,"},{"line_number":7857,"context_line":"                         instance\u003dinstance)"},{"line_number":7858,"context_line":"                self._delete_instance_stuck_in_deleting_task(context, instance)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_dd81bfa3","line":7855,"range":{"start_line":7853,"start_character":15,"end_line":7855,"end_character":73},"in_reply_to":"3f79a3b5_b137e3e4","updated":"2018-10-17 08:12:47.000000000","message":"I have done some simple tests, and it works as idempotent. But will produce redundant messages.","commit_id":"2b8236bec5f5558b31d5d769edcfeed383eb3817"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"3d86ef1f2750fcb8893cc00c4e2bad86360f1416","unresolved":false,"context_lines":[{"line_number":7850,"context_line":"        timeout \u003d CONF.running_deleted_instance_poll_interval * 2"},{"line_number":7851,"context_line":""},{"line_number":7852,"context_line":"        for instance in instances_in_deleting:"},{"line_number":7853,"context_line":"            if timeutils.is_older_than("},{"line_number":7854,"context_line":"                    instance.system_metadata.get("},{"line_number":7855,"context_line":"                        \u0027last_deleted_at\u0027, timeutils.utcnow()), timeout):"},{"line_number":7856,"context_line":"                LOG.info(\u0027Deleting instance that be stuck in deleting task\u0027,"},{"line_number":7857,"context_line":"                         instance\u003dinstance)"},{"line_number":7858,"context_line":"                self._delete_instance_stuck_in_deleting_task(context, instance)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_b137e3e4","line":7855,"range":{"start_line":7853,"start_character":15,"end_line":7855,"end_character":73},"in_reply_to":"3f79a3b5_d53cd2c1","updated":"2018-10-10 09:03:28.000000000","message":"so why we need this metadata? can we just delete it again?","commit_id":"2b8236bec5f5558b31d5d769edcfeed383eb3817"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"e3ba6340a0f355a1d75904d5b4abf1db6a124a3a","unresolved":false,"context_lines":[{"line_number":2671,"context_line":"    def _delete_instance_stuck_in_deleting_task(self, context, instance):"},{"line_number":2672,"context_line":"        try:"},{"line_number":2673,"context_line":"            if instance.task_state \u003d\u003d task_states.DELETING:"},{"line_number":2674,"context_line":"                instance.obj_load_attr(\u0027metadata\u0027)"},{"line_number":2675,"context_line":"                instance.obj_load_attr(\u0027system_metadata\u0027)"},{"line_number":2676,"context_line":"                bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("},{"line_number":2677,"context_line":"                    context, instance.uuid)"},{"line_number":2678,"context_line":"                self._delete_instance(context, instance, bdms)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_8735c246","line":2675,"range":{"start_line":2674,"start_character":16,"end_line":2675,"end_character":57},"updated":"2018-12-18 05:48:25.000000000","message":"so if you already set those attrs as expected_attr when obj loading, why do we need this again?","commit_id":"ae4a6f7b383a0c174e2dc8e4dad6181dbcf20647"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"517627e10146392edfd4c27bc80dc3f4974c7e55","unresolved":false,"context_lines":[{"line_number":2676,"context_line":"                bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("},{"line_number":2677,"context_line":"                    context, instance.uuid)"},{"line_number":2678,"context_line":"                self._delete_instance(context, instance, bdms)"},{"line_number":2679,"context_line":"            else:"},{"line_number":2680,"context_line":"                self.soft_delete_instance(context, instance)"},{"line_number":2681,"context_line":"        except Exception:"},{"line_number":2682,"context_line":"            # we don\u0027t want that an exception blocks the init_host"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_7584d4af","line":2679,"range":{"start_line":2679,"start_character":12,"end_line":2679,"end_character":16},"updated":"2018-12-17 22:24:59.000000000","message":"I think here it would be worthwhile to use elif instance.task_state \u003d\u003d task_states.SOFT_DELETING instead of assuming this method will only be called if task_state is some form of deleting.","commit_id":"ae4a6f7b383a0c174e2dc8e4dad6181dbcf20647"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"2758430c7d1404d5f8d171642cbbf875c2be5709","unresolved":false,"context_lines":[{"line_number":2676,"context_line":"                bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("},{"line_number":2677,"context_line":"                    context, instance.uuid)"},{"line_number":2678,"context_line":"                self._delete_instance(context, instance, bdms)"},{"line_number":2679,"context_line":"            else:"},{"line_number":2680,"context_line":"                self.soft_delete_instance(context, instance)"},{"line_number":2681,"context_line":"        except Exception:"},{"line_number":2682,"context_line":"            # we don\u0027t want that an exception blocks the init_host"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_e63fdcdb","line":2679,"range":{"start_line":2679,"start_character":12,"end_line":2679,"end_character":16},"in_reply_to":"3f79a3b5_7584d4af","updated":"2018-12-18 02:39:43.000000000","message":"yes","commit_id":"ae4a6f7b383a0c174e2dc8e4dad6181dbcf20647"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"e2523604f5601b34007aa38b52e6d3f25e3a8656","unresolved":false,"context_lines":[{"line_number":7862,"context_line":"    @periodic_task.periodic_task("},{"line_number":7863,"context_line":"        spacing\u003dCONF.running_deleted_instance_poll_interval)"},{"line_number":7864,"context_line":"    def _cleanup_instances_stuck_in_deleting_task(self, context):"},{"line_number":7865,"context_line":"        \"\"\"Try to clean up instances that be stuck in deleting task"},{"line_number":7866,"context_line":"        for long time."},{"line_number":7867,"context_line":"        \"\"\""},{"line_number":7868,"context_line":"        LOG.debug(\u0027Cleaning up instances that be stuck in deleting task\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_6712f500","line":7865,"range":{"start_line":7865,"start_character":42,"end_line":7865,"end_character":44},"updated":"2018-12-17 15:25:08.000000000","message":"s/be/are","commit_id":"ae4a6f7b383a0c174e2dc8e4dad6181dbcf20647"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"e2523604f5601b34007aa38b52e6d3f25e3a8656","unresolved":false,"context_lines":[{"line_number":7863,"context_line":"        spacing\u003dCONF.running_deleted_instance_poll_interval)"},{"line_number":7864,"context_line":"    def _cleanup_instances_stuck_in_deleting_task(self, context):"},{"line_number":7865,"context_line":"        \"\"\"Try to clean up instances that be stuck in deleting task"},{"line_number":7866,"context_line":"        for long time."},{"line_number":7867,"context_line":"        \"\"\""},{"line_number":7868,"context_line":"        LOG.debug(\u0027Cleaning up instances that be stuck in deleting task\u0027)"},{"line_number":7869,"context_line":"        filters \u003d {"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_47cd798f","line":7866,"range":{"start_line":7866,"start_character":12,"end_line":7866,"end_character":21},"updated":"2018-12-17 15:25:08.000000000","message":"for a long time","commit_id":"ae4a6f7b383a0c174e2dc8e4dad6181dbcf20647"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"e2523604f5601b34007aa38b52e6d3f25e3a8656","unresolved":false,"context_lines":[{"line_number":7865,"context_line":"        \"\"\"Try to clean up instances that be stuck in deleting task"},{"line_number":7866,"context_line":"        for long time."},{"line_number":7867,"context_line":"        \"\"\""},{"line_number":7868,"context_line":"        LOG.debug(\u0027Cleaning up instances that be stuck in deleting task\u0027)"},{"line_number":7869,"context_line":"        filters \u003d {"},{"line_number":7870,"context_line":"            \u0027task_state\u0027: [task_states.DELETING, task_states.SOFT_DELETING],"},{"line_number":7871,"context_line":"            \u0027host\u0027: self.host,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_07d78123","line":7868,"range":{"start_line":7868,"start_character":46,"end_line":7868,"end_character":48},"updated":"2018-12-17 15:25:08.000000000","message":"are","commit_id":"ae4a6f7b383a0c174e2dc8e4dad6181dbcf20647"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"e2523604f5601b34007aa38b52e6d3f25e3a8656","unresolved":false,"context_lines":[{"line_number":7866,"context_line":"        for long time."},{"line_number":7867,"context_line":"        \"\"\""},{"line_number":7868,"context_line":"        LOG.debug(\u0027Cleaning up instances that be stuck in deleting task\u0027)"},{"line_number":7869,"context_line":"        filters \u003d {"},{"line_number":7870,"context_line":"            \u0027task_state\u0027: [task_states.DELETING, task_states.SOFT_DELETING],"},{"line_number":7871,"context_line":"            \u0027host\u0027: self.host,"},{"line_number":7872,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_c7c18952","line":7869,"updated":"2018-12-17 15:25:08.000000000","message":"What about instances that its deletion has just started?\nI would add here another filter to preserve doubling the deletion tasks.\nLike verify if `updated_at` field is older than N.","commit_id":"ae4a6f7b383a0c174e2dc8e4dad6181dbcf20647"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"2758430c7d1404d5f8d171642cbbf875c2be5709","unresolved":false,"context_lines":[{"line_number":7866,"context_line":"        for long time."},{"line_number":7867,"context_line":"        \"\"\""},{"line_number":7868,"context_line":"        LOG.debug(\u0027Cleaning up instances that be stuck in deleting task\u0027)"},{"line_number":7869,"context_line":"        filters \u003d {"},{"line_number":7870,"context_line":"            \u0027task_state\u0027: [task_states.DELETING, task_states.SOFT_DELETING],"},{"line_number":7871,"context_line":"            \u0027host\u0027: self.host,"},{"line_number":7872,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_861b8883","line":7869,"in_reply_to":"3f79a3b5_358f3cd3","updated":"2018-12-18 02:39:43.000000000","message":"+1","commit_id":"ae4a6f7b383a0c174e2dc8e4dad6181dbcf20647"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"517627e10146392edfd4c27bc80dc3f4974c7e55","unresolved":false,"context_lines":[{"line_number":7866,"context_line":"        for long time."},{"line_number":7867,"context_line":"        \"\"\""},{"line_number":7868,"context_line":"        LOG.debug(\u0027Cleaning up instances that be stuck in deleting task\u0027)"},{"line_number":7869,"context_line":"        filters \u003d {"},{"line_number":7870,"context_line":"            \u0027task_state\u0027: [task_states.DELETING, task_states.SOFT_DELETING],"},{"line_number":7871,"context_line":"            \u0027host\u0027: self.host,"},{"line_number":7872,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_358f3cd3","line":7869,"in_reply_to":"3f79a3b5_c7c18952","updated":"2018-12-17 22:24:59.000000000","message":"This is a good point -- we don\u0027t want the periodic task racing with in-progress deletes. I think checking timeutils.is_older_than(instance.updated_at, CONF.running_deleted_instance_timeout) might be a good way to control whether to cleanup. (And update the help text for the conf option to mention \u0027deleting\u0027 state as well).","commit_id":"ae4a6f7b383a0c174e2dc8e4dad6181dbcf20647"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"e2523604f5601b34007aa38b52e6d3f25e3a8656","unresolved":false,"context_lines":[{"line_number":7877,"context_line":"        for instance in instances_in_deleting:"},{"line_number":7878,"context_line":"            LOG.info(\u0027Deleting instance that may be stuck in deleting task\u0027,"},{"line_number":7879,"context_line":"                     instance\u003dinstance)"},{"line_number":7880,"context_line":"            self._delete_instance_stuck_in_deleting_task(context, instance)"},{"line_number":7881,"context_line":""},{"line_number":7882,"context_line":"    @periodic_task.periodic_task("},{"line_number":7883,"context_line":"        spacing\u003dCONF.running_deleted_instance_poll_interval)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_879e3150","line":7880,"updated":"2018-12-17 15:25:08.000000000","message":"Maybe you can consider \u0027delete_options\u0027 that are also valid for _cleanup_running_deleted_instances? Those options seems to be legit also for this kind of that:\n\n        Valid actions to take are:\n\n            1. noop - do nothing\n            2. log - log which instances are erroneously running\n            3. reap - shutdown and cleanup any erroneously running instances\n            4. shutdown - power off *and disable* any erroneously running\n                          instances","commit_id":"ae4a6f7b383a0c174e2dc8e4dad6181dbcf20647"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"517627e10146392edfd4c27bc80dc3f4974c7e55","unresolved":false,"context_lines":[{"line_number":7877,"context_line":"        for instance in instances_in_deleting:"},{"line_number":7878,"context_line":"            LOG.info(\u0027Deleting instance that may be stuck in deleting task\u0027,"},{"line_number":7879,"context_line":"                     instance\u003dinstance)"},{"line_number":7880,"context_line":"            self._delete_instance_stuck_in_deleting_task(context, instance)"},{"line_number":7881,"context_line":""},{"line_number":7882,"context_line":"    @periodic_task.periodic_task("},{"line_number":7883,"context_line":"        spacing\u003dCONF.running_deleted_instance_poll_interval)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_757294e3","line":7880,"in_reply_to":"3f79a3b5_879e3150","updated":"2018-12-17 22:24:59.000000000","message":"While it\u0027s quite similar to the cleanup of running deleted instances, I was thinking we should keep parity with what\u0027s currently being done during _init_instance to finish deleting an instance in this situation. Else, it seems like a larger behavior change that we\u0027d need to document.","commit_id":"ae4a6f7b383a0c174e2dc8e4dad6181dbcf20647"}]}
