Skip to content

Instantly share code, notes, and snippets.

@freyes
Created February 24, 2016 16:58
Show Gist options
  • Select an option

  • Save freyes/4256dd8d755daadc5a79 to your computer and use it in GitHub Desktop.

Select an option

Save freyes/4256dd8d755daadc5a79 to your computer and use it in GitHub Desktop.
[juju] change unit status from dying to active
1) Connect to machine 0 as root
juju ssh 0 sudo su -
2) Install mongodb client
apt-get install mongodb-clients
3) Connect to mongodb
mongo --ssl -u admin -p $(grep oldpassword /var/lib/juju/agents/machine-0/agent.conf | awk -e '{print $2}') localhost:37017/admin
4) Use juju db
use juju
5) Change status
db.units.update({"name": "UNIT"}, {$set: {"life": 0}});
0 -> active
1 -> dying
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment