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

contrib/cni/*: Change CNI config to latest spec #8204

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

PannagaRao
Copy link
Contributor

@PannagaRao PannagaRao commented May 21, 2024

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?

None

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>
@PannagaRao PannagaRao requested a review from mrunalp as a code owner May 21, 2024 20:51
@openshift-ci openshift-ci bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/documentation Categorizes issue or PR as related to documentation. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels May 21, 2024
Copy link
Contributor

openshift-ci bot commented May 21, 2024

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 /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-sigs/prow repository.

@openshift-ci openshift-ci bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels May 21, 2024
@kwilczynski
Copy link
Member

/ok-to-test

@openshift-ci openshift-ci bot 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 May 22, 2024
Comment on lines 1 to +20
{
"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" }]
]
}
}
Copy link
Member

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
Copy link
Member

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.

@kwilczynski
Copy link
Member

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" }]
        ]
      }
    }
  ]
}

Copy link

codecov bot commented May 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.55%. Comparing base (e90afe2) to head (648bed5).
Report is 451 commits behind head on main.

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     

@PannagaRao
Copy link
Contributor Author

/retest

Copy link
Contributor

openshift-ci bot commented Jun 13, 2024

@PannagaRao: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/ci-fedora-critest 648bed5 link true /test ci-fedora-critest
ci/prow/ci-e2e-evented-pleg 648bed5 link true /test ci-e2e-evented-pleg
ci/prow/ci-cgroupv2-e2e-crun 648bed5 link true /test ci-cgroupv2-e2e-crun
ci/prow/ci-cgroupv2-e2e-features 648bed5 link true /test ci-cgroupv2-e2e-features
ci/prow/ci-rhel-e2e 648bed5 link true /test ci-rhel-e2e
ci/prow/ci-crun-e2e 648bed5 link true /test ci-crun-e2e
ci/prow/ci-cgroupv2-e2e 648bed5 link true /test ci-cgroupv2-e2e
ci/prow/ci-e2e 648bed5 link true /test ci-e2e
ci/prow/ci-e2e-conmonrs 648bed5 link true /test ci-e2e-conmonrs
ci/prow/ci-rhel-critest 648bed5 link true /test ci-rhel-critest

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.

@kwilczynski kwilczynski self-assigned this Jul 12, 2024
@kwilczynski
Copy link
Member

@PannagaRao, we can still update the schema/JSON to the latest version, and then close this PR off nicely. 😄

Copy link

A friendly reminder that this PR had no activity for 30 days.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 12, 2024
@kwilczynski kwilczynski removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 12, 2024
Copy link

A friendly reminder that this PR had no activity for 30 days.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 12, 2024
@kwilczynski kwilczynski removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 12, 2024
Copy link

A friendly reminder that this PR had no activity for 30 days.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/documentation Categorizes issue or PR as related to documentation. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants