removing a machine doesn't always trigger relation-departed hooks

Bug #1947416 reported by Simon Déziel
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Invalid
Undecided
Unassigned

Bug Description

After force removing a machine, Juju didn't call relation-departed hooks.

Initially, `juju status --relations` looked like this:

Model Controller Cloud/Region Version SLA Timestamp
test overlord maas/default 2.9.15 unsupported 20:22:47Z

App Version Status Scale Charm Store Channel Rev OS Message
lxd active 3 lxd local 31 ubuntu

Unit Workload Agent Machine Public address Ports Message
lxd/81 active idle 99 2602:fc62:b:1018:0:1:0:9
lxd/82 active idle 101 2602:fc62:b:1018:0:1:0:7
lxd/83* active idle 102 2602:fc62:b:1018:0:1:0:c

Machine State DNS Inst id Series AZ Message
96 started 2602:fc62:b:1018:0:1:: cloud-vm01 focal default Deployed
99 started 2602:fc62:b:1018:0:1:0:9 cloud-vm03 focal default Deployed
101 started 2602:fc62:b:1018:0:1:0:7 cloud-vm02 focal default Deployed
102 started 2602:fc62:b:1018:0:1:0:c cloud-vm04 focal default Deployed
104 started 2602:fc62:b:1018:0:1:0:e cloud-vm12 focal default Deployed
105 started 2602:fc62:b:1018:0:1:0:2 cloud-vm05 focal default Deployed
106 started 2602:fc62:b:1018:0:1:0:3 cloud-vm06 focal default Deployed
107 started 2602:fc62:b:1018:0:1:0:f cloud-vm13 focal default Deployed
108 started 2602:fc62:b:1018:0:1:0:13 cloud-vm14 focal default Deployed
109 started 2602:fc62:b:1018:0:1:0:5 cloud-vm07 focal default Deployed
110 started 2602:fc62:b:1018:0:1:0:6 cloud-vm09 focal default Deployed
111 started 2602:fc62:b:1018:0:1:0:b cloud-vm08 focal default Deployed
112 started 2602:fc62:b:1018:0:1:0:14 cloud-vm15 focal default Deployed
113 started 2602:fc62:b:1018:0:1:0:d cloud-vm10 focal default Deployed
114 started 2602:fc62:b:1018:0:1:0:12 cloud-vm11 focal default Deployed

Then I removed the leader (lxd/83):
$ juju remove-machine --force 102
removing machine 102
- will remove unit lxd/83

Normally, this operation is visible in the logs as "Emitting Juju event cluster_relation_departed." but there was nothing this time.

Revision history for this message
Simon Déziel (sdeziel) wrote :
Revision history for this message
Simon Déziel (sdeziel) wrote :
Revision history for this message
Simon Déziel (sdeziel) wrote :
Revision history for this message
Simon Déziel (sdeziel) wrote :
Revision history for this message
John A Meinel (jameinel) wrote :

remove-machine --force is explicitly stating "don't worry about running any of the hooks, I am forcibly removing the machine". I believe it makes an attempt to run some, but if they take too long, it skips them. If you want the hooks to always be run, then you shouldn't be using --force.

Changed in juju:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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