Remove "agent_last_heartbeat" internal field from agent drivers

"agent_last_heartbeat" in the driver_internal_info dict of agent drivers is not
used anywhere by ironic itself, except for logging purposes. This
removes it.

Change-Id: Ic198f6a952ed135099bcc525ef548a4aea005056
Closes-Bug: 1602410
This commit is contained in:
Mario Villaplana 2016-09-26 17:48:58 +00:00
parent beb38b3f3f
commit 7dc74ab754
3 changed files with 5 additions and 7 deletions

View File

@ -201,7 +201,6 @@ Common attributes:
Agent driver attributes:
* ``agent_url``: A String value of IPA API URL so that Ironic can talk to IPA ramdisk.
* ``agent_last_heartbeat``: An Integer value of the last agent heartbeat time.
* ``hardware_manager_version``: A String value of the version of the hardware manager in IPA ramdisk.
* ``target_raid_config``: A Dictionary containing the target RAID configuration. This is a copy of
the same name attribute in Node object. But this one is never actually saved into DB and is only

View File

@ -17,7 +17,6 @@
# under the License.
import collections
import time
from ironic_lib import metrics_utils
from oslo_log import log
@ -452,11 +451,7 @@ class AgentDeployMixin(object):
node = task.node
driver_internal_info = node.driver_internal_info
LOG.debug(
'Heartbeat from %(node)s, last heartbeat at %(heartbeat)s.',
{'node': node.uuid,
'heartbeat': driver_internal_info.get('agent_last_heartbeat')})
driver_internal_info['agent_last_heartbeat'] = int(time.time())
LOG.debug('Heartbeat from node %s' % node.uuid)
driver_internal_info['agent_url'] = callback_url
node.driver_internal_info = driver_internal_info

View File

@ -0,0 +1,4 @@
---
deprecations:
- The ``agent_last_heartbeat`` field of ``driver_internal_info`` has been
removed from all agent drivers, since this field was unused by ironic.