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

scripts: Properly exit on failure during upgrade and downgrade #3790

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG
## Release 2.11.8 (in development)
### Bug fixes

- Properly exit on failure during upgrade and downgrade
(PR[#3790](https://github.com/scality/metalk8s/pull/3790))

## Release 2.11.7
### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion scripts/downgrade.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ downgrade_bootstrap () {
SALT_MASTER_CALL=(crictl exec -i "$(get_salt_container)")
"${SALT_MASTER_CALL[@]}" salt-run state.orchestrate \
metalk8s.orchestrate.bootstrap.pre-downgrade \
saltenv="$SALTENV"
saltenv="$SALTENV" || return 1

"${SALT_CALL}" --local --retcode-passthrough state.sls sync_mods="all" \
"metalk8s.roles.bootstrap.local" saltenv="metalk8s-$DESTINATION_VERSION" \
Expand Down
2 changes: 1 addition & 1 deletion scripts/upgrade.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ upgrade_local_engines () {
"${SALT_CALL}" --local --retcode-passthrough state.sls sync_mods="all" \
metalk8s.kubernetes.kubelet.standalone saltenv="$SALTENV" \
pillar="{'metalk8s': {'endpoints': {'salt-master': $saltmaster_endpoint, \
'repositories': $repo_endpoint}}}" && sleep 20
'repositories': $repo_endpoint}}}" && sleep 20 || return 1

# List of containers that need to be running to continue the upgrade
local -a containers_to_check=(
Expand Down