-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
contrib/cni/*: Change CNI config to latest spec #8204
base: main
Are you sure you want to change the base?
Conversation
Changes in the CNI specification have been leading to issues with older configuration file formats. Previously used fields or structures are causing parsing errors like missing 'type' errors in configurations. Checking out main brain than a particular release version to ensure latest plugin build. Signed-off-by: PannagaRamamanohara <pbhojara@redhat.com>
Hi @PannagaRao. Thanks for your PR. I'm waiting for a cri-o member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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-sigs/prow repository. |
/ok-to-test |
{ | ||
"cniVersion": "1.0.0", | ||
"name": "crio", | ||
"plugins": [ | ||
{ | ||
"type": "bridge", | ||
"bridge": "cni0", | ||
"isGateway": true, | ||
"ipMasq": true, | ||
"hairpinMode": true, | ||
"ipam": { | ||
"type": "host-local", | ||
"routes": [ | ||
{ "dst": "0.0.0.0/0" }, | ||
{ "dst": "::/0" } | ||
], | ||
"ranges": [ | ||
[{ "subnet": "10.85.0.0/16" }], | ||
[{ "subnet": "1100:200::/24" }] | ||
] | ||
} | ||
} | ||
] | ||
} | ||
"cniVersion": "1.0.0", | ||
"name": "crio-bridge", | ||
"type": "bridge", | ||
"bridge": "cni0", | ||
"isGateway": true, | ||
"ipMasq": true, | ||
"hairpinMode": true, | ||
"ipam": { | ||
"type": "host-local", | ||
"routes": [ | ||
{ "dst": "0.0.0.0/0" }, | ||
{ "dst": "::/0" } | ||
], | ||
"ranges": [ | ||
[{ "subnet": "10.85.0.0/16" }], | ||
[{ "subnet": "1100:200::/24" }] | ||
] | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not appear to be the latest format per the CNI spec version 1.1.0. Also, the JSON is not well-formatted.
@@ -63,7 +63,7 @@ Download the `CNI` plugins source tree: | |||
```bash | |||
git clone https://github.com/containernetworking/plugins | |||
cd plugins | |||
git checkout v1.1.1 | |||
git checkout main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably fine, provided that things on main
never introduce breaking changes or break backward compatibility.
I am using this version/format you are replacing here without any issues in my test environment per: root@worker-node01:~# cat /etc/cni/net.d/11-crio-ipv4-bridge.conflist
{
"cniVersion": "1.0.0",
"name": "crio",
"plugins": [
{
"type": "bridge",
"bridge": "cni0",
"isGateway": true,
"ipMasq": true,
"hairpinMode": true,
"ipam": {
"type": "host-local",
"routes": [
{ "dst": "0.0.0.0/0" }
],
"ranges": [
[{ "subnet": "10.85.0.0/16" }]
]
}
}
]
} |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8204 +/- ##
==========================================
+ Coverage 49.54% 49.55% +0.01%
==========================================
Files 153 153
Lines 16961 16955 -6
==========================================
- Hits 8403 8402 -1
+ Misses 7511 7505 -6
- Partials 1047 1048 +1 |
/retest |
@PannagaRao: The following tests failed, say
Full PR test history. Your PR dashboard. 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-sigs/prow repository. I understand the commands that are listed here. |
@PannagaRao, we can still update the schema/JSON to the latest version, and then close this PR off nicely. 😄 |
A friendly reminder that this PR had no activity for 30 days. |
A friendly reminder that this PR had no activity for 30 days. |
A friendly reminder that this PR had no activity for 30 days. |
Changes in the CNI specification have been leading to issues with older configuration file formats.
Previously used fields or structures are causing
parsing errors like missing 'type' errors in
configurations. Checking out main brain than a
particular release version to ensure latest
plugin build.
What type of PR is this?
/kind cleanup
/kind documentation
What this PR does / why we need it:
While setting up CNI networking and using the
10-crio-bridge.conflist
file as per the README, an error occurred:"Error loading CNI config file /etc/cni/net.d/10-crio-bridge.conf: error parsing configuration: missing 'type'." This issue arose because the old format of the specification was not being parsed correctly. It's necessary to use the new format, which can be found on the official Container Networking GitHub page.
To resolve this issue, it's recommended to get the latest build plugins by checking out from the main branch of the repository.
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?