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

🐛 Move kairos vars to their own file #2908

Merged
merged 6 commits into from
Oct 8, 2024
Merged

🐛 Move kairos vars to their own file #2908

merged 6 commits into from
Oct 8, 2024

Conversation

Itxaka
Copy link
Member

@Itxaka Itxaka commented Oct 1, 2024

Otherwise when creating derivatives, the upgrades can overwrite the existing kairos release info adn break the whole thing.

This patch adds the variables into a new /]etc/kairos-release file, as well as keeping them in the usual /etc/os-release file for backwards compatibility

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):

Part of: #2907

Otherwise when creating derivatives, the upgrades can overwrite the
existing kairos release info adn break the whole thing.

This patch adds the variables into a new /]etc/kairos-release file, as
well as keeping them in the usual /etc/os-release file for backwards
compatibility

Signed-off-by: Itxaka <[email protected]>
@Itxaka Itxaka requested a review from a team October 1, 2024 08:36
@Itxaka Itxaka added the blocked label Oct 1, 2024
Signed-off-by: Itxaka <[email protected]>
Signed-off-by: Itxaka <[email protected]>
@Itxaka
Copy link
Member Author

Itxaka commented Oct 1, 2024

This needs an updated agent bundled with the changes in order to work

@Itxaka
Copy link
Member Author

Itxaka commented Oct 7, 2024

New framework image should be built to test this with changes to:

  • immucore
  • sdk
  • agent
  • packages

@Itxaka Itxaka removed the blocked label Oct 7, 2024
@Itxaka
Copy link
Member Author

Itxaka commented Oct 7, 2024

Welp, seems to work? Wtf.

Okay, cutting new framework and os builder version

@Itxaka
Copy link
Member Author

Itxaka commented Oct 8, 2024

Now ready to be reviewed finally :D

@Itxaka Itxaka merged commit 5c6eea4 into master Oct 8, 2024
66 checks passed
@Itxaka Itxaka deleted the kairos-version branch October 8, 2024 16:10
@Wolverine65
Copy link

Hello,

When upgrading within kubernetes from e.g. 22.04-standard-amd64-generic-v3.2.2-k3sv1.30.5-k3s1

the upgrade gives below error and can not be applied

making a symbolic link works as a workaround

ln -s /etc/os-release /etc/kairos-release

`+ HOST_DIR=/host

  • '[' '' '!=' true ']'
  • '[' -f /etc/kairos-release ']'
    ++ source /etc/kairos-release
    +++ KAIROS_TARGETARCH=amd64
    +++ KAIROS_ID=kairos
    +++ KAIROS_VERSION=v3.2.2-v1.31.1-k3s1
    +++ KAIROS_VERSION_ID=v3.2.2-v1.31.1-k3s1
    +++ KAIROS_PRETTY_NAME='kairos-standard-ubuntu-22.04 v3.2.2-v1.31.1-k3s1'
    +++ KAIROS_IMAGE_LABEL=22.04-standard-amd64-generic-v3.2.2-k3sv1.31.1-k3s1
    +++ KAIROS_FLAVOR_RELEASE=22.04
    +++ KAIROS_MODEL=generic
    +++ KAIROS_RELEASE=v3.2.2
    +++ KAIROS_BUG_REPORT_URL=https://github.com/kairos-io/kairos/issues
    +++ KAIROS_HOME_URL=https://github.com/kairos-io/kairos
    +++ KAIROS_SOFTWARE_VERSION_PREFIX=k3s
    +++ KAIROS_FLAVOR=ubuntu
    +++ KAIROS_REGISTRY_AND_ORG=quay.io/kairos
    +++ KAIROS_SOFTWARE_VERSION=v1.31.1+k3s1
    +++ KAIROS_NAME=kairos-standard-ubuntu-22.04
    +++ KAIROS_ID_LIKE=kairos-standard-ubuntu-22.04
    +++ KAIROS_IMAGE_REPO=quay.io/kairos/ubuntu:22.04-standard-amd64-generic-v3.2.2-k3sv1.31.1-k3s1
    +++ KAIROS_ARTIFACT=kairos-ubuntu-22.04-standard-amd64-generic-v3.2.2-k3sv1.31.1+k3s1
    +++ KAIROS_FAMILY=ubuntu
    +++ KAIROS_VARIANT=standard
    +++ KAIROS_GITHUB_REPO=kairos-io/kairos
    ++ echo v3.2.2-v1.31.1-k3s1
  • UPDATE_VERSION=v3.2.2-v1.31.1-k3s1
  • '[' -f /etc/kairos-release ']'
    ++ source /host/etc/kairos-release
    /usr/sbin/suc-upgrade: line 13: /host/etc/kairos-release: No such file or directory
  • CURRENT_VERSION=
  • HOST_DIR=/host
  • '[' '' '!=' true ']'
  • '[' -f /etc/kairos-release ']'
    ++ source /etc/kairos-release
    +++ KAIROS_TARGETARCH=amd64
    +++ KAIROS_ID=kairos
    +++ KAIROS_VERSION=v3.2.2-v1.31.1-k3s1
    +++ KAIROS_VERSION_ID=v3.2.2-v1.31.1-k3s1
    +++ KAIROS_PRETTY_NAME='kairos-standard-ubuntu-22.04 v3.2.2-v1.31.1-k3s1'
    +++ KAIROS_IMAGE_LABEL=22.04-standard-amd64-generic-v3.2.2-k3sv1.31.1-k3s1
    +++ KAIROS_FLAVOR_RELEASE=22.04
    +++ KAIROS_MODEL=generic
    +++ KAIROS_RELEASE=v3.2.2
    +++ KAIROS_BUG_REPORT_URL=https://github.com/kairos-io/kairos/issues
    +++ KAIROS_HOME_URL=https://github.com/kairos-io/kairos
    +++ KAIROS_SOFTWARE_VERSION_PREFIX=k3s
    +++ KAIROS_FLAVOR=ubuntu
    +++ KAIROS_REGISTRY_AND_ORG=quay.io/kairos
    +++ KAIROS_SOFTWARE_VERSION=v1.31.1+k3s1
    +++ KAIROS_NAME=kairos-standard-ubuntu-22.04
    +++ KAIROS_ID_LIKE=kairos-standard-ubuntu-22.04
    +++ KAIROS_IMAGE_REPO=quay.io/kairos/ubuntu:22.04-standard-amd64-generic-v3.2.2-k3sv1.31.1-k3s1
    +++ KAIROS_ARTIFACT=kairos-ubuntu-22.04-standard-amd64-generic-v3.2.2-k3sv1.31.1+k3s1
    +++ KAIROS_FAMILY=ubuntu
    +++ KAIROS_VARIANT=standard
    +++ KAIROS_GITHUB_REPO=kairos-io/kairos
    ++ echo v3.2.2-v1.31.1-k3s1
  • UPDATE_VERSION=v3.2.2-v1.31.1-k3s1
  • '[' -f /etc/kairos-release ']'
    ++ source /host/etc/kairos-release
    /usr/sbin/suc-upgrade: line 13: /host/etc/kairos-release: No such file or directory
  • CURRENT_VERSION=`

@Itxaka
Copy link
Member Author

Itxaka commented Nov 13, 2024

@Wolverine65 thanks, opened a ticket on #3010

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

Successfully merging this pull request may close these issues.

4 participants