diff options
| author | Zuul <zuul@review.opendev.org> | 2020-07-06 18:08:14 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2020-07-06 18:08:14 +0000 |
| commit | 2e9620a2c072e27972bbb68d6f491ab71d181f42 (patch) | |
| tree | 7f4d7e4c2802761a53e03bf6f42d999e8cf94482 /ironic_python_agent/agent.py | |
| parent | 621872561087695ec8bb5f93d00384b691b0c366 (diff) | |
| parent | c76b8b2c217d57680baec977b374e821304198f9 (diff) | |
| download | ironic-python-agent-2e9620a2c072e27972bbb68d6f491ab71d181f42.tar.gz | |
Merge "Limit Inspection->Lookup->Heartbeat lag"
Diffstat (limited to 'ironic_python_agent/agent.py')
| -rw-r--r-- | ironic_python_agent/agent.py | 11 |
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.') |
