summaryrefslogtreecommitdiff
path: root/ironic_python_agent/agent.py
diff options
context:
space:
mode:
Diffstat (limited to 'ironic_python_agent/agent.py')
-rw-r--r--ironic_python_agent/agent.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/ironic_python_agent/agent.py b/ironic_python_agent/agent.py
index b2e2e38e..207b9a45 100644
--- a/ironic_python_agent/agent.py
+++ b/ironic_python_agent/agent.py
@@ -403,6 +403,10 @@ class IronicPythonAgent(base.ExecuteCommandMixin):
# Inspection should be started before call to lookup, otherwise
# lookup will fail due to unknown MAC.
uuid = None
+ # We can't try to inspect or heartbeat until we have valid
+ # interfaces to perform those actions over.
+ self._wait_for_interface()
+
if cfg.CONF.inspection_callback_url:
try:
# Attempt inspection. This may fail, and previously
@@ -412,10 +416,8 @@ class IronicPythonAgent(base.ExecuteCommandMixin):
LOG.error('Failed to perform inspection: %s', e)
if self.api_url:
- self._wait_for_interface()
content = self.api_client.lookup_node(
- hardware_info=hardware.dispatch_to_managers(
- 'list_hardware_info'),
+ hardware_info=hardware.list_hardware_info(use_cache=True),
timeout=self.lookup_timeout,
starting_interval=self.lookup_interval,
node_uuid=uuid)
@@ -467,6 +469,9 @@ class IronicPythonAgent(base.ExecuteCommandMixin):
LOG.info('No ipa-api-url configured, Heartbeat and lookup '
'skipped for inspector.')
else:
+ # NOTE(TheJulia): Once communication flow capability is
+ # able to be driven solely from the conductor, this is no
+ # longer a major issue.
LOG.error('Neither ipa-api-url nor inspection_callback_url'
'found, please check your pxe append parameters.')