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

Fix recovery upgrades #445

Merged
merged 1 commit into from
Jul 23, 2021
Merged

Fix recovery upgrades #445

merged 1 commit into from
Jul 23, 2021

Conversation

davidcassany
Copy link
Contributor

This commit fixes a bug related environment variables setting for
cos-upgrade command. cos-upgrade --recovery was not using
the recovery/cos image for upgrades since at the time the upgrade image
was evaluated and decided the RECOVERY_UPGRADE variable was not set
yet.

Signed-off-by: David Cassany [email protected]

@davidcassany davidcassany added the kind/bug Something isn't working label Jul 23, 2021
@davidcassany davidcassany requested a review from mudler July 23, 2021 10:13

if [ -n "$UPGRADE_RECOVERY" ] && [ $UPGRADE_RECOVERY == true ] && [ -n "$RECOVERY_IMAGE" ]; then
UPGRADE_IMAGE=$RECOVERY_IMAGE
if [ -n "$UPGRADE_RECOVERY" ] && [ $UPGRADE_RECOVERY == true ] && [ -n "$RECOVERY_IMAGE" ]; then
Copy link
Contributor Author

Choose a reason for hiding this comment

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

UPGRADE_RECOVERY was not set here since it gets applied in from the command line parsing which used to happen after this method in former implementation. Hence the recovery image from /etc/cos-upgrade-image was never applied and it was defaulting to system/cos

Copy link
Contributor

@mudler mudler left a comment

Choose a reason for hiding this comment

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

good catch!

This commit fixes a bug related environment variables setting for
cos-upgrade command. `cos-upgrade --recovery` was not using
the recovery/cos image for upgrades since at the time the upgrade image
was evaluated and decided the `RECOVERY_UPGRADE` variable was not set
yet.

Signed-off-by: David Cassany <[email protected]>
@davidcassany davidcassany enabled auto-merge (squash) July 23, 2021 11:12
@davidcassany davidcassany merged commit 1da32ae into master Jul 23, 2021
@davidcassany davidcassany deleted the fix_upgrades branch July 23, 2021 15:58
frelon pushed a commit to frelon/elemental-toolkit that referenced this pull request May 12, 2023
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.6.3-0.20220401172941-5ff8fce1fcc6 to 1.6.18.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/commits/v1.6.18)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants