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-3535] Rerender config from secrets during upgrade #150

Merged
merged 2 commits into from
Feb 12, 2024
Merged

Conversation

dragomirp
Copy link
Contributor

Update rendered a blank config and relied on perpetual peer changed to refresh the configs.

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.

black magic, but LGTM. :-D
Will retest candidate->edge upgrade after review/merging edge.

@dragomirp dragomirp marked this pull request as ready for review February 9, 2024 22:05
Comment on lines +87 to +88
cfg = self.charm.get_secret(APP_SCOPE, CFG_FILE_DATABAG_KEY)
self.charm.render_utility_files(cfg)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need the cfg from the secret, since otherwise the follower units will get stuck during refresh.

Comment on lines +143 to +144
if not cfg_file:
cfg_file = pgb.DEFAULT_CONFIG
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The peer rel is not yet around when the charm initialises, so we need to use the default

@dragomirp dragomirp merged commit 742a844 into main Feb 12, 2024
28 checks passed
@dragomirp dragomirp deleted the fix-updates branch February 12, 2024 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants