Description of problem: bond-miimon-interval allow input negative integer Version-Release number of selected component (if applicable): kernel version: 5.14.0-316.el9.x86_64 openvswitch version: openvswitch3.1-3.1.0-14.el9fdp # ethtool -i ens4f0 driver: i40e version: 5.14.0-316.el9.x86_64 firmware-version: 9.20 0x8000d89c 1.3353.0 expansion-rom-version: bus-info: 0000:af:00.0 supports-statistics: yes supports-test: yes supports-eeprom-access: yes supports-register-dump: yes supports-priv-flags: yes # ethtool -i ens4f1 driver: i40e version: 5.14.0-316.el9.x86_64 firmware-version: 9.20 0x8000d89c 1.3353.0 expansion-rom-version: bus-info: 0000:af:00.1 supports-statistics: yes supports-test: yes supports-eeprom-access: yes supports-register-dump: yes supports-priv-flags: yes How reproducible: 100% Steps to Reproduce: 1. create active-backup bond port with other-config:bond-detect-mode=miimon and other-config:bond-miimon-interval=-100 ovs-vsctl set Open_vSwitch . other_config={} ovs-vsctl --if-exists del-br bondbridge ovs-vsctl --may-exist add-br bondbridge ovs-vsctl add-bond bondbridge active-backup ens4f0 ens4f1 lacp=active bond_mode=active-backup -- set Interface ens4f0 mtu_request=9000 -- set Interface ens4f1 mtu_request=9000 ovs-vsctl set port active-backup other-config:bond-detect-mode=miimon ovs-vsctl set Port active-backup other_config:bond-miimon-interval=-100 2. check the bond-miimon-interval from ovs-vsctl # ovs-vsctl list port active-backup _uuid : 2cc2ed85-7140-444d-b9c9-c1c4ed19f8f0 bond_active_slave : "3c:fd:fe:bd:1c:a5" bond_downdelay : 0 bond_fake_iface : false bond_mode : active-backup bond_updelay : 0 cvlans : [] external_ids : {} fake_bridge : false interfaces : [2b97428f-2250-4b47-88fe-9dacfcda7859, 5a816dbb-53c0-4573-80e0-068df02d2f4f] lacp : off mac : [] name : active-backup other_config : {bond-detect-mode=miimon, bond-miimon-interval="-100"} protected : false qos : [] rstp_statistics : {} rstp_status : {} statistics : {} status : {} tag : [] trunks : [] vlan_mode : [] Actual results: 1. allow input negative integer on bond-miimon-interval Expected results: 1. Entering negative integer has no practical meaning. Whether ovs should reject negative integer input. Additional info:
Currently OVS doesn't validate any of the key-values in other_config on entry. You could even set that to an alphabetic string. I believe @msantana was looking into this?
Yes, I was looking into this. The problem is like Mike said the key-values are not validated. The validation (if any) depends on the function that gets those parameters. It may decide to simply ignore invalid parameters and let the user know via logs, or it might not. It's really function dependent. There isnt a global argument verification that tells the user they input something invalid Im marking this as a duplicate of BZ1990130. The fix for both is the same. OVS needs to implement key:value verification on other_config including integer/float range, multiple choice strings, any string, any non-empty string
*** This bug has been marked as a duplicate of bug 1990130 ***