Bug 1897431

Summary: CIDR support for additional network attachment with the bridge CNI plug-in
Product: OpenShift Container Platform Reporter: Jitendra Pradhan <jpradhan>
Component: NetworkingAssignee: Miguel Duarte Barroso <mduarted>
Networking sub component: multus QA Contact: Weibin Liang <weliang>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: medium CC: aos-bugs, bbennett, dosmith, mduarted, mfojtik
Version: 4.5   
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-10 16:02:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jitendra Pradhan 2020-11-13 04:26:16 UTC
Description of problem:

It has observed that, during rawCNIConfig if the IPaddress is not in CIDR format, OCP is not throwing the appropriate error. So Can our product verify the config during parsing phase and throw that IP address is in invalid format.

Version-Release number of selected component (if applicable): 4.4


How reproducible: Refer the Document https://access.redhat.com/documentation/en-us/openshift_container_platform/4.4/html-single/networking/index#nw-multus-create-network_configuring-bridge


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results: OCP should throw error during the parsing phase that IP address specified in not in CIDR format.


Additional info: Please refer the Case # 02731625

Comment 1 Douglas Smith 2020-11-13 18:47:18 UTC
We do have a documentation fix that just landed here @ https://bugzilla.redhat.com/show_bug.cgi?id=1871145

However, I agree that the error messaging could be improved.

Comment 3 Miguel Duarte Barroso 2021-06-22 17:42:51 UTC
error msg update proposed on https://github.com/containernetworking/plugins/pull/638

Comment 6 Weibin Liang 2021-11-16 16:11:50 UTC
Tested and verified in 4.10.0-0.nightly-2021-11-15-034648

New error message from sandbox:
Warning  FailedCreatePodSandBox  12s   kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create pod network sandbox k8s_macvlan-bridge-ipam-dhcp_test_9f0f8f7b-e2ac-4f2d-bae6-bf043eb01322_0(2dd78b2a1aa8f1774bb3e584398bc6fa78f6c963362ad05ded287109a54ae4ae): error adding pod test_macvlan-bridge-ipam-dhcp to CNI network "multus-cni-network": plugin type="multus" name="multus-cni-network" failed (add): [test/macvlan-bridge-ipam-dhcp:test-network-1]: error adding container to network "test-network-1": the 'address' field is expected to be in CIDR notation, got: '191.168.1.23'


Old error message from sandbox:
message: 'Failed to create pod sandbox: rpc error: code = Unknown desc = failed
    to create pod network sandbox k8s_bridge-pod-1_default_f7912f37-249e-4cae-865e-5c3e4f29b322_0(f579e0734e405142e1d3c28e190ef36794dc03bf713e1fe6fe8ac1497e80e5b4):
    Multus: [default/bridge-pod-1]: error adding container to network "test-network-1":
    delegateAdd: error invoking DelegateAdd - "bridge": error in getting result from
    AddNetwork: invalid CIDR 191.168.1.7: invalid CIDR address: 191.168.1.7'

Comment 12 errata-xmlrpc 2022-03-10 16:02:33 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 (Moderate: OpenShift Container Platform 4.10.3 security update), 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/RHSA-2022:0056