LXD cluster endpoint doesn't update
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
After bootstrapping a LXD cloud and cluster, I had a failure of the node that was provided during bootstrap as the LXD remote. After updating the local config for the cloud to point to one of the other machines, it appears the controller isn't updating and continues to try and reach the original machine.
Here is a debug log while trying to ssh to a machine.
juju ssh --debug -vvv salt-master/0
10:08:11 INFO juju.cmd supercommand.go:57 running juju [2.6.6 gc go1.10.4]
10:08:11 DEBUG juju.cmd supercommand.go:58 args: []string{
10:08:11 INFO juju.juju api.go:67 connecting to API addresses: [192.168.
10:08:11 DEBUG juju.api apiclient.go:1092 successfully dialed "wss://
10:08:11 INFO juju.api apiclient.go:624 connection established to "wss://
10:08:11 DEBUG juju.cmd.
10:08:16 DEBUG juju.cmd.
10:08:16 DEBUG juju.api monitor.go:35 RPC connection died
ERROR opening environment: Get https:/
10:08:16 DEBUG cmd supercommand.go:496 error stack:
opening environment: Get https:/
/build/
/build/
/build/
/build/
/build/
You'll see it's trying to access 192.168.0.224 which is the machine that died.
I've changed the config for the cloud in clouds.yaml as you can see verified here.
juju show-cloud prod-lxd
defined: local
type: lxd
description: LXD Container Hypervisor
auth-types: [certificate]
endpoint: https:/
regions:
default: {}
I also updated the address in bootstrap-
controller-
credential: prod-lxd-creds
cloud: prod-lxd
type: lxd
region: default
endpoint: https:/
I understand that juju doesn't accept a list of IP addresses, but there should be a way to move the endpoint when a single machine in the cluster is lost.
What can I do from here to restore this model's controller to a functioning state?
I've logged in and edited the mongodb with: updateOne( {"_id": "prod-lxd" },{$set: {"endpoint":"https:/ /192.168. 0.107:8443", "regions": { "default" : { "endpoint" : "https:/ /192.168. 0.107:8443" } }}}) find({" _id": "prod-lxd"})
db.clouds.
{ "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 }
juju:PRIMARY> db.clouds.
However now I'm getting a 'not authorized' error.
juju ssh --debug -vvv salt-master/0 "/snap/ juju/8594/ bin/juju" , "ssh", "--debug", "-vvv", "salt-master/0"} 1.242:17070] 192.168. 1.242:17070/ model/ea27db4d- 1292-4108- 831d-ae64cb5815 ea/api" 192.168. 1.242:17070/ model/ea27db4d- 1292-4108- 831d-ae64cb5815 ea/api" juju.commands ssh_common.go:260 proxy-ssh is false juju.commands ssh_common.go:377 getting target "salt-master/0" address(es) failed: opening environment: not authorized (retrying) juju.commands ssh_common.go:377 getting target "salt-master/0" address(es) failed: opening environment: not authorized (retrying) juju.commands ssh_common.go:377 getting target "salt-master/0" address(es) failed: opening environment: not authorized (retrying) juju.commands ssh_common.go:377 getting target "salt-master/0" address(es) failed: opening environment: not authorized (retrying) juju.commands ssh_common.go:377 getting target "salt-master/0" address(es) failed: opening environment: not authorized (retrying) juju.commands ssh_common.go:377 getting target "salt-master/0" address(es) failed: opening environment: not authorized (retrying) juju.commands ssh_common.go:377 getting target "salt-master/0" address(es) failed: opening environment: not authorized (retrying) juju.commands ssh_common.go:377 getting target "salt-master/0" address(es) failed: opening environment: not authorized (retrying) juju.commands ssh_common.go:377 getting target "salt-master/0" address(es) failed: opening environment: not authorized (retrying) juju.commands ssh_common.go:377 getting target "salt-master/0" address(es) failed: opening environment: not authorized (retrying) juju/parts/ juju/go/ src/github. com/juju/ juju/rpc/ client. go:178: juju/parts/ juju/go/ src/github. com/juju/ juju/api/ apiclient. go:1187: juju/parts/ juju/go/ src/github. com/juju/ juju/api/ sshclient/ facade. go:52: juju/parts/ juju/go/ src/github. com/juju/ juju/cmd/ juju/commands/ ssh_common. go:405: juju/parts/ juju/go/ src/github. com/juju/ juju/cmd/ juju/commands/ ssh_common. go:385:
10:55:18 INFO juju.cmd supercommand.go:57 running juju [2.6.6 gc go1.10.4]
10:55:18 DEBUG juju.cmd supercommand.go:58 args: []string{
10:55:18 INFO juju.juju api.go:67 connecting to API addresses: [192.168.
10:55:18 DEBUG juju.api apiclient.go:1092 successfully dialed "wss://
10:55:18 INFO juju.api apiclient.go:624 connection established to "wss://
10:55:19 DEBUG juju.cmd.
10:55:19 DEBUG juju.cmd.
10:55:19 DEBUG juju.cmd.
10:55:20 DEBUG juju.cmd.
10:55:20 DEBUG juju.cmd.
10:55:21 DEBUG juju.cmd.
10:55:22 DEBUG juju.cmd.
10:55:22 DEBUG juju.cmd.
10:55:23 DEBUG juju.cmd.
10:55:23 DEBUG juju.cmd.
10:55:24 DEBUG juju.cmd.
10:55:24 DEBUG juju.api monitor.go:35 RPC connection died
ERROR opening environment: not authorized
10:55:24 DEBUG cmd supercommand.go:496 error stack:
opening environment: not authorized
/build/
/build/
/build/
/build/
/build/