fix: IPMI polls after the first failed; BMC drivers collect SNMP health (0.2.1)
The second IPMI poll of a BMC in the same worker process failed with "'<' not supported between instances of 'float' and 'NoneType'". pyghmi files a session in Session.initting_sessions under the credentials as str and deletes it only under bytes, so the entry stays and the next Command got the old, logged-out session back. The driver drops that entry itself before open() and after close(). Reproduced and verified live against the Supermicro X10DRL-i: three polls in one process now succeed. IpmiDriver and RedfishDriver mix in HealthMetricsMixin, so netOrk's SNMP health poll reads the BMC's own load, memory and interfaces where the BMC runs net-snmp with the UCD-MIB, as the X10's does.
This commit is contained in:
1 parent
332e6090a7
commit
0e38e18e26
6 files changed
+81
-10
No files matched your search
@@ -30,7 +30,7 @@ from datetime import datetime, timezone
|
||||
from typing import Any
|
||||
|
||||
from napalm.base.exceptions import ConnectionException
|
||||
from napalm_device_types import ManagementControllerDriver
|
||||
from napalm_device_types import HealthMetricsMixin, ManagementControllerDriver
|
||||
from napalm_device_types.base import FingerprintRule, PortSpec
|
||||
from napalm_device_types.models import POWER_ACTIONS
|
||||
|
||||
@@ -109,8 +109,12 @@ def _status(item: _JsonDict) -> str:
|
||||
return item.get("health") or ""
|
||||
|
||||
|
||||
class RedfishDriver(ManagementControllerDriver):
|
||||
"""NAPALM driver for Redfish BMCs (Supermicro, iDRAC, iLO, XCC and others)."""
|
||||
class RedfishDriver(HealthMetricsMixin, ManagementControllerDriver):
|
||||
"""NAPALM driver for Redfish BMCs (Supermicro, iDRAC, iLO, XCC and others).
|
||||
|
||||
``HealthMetricsMixin``: the BMC's own load, memory and interfaces over SNMP (UCD-MIB),
|
||||
where the BMC runs net-snmp. The managed server's sensors come from ``get_environment``.
|
||||
"""
|
||||
|
||||
platform = "redfish"
|
||||
DRIVER_NAME = "redfish"
|
||||
|
||||
Reference in new issue
Block a user