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 4135][DPE-3953] Add pre checks upgrade and Integration Tests #267

Merged
merged 125 commits into from
May 7, 2024

Conversation

phvalguima
Copy link
Contributor

Implements the pre-upgrade-checks and integration tests for small deployments upgrade.

@carlcsaposs-canonical carlcsaposs-canonical force-pushed the pre-upgrade-check branch 2 times, most recently from 60c3f48 to 3613bf5 Compare April 29, 2024 14:17
Base automatically changed from pre-upgrade-check to main April 30, 2024 08:21
@phvalguima phvalguima changed the base branch from main to DPE-4224-remove-relation-emits April 30, 2024 08:51
@phvalguima phvalguima force-pushed the DPE-4135-add-pre-checks-upgrade branch from 34b7441 to 7eced26 Compare April 30, 2024 08:54
lib/charms/opensearch/v0/opensearch_backups.py Outdated Show resolved Hide resolved
lib/charms/opensearch/v0/opensearch_backups.py Outdated Show resolved Hide resolved
lib/charms/opensearch/v0/opensearch_base_charm.py Outdated Show resolved Hide resolved
src/upgrade.py Outdated Show resolved Hide resolved
src/upgrade.py Outdated Show resolved Hide resolved
src/upgrade.py Outdated Show resolved Hide resolved
src/upgrade.py Outdated Show resolved Hide resolved
src/upgrade.py Outdated Show resolved Hide resolved
src/opensearch.py Outdated Show resolved Hide resolved
@carlcsaposs-canonical
Copy link
Contributor

should we check that a backup exists?

@phvalguima
Copy link
Contributor Author

should we check that a backup exists?

@carlcsaposs-canonical @medib in my opinion, yes but then how long before? A day, an hour? Too far and it is an almost useless check, too short and a big cluster will always fail the pre-upgrade-checks.

@carlcsaposs-canonical
Copy link
Contributor

should we check that a backup exists?

@carlcsaposs-canonical @medib in my opinion, yes but then how long before? A day, an hour? Too far and it is an almost useless check, too short and a big cluster will always fail the pre-upgrade-checks.

good question, but at the least, IMO, checking that at least 1 backup exists is better than no backup at all

lib/charms/opensearch/v0/opensearch_backups.py Outdated Show resolved Hide resolved
lib/charms/opensearch/v0/opensearch_backups.py Outdated Show resolved Hide resolved
src/upgrade.py Outdated Show resolved Hide resolved
src/upgrade.py Outdated Show resolved Hide resolved
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 Pedro, I left some comments. Overall - I don't immediately see the need to alter the opensearch_distro if we only support upgrades from 2.12 (upgrades from older versions wthout the upgrades implementation is not supported)

lib/charms/opensearch/v0/helper_cluster.py Outdated Show resolved Hide resolved
lib/charms/opensearch/v0/helper_cluster.py Outdated Show resolved Hide resolved
lib/charms/opensearch/v0/opensearch_backups.py Outdated Show resolved Hide resolved
src/opensearch.py Outdated Show resolved Hide resolved
src/opensearch.py Outdated Show resolved Hide resolved
src/opensearch.py Outdated Show resolved Hide resolved
Base automatically changed from DPE-4224-remove-relation-emits to main May 1, 2024 14:59
lib/charms/opensearch/v0/opensearch_backups.py Outdated Show resolved Hide resolved
lib/charms/opensearch/v0/helper_charm.py Outdated Show resolved Hide resolved
lib/charms/opensearch/v0/opensearch_backups.py Outdated Show resolved Hide resolved
src/upgrade.py Outdated Show resolved Hide resolved
src/upgrade.py Outdated Show resolved Hide resolved
src/upgrade.py Outdated Show resolved Hide resolved
tests/integration/test_small_deployment_upgrades.py Outdated Show resolved Hide resolved
tests/integration/test_small_deployment_upgrades.py Outdated Show resolved Hide resolved
tests/integration/test_small_deployment_upgrades.py Outdated Show resolved Hide resolved
@phvalguima
Copy link
Contributor Author

question: what version are you upgrading from in the tests?
would it make more sense to upgrade the local version of the charm & change the snap rev so that the stability of this test is not affected by an external charm?
or is the intention to always test against edge or stable of opensearch?

@carlcsaposs-canonical, this is just a really temporary step. I am packing this same PR but with snap rev40 instead of rev44. I release it under pguimaraes-opensearch-upgrade-test for now.

I will revisit this logic later this week, once I packed the newer 2.13 and 2.14 releases.
Here is the ticket to track it: https://warthogs.atlassian.net/browse/DPE-4284

phvalguima and others added 5 commits May 6, 2024 12:31
Co-authored-by: Carl Csaposs <carl.csaposs@canonical.com>
Co-authored-by: Carl Csaposs <carl.csaposs@canonical.com>
Co-authored-by: Carl Csaposs <carl.csaposs@canonical.com>
@carlcsaposs-canonical
Copy link
Contributor

@carlcsaposs-canonical, this is just a really temporary step. I am packing this same PR but with snap rev40 instead of rev44. I release it under pguimaraes-opensearch-upgrade-test for now.

I will revisit this logic later this week, once I packed the newer 2.13 and 2.14 releases. Here is the ticket to track it: https://warthogs.atlassian.net/browse/DPE-4284

#267 (comment)

Copy link
Contributor

@carlcsaposs-canonical carlcsaposs-canonical left a comment

Choose a reason for hiding this comment

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

looks good, one open question

src/upgrade.py Outdated Show resolved Hide resolved
Mehdi-Bendriss
Mehdi-Bendriss previously approved these changes May 6, 2024
src/upgrade.py Outdated Show resolved Hide resolved
Co-authored-by: Mehdi Bendriss <bendrissmehdi@gmail.com>
@phvalguima phvalguima merged commit 6670d19 into main May 7, 2024
10 checks passed
@phvalguima phvalguima deleted the DPE-4135-add-pre-checks-upgrade branch May 7, 2024 05:10
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