Blame SOURCES/bz1313561-fence_compute-locate-all-instances-to-be-evacuated.patch

01bf6b
diff -uNr a/fence/agents/compute/fence_compute.py b/fence/agents/compute/fence_compute.py
01bf6b
--- a/fence/agents/compute/fence_compute.py	2016-03-30 16:07:11.600203519 +0200
01bf6b
+++ b/fence/agents/compute/fence_compute.py	2016-03-30 16:09:17.184539645 +0200
01bf6b
@@ -80,6 +80,7 @@
01bf6b
 		return True
01bf6b
 	if server.image.get('id') in evac_images:
01bf6b
 		return True
01bf6b
+	logging.debug("Instance %s is not evacuable" % server.image.get('id'))
01bf6b
 	return False
01bf6b
 
01bf6b
 def _get_evacuable_flavors():
01bf6b
@@ -103,10 +104,12 @@
01bf6b
 
01bf6b
 def _host_evacuate(options):
01bf6b
 	result = True
01bf6b
-	servers = nova.servers.list(search_opts={'host': options["--plug"]})
01bf6b
+	servers = nova.servers.list(search_opts={'host': options["--plug"], 'all_tenants': 1 })
01bf6b
 	if options["--instance-filtering"] == "False":
01bf6b
+		logging.debug("Evacuating all images and flavors")
01bf6b
 		evacuables = servers
01bf6b
 	else:
01bf6b
+		logging.debug("Filtering images and flavors")
01bf6b
 		flavors = _get_evacuable_flavors()
01bf6b
 		images = _get_evacuable_images()
01bf6b
 		# Identify all evacuable servers
01bf6b
@@ -119,6 +122,7 @@
01bf6b
 		on_shared_storage = True
01bf6b
 
01bf6b
 	for server in evacuables:
01bf6b
+		logging.debug("Processing %s" % server)
01bf6b
 		if hasattr(server, 'id'):
01bf6b
 			response = _server_evacuate(server.id, on_shared_storage)
01bf6b
 			if response["accepted"]: