Skip to content

bugalertUpdate.py issues - Invalid command & missing node check #4

@tu-arista

Description

@tu-arista

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, cvp needs to be changed to cvpi

stdin, stdout, stderr = ssh.exec_command('cvpi stop bugalerts-update && cvp start bugalerts-update')

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:

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! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions