quads icon indicating copy to clipboard operation
quads copied to clipboard

VLANs not being applied to the interfaces based on name

Open QuantumPosix opened this issue 7 months ago • 1 comments

  • QUADS version (rpm -qa | grep quads and/or quads --version): quads-2.2.0-20250416.noarch
  • Python version: Python 3.12.7
  • Operating System: Fedora release 40 (Forty)

Describe the bug If you define interfaces for em3 or em4 without having an em1 or em2, quads will treat em3 and em4 to the vlans that em1 and em2 would use over the respective ones for their interfaces.

To Reproduce Steps to reproduce the behavior: quads --ls-interface --host host.example.com

  bios id: None
  mac address: <mac>
  switch ip: <ip>
  port: et-0/0/0:2
  speed: 25
  vendor: intel
  pxe_boot: False
  maintenance: False
interface: em4
  bios id: None
  mac address: <mac>
  switch ip: <ip>
  port: et-0/0/0:3
  speed: 25
  vendor: intel
  pxe_boot: False
  maintenance: False

run verify_switchconf.py --cloud cloud##

INFO - Host: host1.example.com
INFO - Host: host2.example.com
INFO - Host: host3.example.com
INFO - Host: host4.example.com
INFO - Host: host5.example.com
INFO - Host: host6.example.com
INFO - Host: host7.example.com
INFO - Host: host8.example.com
INFO - Host: host9.example.com
INFO - Host: host10.example.com
INFO - Host: host11.example.com
WARNING - Interface et-0/0/0:0 not using QinQ_vl1210
WARNING - Interface et-0/0/0:0 appears to be a member of VLAN 1212, should be 1210
WARNING - Interface et-0/0/0:1 not using QinQ_vl1211
WARNING - Interface et-0/0/0:1 appears to be a member of VLAN 1213, should be 1211
INFO - Host: host12.example.com
WARNING - Interface et-0/0/0:2 not using QinQ_vl1210
WARNING - Interface et-0/0/0:2 appears to be a member of VLAN 1212, should be 1210
WARNING - Interface et-0/0/0:3 not using QinQ_vl1211
WARNING - Interface et-0/0/0:3 appears to be a member of VLAN 1213, should be 1211
INFO - Host: host13.example.com
INFO - Host: host14.example.com
INFO - Host: host15.example.com
INFO - Host: host16.example.com
INFO - Host: host17.example.com
INFO - Host: host18.example.com
INFO - Host: host19.example.com
INFO - Host: host20.example.com

Expected behavior For the proper vlans to be put on via interface name (not position)

QuantumPosix avatar May 15 '25 12:05 QuantumPosix

If you define interfaces for em3 or em4 without having an em1 or em2, quads will treat em3 and em4 to the vlans that em1 and em2 would use over the respective ones for their interfaces.

QUADS interfaces need to be defined from the perspective and order of how it sees it's managed interfaces, not from the perspective of the host, what other interfaces are plugged where and so on.

On a system physically without an EM1 / EM2 your EM3 / EM4 is simply going to be EM1/EM2. (EM naming is generic and means nothing in or out of QUADS, managed interfaces just need a string identifier).

If you aren't planning on having QUADS control EM1/EM2 for now then set maintenance to True so they aren't used but the ordering is intact in case you do. However if you never plan on having QUADS manage them then simply define them as EM1/EM2 as that's the order QUADS sees them.

QUADS doesn't need to know about things it will not manage and if you don't ever plan on having QUADS manage it just define your interfaces in the order that QUADS sees it. That device name is generic and doesn't mean a lot as far as attribution within QUADS.

There are other ways to determine what the actual port is because of the physical switch-port it connects to. The best way to consider this is what is the first internal interface that QUADS manages regardless of where it's plugged in - that's always EM1 etc. The name doesn't mean anything and can be easily modified, changed, repurposed later.

sadsfae avatar May 15 '25 12:05 sadsfae