From 78fd9aa4699663b0ca5c474d1baaad9849740786 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Wed, 15 Feb 2017 16:37:28 -0500 Subject: [PATCH] Remove dead code: _safe_destroy_instance_residue This method is no longer called from anything after change 3c2ce9450bea8d417bfd3fbe26ee688446c6a348. Change-Id: If008c50dd2c85ff8bcaf7e2d80b2840fdfb554b7 --- nova/compute/api.py | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/nova/compute/api.py b/nova/compute/api.py index 3a665d3198a7..cd3498a8c0e8 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -1118,30 +1118,6 @@ class API(base.Base): return objects.InstanceGroup.get_by_uuid(context, group_hint) - def _safe_destroy_instance_residue(self, instances, instances_to_build): - """Delete residue left over from a failed instance build with - reckless abandon. - - :param instances: List of Instance objects to destroy - :param instances_to_build: List of tuples, output from - _provision_instances, which is: - request_spec, build_request, instance_mapping - """ - for instance in instances: - try: - instance.destroy() - except Exception as e: - LOG.debug('Failed to destroy instance residue: %s', e, - instance=instance) - for to_destroy in instances_to_build: - for thing in to_destroy: - try: - thing.destroy() - except Exception as e: - LOG.debug( - 'Failed to destroy %s during residue cleanup: %s', - thing, e) - def _create_instance(self, context, instance_type, image_href, kernel_id, ramdisk_id, min_count, max_count,