unit data not removed from relation

Bug #1885339 reported by james beedy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Incomplete
Undecided
Unassigned
Prometheus2 charm
Triaged
Medium
Unassigned

Bug Description

I remove a unit, but the unit data never gets removed from the peer relation, see https://paste.ubuntu.com/p/TcNTf6Sy9h/

Furthermore, the other units of the application don't get a relation-changed hook fired when a unit leaves.

Revision history for this message
james beedy (jamesbeedy) wrote :

code where we add 'hostname' to the units data https://gist.github.com/jamesbeedy/2bd8429995f609919834f69d7a8b481f

james beedy (jamesbeedy)
description: updated
Revision history for this message
Tim Penhey (thumper) wrote :

Hi James,

Could you provide the unit logs from the units left? That would show if it was trying to call the event but for some reason couldn't.

How is this charm built? Is it possible that there is a typo in the departed hook name?

Is the charm public?

Changed in juju:
status: New → Incomplete
Revision history for this message
Tim Penhey (thumper) wrote :

Also would be good to know if the charm has different behaviour on Juju 2.7 vs. 2.8

Revision history for this message
james beedy (jamesbeedy) wrote :

@thumper https://github.com/jamesbeedy/charm-peerer, I've also attached this as built charm.

Revision history for this message
james beedy (jamesbeedy) wrote :

@thumper is there anything else I can do to help move this along?

summary: - unit not removed from relation
+ unit data not removed from relation
description: updated
Revision history for this message
John A Meinel (jameinel) wrote :

So it concretely look like:

'relation-list' is correctly reporting that the unit is gone but
'relation-get' still lets you read the old data, because that data isn't removed from the database.

Probably we are missing a cleanup step that ensures a departing unit's data is removed from the settings collections.

We could paper around it by having the Unit agent refuse to return the data if it isn't currently part of the units joined in the relation, but we should really fix it at the source.

Adam Dyess (addyess)
Changed in charm-prometheus2:
status: New → Triaged
Jose Guedez (jfguedez)
Changed in charm-prometheus2:
status: Triaged → Invalid
status: Invalid → Triaged
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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