Skip to content

[RFE] Add OS-specific Device column to quads --ls-interface #756

Open

Description

@kambiz-aghaiepour

Summary

quads --ls-interface lists QUADS logical interface names (em1, em2, …), but those names do not exist inside the installed OS. Add a Device column containing the OS-specific device name, immediately after Name.

Background

The actual device naming scheme is already known: the foreman kickstart template (templates/foreman/custom-generic-network-post.rb) maps nic1..nic5 to OS device names per host model and OS major, and the rendered result is on the host as /root/setup-interfaces.sh. Today operators must reverse-engineer the translation (correlate MAC addresses, VLAN IDs or switch ports) to know which OS device belongs to which QUADS interface. The name is also OS-dependent — RHEL 9.4 uses predictable names (ens1f0, eno12409np1, …), while other/current OSes in --os-list (e.g. RHEL 10.0) may differ.

Current output (POC)

                                             Interfaces: f06-h08-000-r660.example.com
┏━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━┓
┃ Name ┃ BIOS ID ┃ MAC Address       ┃ Switch IP   ┃ Port       ┃ Switch Vendor ┃ Speed  ┃ Vendor                         ┃ PXE Boot ┃ Maintenance ┃
┡━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━┩
│ em1  │ None    │ b4:83:51:10:52:64 │ 10.1.32.158 │ et-0/0/0:1 │ juniper       │ 25000  │ Intel Corporation              │ False    │ False       │
│ em2  │ None    │ 04:32:01:a9:d8:81 │ 10.1.33.182 │ et-0/0/0:1 │ juniper       │ 25000  │ Broadcom Inc. and subsidiaries │ True     │ False       │
│ em3  │ None    │ b4:83:51:10:52:65 │ 10.1.40.187 │ Et9/2      │ arista        │ 25000  │ Intel Corporation              │ False    │ False       │
│ em4  │ None    │ a0:88:c2:d5:07:4a │ 10.1.40.73  │ Et7/3      │ arista        │ 100000 │ Mellanox Technologies          │ False    │ False       │
└──────┴─────────┴───────────────────┴─────────────┴────────────┴───────────────┴────────┴────────────────────────────────┴──────────┴─────────────┘

Proposed output (adding Device after Name)

                                             Interfaces: f06-h08-000-r660.example.com
┏━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━┓
┃ Name ┃ Device      ┃ BIOS ID ┃ MAC Address       ┃ Switch IP   ┃ Port       ┃ Switch Vendor ┃ Speed  ┃ Vendor                         ┃ PXE Boot ┃ Maintenance ┃
┡━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━┩
│ em1  │ ens1f0      │ None    │ b4:83:51:10:52:64 │ 10.1.32.158 │ et-0/0/0:1 │ juniper       │ 25000  │ Intel Corporation              │ False    │ False       │
│ em2  │ eno12409np1 │ None    │ 04:32:01:a9:d8:81 │ 10.1.33.182 │ et-0/0/0:1 │ juniper       │ 25000  │ Broadcom Inc. and subsidiaries │ True     │ False       │
│ em3  │ ens1f1      │ None    │ b4:83:51:10:52:65 │ 10.1.40.187 │ Et9/2      │ arista        │ 25000  │ Intel Corporation              │ False    │ False       │
│ em4  │ ens2f0np0   │ None    │ a0:88:c2:d5:07:4a │ 10.1.40.73  │ Et7/3      │ arista        │ 100000 │ Mellanox Technologies          │ False    │ False       │
└──────┴─────────────┴─────────┴───────────────────┴─────────────┴────────────┴───────────────┴────────┴────────────────────────────────┴──────────┴─────────────┘

Proposal

  • Add Device immediately after Name in --ls-interface.

  • Store the per-OS device names in host/interface metadata (the same YAML used by --define-host-details / --export-host-details), keyed by OS, e.g.:

    interfaces:
      - name: em1
        mac_address: b4:83:51:10:52:64
        device_names:
          "RHEL 9.4": ens1f0
          "RHEL 10.0": <name>

    Exact schema is open; the requirement is that the mapping is per-OS and owned by QUADS, not only by the foreman template.

  • Resolve the value from the host's active allocation OS (Assignment.ostype, the field set by quads --cloud <cloud> --add-cloud/--mod-cloud --os; RHEL 9.4 for the example above).

  • When there is no active allocation/OS (e.g. spare pool), fall back to the configured default OS mapping (plugins.foreman.default_os).

  • Optional (not required for this RFE): to avoid maintaining two copies of the mapping, the foreman template could consume the same metadata instead of hard-coding names per model.

  • Add RHEL 10.0 entries: --os-list already offers RHEL 10.0, but the current template only special-cases os_major == 9, so RHEL 10 names do not exist yet.

Evidence (POC, RHEL 9.4)

ip -br link on the host correlated by MAC address:

QUADS Name MAC Address OS Device (RHEL 9.4)
em1 b4:83:51:10:52:64 ens1f0
em2 04:32:01:a9:d8:81 eno12409np1
em3 b4:83:51:10:52:65 ens1f1
em4 a0:88:c2:d5:07:4a ens2f0np0

The host also has eno12399np0 and ens2f1np1 (no QUADS interface rows); they are not affected by this RFE.

Acceptance criteria

  1. quads --host <host> --ls-interface renders a Device column after Name.
  2. Values match the OS of the host's current allocation (ostype) — a RHEL 10.0 allocation must not show RHEL 9.4 names.
  3. Hosts without an allocation fall back to the default OS mapping.
  4. Existing columns/order otherwise unchanged; --export-host-details can round-trip the new data.
  5. Covered models from the template (r650, r660, r750, r930, r730xd, fc640, dl360) all resolve correctly.

Activity

  1. ttlogan commented on Oct 29, 2026

    @ttlogan
    Contributor

    Read through it. The mapping today lives only in templates/foreman/custom-generic-network-post.rb (nic1..nic5, per-model, os_major == 9 only) and is rendered onto the host as /root/setup-interfaces.sh, so QUADS has no copy and operators reverse-engineer it. Moving it into interface metadata keyed by OS and resolving from the active allocation ostype (fallback plugins.foreman.default_os) fits how --define-host-details / --export-host-details already round-trip host data. Two gaps worth pinning before anyone starts: the template only special-cases os_major == 9, so RHEL 10.0 names do not exist anywhere yet, which leaves acceptance #2 with nothing to resolve from; and spare hosts with no allocation fall back to a single default_os rather than the template's per-model overrides. No opinion on the exact schema yet; will circle back once there is a concrete data source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions