Closed james-jra closed 6 years ago
The 'type' field of the interface object is not a key field (see RFC 2863). Therefore, the application should request all interface objects, and filter those whose type is 'vlan'.
Hi @james-jra -- I have to ask, but did you reboot the system after the "apt-get upgrade" operation?
As we have provided the support for "type" based query for the interfaces, it should work. Can you please check whether you have rebooted the switch after the upgrade. Also I would suggest to use dist-upgrade instead of upgrade. Also please refer "Upgrading OpenSwitch" section at https://archive.openswitch.net/docs/2.3.0/openswitch_opx_230_release_notes.pdf
@hpersh I agree that the 'type' field is not a key field, and I am happy to have the application implement this filtering if this is no longer supported in CPS. However, as Atanu has said, the CPS API has historically supported the 'type' based query for interfaces. and I would be alarmed if this has been intentionally removed without being documented anywhere (like package changelogs). Especially since the following three utility scripts included in OPX rely on the 'type' based query for interfaces:
Just in case you do need to address this issue, I've provided more information to help your investigation below:
@atanu-mandal Yes, I did reboot the switch. I've tried this three times now
deb http://deb.openswitch.net/ testing main opx opx-non-free
.
Reproduction using OPX 2.3.0-dev1 VM
I'm running the VM in VirtualBox using Vagrant, with the following Vagrantfile. I start with a clean virtual machine.
Vagrant.configure("2") do |config|
config.ssh.username = "opxUser"
config.vm.box = "opx/2.3.0-dev1"
config.vm.box_version = "2.3.0-dev1"
end
opxUser@opx23_vm:~$ sudo cps_config_vlan.py --add --id 100 --vlantype 1
Success
opxUser@opx23_vm:~$ sudo cps_get_oid.py \
> dell-base-if-cmn/if/interfaces/interface \
> if/interfaces/interface/type=ianaift:l2vlan
============dell-base-if-cmn/if/interfaces/interface==========
* Update & upgrade:
opxUser@opx23_vm:~$ sudo apt-get update && sudo apt-get dist-upgrade
@james-jra I believe I found the cause. It may have to do with another push that went in recently. Will keep you posted.
Thanks, Garrick
Hi James, Thanks for trying and providing us the detailed info. As Garrick has mentioned we are actively looking into this having found a probable cause. Will update you soon.
This is now fixed through https://review.openswitch.net/#/c/14697/
Also https://review.openswitch.net/14696
The packages with the fixes are currently published to the "unstable" release stream and will be made available once the packages are promoted to "stable" in the next OPX bugfix release, 2.3.1.
I've just updated an OPX 2.3 machine (
apt-get update && apt-get upgrade
) After this update, querying interface configuration by interface type no longer works - it always returns the full list of interfaces. Querying by name or interface-index still works.Before the update, I could query all configuration for VLAN interfaces, as shown below:
Now, the same command returns all interfaces of any type:
The packages which changed in the update were: