Changing your OpenStack password in juju

I recently got my OpenStack password reset, and juju was unable to deploy new services even after I replaced all the occurrences of the old password by the new password in ~/.juju (or $JUJU_HOME, if you’re into that sort of thing).

The thing is, juju also stores the password in the MongoDB database on node 0, so you’ll want to change it there as well.

$ juju ssh 0
machine-0:~$ mongo --ssl -u admin -p $(sudo grep oldpassword /var/lib/juju/agents/machine-0/agent.conf | awk -e '{print $2}') localhost:37017/admin
MongoDB shell version: 2.4.9
connecting to: localhost:37017/admin
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
juju:PRIMARY> db.settings.update({'_id': "e"}, { $set : { password: "l33tpassword" } })
juju:PRIMARY> db.settings.find({'_id': "e"}).pretty()
{
[...]
"password" : "l33tpassword",
[...]
}
juju:PRIMARY>
bye
machine-0:~$ logout

And voilĂ  ! This was with juju 1.23 by the way.

Leave a Reply

Your email address will not be published. Required fields are marked *