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

Update support for RHEL 8 #8164

Merged
merged 1 commit into from
Dec 27, 2019
Merged

Conversation

hakman
Copy link
Member

@hakman hakman commented Dec 20, 2019

RHEL/CentOS 8 support is broken for various reasons:

  1. check for Debian family doesn't recognise the distro
  2. iptables-setup cannot be run from home dir (probably some extra security)
  3. python package needs to be more explicit (python2 or python3)
  4. ntpd fails to install because it has been replaced with chronny

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 20, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @hakman. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 20, 2019
@rifelpet
Copy link
Member

This is great! do you think we could add an e2e job for this? It should be as easy as copying the centos7 one and changing the ami id that it uses.
/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 20, 2019
@hakman
Copy link
Member Author

hakman commented Dec 20, 2019

@rifelpet was thinking the same thing about the e2e job.
The only catch here would be that somehow we need to enable calico.iptablesBackend: NFT. Wanted to ask you what would be the best place to add it.

@rifelpet
Copy link
Member

For e2e tests the best we can do is kops' --set functionality to override specific fields in manifests that arent otherwise accessible by cli flags in kops create cluster.

See these here:

if featureflag.SpecOverrideFlag.Enabled() {
cmd.Flags().StringSliceVar(&options.Overrides, "override", options.Overrides, "Directly configure values in the spec")
}

each field needs to explicitly get added to this string->field mapping function:

func SetClusterFields(fields []string, cluster *api.Cluster, instanceGroups []*api.InstanceGroup) error {

and we'd set it in a test with this --kops-overrides flag: https://github.com/kubernetes/test-infra/blob/4beb96650aaee54c274a42fb0ca011333808b6f5/kubetest/kops.go#L74

Though if that field is required for centos8 to work, should kops just automatically set it somehow? I know that can be tricky to make an addon manifest's contents depend on an AMI (of which there can be many in a given cluster). maybe its worth discussing at office hours today.

@hakman
Copy link
Member Author

hakman commented Dec 20, 2019

@rifelpet good news. Not sure why I thought tests would run with Calico. Just did a quick test with Kubenet (default) and seems to work without any issue. So the test can be added without any extra changes.

@hakman
Copy link
Member Author

hakman commented Dec 20, 2019

/assign @granular-ryanbonham
/cc @rifelpet

@@ -57,7 +57,7 @@ func (b *MiscUtilsBuilder) Build(c *fi.ModelBuilderContext) error {
packages = append(packages, "apt-transport-https")
} else if b.Distribution.IsRHELFamily() {
packages = append(packages, "curl")
packages = append(packages, "python")
packages = append(packages, "python2")
Copy link
Member

Choose a reason for hiding this comment

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

Is this not python for Centos7? Or is python an alias for python2?

Copy link
Member Author

Choose a reason for hiding this comment

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

On CenOS 7 python2 is an alias for python.

@@ -87,7 +87,7 @@ iptables -A FORWARD -w -p ICMP -j ACCEPT
fi
`
return &nodetasks.File{
Path: "/home/kubernetes/bin/iptables-setup",
Path: "/opt/kops/helpers/iptables-setup",
Copy link
Member

Choose a reason for hiding this comment

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

We might have to create this directory explicitly, but I think it's a good idea to pick a more reasonable directory.

For immutable OSes, we might have to bind-mount these also, if we're seeing failures there.

I think we could also do /opt/kops/bin/iptables-setup

Copy link
Member Author

Choose a reason for hiding this comment

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

I chose the "helpers" dir because that was the dir chosen for the Docker healthcheck.
Will give this a try with CoreOS also when this is merged and check again.
Changing to /opt/kops/bin/iptables-setup sounds good to me.

@justinsb
Copy link
Member

I guess we should get this in, and then double check if we broke centos7 and other immutable OSes like COS.

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 27, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman, justinsb

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 Dec 27, 2019
@hakman
Copy link
Member Author

hakman commented Dec 27, 2019

Thanks @justinsb. This will make testing simpler for the tar.gz package for containerd.
Once #8172 gets checked we can enable the e2e test for containerd + rhel8.

@k8s-ci-robot k8s-ci-robot merged commit ac76e81 into kubernetes:master Dec 27, 2019
@hakman hakman deleted the update-rhel-8 branch December 27, 2019 16:10
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. 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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants