Skip to content

Same server -> different interface naming #690

@josecastillolema

Description

@josecastillolema

We need a way to deal with this situation where the same HW type can have different interface names, an example:

  • fxy-h04-xyz-r630 -> enp4s0f0
  • fxy-h10-xyz-r630-> enp3s0f0

The current approach relies on the lab.yml file and will fail when we get assigned r630 servers with enp4s0f0:

  scalelab:
    r630:
    - enp3s0f0
    - eno1
    - eno2
    - eno3
    - eno4

Some ideas to consider:

  • Use the mac address provided by the ocpinventory.json file instead? Can we rely on the order of the interfaces for this?
  • Check if the interface exists on the server before the deployment using the QUADS API?
$ curl -s https://quads2.example/api/v3/hosts/fxy-h04-xyz-r630.example.com | jq '.interfaces[] | select(.name == "em1")'
{
  "bios_id": null,
  "host_id": xyz,
  "id": xyz,
  "mac_address": "xx:xx:xx:xx:xx:xx",
  "maintenance": false,
  "name": "em1",
  "pxe_boot": false,
  "speed": 10,
  "switch_ip": "x.y.z.w",
  "switch_port": "xe-0/x/x:x",
  "vendor": ""
}

$ curl -s https://quads2.example.com/api/v3/hosts/f24-h04-000-r630.example.com | jq '.interfaces[] | select(.name == "em1dsd")'
  • Something similar to what jetlag does, maintaining few exception for certain racks:
      r640:
        pub_nic: eno1np0
        prov_nic: ens1f1
        bm_nic: ens2f0np0
        bm_nic_2: eno2np1
        prov_nic_f18: ens3f1

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions