From d906fc2bb288adcf5eb27f9f589cab2729f2df41 Mon Sep 17 00:00:00 2001 From: Arne Wiebalck Date: Fri, 10 Jan 2020 10:45:05 +0100 Subject: [PATCH] Add node info and exc name when getting rootfs info from Glance This is a follow-up to change #686580. Story: #2006649 Task: #37081 Change-Id: Ic6ed372c710e3df47b193818d8a9a0c567d90195 --- ironic/drivers/modules/agent_base_vendor.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ironic/drivers/modules/agent_base_vendor.py b/ironic/drivers/modules/agent_base_vendor.py index 3b6c73bf4c..a864c858e8 100644 --- a/ironic/drivers/modules/agent_base_vendor.py +++ b/ironic/drivers/modules/agent_base_vendor.py @@ -838,14 +838,17 @@ class AgentDeployMixin(HeartbeatMixin): image_info = glance.show(image_source) image_properties = image_info.get('properties') root_uuid = image_properties['rootfs_uuid'] - LOG.debug('Got rootfs_uuid from Glance: %s', root_uuid) + LOG.debug('Got rootfs_uuid from Glance: %s ' + '(node %s)', root_uuid, node.uuid) except Exception as e: LOG.warning('Could not get \'rootfs_uuid\' property for ' - 'image %(image)s from Glance: %(error)s.', - {'image': image_source, 'error': e}) + 'image %(image)s from Glance for node %(node)s. ' + '%(cls)s: %(error)s.', + {'image': image_source, 'node': node.uuid, + 'cls': e.__class__.__name__, 'error': e}) root_uuid = internal_info.get('root_uuid_or_disk_id') LOG.debug('Got rootfs_uuid from driver internal info: ' - ' %s', root_uuid) + '%s (node %s)', root_uuid, node.uuid) whole_disk_image = internal_info.get('is_whole_disk_image') if software_raid or (root_uuid and not whole_disk_image):