@@ -6029,70 +6029,7 @@ def apic_downgrade_compat_warning_check(cversion, tversion, **kwargs):
60296029
60306030 return Result (result = result , headers = headers , data = data , recommended_action = recommended_action , doc_url = doc_url )
60316031
6032- @check_wrapper (check_title = "Tacacs server unresponsive check" )
6033- def tacacs_server_unresponsive_check (fabric_nodes , tversion , username , password , ** kwargs ):
6034- result = PASS
6035- headers = ['APIC_Name' , 'count' ]
6036- data = []
6037- recommended_action = "Contact Cisco TAC for Support before upgrade"
6038- doc_url = "https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#tacacs-server-unresponsive-check"
6039-
6040- if not tversion :
6041- return Result (result = MANUAL , msg = TVER_MISSING )
6042- if tversion .older_than ("6.1(4h)" ):
6043- controllers = [node for node in fabric_nodes if node ['fabricNode' ]['attributes' ]['role' ] == 'controller' ]
6044- if not controllers :
6045- return Result (result = ERROR , msg = "No fabricNode of APIC. Is the cluster healthy?" , doc_url = doc_url )
6046- has_error = False
6047- for controller in controllers :
6048- try :
6049- connection = Connection (controller ['fabricNode' ]['attributes' ]['address' ])
6050- connection .username = username
6051- connection .password = password
6052- connection .connect ()
6053- connection .cmd ('cd /var/log/dme/log && zgrep -c "AAA server is unresponsive or too slow to respond" nginx.bin.log' )
6054- count = int (connection .output .strip ())
6055- if (count > 0 ):
6056- data .append ([controller ['fabricNode' ]['attributes' ]['name' ], count ])
6057- except Exception as e :
6058- has_error = True
6059- data .append ([controller ['fabricNode' ]['attributes' ]['name' ], str (e )])
6060-
6061- connection .close ()
6062-
6063- if has_error :
6064- result = ERROR
6065- elif data :
6066- result = FAIL_O
6067- return Result (result = result ,headers = headers ,data = data ,recommended_action = recommended_action ,doc_url = doc_url )
6068- else :
6069- return Result (result = PASS , msg = VER_NOT_AFFECTED )
6070-
60716032
6072- @check_wrapper (check_title = 'Auto Firmware Update on Switch Discovery' )
6073- def auto_firmware_update_on_switch_check (cversion , tversion , ** kwargs ):
6074- result = PASS
6075- headers = ["Auto Firmware Update Status" , "Default Firmware Version" , "Upgrade Target Version" ]
6076- data = []
6077- recommended_action = 'Disable Auto Firmware Update before the upgrade as a precaution. See the reference doc for details.'
6078- doc_url = 'https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/validations/#auto-firmware-update-on-switch-discovery'
6079-
6080- if not tversion or not cversion :
6081- return Result (result = MANUAL , msg = TVER_MISSING )
6082-
6083- if tversion .older_than ("6.0(3a)" ) or (
6084- cversion .newer_than ("6.0(3a)" ) or (cversion .major1 == "5" and cversion .newer_than ("5.2(8a)" ))
6085- ):
6086- return Result (result = NA , msg = VER_NOT_AFFECTED )
6087-
6088- fwrepop = icurl ("mo" , "uni/fabric/fwrepop.json" )
6089- if fwrepop and fwrepop [0 ]["firmwareRepoP" ]["attributes" ]["enforceBootscriptVersionValidation" ] == "yes" :
6090- data .append (["Enabled" , fwrepop [0 ]["firmwareRepoP" ]["attributes" ]["defaultSwitchVersion" ], str (tversion )])
6091- result = MANUAL
6092-
6093- return Result (result = result , headers = headers , data = data , recommended_action = recommended_action , doc_url = doc_url )
6094-
6095-
60966033@check_wrapper (check_title = "svccoreCtrlr excessive entries check" )
60976034def svccoreCtrlr_excessive_entries_check (tversion , ** kwargs ):
60986035 result = PASS
0 commit comments