-
Notifications
You must be signed in to change notification settings - Fork 3
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
Copy signing keys from main to workers #349
base: main
Are you sure you want to change the base?
Conversation
@@ -58,15 +61,32 @@ def _change_config(self, charm_state: CharmState) -> None: | |||
Args: | |||
charm_state: Instance of CharmState | |||
""" | |||
if self._charm.get_main_unit() is None and self._charm.unit.is_leader(): |
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.
As far as I see, the method database_observer._change_config is nearly equal to the method charm.change_config. Why not calling the charm method instead? (maybe add that method to the base class of the charm, so no casting is needed)
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.
I believe this will be better handled/discussed in ISD-1820. What do you think?
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.
But...this is related to the last commit that I pushed regarding is_main check. I'll wait for the integration tests to run and see the behavior but I think it would be easy to do your suggestion in all observers and just call the charm.change_config method.
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.
Proposal: Merge this one (after reviews) and then work on the reconcile/restarts in the ISD-1820.
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore: update charm libraries * remove stored state from redis observer * remove stored state * fix tests * src-docs * fix unit tests * Update test_charm_scaling.py * fix unit tests * fix tests --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Arturo Seijas <arturo.seijas@canonical.com> Co-authored-by: javierdelapuente <javier.delapuente@canonical.com> Co-authored-by: arturo-seijas <102022572+arturo-seijas@users.noreply.github.com>
Test coverage for 9bf0b75
Static code analysis report
|
Attention
To be merged after IRC PRs.
Overview
Copy signing keys from main unit to worker since is required to be the same for prevent problems while sending signed events.
Also, check if Redis configuration has changed before restarting Synapse. Redis charm sends the same custom event for relation created and joined.
Rationale
Every unit will sign events with the same key.
Juju Events Changes
Module Changes
Library Changes
Checklist
src-docs
urgent
,trivial
,complex
)No doc is changed in CH.