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

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