)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"69f9b28b1cf463e10d5d29e7eddc478df538fee5","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When a VM failed to boot due to \u0027No valid host was found\u0027, deleting"},{"line_number":10,"context_line":"the VM will not cause the associated neutron ports that were created"},{"line_number":11,"context_line":"by nova to be deleted. These ports should be locally deleted."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I9faafab808f4dce593f7373d149a32bdac319bfa"},{"line_number":14,"context_line":"Closes-Bug: #1594604"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3aaa91ec_9d22afa1","line":11,"updated":"2016-06-24 16:00:28.000000000","message":"Add something like:\n\nRight now, we will short-circuit early and not even do a full local_delete() from the api because instance.host is not set. This patch makes us not short circuit when instances are in error state as they may have been through any number of build attempts and have (by definition) made it further through the process than that short circuit path expects. Calling local_delete() makes sure we clean up any resources that may have been allocated for the instance, like neutron ports.","commit_id":"13f781bfd8d64a300aa38c54af005127a1540877"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"0692525a906c6125fa865e5bfaee147be0b8c207","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When a VM failed to boot due to \u0027No valid host was found\u0027, deleting"},{"line_number":10,"context_line":"the VM will not cause the associated neutron ports that were created"},{"line_number":11,"context_line":"by nova to be deleted. These ports should be locally deleted."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I9faafab808f4dce593f7373d149a32bdac319bfa"},{"line_number":14,"context_line":"Closes-Bug: #1594604"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3aaa91ec_fdfc93b9","line":11,"in_reply_to":"3aaa91ec_9d22afa1","updated":"2016-06-24 16:04:57.000000000","message":"That sounds good.","commit_id":"13f781bfd8d64a300aa38c54af005127a1540877"}],"nova/compute/api.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"69f9b28b1cf463e10d5d29e7eddc478df538fee5","unresolved":false,"context_lines":[{"line_number":1591,"context_line":"            shelved_offloaded \u003d (instance.vm_state"},{"line_number":1592,"context_line":"                                 \u003d\u003d vm_states.SHELVED_OFFLOADED)"},{"line_number":1593,"context_line":"            if not instance.host:"},{"line_number":1594,"context_line":"                if (instance.vm_state !\u003d vm_states.ERROR and"},{"line_number":1595,"context_line":"                    not shelved_offloaded):"},{"line_number":1596,"context_line":"                    try:"},{"line_number":1597,"context_line":"                        compute_utils.notify_about_instance_usage("}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_3a774103","line":1594,"range":{"start_line":1594,"start_character":20,"end_line":1594,"end_character":56},"updated":"2016-06-24 16:00:28.000000000","message":"Can you wrap this into another variable like shelved_offloaded? \n\nIf you combine the host check as well, I think this would be much clearer. Like:\n\n # Killing this before it got scheduled\n dead_early \u003d not instance.host and vm_state !\u003d vm_states.ERROR\n if not shelved_offloaded and dead_early:\n     ...","commit_id":"13f781bfd8d64a300aa38c54af005127a1540877"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"0692525a906c6125fa865e5bfaee147be0b8c207","unresolved":false,"context_lines":[{"line_number":1591,"context_line":"            shelved_offloaded \u003d (instance.vm_state"},{"line_number":1592,"context_line":"                                 \u003d\u003d vm_states.SHELVED_OFFLOADED)"},{"line_number":1593,"context_line":"            if not instance.host:"},{"line_number":1594,"context_line":"                if (instance.vm_state !\u003d vm_states.ERROR and"},{"line_number":1595,"context_line":"                    not shelved_offloaded):"},{"line_number":1596,"context_line":"                    try:"},{"line_number":1597,"context_line":"                        compute_utils.notify_about_instance_usage("}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_fd23f353","line":1594,"range":{"start_line":1594,"start_character":20,"end_line":1594,"end_character":56},"in_reply_to":"3aaa91ec_3a774103","updated":"2016-06-24 16:04:57.000000000","message":"will do","commit_id":"13f781bfd8d64a300aa38c54af005127a1540877"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"32492fb661b8b11c323fc98c0d6223c4fd0de052","unresolved":false,"context_lines":[{"line_number":1591,"context_line":"            shelved_offloaded \u003d (instance.vm_state"},{"line_number":1592,"context_line":"                                 \u003d\u003d vm_states.SHELVED_OFFLOADED)"},{"line_number":1593,"context_line":"            if not instance.host:"},{"line_number":1594,"context_line":"                if (instance.vm_state !\u003d vm_states.ERROR and"},{"line_number":1595,"context_line":"                    not shelved_offloaded):"},{"line_number":1596,"context_line":"                    try:"},{"line_number":1597,"context_line":"                        compute_utils.notify_about_instance_usage("}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_c148908d","line":1594,"range":{"start_line":1594,"start_character":20,"end_line":1594,"end_character":56},"in_reply_to":"3aaa91ec_fd23f353","updated":"2016-06-27 14:12:11.000000000","message":"is the following equivalent and correct (please disregard indentation for now):\n\n     if not instance.host and instance.vm_state not in (vm_states.ERROR, vm_states.SHELVED_OFFLOADED)\n\nIt simply means the VM is not bound and not in the state that can\u0027t be short-circuited for removal\n\nTo make it clearer:\n\n     delete_right_away \u003d (not instance.host and \n                                      instance.vm_state not in (vm_states.ERROR, vm_states.SHELVED_OFFLOADED))","commit_id":"13f781bfd8d64a300aa38c54af005127a1540877"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"32492fb661b8b11c323fc98c0d6223c4fd0de052","unresolved":false,"context_lines":[{"line_number":1612,"context_line":""},{"line_number":1613,"context_line":"            is_local_delete \u003d True"},{"line_number":1614,"context_line":"            try:"},{"line_number":1615,"context_line":"                if instance.host and not shelved_offloaded:"},{"line_number":1616,"context_line":"                    service \u003d objects.Service.get_by_compute_host("},{"line_number":1617,"context_line":"                        context.elevated(), instance.host)"},{"line_number":1618,"context_line":"                    is_local_delete \u003d not self.servicegroup_api.service_is_up("}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_33c0c77c","line":1615,"updated":"2016-06-27 14:12:11.000000000","message":"if a vm is in the SHELVED_OFFLOADED state, is its host None? So my question is is the following test sufficient for the purpose of setting is_local_delete correctly:\n\n             if instance.host:\n\nIf yes, then the variable shelved_offloaded is not needed any more","commit_id":"13f781bfd8d64a300aa38c54af005127a1540877"}]}
