Merge "Fix log statement about starting inspection"

This commit is contained in:
Zuul 2024-06-29 17:11:58 +00:00 committed by Gerrit Code Review
commit 6ad623bb84
2 changed files with 6 additions and 7 deletions

View File

@ -45,7 +45,7 @@ class AgentInspect(common.Common):
self.hooks = hooks_base.validate_inspection_hooks() self.hooks = hooks_base.validate_inspection_hooks()
def _start_managed_inspection(self, task): def _start_managed_inspection(self, task):
"""Start inspection managed by ironic.""" """Start inspection with boot managed by ironic."""
ep = deploy_utils.get_ironic_api_url().rstrip('/') ep = deploy_utils.get_ironic_api_url().rstrip('/')
if ep.endswith('/v1'): if ep.endswith('/v1'):
ep = f'{ep}/continue_inspection' ep = f'{ep}/continue_inspection'

View File

@ -190,8 +190,7 @@ class Common(base.InspectInterface):
def inspect_hardware(self, task): def inspect_hardware(self, task):
"""Inspect hardware to obtain the hardware properties. """Inspect hardware to obtain the hardware properties.
This particular implementation only starts inspection using Results will be checked in a periodic task.
ironic-inspector. Results will be checked in a periodic task.
:param task: a task from TaskManager. :param task: a task from TaskManager.
:returns: states.INSPECTWAIT :returns: states.INSPECTWAIT
@ -214,8 +213,8 @@ class Common(base.InspectInterface):
inspect_utils.cache_lookup_addresses(task.node) inspect_utils.cache_lookup_addresses(task.node)
task.node.save() task.node.save()
LOG.debug('Starting inspection for node %(uuid)s using ' LOG.debug('Starting inspection for node %(uuid)s. Booting is '
'ironic-inspector, booting is managed by %(project)s', 'managed by %(project)s',
{'uuid': task.node.uuid, {'uuid': task.node.uuid,
'project': 'ironic' if manage_boot else 'ironic-inspector'}) 'project': 'ironic' if manage_boot else 'ironic-inspector'})
@ -237,7 +236,7 @@ class Inspector(Common):
"""In-band inspection via ironic-inspector project.""" """In-band inspection via ironic-inspector project."""
def _start_managed_inspection(self, task): def _start_managed_inspection(self, task):
"""Start inspection managed by ironic.""" """Start inspection with boot managed by ironic."""
cli = client.get_client(task.context) cli = client.get_client(task.context)
endpoint = _get_callback_endpoint(cli) endpoint = _get_callback_endpoint(cli)
prepare_managed_inspection(task, endpoint) prepare_managed_inspection(task, endpoint)
@ -313,7 +312,7 @@ def _start_inspection(node_uuid, context):
def _check_status(task): def _check_status(task):
"""Check inspection status for node given by a task.""" """Check inspection status from inspector for node given by a task."""
node = task.node node = task.node
if node.provision_state != states.INSPECTWAIT: if node.provision_state != states.INSPECTWAIT:
return return