diff --git a/CHANGELOG.md b/CHANGELOG.md index 13559838b4..91605d2f0f 100644 --- a/CHANGELOG.md +++ b/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 diff --git a/scripts/downgrade.sh.in b/scripts/downgrade.sh.in index c5cd3652ec..457b368fee 100755 --- a/scripts/downgrade.sh.in +++ b/scripts/downgrade.sh.in @@ -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" \ diff --git a/scripts/upgrade.sh.in b/scripts/upgrade.sh.in index 31d4148b75..e87eb18df6 100755 --- a/scripts/upgrade.sh.in +++ b/scripts/upgrade.sh.in @@ -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=(