-
Notifications
You must be signed in to change notification settings - Fork 2
bugalertUpdate.py issues - Invalid command & missing node check #4
Copy link
Copy link
Open
Description
Hey Mark!
I tried out your bugalertUpdate script, it has two issues but which are easy to fix:
- In the second command in each of the following lines,
cvpneeds to be changed tocvpi
Arista_scripts/bugalertUpdate.py
Line 189 in 84b3cd2
| stdin, stdout, stderr = ssh.exec_command('cvpi stop bugalerts-update && cvp start bugalerts-update') |
Arista_scripts/bugalertUpdate.py
Line 219 in 84b3cd2
| stdin, stdout, stderr = ssh.exec_command('cvpi stop bugalerts-update && cvp start bugalerts-update') |
- The check for the number of nodes is missing after line 180, I assume that the environment variables (e.g.,
$SECONDARY_HOSTNAME) are only populated when there is more than one node running - The lab I tested
this in was running only one. This should be fixed by adding the same check which you did in the lines here:
Arista_scripts/bugalertUpdate.py
Lines 209 to 210 in 84b3cd2
| stdin, stdout, stderr = ssh.exec_command('kubectl get nodes | grep Ready | wc -l') | |
| if stdout == "3": |
Apart from that, the CLI instructions worked for me and I could update the AlertBase-CVP.json in my lab,
thanks for this script! :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels