Use new agent API if available

Falls back to vendor passthru on receiving 404.

Also fixes logging around lookup: log traceback on unexpected
exceptions, log successful lookup and replace % with ,

Change-Id: I7160c99ca63585fc333482fa578fdf5e0962b2b6
Depends-On: I9080c07b03103cd7a323e2fc01be821733b07eea
Partial-Bug: #1570841
This commit is contained in:
Dmitry Tantsur
2016-06-27 16:53:31 +02:00
parent ad60806f93
commit 09265ba4b5
5 changed files with 158 additions and 108 deletions

@ -336,9 +336,11 @@ class IronicPythonAgent(base.ExecuteCommandMixin):
starting_interval=self.lookup_interval,
node_uuid=uuid)
LOG.debug('Received lookup results: %s', content)
self.node = content['node']
LOG.info('Lookup succeeded, node UUID is %s', self.node['uuid'])
hardware.cache_node(self.node)
self.heartbeat_timeout = content['heartbeat_timeout']
self.heartbeat_timeout = content['config']['heartbeat_timeout']
wsgi = simple_server.make_server(
self.listen_address[0],