On this one we start our HA testing, there will be a couple of videos on this topic.
Use this to format your JUJU status a little cleaner:
$ juju status --format tabular
Check this site out for what the juju status means.
If a hook is in error status you can try to re-run the hook with this command, basically the same as clicking resolved in the gui:
$ juju resolved --retry neutron-gateway/0
If a hook is stalled and not in error status, it might be stuck in executing for example, you can try to resume the hook.
Use this command to check what actions the service has:
$ action defined neutron-gateway
In some cases you will be able to try to resume the service to clear the stalled hook:
$ juju action do neutron-gateway/0 resume
Grab a juju status and keep it in a file:
$ juju status > output
Read it with:
$ nano output
Search in nano with CTRL + w
To use JUJU help for commands, enter:
$ juju help commands
To completely remove a machine using machine number and all it containers use:
BE CAREFUL MAKE SURE YOU HAVE THE RIGHT NUMBER!
$ juju machine remove 1 --force
To add a new machine from maas to juju by its name use:
$ juju machine add node5780.maas
To add LXC container to machine 18 use, I added 6 in this video:
$ juju machine add lxc:18>
To add a unit to root machine 18 use:
$ juju add-unit base-machine --to 18
To add a unit to lxc container use:
$ juju add-unit base-machine --to 18/lxc/0
After the video cinder didn’t come up clean which impacted mysql, we saw these error in juju status:
mysql/1: workload-status: current: error message: 'hook failed: "shared-db-relation-changed" for cinder:shared-db' since: 23 Nov 2016 21:40:45Z cinder/3: workload-status: current: blocked message: 'Services not running that should be: cinder-api' since: 23 Nov 2016 21:34:40Z hacluster-mysql/3: workload-status: current: blocked message: Insufficient peer units for ha cluster (require 3) since: 23 Nov 2016 22:33:36Z agent-status: current: executing message: running hanode-relation-joined hook since: 23 Nov 2016 22:35:32Z version: 1.25.6 agent-state: started
to resolve this I ran:
$ juju ssh juju ssh 18/lxc/5 $ sudo service cinder-api restart $ exit $ juju resolved --retry cinder/3 $ juju ssh mysql/1 $ sudo /etc/init.d/mysql stop $ sudo /etc/init.d/mysql bootstrap-pxc $ exit $ juju ssh mysql/3 sudo reboot now