Skip to content

Commit

Permalink
scripts: Properly exit on failure during upgrade and downgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
TeddyAndrieux committed Jun 8, 2022
1 parent 3356dfd commit e9c25ec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -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
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
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

0 comments on commit e9c25ec

Please sign in to comment.