Added timeout crash avoidance
This commit is contained in:
@@ -91,8 +91,6 @@ async def idrac7_8PoolRemote_v3(remoteIP: str, queueToInsrt: asyncio.Queue):
|
|||||||
|
|
||||||
snmpEngine.close_dispatcher()
|
snmpEngine.close_dispatcher()
|
||||||
|
|
||||||
print(voltResult)
|
|
||||||
|
|
||||||
# Exhaust CPU1 and CPU2 temp
|
# Exhaust CPU1 and CPU2 temp
|
||||||
|
|
||||||
exhaustTemp = None
|
exhaustTemp = None
|
||||||
|
|||||||
@@ -56,6 +56,10 @@ async def idrac9PoolRemote_v3(remoteIP: str, queueToInsrt: asyncio.Queue):
|
|||||||
errorIndication, errorStatus, errorIndex, mainVarBinds = await iterator
|
errorIndication, errorStatus, errorIndex, mainVarBinds = await iterator
|
||||||
|
|
||||||
if errorIndication:
|
if errorIndication:
|
||||||
|
if errorIndication == "No SNMP response received before timeout":
|
||||||
|
print(f"Host {remoteIP} timed out.\nContinuing...")
|
||||||
|
snmpEngine.close_dispatcher()
|
||||||
|
return 1
|
||||||
print(errorIndication)
|
print(errorIndication)
|
||||||
elif errorStatus:
|
elif errorStatus:
|
||||||
print(
|
print(
|
||||||
|
|||||||
@@ -53,6 +53,10 @@ async def walk_column_v3(snmpEngine, remoteIP: str, base_oid: str) -> dict:
|
|||||||
lexicographicMode=False,
|
lexicographicMode=False,
|
||||||
):
|
):
|
||||||
if errInd:
|
if errInd:
|
||||||
|
print(f"\n\n{errInd}\n\n")
|
||||||
|
if "No SNMP response received before timeout" in errInd:
|
||||||
|
print(f"Host {remoteIP} timed out.\nContinuing...")
|
||||||
|
return 1
|
||||||
raise RuntimeError(errInd)
|
raise RuntimeError(errInd)
|
||||||
if errStat:
|
if errStat:
|
||||||
raise RuntimeError(errStat.prettyPrint())
|
raise RuntimeError(errStat.prettyPrint())
|
||||||
|
|||||||
Reference in New Issue
Block a user