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

Add in-place upgrades #242

Merged
merged 53 commits into from
Apr 29, 2024
Merged

Add in-place upgrades #242

merged 53 commits into from
Apr 29, 2024

Conversation

carlcsaposs-canonical
Copy link
Contributor

@carlcsaposs-canonical carlcsaposs-canonical commented Apr 18, 2024

Ported from canonical/mysql-router-operator#88

upgrade.py, machine_upgrade.py and event handlers in charm.py are mostly shared with upgrade.py, machine_upgrade.py and event handlers in abstract_charm.py/machine_charm.py in MySQL Router VM charm

Non-upgrade event handler guards implemented per https://docs.google.com/spreadsheets/d/1_qjINUoj5Mi7PlXhCdpwQ0170bIZSgpvNFMAnTOtuQw/edit#gid=0

@carlcsaposs-canonical
Copy link
Contributor Author

carlcsaposs-canonical commented Apr 18, 2024

TODO:

Base automatically changed from tls-relation-created to main April 18, 2024 10:53
Copy link
Contributor

@phvalguima phvalguima left a comment

Choose a reason for hiding this comment

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

Left some extra suggestions. I will review the core of the upgrade lib later today.

src/charm.py Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/machine_upgrade.py Outdated Show resolved Hide resolved
actions.yaml Show resolved Hide resolved
actions.yaml Outdated Show resolved Hide resolved
@carlcsaposs-canonical
Copy link
Contributor Author

@Mehdi-Bendriss I haven't updated the guards for non-upgrade event handlers since #190—let me know if there's anything I should update

Given that the scope of this PR is upgrades for simple deployments only, not sure what's desired here
We could add some basic handling (e.g. other opensearch apps shouldn't be scaled up/down during upgrade?)

Co-authored-by: phvalguima <pedro.guimaraes@canonical.com>
Copy link
Contributor

@Mehdi-Bendriss Mehdi-Bendriss left a comment

Choose a reason for hiding this comment

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

Thanks Carl! Great work! I do not have major concerns here, only a few comments

actions.yaml Outdated Show resolved Hide resolved
src/charm.py Show resolved Hide resolved
src/upgrade.py Show resolved Hide resolved
src/upgrade.py Show resolved Hide resolved
src/upgrade.py Show resolved Hide resolved
src/upgrade.py Show resolved Hide resolved
phvalguima added a commit that referenced this pull request Apr 26, 2024
Spin of #242, [following this
discussion](#242 (review)).
Adds an integration test to ensure we have the correct version in the
`workload_version` file.

---------

Co-authored-by: Carl Csaposs <carl.csaposs@canonical.com>
phvalguima
phvalguima previously approved these changes Apr 26, 2024
@carlcsaposs-canonical carlcsaposs-canonical merged commit a682863 into main Apr 29, 2024
25 of 26 checks passed
@carlcsaposs-canonical carlcsaposs-canonical deleted the upgrades branch April 29, 2024 14:15
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.

3 participants