Comment 8 for bug 1960934

Revision history for this message
John A Meinel (jameinel) wrote :

Looking at the Juju side of the code, it is trying to set it:

github.com/juju/juju/worker/uniter/relation/resolver.go 235:
                return hook.Info{
                        Kind: hooks.RelationBroken,
                        RelationId: relationId,
                        RemoteApplication: r.stateTracker.RemoteApplication(relationId),
                }, nil

It would seem by that time the remote application is already gone from the tracking state, so we don't have a value to give.
Earlier in that file we do have a list of locally known app names in the relation, it might be possible for us to look there. I'm not positive, since we have been doing things like 'relation-departed' and having things cleaning up from there. I'm not positive if localState.ApplicationMembers only holds a value if the application has set a value in the app data bag. But it might be a potential solution.