Skip to content

Commit 64f086d

Browse files
committed
fence_compute: additional debug logging for when things go wrong
1 parent 785a381 commit 64f086d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fence/agents/compute/fence_compute.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ def _is_server_evacuable(server, evac_flavors, evac_images):
8080
return True
8181
if server.image.get('id') in evac_images:
8282
return True
83+
logging.debug("Instance %s is not evacuable" % server.image.get('id'))
8384
return False
8485

8586
def _get_evacuable_flavors():
@@ -105,8 +106,10 @@ def _host_evacuate(options):
105106
result = True
106107
servers = nova.servers.list(search_opts={'host': options["--plug"], 'all_tenants': 1 })
107108
if options["--instance-filtering"] == "False":
109+
logging.debug("Evacuating all images and flavors")
108110
evacuables = servers
109111
else:
112+
logging.debug("Filtering images and flavors")
110113
flavors = _get_evacuable_flavors()
111114
images = _get_evacuable_images()
112115
# Identify all evacuable servers
@@ -119,6 +122,7 @@ def _host_evacuate(options):
119122
on_shared_storage = True
120123

121124
for server in evacuables:
125+
logging.debug("Processing %s" % server)
122126
if hasattr(server, 'id'):
123127
response = _server_evacuate(server.id, on_shared_storage)
124128
if response["accepted"]:

0 commit comments

Comments
 (0)