-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed some issues when removing an ingress relation #282
base: main
Are you sure you want to change the base?
Conversation
@@ -890,7 +900,15 @@ def _wipe_ingress_for_relation(self, relation: Relation, *, wipe_rel_data=True): | |||
# Skip this for traefik-route because it doesn't have a `wipe_ingress_data` method. | |||
provider = self._provider_from_relation(relation) | |||
if wipe_rel_data and self.unit.is_leader() and provider != self.traefik_route: | |||
provider.wipe_ingress_data(relation) # type: ignore # this is an ingress-type relation | |||
try: | |||
provider.wipe_ingress_data(relation) # type: ignore # this is an ingress-type relation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it work if we do nothing for relation broken?
Juju takes care of the databag - we probably shouldn't worry about cleanup.
Seems wrong to log an ERROR with a reservation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mmm, true, not sure what's the goal semantically of wiping the databags. historically traefik's been doing it forever, it's just habit now.
@simskij perhaps has some context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps it's a way for the charm to mark for itself that the relation is going away and should not be used.
Issue
When removing a relation between traefik and, say, alertmanager, traefik goes into error state because it fails to wipe the relation databags due to some permission error.
Solution: be more careful with databag cleanup.