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

RFC: Major-to-major OS update only #3629

Closed
agners opened this issue May 10, 2022 · 1 comment · Fixed by #3632
Closed

RFC: Major-to-major OS update only #3629

agners opened this issue May 10, 2022 · 1 comment · Fixed by #3632

Comments

@agners
Copy link
Member

agners commented May 10, 2022

Context

At times OS changes requires some migration. To make migration maintainable, we typically assume upgrades from one major to the next.

In a particular case, ova and generic-x86-64 updates from 6.1 and before cannot be done to 7.6 and beyond (read the details in home-assistant/operating-system#1889).

Decision

We should prevent upgrades which skip major versions. We do not have metadata about older release readily available, hence that does not allow us to jump to the latest version of a particular major release. However, we do know the first version of a particular major release, hence we can enforce an update to that version only, e.g.:

  • 6.0 -> 7.0
  • 6.6 -> 7.0
  • 7.0 -> 8.0
@agners
Copy link
Member Author

agners commented May 10, 2022

In discussion, jumping to x.0 releases is problematic for two reasons:

  • We cannot address a bug in the upgrade path of a x.0 release
  • Some people might be inclined to not upgrade due to releases ending with .0 having bad reputation 😅

Proposed solution is to upgrade to the latest release of the next major release. For that to work we need to have a dictionary which allows to loop up what the last release of a particular series is, e.g.

  "hassos-upgrade": {
    "6": "6.6",
    "5": "5.13",
  }

The logic would check as follows:

  1. Get major of current release
  2. Lookup major in hassos-upgrade
  3. If listed and match: Goto 6
  4. If listed and doesn't match: Offer upgrade to that version
  5. If not listed: Offer upgrade to latest as per hassos dictionary.
  6. Lookup major + 1 in hassos-upgrade
  7. If listed: Offer upgrade to that version
  8. If not listed: Offer upgrade to latest as per hassos dictionary.

This would mean following upgrade paths:

  • Starting at 6.1: -> 6.6 -> 7.6
  • Starting at 6.6: -> 7.6

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant