Azure provider: Can't remove machine (with storage)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
Hi,
I can't seem to remove this machine, the unit is gone but not the machine. It seems stuck in 'dying', likely to do with attached storage?
| Machine State DNS Inst id Series AZ Message
| 0 started 20.193.47.26 machine-0 focal
| 1 down 20.53.72.175 machine-1 focal
| 3 started 20.53.109.34 machine-3 focal
| $ juju remove-machine 1 --force --no-wait
| removing machine 1
| $ juju list-storage
| Unit Storage id Type Pool Size Status Message
| ubuntu-
| ubuntu-
| $ juju status --format=yaml
| "1":
| juju-status:
| current: down
| message: agent is not communicating with the server
| since: 30 Sep 2020 09:37:28Z
| version: 2.8.3
| life: dying
| dns-name: 20.53.72.175
| ip-addresses:
| - 20.53.72.175
| - 192.168.0.5
| instance-id: machine-1
| machine-status:
| current: running
| since: 14 Jul 2020 04:39:50Z
| modification-
| current: idle
| since: 14 Jul 2020 04:37:08Z
| series: focal
| network-interfaces:
| eth0:
| ip-addresses:
| - 192.168.0.5
| mac-address: 00:0d:3a:cb:08:65
| gateway: 192.168.0.1
| is-up: true
| constraints: instance-
| hardware: arch=amd64 cores=2 mem=7168M root-disk=30720M
| ...
| volumes:
| "1":
| provider-id: volume-1
| attachments:
| machines:
| "1":
| device-link: /dev/disk/
| read-only: false
| life: alive
| pool: azure
| size: 102400
| persistent: true
| life: dying
| status:
| current: attached
| since: 25 Aug 2020 06:44:23Z
Full 'juju storage --format=yaml' output - https:/
Model is Juju 2.8.3.
I tried to reproduce this on juju 2.8.5 by adding a machine w/ storage on azure. I wasn't able to reproduce -- the machine got removed cleanly.
```
juju deploy postgresql --storage pgdata=10G
# Deploys the machine as expected
juju remove-unit postegresql/0
# Removes the machine as expected
# I can remove storage with:
juju remove-storage pgdata/0
```
What is the history of this cluster? Does `juju remove-storage` unstick you? Did you attempt remove-unit before attempting to remove-machine?