Skip to content

Conversation

@rphillips
Copy link
Contributor

@rphillips rphillips commented Sep 11, 2018

Enables crio for the kubelet container runtime.

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rphillips
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: yifan-gu

If they are not already assigned, you can assign the PR to them by writing /assign @yifan-gu in a comment when ready.

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

The pull request process is described here

Details 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

@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 11, 2018
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 11, 2018
Copy link
Contributor

Choose a reason for hiding this comment

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

@rphillips

  • why is this file required?
  • who uses this ?
  • how will we configure it if we somebody needs to configure it for their internal registry ??

/cc @crawford

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The file is needed since crio gets installed with a default config which only includes the registry.access.redhat.com registry. docker.io needs to be added to the registry list to pull in defaulted docker images.

/cc @sjenning

Copy link
Contributor

Choose a reason for hiding this comment

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

If this only affects images like openshift/origin-machine-config-operator:latest as this is not a fully qualified name, it should have been docker.io/openshift/origin-machine-config-operator:latest.

I rather have people use fully qualified names, than put this file on each machine... @crawford WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

@rphillips can you change this file to suggestion made in the installer here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@abhinavdahiya
Copy link
Contributor

@rphillips also can you run go test ./pkg/controller/template/... -u to update the golden test files.

@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 11, 2018
@rphillips
Copy link
Contributor Author

@abhinavdahiya regenerated

@rphillips
Copy link
Contributor Author

/hold

We may want to merge the cross-repo crio PR's all at once.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 11, 2018
@rphillips rphillips changed the title kubelet: enable crio WIP: kubelet: enable crio Sep 11, 2018
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 11, 2018
Copy link
Contributor

Choose a reason for hiding this comment

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

As mentioned in openshift/installer#234 (comment), can you remove these empty sections?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

Copy link
Member

Choose a reason for hiding this comment

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

Why did you need to set this? Did you hit an error without it, or is it just increasing robustness? What's the default value? How did you decide on 10m?

Copy link
Contributor

Choose a reason for hiding this comment

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

default is 2m. probably doesn't need to be changed. i think the cri-o docs recommend this, but i don't think it is needed.

Copy link
Member

Choose a reason for hiding this comment

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

default is 2m. probably doesn't need to be changed

I'm in favor of dropping it then. The fewer local opinions we need to maintain, the better :).

Copy link
Contributor Author

@rphillips rphillips Sep 13, 2018

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's keep the time out then, as it might be required when we pull hyberkube image on slower network.

Copy link
Member

Choose a reason for hiding this comment

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

It DRY things up a bit to have a templates/_base/all/files/container-registries.yaml or some such which would be added to both masters and workers. But perhaps that is more than we want to bite off in this particular PR.

@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 13, 2018
@rphillips
Copy link
Contributor Author

Updated the PR and removed the --runtime-request-timeout.

The default --runtime-request-timeout enforces a 2 minute timeout on image pulls... We may want to bump it up for slower networks.

@rphillips rphillips changed the title WIP: kubelet: enable crio kubelet: enable crio Sep 13, 2018
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 13, 2018
@rphillips
Copy link
Contributor Author

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 13, 2018
Copy link
Contributor

Choose a reason for hiding this comment

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

--cni-conf-dir, --cni-bin-dir, --network-pluging are no longer required as cri-o handles everything.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. Removed those options.

@abhinavdahiya
Copy link
Contributor

/hold

I was testing these changes yesterday, networking is not ready to be used with crio in installer yet. openshift/installer#235 (comment)

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 13, 2018
@abhinavdahiya
Copy link
Contributor

abhinavdahiya commented Sep 13, 2018

The default --runtime-request-timeout enforces a 2 minute timeout on image pulls... We may want to bump it up for slower networks.

As it is recommended by https://github.com/kubernetes-sigs/cri-o/blob/master/kubernetes.md#preparing-kubelet Let's set it to 10m

@rphillips
Copy link
Contributor Author

rphillips commented Sep 13, 2018

@abhinavdahiya I added support for a 10m timeout, and an environment variable and file to be able to overwrite the default

@sjenning
Copy link
Contributor

I think all the feedback has been addressed. I've tested this an it works:

$ oc get nodes -o wide
NAME            STATUS    ROLES       AGE       VERSION           INTERNAL-IP      EXTERNAL-IP   OS-IMAGE                  KERNEL-VERSION               CONTAINER-RUNTIME
dev-bootstrap   Ready     bootstrap   5m        v1.11.0+d4cacc0   192.168.124.10   <none>        Red Hat CoreOS 4.0.5470   3.10.0-862.14.1.el7.x86_64   cri-o://1.11.2
dev-master-0    Ready     master      4m        v1.11.0+d4cacc0   192.168.124.11   <none>        Red Hat CoreOS 4.0.5470   3.10.0-862.14.1.el7.x86_64   cri-o://1.11.2
dev-worker-0    Ready     worker      4m        v1.11.0+d4cacc0   192.168.124.50   <none>        Red Hat CoreOS 4.0.5470   3.10.0-862.14.1.el7.x86_64   cri-o://1.11.2
dev-worker-1    Ready     worker      4m        v1.11.0+d4cacc0   192.168.124.51   <none>        Red Hat CoreOS 4.0.5470   3.10.0-862.14.1.el7.x86_64   cri-o://1.11.2

can this get approved?

@wking
Copy link
Member

wking commented Sep 13, 2018

This looks good to me. @abhinavdahiya, do you want to mark your requested-change resolved?

@abhinavdahiya
Copy link
Contributor

abhinavdahiya commented Sep 13, 2018

@wking #52 (comment)

lgtm this now will break installer.

@abhinavdahiya
Copy link
Contributor

@rphillips @sjenning
Can you add these files to the PR:

$ cat templates/_base/master/files/etc-sysconfig-crio-network.yaml
filesystem: "root"
mode: 0644
path: "/etc/sysconfig/crio-network"
contents:
  inline: |
    CRIO_NETWORK_OPTIONS=--cni-config-dir=/etc/kubernetes/cni/net.d --cni-plugin-dir=/etc/kubernetes/cni/bin

$ cat templates/_base/worker/files/etc-sysconfig-crio-network.yaml
filesystem: "root"
mode: 0644
path: "/etc/sysconfig/crio-network"
contents:
  inline: |
    CRIO_NETWORK_OPTIONS=--cni-config-dir=/etc/kubernetes/cni/net.d --cni-plugin-dir=/etc/kubernetes/cni/bin
``

Also rebase to 2 commits, one with changes and one with generated test_data `go test ./pkg/controller/templates/.. -u`

@sjenning sjenning mentioned this pull request Sep 14, 2018
@rphillips
Copy link
Contributor Author

Closing in favor of #63

@rphillips rphillips closed this Sep 14, 2018
osherdp pushed a commit to osherdp/machine-config-operator that referenced this pull request Apr 13, 2021
logging cleanup for bz debug, progressing debug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants