Unable to tell if a remote unit has joined a relation

Bug #1667268 reported by Stuart Bishop
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Expired
Wishlist
Unassigned

Bug Description

In a -relation-joined or -relation-changed hook, a charm is unable to tell if the remote unit has not yet joined the relation, or if the remote unit has joined and not set any data.

It would be useful to tell if the remote end of a relation has run its relation-joined hook or one or more iterations of relation-changed yet. This could be exposed on the relation as standard relation data (like the IP address).

As the information is being set by juju rather than the charm, it would be available even if the remote unit does not even have a corresponding relation hook wired up.

The use is it would allow a charm to know if the remote unit has chosen to set no data on a relation and should be provided with 'default' settings, or that the remote unit has not yet had an opportunity to speak its mind and we should wait until a future -relation-changed hook before allocating resources and responding.

As a strawman proposal, I suggest adding a 'last-relation-hook' property to the relation which is set on successful completion of a hook or when there was no hook to run. Its value would thus be one of 'joined', 'changed', or 'departed'. In the future when the departing hook is implemented it could also be 'departing'. 'broken' may also be possible, although I doubt a charm would ever get an opportunity to see it.

Stuart Bishop (stub)
summary: - Unable to tell if a remote service has joined a relation
+ Unable to tell if a remote unit has joined a relation
Changed in juju:
status: New → Triaged
importance: Undecided → Wishlist
tags: added: charm charmers hooks
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 5 years, so we're marking it Expired. If you believe this is incorrect, please update the status.

Changed in juju:
status: Triaged → Expired
tags: added: expirebugs-bot
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.