Bug 1579445 - cri-o package should not add /cni/net.d/ configurations files on install
Summary: cri-o package should not add /cni/net.d/ configurations files on install
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.11.z
Assignee: Jindrich Novy
QA Contact: weiwei jiang
URL:
Whiteboard:
Depends On:
Blocks: 1186913
TreeView+ depends on / blocked
 
Reported: 2018-05-17 16:41 UTC by Ryan Howe
Modified: 2023-03-24 14:05 UTC (History)
17 users (show)

Fixed In Version: cri-o-1.11.16-0.4.dev.rhaos3.11.git3f89eba.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-12-16 11:57:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Yum update cri-o example (3.31 KB, text/plain)
2018-12-03 11:04 UTC, Andre Costa
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:4050 0 None None None 2019-12-16 11:57:26 UTC

Description Ryan Howe 2018-05-17 16:41:33 UTC
Description of problem:

Installing crio will add cni configuration files with out adding the cni plugins. When cri-o is installed with out a openshift using it this will cause issues with the kubelet starting a pod due to trying to load the cni bridge plugin. The plugins are also never installed so these files are not needed. 

 # ls /etc/cni/net.d/ | sort -d
 100-crio-bridge.conf
 200-loopback.conf
 80-openshift-network.conf

Version-Release number of selected component (if applicable):
 
 # rpm -qf /etc/cni/net.d/200-loopback.conf
 # rpm -qf /etc/cni/net.d/100-crio-bridge.conf

   cri-o-1.9.10-1.git8723732.el7.x86_64



How reproducible:
100%

Steps to Reproduce:
1. Yum install cri-o 
2. Install openshift before or after the above, no enabling cri-o 


Actual results:
 atomic-openshift-node[33346]: E0515 18:40:53.018117   33346 cni.go:259] Error adding network: failed to find plugin "bridge" in path [/opt/bridge/bin /opt/cni/bin]
 atomic-openshift-node[33346]: E0515 18:40:53.018136   33346 cni.go:227] Error while adding to cni network: failed to find plugin "bridge" in path [/opt/bridge/bin /opt/cni/bin]


Expected results:
 cri-o package install to no add cni configuration files. 


Additional info:

https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/#cni

If there are multiple CNI configuration files in the directory, the first one in lexicographic order of file name is used.

# ls /etc/cni/net.d/ | sort -d
100-crio-bridge.conf
200-loopback.conf
80-openshift-network.conf


Plugins Loaded: 
https://github.com/openshift/origin/blob/release-3.9/vendor/k8s.io/kubernetes/pkg/kubelet/network/cni/cni.go#L257
https://github.com/openshift/origin/blob/release-3.9/vendor/github.com/containernetworking/cni/libcni/conf.go#L151-L171


When crio is enabled via the OpenShift installer anisble deletes the cni plugin configuration files:
  
- This is the only play that will make sure those files are absent: 
https://github.com/openshift/openshift-ansible/blob/release-3.9/roles/container_runtime/tasks/package_crio.yml#L40-L46

- Its called from this play:
https://github.com/openshift/openshift-ansible/blob/release-3.9/playbooks/container-runtime/private/config.yml#L39-L45

Comment 1 Ryan Howe 2018-05-18 13:48:05 UTC
Also this when cri-o is enabled on an OpenShift node and then cri-o is updated it will add these back on the host. 

# rm /etc/cni/net.d/200-loopback.conf
# rm /etc/cni/net.d/100-crio-bridge.conf

# yum update cri-o 

# ls /etc/cni/net.d/
100-crio-bridge.conf       200-loopback.conf          80-openshift-network.conf 


Causing the OpenShift node to fail to start pods with erro "Error while adding to cni network: failed to find plugin "bridge" in path [/opt/bridge/bin /opt/cni/bin]" 

Manual deletion is needed then.

Comment 2 Antonio Murdaca 2018-05-21 09:41:36 UTC
mmm I'm fine removing those configurations and provide them as another cri-o-cni-configs RPM. We can suggest people to install this new package when running CRI-O w/o openshift or with kube.
Lokesh, can we ship such an RPM containing just CNI config files?
Mrunal, Dan, wdyt?

Comment 3 Antonio Murdaca 2018-05-21 09:42:37 UTC
I believe this is not a 3.10 blocker though. The installer takes care of the network just fine, this is an edge case when CRI-O is installed prior to installing openshift. I'm removing this from 3.10 but feel free to move it back if you think so.

Comment 6 Andre Costa 2018-12-03 11:04:09 UTC
Hi,

We have another customer asking to see if it is possible to add cri-o to the atomic-openshift-excluder or create one like we have for docker.
Every time we update system and cri-o gets updated it will add the files already mentioned in this bugzila. Or you can rename the files because now following that order the atomic-openshift-node service will fail since 80-openshift-network.conf gets in the last place.

I'm uploading an example I did with OCP 3.11 repos.

Thanks,

Comment 7 Andre Costa 2018-12-03 11:04:46 UTC
Created attachment 1510852 [details]
Yum update cri-o example

Comment 8 Lokesh Mandvekar 2019-01-02 14:25:24 UTC
(In reply to Antonio Murdaca from comment #2)
> mmm I'm fine removing those configurations and provide them as another
> cri-o-cni-configs RPM. We can suggest people to install this new package
> when running CRI-O w/o openshift or with kube.
> Lokesh, can we ship such an RPM containing just CNI config files?
> Mrunal, Dan, wdyt?

Frantisek, can you please make this change ^

Comment 11 Daniel Walsh 2019-06-20 10:55:41 UTC
Lokesh can you take this over.

Comment 15 Stephen Cuppett 2019-11-20 19:06:50 UTC
OCP 3.6-3.10 is no longer on full support [1]. Marking CLOSED DEFERRED. If you have a customer case with a support exception or have reproduced on 3.11+, please reopen and include those details. When reopening, please set the Target Release to the appropriate version where needed.

[1]: https://access.redhat.com/support/policy/updates/openshift

Comment 16 Stephen Cuppett 2019-11-20 19:06:57 UTC
OCP 3.6-3.10 is no longer on full support [1]. Marking CLOSED DEFERRED. If you have a customer case with a support exception or have reproduced on 3.11+, please reopen and include those details. When reopening, please set the Target Release to the appropriate version where needed.

[1]: https://access.redhat.com/support/policy/updates/openshift

Comment 17 Andre Costa 2019-11-21 10:21:55 UTC
Hello,

This is for OCP 3.11 which is the current version on the customer and I was able to reproduce this issue recently.

Comment 19 weiwei jiang 2019-12-02 09:20:11 UTC
Verified with cri-o-1.11.16-0.4.dev.rhaos3.11.git3f89eba.el7
# rpm -ql cri-o
/etc/crictl.yaml
/etc/crio
/etc/crio/crio.conf
/etc/crio/seccomp.json
/etc/sysconfig/crio-network
/etc/sysconfig/crio-storage
/usr/bin/crio
/usr/lib/systemd/system/cri-o.service
/usr/lib/systemd/system/crio-shutdown.service
/usr/lib/systemd/system/crio.service
/usr/libexec/crio
/usr/libexec/crio/conmon
/usr/libexec/crio/pause
/usr/share/doc/cri-o-1.11.16
/usr/share/doc/cri-o-1.11.16/README.md
/usr/share/licenses/cri-o-1.11.16
/usr/share/licenses/cri-o-1.11.16/LICENSE
/usr/share/man/man5/crio.conf.5.gz
/usr/share/man/man8/crio.8.gz
/usr/share/oci-umount
/usr/share/oci-umount/oci-umount.d
/usr/share/oci-umount/oci-umount.d/crio-umount.conf
/var/lib/containers
# rpm -qa|grep -i cri-o
cri-o-1.11.16-0.4.dev.rhaos3.11.git3f89eba.el7.x86_64

Comment 21 errata-xmlrpc 2019-12-16 11:57:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:4050


Note You need to log in before you can comment on or make changes to this bug.