-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Use python3-libselinux on RHEL8/Centos8 #5127
Use python3-libselinux on RHEL8/Centos8 #5127
Conversation
Welcome @Mosibi! |
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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/test-infra repository. I understand the commands that are listed here. |
/assign @riverzhang |
…lder Ansible version. Default it to 0 in when not present and use libselinux-python as package to get current default behaviour.
/retest |
@Mosibi: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
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/test-infra repository. |
Build packet_ubuntu-contiv-sep failed because it could not connect to instance-3
I can't think of any reason why this PR could have caused this, so i think it was an error with the test environment that's out of scope of this PR. |
@Mosibi Thanks |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Mosibi, riverzhang 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 |
* 'master' of https://github.com/kubernetes-sigs/kubespray: Add support for k8s v1.14.6 (kubernetes-sigs#5182) Parameterize gcr, quay, and docker image repo defines (kubernetes-sigs#5146) use hyperkubeimage to run controlplane containers (kubernetes-sigs#5178) Update main.yml (kubernetes-sigs#5166) Fixes issue kubernetes-sigs#5160 (kubernetes-sigs#5171) Use more native way to update kubeconfigs using kubeadm (kubernetes-sigs#5165) Fix macro on local_volume_provisioner (kubernetes-sigs#5168) Move cri_socket var to kubespray-defaults (kubernetes-sigs#5149) Add support for k8s v1.16.0-beta.2 (kubernetes-sigs#5148) Fix ansible task titles (kubernetes-sigs#5154) Adjust endpoints for kube-proxy,controller,scheduler to proper ip (kubernetes-sigs#5150) Documenting Terraform variable `az_list` explicitly (kubernetes-sigs#5132) Make haproxy/nginx client timeout configurable (kubernetes-sigs#5140) print hostnames (kubernetes-sigs#5110) Cleanup: fix typo in doc (kubernetes-sigs#5105) Use python3-libselinux on RHEL8/Centos8 (kubernetes-sigs#5127)
Just tried it on CentOS 8 and this is not working because bootstrap-os is running with gather_facts: false
Line 24 in 023108a
|
In bootstrap-centos.yml we haven't gathered the facts, so kubernetes-sigs#5127 couldn't work Minimum ansible version to run kubespray is 2.7.8, so ansible_distribution_major_version is defined an there is no need to default it Signed-off-by: Etienne Champetier <[email protected]>
same change as kubernetes-sigs/kubespray#5127
* Use python3-libselinux on RHEL8/Centos8 * The fact ansible_facts.distribution_major_version is not present on older Ansible version. Default it to 0 in when not present and use libselinux-python as package to get current default behaviour.
* Fix python3-libselinux installation for RHEL/CentOS 8 In bootstrap-centos.yml we haven't gathered the facts, so #5127 couldn't work Minimum ansible version to run kubespray is 2.7.8, so ansible_distribution_major_version is defined an there is no need to default it Signed-off-by: Etienne Champetier <[email protected]> * Restart NetworkManager for RHEL/CentOS 8 network.service doesn't exist anymore # systemctl status network Unit network.service could not be found. Signed-off-by: Etienne Champetier <[email protected]> * Add module_hotfixes=True to docker / containerd yum repo config https://bugzilla.redhat.com/show_bug.cgi?id=1734081 https://bugzilla.redhat.com/show_bug.cgi?id=1756473 Without this setting you end up with the following error: # yum install docker-ce Failed to set locale, defaulting to C Last metadata expiration check: 0:03:21 ago on Thu Sep 26 22:00:05 2019. Error: Problem: package docker-ce-3:19.03.2-3.el7.x86_64 requires containerd.io >= 1.2.2-3, but none of the providers can be installed - cannot install the best candidate for the job - package containerd.io-1.2.2-3.3.el7.x86_64 is excluded - package containerd.io-1.2.2-3.el7.x86_64 is excluded - package containerd.io-1.2.4-3.1.el7.x86_64 is excluded - package containerd.io-1.2.5-3.1.el7.x86_64 is excluded - package containerd.io-1.2.6-3.3.el7.x86_64 is excluded (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages) Signed-off-by: Etienne Champetier <[email protected]>
* Fix python3-libselinux installation for RHEL/CentOS 8 In bootstrap-centos.yml we haven't gathered the facts, so kubernetes-sigs#5127 couldn't work Minimum ansible version to run kubespray is 2.7.8, so ansible_distribution_major_version is defined an there is no need to default it Signed-off-by: Etienne Champetier <[email protected]> * Restart NetworkManager for RHEL/CentOS 8 network.service doesn't exist anymore # systemctl status network Unit network.service could not be found. Signed-off-by: Etienne Champetier <[email protected]> * Add module_hotfixes=True to docker / containerd yum repo config https://bugzilla.redhat.com/show_bug.cgi?id=1734081 https://bugzilla.redhat.com/show_bug.cgi?id=1756473 Without this setting you end up with the following error: # yum install docker-ce Failed to set locale, defaulting to C Last metadata expiration check: 0:03:21 ago on Thu Sep 26 22:00:05 2019. Error: Problem: package docker-ce-3:19.03.2-3.el7.x86_64 requires containerd.io >= 1.2.2-3, but none of the providers can be installed - cannot install the best candidate for the job - package containerd.io-1.2.2-3.3.el7.x86_64 is excluded - package containerd.io-1.2.2-3.el7.x86_64 is excluded - package containerd.io-1.2.4-3.1.el7.x86_64 is excluded - package containerd.io-1.2.5-3.1.el7.x86_64 is excluded - package containerd.io-1.2.6-3.3.el7.x86_64 is excluded (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages) Signed-off-by: Etienne Champetier <[email protected]>
same change as kubernetes-sigs/kubespray#5127
same change as kubernetes-sigs/kubespray#5127
same change as kubernetes-sigs/kubespray#5127
What type of PR is this?
/kind feature
What this PR does / why we need it:
RHEL 8 and Centos 8 default to python3 and do not have the libselinux-python package anymore. Instead of that the package python3-libselinux should be used. This ternary filter installs the right version.
Which issue(s) this PR fixes:
Fixes #5046
Special notes for your reviewer:
Does this PR introduce a user-facing change?: