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 task naming in bootstrap-os #11714

Merged
merged 1 commit into from
Nov 17, 2024

Conversation

ErikJiang
Copy link
Member

@ErikJiang ErikJiang commented Nov 15, 2024

What type of PR is this?

/kind bug

What this PR does / why we need it:

The naming of some task files in bootstrap-os doesn't match the ID values in the actual os-release file, which will cause the related OS tasks not to be executed.

# nerdctl run --rm clearlinux:latest cat /etc/os-release |grep "^ID="
ID=clear-linux-os

# nerdctl run --rm redhat/ubi8:8.10 cat /etc/os-release |grep "^ID="
ID="rhel"

Which issue(s) this PR fixes:

Fixes #11712

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

fix task naming in bootstrap-os

Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 15, 2024
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 15, 2024
@MrFreezeex
Copy link
Member

Does this apply in those other places:

❯ find | grep -E '(redhat|clearlinux)'
./roles/container-engine/docker/vars/redhat-7.yml
./roles/container-engine/docker/vars/clearlinux.yml
./roles/container-engine/docker/vars/redhat.yml
./roles/bootstrap-os/tasks/clearlinux.yml
./roles/bootstrap-os/tasks/redhat.yml
./roles/kubernetes-apps/helm/vars/redhat-7.yml
./roles/kubernetes-apps/helm/vars/redhat.yml
./roles/adduser/vars/redhat.yml
./roles/network_plugin/calico/vars/redhat-9.yml
./roles/network_plugin/calico/vars/redhat.yml

too?

@ErikJiang
Copy link
Member Author

@MrFreezeex
It currently seems that only the bootstrap-os role parses the os-release file to identify different OS distributions.
In contrast, other roles primarily differentiate based on ansible_distribution.
Therefore, only the bootstrap-os role needs to be modified.
The reason why the bootstrap-os role does not use the ansible_distribution method remains unclear.
I suspect the information obtained through ansible_distribution may not fully meet the requirements for identifying different OS within bootstrap-os.

Copy link
Member

@MrFreezeex MrFreezeex left a comment

Choose a reason for hiding this comment

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

Ah indeed makes sense, I am guessing that we don't have this fact yet in the bootstrap phase and thus we need to get it via another way which is unfortunately not consistent with other places :/

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 16, 2024
@VannTen
Copy link
Contributor

VannTen commented Nov 17, 2024

/ok-to-test
/approve

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Nov 17, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ErikJiang, MrFreezeex, VannTen

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 17, 2024
@VannTen
Copy link
Contributor

VannTen commented Nov 17, 2024

/retest

@k8s-ci-robot k8s-ci-robot merged commit 316e579 into kubernetes-sigs:master Nov 17, 2024
41 checks passed
@VannTen
Copy link
Contributor

VannTen commented Nov 17, 2024

/cherrypick release-2.25
/cherrypick release-2.26

@k8s-infra-cherrypick-robot

@VannTen: new pull request created: #11718

In response to this:

/cherrypick release-2.25
/cherrypick release-2.26

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-infra-cherrypick-robot

@VannTen: new pull request created: #11719

In response to this:

/cherrypick release-2.25
/cherrypick release-2.26

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

kpoxo6op pushed a commit to kpoxo6op/kubespray that referenced this pull request Dec 27, 2024
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bootstrap OS is not executed on RedHat 8.10
5 participants