Skip to content
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

DPE-4235, DPE-3262, DPE-4315 Common UX for replication #452

Merged
merged 16 commits into from
Jun 7, 2024

Conversation

paulomach
Copy link
Contributor

@paulomach paulomach commented May 3, 2024

Issue

Solution

  • Block on relation from the "wrong" side, i.e., a blocked cluster cannot be the async-primary when creating the async relation.
  • removes relation secret on relation broken
  • implement password rotation from offer side only
  • add assumes juju >=3.4.3 for full replication support

Fixes #445

Copy link
Contributor

@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Will test this tomorrow in Madrid! See you there!

@paulomach paulomach changed the title DPE-4235 block redo relation after switchover DPE-4235, DPE-3262, DPE-4315 block redo relation after switchover Jun 4, 2024
@paulomach paulomach changed the title DPE-4235, DPE-3262, DPE-4315 block redo relation after switchover DPE-4235, DPE-3262, DPE-4315 Common UX for replication Jun 6, 2024
Copy link
Contributor

@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!

Comment on lines +588 to +589
def _on_secret_change(self, event: SecretChangedEvent):
"""Propagates the secret being changed."""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: does each juju application have its own secret? is it possible for them to all share the same secret (so that it only needs to be managed by the primary charm)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes.
It should but that add extra complexity since we always deploy an app with it own secrets, so unifying old need to delete one, and recreating on relation broken.
giving the troubled history with secrets and CMR, I rather do some duplication that works for now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

giving the troubled history with secrets and CMR, I rather do some duplication that works for now.

👍

asking just for my understanding: not sure I understand—during primary switchover there's no way to transfer ownership of the secret to the new app?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can't. Juju design it thinking in a saas model, where a service is provider. In practice the relation offer side is the only one that can manipulate the secret granted to the relation. The consumer side can neither write nor grant a secret to the relation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay; then probably never a good idea to use a single secret

thank you!

metadata.yaml Show resolved Hide resolved
@paulomach paulomach merged commit ccd5922 into main Jun 7, 2024
44 of 45 checks passed
@paulomach paulomach deleted the fix/dpe-4235-redo-relation-after-switchover branch June 7, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

async re-relation ofter switchover breaks charm
3 participants