useful_scripts/check_juju.sh
Arif Ali bb166ecc96
Update to latest scripts
* do_innodb_resolution.sh: mostly now works, the timing between
  update-status and the add-instance may need to be tweaked still
* vault.sh: use juju status json to grab the IPs for the vault units
* check_juju.sh: add debug to the default status
* check_avail_pci.sh: add hypervisor_name to the output to make it
  easier to grab multiple nodes
* get_passwords.sh: add extra password for collection
2024-01-09 14:19:47 +00:00

18 lines
371 B
Bash
Executable File

#!/bin/bash
check_controller()
{
controller=$1
model="cpe-focal"
juju status --debug -m "${controller}":${model} --color | grep ^Unit -A 999999 | grep -E -v "started.*focal|started.*bionic|active.*idle"
}
if [[ -z "$1" ]] ; then
check_controller "$(juju controllers --format json | jq -r .\"current-controller\")"
else
check_controller "${1}"
fi