changing the cloud URL on a live controller via cli

Bug #1805013 reported by Dmitrii Shcherbakov
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Christopher Lee

Bug Description

I recently upgraded MAAS as follows: 2.3.x -> 2.4.x -> 2.5.x and in that process the URL to access MAAS has changed (see lp:1804070).

After that a Juju controller (2.4.1) partially continued functioning (status worked but I could not ssh into any machine).

ubuntu@maas:~$ juju ssh neutron-openvswitch/0
ERROR opening environment: could not connect to MAAS controller - check the endpoint is correct (not supported)

There doesn't seem to be a command to update an endpoint of an existing cloud (update-clouds only works for public clouds).

I did some database surgery which worked but I think the same needs to be supported via CLI.

# ssh to the controller
ssh ubuntu@192.0.2.60

root@controller-juju:~# conf=/var/lib/juju/agents/machine-*/agent.conf
root@controller-juju:~# user=`sudo grep tag $conf | cut -d' ' -f2`
root@controller-juju:~# password=`sudo grep statepassword $conf | cut -d' ' -f2`
root@controller-juju:~# mongodb --host 127.0.0.1 --port 37017 --authenticationDatabase admin --ssl --sslAllowInvalidCertificates --username "$user" --password "$password"

root@controller-juju:~# /usr/lib/juju/mongo3.2/bin/mongo --host 127.0.0.1 --port 37017 --authenticationDatabase admin --ssl --sslAllowInvalidCertificates --username "$user" --password "$password"
MongoDB shell version: 3.2.15
connecting to: 127.0.0.1:37017/test
2018-11-25T13:40:19.983+0000 W NETWORK [thread1] SSL peer certificate validation failed: unable to get local issuer certificate
2018-11-25T13:40:19.983+0000 W NETWORK [thread1] The server certificate does not match the host name 127.0.0.1
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
Server has startup warnings:
2018-08-08T20:59:31.952+0000 I CONTROL [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2018-08-08T20:59:31.952+0000 I CONTROL [initandlisten]
2018-08-08T20:59:31.953+0000 I CONTROL [initandlisten]
2018-08-08T20:59:31.953+0000 I CONTROL [initandlisten] ** WARNING: soft rlimits too low. rlimits set to 20000 processes, 65000 files. Number of processes should be at least 32500 : 0.5 times number of files.
juju:PRIMARY> use juju;
switched to db juju

juju:PRIMARY> db.clouds.find({"_id": "samaas"})
{ "_id" : "samaas", "name" : "samaas", "type" : "maas", "auth-types" : [ "oauth1" ], "endpoint" : "http://192.0.2.2/MAAS/", "txn-revno" : NumberLong(2), "txn-queue" : [ ] }

juju:PRIMARY> db.clouds.find({"_id": "samaas"})
{ "_id" : "samaas", "name" : "samaas", "type" : "maas", "auth-types" : [ "oauth1" ], "endpoint" : "http://192.0.2.2:5240/MAAS/", "txn-revno" : NumberLong(2), "txn-queue" : [ ] }

Revision history for this message
Richard Harding (rharding) wrote :

There's some existing work around allowing updating clouds/credentials that this would fall under. The biggest thing will be distributing changes to new users/etc. Will include this as a test case under that work.

Changed in juju:
status: New → Triaged
importance: Undecided → High
milestone: none → 2.5.1
Ian Booth (wallyworld)
Changed in juju:
milestone: 2.5.1 → 2.5.2
Ian Booth (wallyworld)
Changed in juju:
assignee: nobody → Christopher Lee (veebers)
Changed in juju:
milestone: 2.5.2 → 2.5.3
Ian Booth (wallyworld)
Changed in juju:
status: Triaged → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.