I have a controller juju 2.9.25 in a lxd cloud.
When I'm adding a physical machine manually:
juju add-machine ssh:ubuntu@192.168.2.3
Then, the machine is never exiting pending from juju status. (The agent gets into trouble somehow)
See discourse post about all this: https://discourse.charmhub.io/t/adding-manual-machine-fails-on-address-not-valid/5823/
When I add the apiaddress manually to the agent.conf and restart the machine agent
systemctl restart jujud-machine-0.service
Then, the apipassword key is gone from the config and a new error enters:
If I add the entries TWICE... Then, it seems that the agent manages to connect, but then something happens and I'm back at zero.
Here is the logs from such an event following a restart of the machine agent:
2022-03-10 19:55:06 INFO juju.cmd supercommand.go:56 running jujud [2.9.25 0 695d9bc09df0725a168df52707336bb6a3a92ff7 gc go1.17]
2022-03-10 19:55:06 DEBUG juju.cmd supercommand.go:57 args: []string{"/var/lib/juju/tools/machine-4/jujud", "machine", "--data-dir", "/var/lib/juju", "--machine-id", "4", "--debug"}
2022-03-10 19:55:06 DEBUG juju.utils gomaxprocs.go:24 setting GOMAXPROCS to 16
2022-03-10 19:55:06 DEBUG juju.agent agent.go:592 read agent config, format "2.0"
2022-03-10 19:55:06 INFO juju.agent.setup agentconf.go:128 setting logging config to "<root>=INFO"
2022-03-10 19:55:06 INFO juju.worker.upgradesteps worker.go:60 upgrade steps for 2.9.25 have already been run.
2022-03-10 19:55:06 INFO juju.api apiclient.go:673 connection established to "wss://192.168.2.224:17070/model/fb0a48a3-72b3-430f-88c0-ed246604a5eb/api"
2022-03-10 19:55:06 INFO juju.worker.apicaller connect.go:163 [fb0a48] "machine-4" successfully connected to "192.168.2.224:17070"
2022-03-10 19:55:06 INFO juju.api apiclient.go:673 connection established to "wss://192.168.2.224:17070/model/fb0a48a3-72b3-430f-88c0-ed246604a5eb/api"
2022-03-10 19:55:06 INFO juju.worker.apicaller connect.go:163 [fb0a48] "machine-4" successfully connected to "192.168.2.224:17070"
2022-03-10 19:55:06 INFO juju.worker.upgrader upgrader.go:244 desired agent binary version: 2.9.25
2022-03-10 19:55:06 INFO juju.worker.deployer nested.go:159 new context: units "", stopped ""
2022-03-10 19:55:06 INFO juju.worker.migrationminion worker.go:140 migration phase is now: NONE
2022-03-10 19:55:06 INFO juju.worker.logger logger.go:120 logger worker started
2022-03-10 19:55:06 INFO juju.worker.diskmanager diskmanager.go:67 block devices changed: []storage.BlockDevice{storage.BlockDevice{DeviceName:"loop0", DeviceLinks:[]string(nil), Label:"", UUID:"", HardwareId:"", WWN:"", BusAddress:"", Size:0x6e, FilesystemType:"squashfs", InUse:true, MountPoint:"/snap/core/12725", SerialId:""}, storage.BlockDevice{DeviceName:"loop1", DeviceLinks:[]string(nil), Label:"", UUID:"", HardwareId:"", WWN:"", BusAddress:"", Size:0x37, FilesystemType:"squashfs", InUse:true, MountPoint:"/snap/core18/2284", SerialId:""}, storage.BlockDevice{DeviceName:"loop2", DeviceLinks:[]string(nil), Label:"", UUID:"", HardwareId:"", WWN:"", BusAddress:"", Size:0x3d, FilesystemType:"squashfs", InUse:true, MountPoint:"/snap/core20/1361", SerialId:""}, storage.BlockDevice{DeviceName:"loop3", DeviceLinks:[]string(nil), Label:"", UUID:"", HardwareId:"", WWN:"", BusAddress:"", Size:0x37, FilesystemType:"squashfs", InUse:true, MountPoint:"/snap/core18/2253", SerialId:""}, storage.BlockDevice{DeviceName:"loop4", DeviceLinks:[]string(nil), Label:"", UUID:"", HardwareId:"", WWN:"", BusAddress:"", Size:0x0, FilesystemType:"squashfs", InUse:true, MountPoint:"/snap/jq/6", SerialId:""}, storage.BlockDevice{DeviceName:"loop5", DeviceLinks:[]string(nil), Label:"", UUID:"", HardwareId:"", WWN:"", BusAddress:"", Size:0x3d, FilesystemType:"squashfs", InUse:true, MountPoint:"/snap/core20/1328", SerialId:""}, storage.BlockDevice{DeviceName:"loop6", DeviceLinks:[]string(nil), Label:"", UUID:"", HardwareId:"", WWN:"", BusAddress:"", Size:0x43, FilesystemType:"squashfs", InUse:true, MountPoint:"/snap/lxd/21835", SerialId:""}, storage.BlockDevice{DeviceName:"loop7", DeviceLinks:[]string(nil), Label:"", UUID:"", HardwareId:"", WWN:"", BusAddress:"", Size:0x2b, FilesystemType:"squashfs", InUse:true, MountPoint:"/snap/snapd/14978", SerialId:""}, storage.BlockDevice{DeviceName:"loop8", DeviceLinks:[]string(nil), Label:"", UUID:"", HardwareId:"", WWN:"", BusAddress:"", Size:0x43, FilesystemType:"squashfs", InUse:true, MountPoint:"/snap/lxd/22526", SerialId:""}, storage.BlockDevice{DeviceName:"loop9", DeviceLinks:[]string{"/dev/disk/by-label/juju-btrfs", "/dev/disk/by-uuid/acbc28ce-45e7-491b-a105-5fccd73f7a44"}, Label:"juju-btrfs", UUID:"acbc28ce-45e7-491b-a105-5fccd73f7a44", HardwareId:"", WWN:"", BusAddress:"", Size:0x60db, FilesystemType:"btrfs", InUse:true, MountPoint:"", SerialId:""}, storage.BlockDevice{DeviceName:"sda", DeviceLinks:[]string{"/dev/disk/by-id/scsi-0HP_LOGICAL_VOLUME_00000000", "/dev/disk/by-id/scsi-3600508b1001c01ece85c00bfdede757f", "/dev/disk/by-id/scsi-SHP_LOGICAL_VOLUME_500143802258BED0", "/dev/disk/by-id/wwn-0x600508b1001c01ece85c00bfdede757f", "/dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:0"}, Label:"", UUID:"", HardwareId:"scsi-3600508b1001c01ece85c00bfdede757f", WWN:"0x600508b1001c01ece85c00bfdede757f", BusAddress:"scsi@2:1.0.0", Size:0x4459c, FilesystemType:"", InUse:true, MountPoint:"", SerialId:"3600508b1001c01ece85c00bfdede757f"}, storage.BlockDevice{DeviceName:"sda1", DeviceLinks:[]string{"/dev/disk/by-id/scsi-0HP_LOGICAL_VOLUME_00000000-part1", "/dev/disk/by-id/scsi-3600508b1001c01ece85c00bfdede757f-part1", "/dev/disk/by-id/scsi-SHP_LOGICAL_VOLUME_500143802258BED0-part1", "/dev/disk/by-id/wwn-0x600508b1001c01ece85c00bfdede757f-part1", "/dev/disk/by-partuuid/284c0cd2-b98e-49c6-8583-1c8d3502b760", "/dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:0-part1"}, Label:"", UUID:"", HardwareId:"scsi-3600508b1001c01ece85c00bfdede757f", WWN:"0x600508b1001c01ece85c00bfdede757f", BusAddress:"scsi@2:1.0.0", Size:0x1, FilesystemType:"", InUse:false, MountPoint:"", SerialId:"3600508b1001c01ece85c00bfdede757f"}, storage.BlockDevice{DeviceName:"sda2", DeviceLinks:[]string{"/dev/disk/by-id/scsi-0HP_LOGICAL_VOLUME_00000000-part2", "/dev/disk/by-id/scsi-3600508b1001c01ece85c00bfdede757f-part2", "/dev/disk/by-id/scsi-SHP_LOGICAL_VOLUME_500143802258BED0-part2", "/dev/disk/by-id/wwn-0x600508b1001c01ece85c00bfdede757f-part2", "/dev/disk/by-partuuid/4328ed3d-5cb8-4bbe-a46f-a4d0c3b35ae6", "/dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:0-part2", "/dev/disk/by-uuid/c3c46a1c-de95-4ccc-bac8-03c15896ca2a"}, Label:"", UUID:"c3c46a1c-de95-4ccc-bac8-03c15896ca2a", HardwareId:"scsi-3600508b1001c01ece85c00bfdede757f", WWN:"0x600508b1001c01ece85c00bfdede757f", BusAddress:"scsi@2:1.0.0", Size:0x400, FilesystemType:"ext4", InUse:true, MountPoint:"/boot", SerialId:"3600508b1001c01ece85c00bfdede757f"}, storage.BlockDevice{DeviceName:"sda3", DeviceLinks:[]string{"/dev/disk/by-id/lvm-pv-uuid-QdesTc-ouRX-s4fP-qCcB-bjAA-OoGV-JjT9fm", "/dev/disk/by-id/scsi-0HP_LOGICAL_VOLUME_00000000-part3", "/dev/disk/by-id/scsi-3600508b1001c01ece85c00bfdede757f-part3", "/dev/disk/by-id/scsi-SHP_LOGICAL_VOLUME_500143802258BED0-part3", "/dev/disk/by-id/wwn-0x600508b1001c01ece85c00bfdede757f-part3", "/dev/disk/by-partuuid/1428fd62-5554-4aa6-bd46-885dd0566e85", "/dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:0-part3"}, Label:"", UUID:"QdesTc-ouRX-s4fP-qCcB-bjAA-OoGV-JjT9fm", HardwareId:"scsi-3600508b1001c01ece85c00bfdede757f", WWN:"0x600508b1001c01ece85c00bfdede757f", BusAddress:"scsi@2:1.0.0", Size:0x44199, FilesystemType:"LVM2_member", InUse:true, MountPoint:"", SerialId:"3600508b1001c01ece85c00bfdede757f"}, storage.BlockDevice{DeviceName:"sdb", DeviceLinks:[]string{"/dev/disk/by-id/scsi-0HP_LOGICAL_VOLUME_01000000", "/dev/disk/by-id/scsi-3600508b1001c0ec3cce625c6c0c5813c", "/dev/disk/by-id/scsi-SHP_LOGICAL_VOLUME_500143802258BED0", "/dev/disk/by-id/wwn-0x600508b1001c0ec3cce625c6c0c5813c", "/dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:1"}, Label:"", UUID:"", HardwareId:"scsi-3600508b1001c0ec3cce625c6c0c5813c", WWN:"0x600508b1001c0ec3cce625c6c0c5813c", BusAddress:"scsi@2:1.0.1", Size:0x8baec, FilesystemType:"", InUse:true, MountPoint:"", SerialId:"3600508b1001c0ec3cce625c6c0c5813c"}, storage.BlockDevice{DeviceName:"sdb1", DeviceLinks:[]string{"/dev/disk/by-id/scsi-0HP_LOGICAL_VOLUME_01000000-part1", "/dev/disk/by-id/scsi-3600508b1001c0ec3cce625c6c0c5813c-part1", "/dev/disk/by-id/scsi-SHP_LOGICAL_VOLUME_500143802258BED0-part1", "/dev/disk/by-id/wwn-0x600508b1001c0ec3cce625c6c0c5813c-part1", "/dev/disk/by-label/lxdhosts", "/dev/disk/by-partlabel/zfs-a7a91d3dfe14c8c1", "/dev/disk/by-partuuid/b106e153-04ca-b24a-96ba-bd76476ad7e1", "/dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:1-part1", "/dev/disk/by-uuid/13632863783802810807"}, Label:"lxdhosts", UUID:"13632863783802810807", HardwareId:"scsi-3600508b1001c0ec3cce625c6c0c5813c", WWN:"0x600508b1001c0ec3cce625c6c0c5813c", BusAddress:"scsi@2:1.0.1", Size:0x8bae3, FilesystemType:"zfs_member", InUse:true, MountPoint:"", SerialId:"3600508b1001c0ec3cce625c6c0c5813c"}, storage.BlockDevice{DeviceName:"sdb9", DeviceLinks:[]string{"/dev/disk/by-id/scsi-0HP_LOGICAL_VOLUME_01000000-part9", "/dev/disk/by-id/scsi-3600508b1001c0ec3cce625c6c0c5813c-part9", "/dev/disk/by-id/scsi-SHP_LOGICAL_VOLUME_500143802258BED0-part9", "/dev/disk/by-id/wwn-0x600508b1001c0ec3cce625c6c0c5813c-part9", "/dev/disk/by-partuuid/5203134c-6a2d-ce46-adea-73db0e666772", "/dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:1-part9"}, Label:"", UUID:"", HardwareId:"scsi-3600508b1001c0ec3cce625c6c0c5813c", WWN:"0x600508b1001c0ec3cce625c6c0c5813c", BusAddress:"scsi@2:1.0.1", Size:0x8, FilesystemType:"", InUse:false, MountPoint:"", SerialId:"3600508b1001c0ec3cce625c6c0c5813c"}}
2022-03-10 19:55:07 INFO juju.worker.upgradeseries worker.go:161 no series upgrade lock present
2022-03-10 19:55:07 INFO juju.cmd.jujud.runner runner.go:556 start "4-container-watcher"
2022-03-10 19:55:07 INFO juju.worker.machiner machiner.go:162 setting addresses for "machine-4" to [local-machine:127.0.0.1 local-machine:::1]
2022-03-10 19:55:07 INFO juju.container.lxd manager.go:70 Availability zone will be empty for this container manager
2022-03-10 19:55:07 INFO juju.worker.authenticationworker worker.go:103 "machine-4" key updater worker started
2022-03-10 19:55:07 INFO juju.cmd.jujud.runner runner.go:386 runner is dying
2022-03-10 19:55:07 INFO juju.worker.logger logger.go:136 logger worker stopped
2022-03-10 19:55:07 INFO juju.cmd.jujud.runner runner.go:587 stopped "4-container-watcher", err: connection is shut down
2022-03-10 19:55:07 ERROR juju.cmd.jujud.runner runner.go:459 fatal "4-container-watcher": connection is shut down
2022-03-10 19:55:07 ERROR juju.worker.dependency engine.go:693 "api-caller" manifold worker returned unexpected error: [fb0a48] "machine-4" cannot open api: validating info for opening an API connection: missing addresses not valid
2022-03-10 19:55:07 ERROR juju.worker.dependency engine.go:693 "api-caller" manifold worker returned unexpected error: [fb0a48] "machine-4" cannot open api: validating info for opening an API connection: missing addresses not valid
2022-03-10 19:55:11 ERROR juju.worker.dependency engine.go:693 "api-caller" manifold worker returned unexpected error: [fb0a48] "machine-4" cannot open api: validating info for opening an API connection: missing addresses not valid
apipassword: kkHnTKwUr/hf7cWst0Ijbb8k
apiaddresses:
- 192.168.2.224:170702022-03-10 19:55:15 ERROR juju.worker.dependency engine.go:693 "api-caller" manifold worker returned unexpected error: [fb0a48] "machine-4" cannot open api: validating info for opening an API connection: missing addresses not valid
Please note that the agent.conf has both apiaddress and apipassword keys removed after this event...
2022-03-10 20:13:20 INFO juju.cmd. jujud.runner runner.go:556 start "4-container- watcher" upgradeseries worker.go:161 no series upgrade lock present dependency engine.go:693 "instance-mutater" manifold worker returned unexpected error: cannot start machine instancemutater worker: websocket: close sent authenticationw orker worker.go:100 starting key updater worker: connection is shut down jujud.runner runner.go:587 stopped "4-container- watcher" , err: worker "4-container- watcher" exited: connection is shut down dependency engine.go:693 "reboot-executor" manifold worker returned unexpected error: connection is shut down dependency engine.go:693 "fan-configurer" manifold worker returned unexpected error: connection is shut down jujud.runner runner.go:386 runner is dying jujud.runner runner.go:459 fatal "4-container- watcher" : worker "4-container- watcher" exited: connection is shut down dependency engine.go:693 "api-caller" manifold worker returned unexpected error: [fb0a48] "machine-4" cannot open api: validating info for opening an API connection: missing addresses not valid
2022-03-10 20:13:20 INFO juju.container.lxd manager.go:70 Availability zone will be empty for this container manager
2022-03-10 20:13:20 INFO juju.worker.
2022-03-10 20:13:20 ERROR juju.worker.
2022-03-10 20:13:20 INFO juju.worker.
2022-03-10 20:13:20 INFO juju.cmd.
2022-03-10 20:13:20 INFO juju.worker.logger logger.go:136 logger worker stopped
2022-03-10 20:13:20 ERROR juju.worker.
2022-03-10 20:13:20 ERROR juju.worker.
2022-03-10 20:13:20 INFO juju.cmd.
2022-03-10 20:13:20 ERROR juju.cmd.
2022-03-10 20:13:20 ERROR juju.worker.