Improve iSCSI deployment logs
This patch just add some DEBUG and INFO logs for the iSCSI deployment methodology, so that the operator knows what's the steps the ramdisk is taken by looking at the conductor logs. The patch add logs for Ironic when working with both supported ramdisks DIB and IPA. Change-Id: Iaee09643b03877a1a735b6019def47445bf3e16f
This commit is contained in:
@@ -469,6 +469,7 @@ class BaseAgentVendor(base.VendorInterface):
|
||||
node = task.node
|
||||
if not node.driver_internal_info.get(
|
||||
'is_whole_disk_image') and root_uuid:
|
||||
LOG.debug('Installing the bootloader on node %s', node.uuid)
|
||||
result = self._client.install_bootloader(
|
||||
node, root_uuid=root_uuid,
|
||||
efi_system_part_uuid=efi_system_part_uuid)
|
||||
@@ -487,3 +488,6 @@ class BaseAgentVendor(base.VendorInterface):
|
||||
{'boot_dev': boot_devices.DISK, 'node': node.uuid,
|
||||
'error': e})
|
||||
self._log_and_raise_deployment_error(task, msg)
|
||||
|
||||
LOG.info(_LI('Bootloader successfully installed on node %s'),
|
||||
node.uuid)
|
||||
|
||||
@@ -591,14 +591,17 @@ def validate_bootloader_install_status(task, input_params):
|
||||
:raises: InstanceDeployFailure, if bootloader installation was
|
||||
reported from ramdisk as failure.
|
||||
"""
|
||||
node = task.node
|
||||
if input_params['status'] != 'SUCCEEDED':
|
||||
msg = (_('Failed to install bootloader on node %(node)s. '
|
||||
'Error: %(error)s.') %
|
||||
{'node': task.node.uuid, 'error': input_params.get('error')})
|
||||
{'node': node.uuid, 'error': input_params.get('error')})
|
||||
LOG.error(msg)
|
||||
deploy_utils.set_failed_state(task, msg)
|
||||
raise exception.InstanceDeployFailure(msg)
|
||||
|
||||
LOG.info(_LI('Bootloader successfully installed on node %s'), node.uuid)
|
||||
|
||||
|
||||
def finish_deploy(task, address):
|
||||
"""Notifies the ramdisk to reboot the node and makes the instance active.
|
||||
|
||||
@@ -576,6 +576,7 @@ class VendorPassthru(agent_base_vendor.BaseAgentVendor):
|
||||
'address': The IP address of the ramdisk
|
||||
"""
|
||||
task.process_event('resume')
|
||||
LOG.debug('Continuing the deployment on node %s', task.node.uuid)
|
||||
iscsi_deploy.validate_bootloader_install_status(task, kwargs)
|
||||
iscsi_deploy.finish_deploy(task, kwargs['address'])
|
||||
|
||||
@@ -593,6 +594,7 @@ class VendorPassthru(agent_base_vendor.BaseAgentVendor):
|
||||
"""
|
||||
node = task.node
|
||||
task.process_event('resume')
|
||||
LOG.debug('Continuing the deployment on node %s', node.uuid)
|
||||
|
||||
_destroy_token_file(node)
|
||||
is_whole_disk_image = node.driver_internal_info['is_whole_disk_image']
|
||||
@@ -622,6 +624,8 @@ class VendorPassthru(agent_base_vendor.BaseAgentVendor):
|
||||
# 'pass_bootloader_install_info', if it's not a
|
||||
# whole disk image.
|
||||
if not is_whole_disk_image:
|
||||
LOG.debug('Installing the bootloader on node %s',
|
||||
node.uuid)
|
||||
deploy_utils.notify_ramdisk_to_proceed(kwargs['address'])
|
||||
task.process_event('wait')
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user