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

Kubernetes: inconsistent and incorrect CNI dir #392

Closed
pohly opened this issue Feb 8, 2019 · 1 comment
Closed

Kubernetes: inconsistent and incorrect CNI dir #392

pohly opened this issue Feb 8, 2019 · 1 comment

Comments

@pohly
Copy link

pohly commented Feb 8, 2019

Environment (please complete the following):

Handling of the CNI directory is wrong in the current revision of the page.

CRI-O’s default plugin_dir is /opt/bin/cni. CNI plugins are installed as part of cloud-native-basic.

The actual path is /opt/cni/bin.

Notes about Weave Net add-on
...
Add the loopback CNI plugin to the plugin path with the command:

sudo ln -s /usr/libexec/cni/loopback /opt/bin/cni/loopback

/usr/lib/tmpfiles.d/cri-o.conf creates /opt/bin/cni, so the command above doesn't fail, but probably doesn't fix the issue (haven't tried).

Notes about flannel add-on
...
Create a symlink for the network overlays:

sudo ln -s /usr/libexec/cni /opt/cni/bin

This will fail once /usr/lib/tmpfiles.d/cri-o.confgets changed to create the directory.

Note

Clear Linux OS installs CNI plugins that are part of the cloud-native-basic bundle to /usr/libexec/cni. The directory is required because ` swupd verify` may use it to repair a system to a known good state.

That's correct, but it is not specific to flannel.

My proposal is to have one note that works for multiple CNI plugins and remove the workarounds from the flannel and weave sections:



Note

CRI-O’s default plugin_dir is /opt/cni/bin. This must be a writable directory, because third-party networking add-ons will install themselves there. CNI plugins provided by Clear Linux are installed as part of cloud-native-basic in /usr/libexec/cni/ and are currently *not* found by CRI-O by default. These separate directories are required because `swupd` controls the content of `/usr` and leaves `/opt` unchanged.

When using third-party network add-ons that rely on those plugins (like weave or flannel do), then make them available via symlinks:

sudo mkdir -p /opt/cni/bin
for i in /usr/libexec/cni/*; do sudo ln -sf $i /opt/bin/cni/; done
@mythi
Copy link
Contributor

mythi commented Feb 8, 2019

@mvincerx please prioritize this. @pohly's suggestion looks good to me.

mvincerx added a commit to mvincerx/clear-linux-documentation that referenced this issue Feb 8, 2019
- Provides bash script to manage default plugin_dir
- Closes clearlinux#392

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants