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

Setting VLAN interface admin state via Netlink does not propagate to CPS #77

Open
james-jra opened this issue Mar 21, 2018 · 4 comments
Assignees

Comments

@james-jra
Copy link

When I set the admin-state of a VLAN interface using the typical Linux networking utilities, the target value of the if/interfaces/interface/enabled field does not change when queried through CPS.

Setting if/interfaces/interface/enabled through CPS does work as expected - e.g. setting enabled=1 causes the interface to come up, and subsequent queries in CPS are correct.

Reproduction

  • Create a VLAN interface. It's admin-down when it's created
opxUser@opx221_vm:~$ sudo cps_config_vlan.py --add --id 11 --vlantype 1
Success
opxUser@opx221_vm:~$ ip link show dev br11
45: br11: <BROADCAST,MULTICAST,PROMISC> mtu 1500 qdisc noop state DOWN mode DEFAULT group default
    link/ether 08:00:27:2d:79:07 brd ff:ff:ff:ff:ff:ff
  • CPS shows enabled = 0
opxUser@opx221_vm:~$ sudo cps_get_oid.py dell-base-if-cmn/if/interfaces/interface if/interfaces/interface/name=br11 | grep enabled
if/interfaces/interface/enabled = 0
  • Bring it up using ip link. CPS still shows enabled = 0. This is wrong
opxUser@opx221_vm:~$ sudo ip link set dev br11 up
opxUser@opx221_vm:~$ ip link show dev br11
45: br11: <NO-CARRIER,BROADCAST,MULTICAST,PROMISC,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
    link/ether 08:00:27:2d:79:07 brd ff:ff:ff:ff:ff:ff
opxUser@opx221_vm:~$
opxUser@opx221_vm:~$ sudo cps_get_oid.py dell-base-if-cmn/if/interfaces/interface if/interfaces/interface/name=br11 | grep enabled
if/interfaces/interface/enabled = 0    <--------
  • Bring it down again, and instead bring it up using CPS
opxUser@opx221_vm:~$ sudo ip link set dev br11 down
opxUser@opx221_vm:~$ ip link show dev br11
45: br11: <BROADCAST,MULTICAST,PROMISC> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
    link/ether 08:00:27:2d:79:07 brd ff:ff:ff:ff:ff:ff
opxUser@opx221_vm:~$
opxUser@opx221_vm:~$ sudo cps_set_oid.py -qua target -oper action dell-base-if-cmn/set-interface dell-base-if-cmn/set-interface/input/operation=3 if/interfaces/interface/name=br11 if/interfaces/interface/enabled=1
Success
Key: 1.19.1245192.
cps/object-group/return-code = 0
dell-base-if-cmn/set-interface/input/operation = 3
if/interfaces/interface/enabled = 1
if/interfaces/interface/name = br11
opxUser@opx221_vm:~$ ip link show dev br11
45: br11: <NO-CARRIER,BROADCAST,MULTICAST,PROMISC,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
    link/ether 08:00:27:2d:79:07 brd ff:ff:ff:ff:ff:ff
  • This time CPS shows the correct value
opxUser@opx221_vm:~$ sudo cps_get_oid.py dell-base-if-cmn/if/interfaces/interface if/interfaces/interface/name=br11 | grep enabled
if/interfaces/interface/enabled = 1
  • Finally, bring it down using ip link. Once again, CPS does not update the target configuration
opxUser@opx221_vm:~$ sudo ip link set dev br11 down
opxUser@opx221_vm:~$ ip link show dev br11
45: br11: <BROADCAST,MULTICAST,PROMISC> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
    link/ether 08:00:27:2d:79:07 brd ff:ff:ff:ff:ff:ff
opxUser@opx221_vm:~$
opxUser@opx221_vm:~$ sudo cps_get_oid.py dell-base-if-cmn/if/interfaces/interface if/interfaces/interface/name=br11 | grep enabled
if/interfaces/interface/enabled = 1      <-------------
@atanu-mandal
Copy link
Collaborator

Hi James,

Your observation is right. Currently vlan attributes from netlink are not processed. We are planning to get it fixed in future release.

Thanks.

@jeff-yin
Copy link
Member

Same issue as #48?

@james-jra
Copy link
Author

james-jra commented May 17, 2018

@jeff-yin
I don't think this is a duplicate of #48

#48 refers to incorrect values for the if/interface-state/interface/{admin-status, oper-status}.

This issue (#77) refers to not updating the value of if/interfaces/interface/enabled when the VLAN is brought admin-up using ip link set dev vlan1 up.

@GarrickHe GarrickHe self-assigned this Jun 29, 2018
@GarrickHe
Copy link
Contributor

GarrickHe commented Jun 29, 2018

Update - I'm looking into this issue now. The issue is we don't have a handler to deal with admin or operation status from Netlink messages.

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

4 participants