)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"193126e6c88597d8eadda1cd30f290da210d5fcb","unresolved":false,"context_lines":[{"line_number":11,"context_line":"manager."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Based on the review discussion soft delete notification emitted from"},{"line_number":14,"context_line":"the compute/api is missleading as those are not really soft delete"},{"line_number":15,"context_line":"cases. The only real soft delete case is when"},{"line_number":16,"context_line":"compute.manager.soft_delete_instance() is called. So this patch also"},{"line_number":17,"context_line":"changes the event type accordingly."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"3f4b6375_4e897924","line":14,"range":{"start_line":14,"start_character":22,"end_line":14,"end_character":23},"updated":"2017-10-30 20:18:58.000000000","message":"misleading","commit_id":"70e8a7e5bcb3838c3e84479d7b4ddbcf6c9df861"}],"nova/compute/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7194896a4a2abf70fe9e3be95fbb9113c3309bfd","unresolved":false,"context_lines":[{"line_number":1865,"context_line":"                try:"},{"line_number":1866,"context_line":"                    with compute_utils.notify_about_instance_delete("},{"line_number":1867,"context_line":"                            self.notifier, context, instance,"},{"line_number":1868,"context_line":"                            delete_type\u003ddelete_type):"},{"line_number":1869,"context_line":"                        instance.destroy()"},{"line_number":1870,"context_line":"                    quotas.commit()"},{"line_number":1871,"context_line":"                    LOG.info(_LI(\u0027Instance deleted and does not have host \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a30ddce_dc70f2de","line":1868,"range":{"start_line":1868,"start_character":28,"end_line":1868,"end_character":51},"updated":"2017-03-09 22:42:36.000000000","message":"You\u0027ll have to rebase, but also note the discussion here:\n\nhttps://review.openstack.org/#/c/437222/7/nova/compute/api.py@1792\n\nBasically sending a soft_delete notification in a local delete case doesn\u0027t really make any sense, and that\u0027s the only time that we send the soft_delete notification, so Dan and I were thinking we should just not ever send a soft_delete notification since it never is a soft_delete when that happens.","commit_id":"7cba6beffa677d718636be07e2e6733e0a60ada9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"467d9a4cdbcc9f5c08d637fd8feea561f49353b3","unresolved":false,"context_lines":[{"line_number":1865,"context_line":"                try:"},{"line_number":1866,"context_line":"                    with compute_utils.notify_about_instance_delete("},{"line_number":1867,"context_line":"                            self.notifier, context, instance,"},{"line_number":1868,"context_line":"                            delete_type\u003ddelete_type):"},{"line_number":1869,"context_line":"                        instance.destroy()"},{"line_number":1870,"context_line":"                    quotas.commit()"},{"line_number":1871,"context_line":"                    LOG.info(_LI(\u0027Instance deleted and does not have host \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ffa3b31_c0e2be01","line":1868,"range":{"start_line":1868,"start_character":28,"end_line":1868,"end_character":51},"in_reply_to":"3a1ff146_33225601","updated":"2017-04-18 17:36:51.000000000","message":"force_delete is the same as delete except it bypasses the task_state check in the check_instance_state decorator. So for delete, it will fail if instance.task_state is not None (meaning the instance is undergoing some kind of task transition). For force_delete, we ignore task_state and just let you delete the instance regardless of task_state.\n\nSo yeah I think force_delete is OK here, just not soft_delete.","commit_id":"7cba6beffa677d718636be07e2e6733e0a60ada9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4d1e2593ae353f175f3d1a370acec78f09ae1724","unresolved":false,"context_lines":[{"line_number":1865,"context_line":"                try:"},{"line_number":1866,"context_line":"                    with compute_utils.notify_about_instance_delete("},{"line_number":1867,"context_line":"                            self.notifier, context, instance,"},{"line_number":1868,"context_line":"                            delete_type\u003ddelete_type):"},{"line_number":1869,"context_line":"                        instance.destroy()"},{"line_number":1870,"context_line":"                    quotas.commit()"},{"line_number":1871,"context_line":"                    LOG.info(_LI(\u0027Instance deleted and does not have host \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f013ff3_7cea90ac","line":1868,"range":{"start_line":1868,"start_character":28,"end_line":1868,"end_character":51},"in_reply_to":"7ffa3b31_c0e2be01","updated":"2017-05-16 16:16:25.000000000","message":"Done","commit_id":"7cba6beffa677d718636be07e2e6733e0a60ada9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"2cb65981671f951cc799821489e0bd1b77c66f9e","unresolved":false,"context_lines":[{"line_number":1865,"context_line":"                try:"},{"line_number":1866,"context_line":"                    with compute_utils.notify_about_instance_delete("},{"line_number":1867,"context_line":"                            self.notifier, context, instance,"},{"line_number":1868,"context_line":"                            delete_type\u003ddelete_type):"},{"line_number":1869,"context_line":"                        instance.destroy()"},{"line_number":1870,"context_line":"                    quotas.commit()"},{"line_number":1871,"context_line":"                    LOG.info(_LI(\u0027Instance deleted and does not have host \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a1ff146_33225601","line":1868,"range":{"start_line":1868,"start_character":28,"end_line":1868,"end_character":51},"in_reply_to":"9a30ddce_dc70f2de","updated":"2017-03-16 13:03:18.000000000","message":"I try to put the pieces together about the soft_delete discussion but I\u0027m still in the dark. So you suggest to remove the delete_type here as soft_delete is meaningless here due to the fact that the instance is not scheduled to any host in this case. That seems logical to me. However besides soft_delete there is something called force_delete [1] and that also uses the delete_type parameter.\n\n[1]https://github.com/openstack/nova/blob/master/nova/compute/api.py#L2311","commit_id":"7cba6beffa677d718636be07e2e6733e0a60ada9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"2cb65981671f951cc799821489e0bd1b77c66f9e","unresolved":false,"context_lines":[{"line_number":2063,"context_line":"            LOG.warning(_LW(\"instance\u0027s host %s is down, deleting from \""},{"line_number":2064,"context_line":"                            \"database\"), instance.host, instance\u003dinstance)"},{"line_number":2065,"context_line":"        with compute_utils.notify_about_instance_delete("},{"line_number":2066,"context_line":"                self.notifier, context, instance, delete_type):"},{"line_number":2067,"context_line":""},{"line_number":2068,"context_line":"            elevated \u003d context.elevated()"},{"line_number":2069,"context_line":"            if self.cell_type !\u003d \u0027api\u0027:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a1ff146_5390b2ec","line":2066,"updated":"2017-03-16 13:03:18.000000000","message":"@Matt is this again a place where soft_delete is meaningless? \n\nAs far as I understand local delete means that we doesn\u0027t really delete anything from the compute as a) compute is not available b) the instance is shelve_offloaded . Nova just deletes the instance from the db and the in case of a) when the compute is recovered it will clean up the the compute local data of the deleted instance.\n\nThe same question about force_delete applies here as well.","commit_id":"7cba6beffa677d718636be07e2e6733e0a60ada9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3e3221c24dc45bcfd41a8cf07dc047ee75ffd78e","unresolved":false,"context_lines":[{"line_number":2063,"context_line":"            LOG.warning(_LW(\"instance\u0027s host %s is down, deleting from \""},{"line_number":2064,"context_line":"                            \"database\"), instance.host, instance\u003dinstance)"},{"line_number":2065,"context_line":"        with compute_utils.notify_about_instance_delete("},{"line_number":2066,"context_line":"                self.notifier, context, instance, delete_type):"},{"line_number":2067,"context_line":""},{"line_number":2068,"context_line":"            elevated \u003d context.elevated()"},{"line_number":2069,"context_line":"            if self.cell_type !\u003d \u0027api\u0027:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ffa3b31_a0ad7289","line":2066,"in_reply_to":"3a1ff146_5390b2ec","updated":"2017-04-18 18:20:52.000000000","message":"Right soft_delete doesn\u0027t make sense here. In the normal soft_delete case, the instance.host is set or the the compute is up and we call soft_delete_instance on the compute manager:\n\nhttps://github.com/openstack/nova/blob/master/nova/compute/manager.py#L2575\n\nWhich sends the soft_delete notifications.\n\nOnce the timer is up, if the instance that was soft deleted hasn\u0027t been restored, it\u0027s hard-deleted here:\n\nhttps://github.com/openstack/nova/blob/master/nova/compute/manager.py#L6459\n\nI think force_delete is OK for the notification in this _local_delete method, yes.","commit_id":"7cba6beffa677d718636be07e2e6733e0a60ada9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4d1e2593ae353f175f3d1a370acec78f09ae1724","unresolved":false,"context_lines":[{"line_number":2063,"context_line":"            LOG.warning(_LW(\"instance\u0027s host %s is down, deleting from \""},{"line_number":2064,"context_line":"                            \"database\"), instance.host, instance\u003dinstance)"},{"line_number":2065,"context_line":"        with compute_utils.notify_about_instance_delete("},{"line_number":2066,"context_line":"                self.notifier, context, instance, delete_type):"},{"line_number":2067,"context_line":""},{"line_number":2068,"context_line":"            elevated \u003d context.elevated()"},{"line_number":2069,"context_line":"            if self.cell_type !\u003d \u0027api\u0027:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f013ff3_5cd114fb","line":2066,"in_reply_to":"7ffa3b31_a0ad7289","updated":"2017-05-16 16:16:25.000000000","message":"Done","commit_id":"7cba6beffa677d718636be07e2e6733e0a60ada9"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"0f8eb795f1607b676a036ddba08170d348ad27f3","unresolved":false,"context_lines":[{"line_number":1878,"context_line":"                    with compute_utils.notify_about_instance_delete("},{"line_number":1879,"context_line":"                            self.notifier, context, instance,"},{"line_number":1880,"context_line":"                            delete_type"},{"line_number":1881,"context_line":"                            if delete_type !\u003d \u0027soft_delete\u0027"},{"line_number":1882,"context_line":"                            else \u0027delete\u0027):"},{"line_number":1883,"context_line":"                        instance.destroy()"},{"line_number":1884,"context_line":"                    LOG.info(\u0027Instance deleted and does not have host \u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f4b6375_73efaa87","line":1881,"range":{"start_line":1881,"start_character":28,"end_line":1881,"end_character":59},"updated":"2017-10-18 09:57:29.000000000","message":"after going through the comment it was clear(good learning for me about notification) about not to notify the soft_delete. it will be good if we can add a brief note about it for easy ref in future.","commit_id":"70e8a7e5bcb3838c3e84479d7b4ddbcf6c9df861"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"81652324fb3dea1922fbfcc2b9d65ce1d4e84597","unresolved":false,"context_lines":[{"line_number":1877,"context_line":"                try:"},{"line_number":1878,"context_line":"                    with compute_utils.notify_about_instance_delete("},{"line_number":1879,"context_line":"                            self.notifier, context, instance,"},{"line_number":1880,"context_line":"                            delete_type"},{"line_number":1881,"context_line":"                            if delete_type !\u003d \u0027soft_delete\u0027"},{"line_number":1882,"context_line":"                            else \u0027delete\u0027):"},{"line_number":1883,"context_line":"                        instance.destroy()"},{"line_number":1884,"context_line":"                    LOG.info(\u0027Instance deleted and does not have host \u0027"},{"line_number":1885,"context_line":"                             \u0027field, its vm_state is %(state)s.\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f4e5783_8c1bf519","line":1882,"range":{"start_line":1880,"start_character":28,"end_line":1882,"end_character":41},"updated":"2017-10-11 10:33:30.000000000","message":"this would probably look better done before the context manager block\n\n   delete_type_ \u003d delete_type if ...","commit_id":"70e8a7e5bcb3838c3e84479d7b4ddbcf6c9df861"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"193126e6c88597d8eadda1cd30f290da210d5fcb","unresolved":false,"context_lines":[{"line_number":2039,"context_line":"                        \"database\", instance.host, instance\u003dinstance)"},{"line_number":2040,"context_line":"        with compute_utils.notify_about_instance_delete("},{"line_number":2041,"context_line":"                self.notifier, context, instance,"},{"line_number":2042,"context_line":"                delete_type if delete_type !\u003d \u0027soft_delete\u0027 else \u0027delete\u0027):"},{"line_number":2043,"context_line":""},{"line_number":2044,"context_line":"            elevated \u003d context.elevated()"},{"line_number":2045,"context_line":"            if self.cell_type !\u003d \u0027api\u0027:"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f4b6375_8ec41142","line":2042,"updated":"2017-10-30 20:18:58.000000000","message":"same comment as above from stephenfin...","commit_id":"70e8a7e5bcb3838c3e84479d7b4ddbcf6c9df861"}]}
