Skip to content

Commit

Permalink
fence_compute: additional debug logging for when things go wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
beekhof committed Mar 17, 2016
1 parent 785a381 commit 64f086d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fence/agents/compute/fence_compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def _is_server_evacuable(server, evac_flavors, evac_images):
return True
if server.image.get('id') in evac_images:
return True
logging.debug("Instance %s is not evacuable" % server.image.get('id'))
return False

def _get_evacuable_flavors():
Expand All @@ -105,8 +106,10 @@ def _host_evacuate(options):
result = True
servers = nova.servers.list(search_opts={'host': options["--plug"], 'all_tenants': 1 })
if options["--instance-filtering"] == "False":
logging.debug("Evacuating all images and flavors")
evacuables = servers
else:
logging.debug("Filtering images and flavors")
flavors = _get_evacuable_flavors()
images = _get_evacuable_images()
# Identify all evacuable servers
Expand All @@ -119,6 +122,7 @@ def _host_evacuate(options):
on_shared_storage = True

for server in evacuables:
logging.debug("Processing %s" % server)
if hasattr(server, 'id'):
response = _server_evacuate(server.id, on_shared_storage)
if response["accepted"]:
Expand Down

0 comments on commit 64f086d

Please sign in to comment.