Skip to content

Conversation

@stevekeay
Copy link
Contributor

@stevekeay stevekeay commented Nov 5, 2024

We were assuming that every NIC with a partition like Slot.2-1-1 also had a redfish entry for the "base" interface like Slot.2-1, however this is not true on all devices. Some only have the partition-style names. Therefore we change the logic: instead of including only a fixed pattern of NIC names, we ignore any interface that looks like a partition of an existing base NIC.

This currently has issues, because on systems that don't report the shorter names, those names are not recognised when we update the BIOS settings. So perhaps we have to retain the longer names for that purpose.

This in turn is going to be confusing if these inconsistent naming is a result of firmare versions. We would end up with the longer names in nautobot, and then if the firmware is upgraded the names would change. So, potentially the fix is to go for a firmware update before we do any of this. Alternatively, it might be that the differences are due to hardware variation. On the hardware I inspected, I noticed the shorter names were absent on Mellanox NICs, but present on Broadcom ones:

  • Mellanox ConnectX-6 Dx Dual Port 100 GbE QSFP56 Adapter
  • Broadcom P225p NetXtreme-E Dual-port 10Gb/25Gb Ethernet PCIe Adapter

@github-actions
Copy link

github-actions bot commented Nov 5, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
224 221 99% 0% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: 5c8aeb5 by action🐍

@github-actions
Copy link

github-actions bot commented Nov 5, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
178 85 48% 0% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: af0c06e by action🐍

@stevekeay stevekeay changed the title Get Interface data from NICs that don't have the separate partition info WIP: Get Interface data from NICs that don't have the separate partition info Nov 5, 2024
We were assuming that every NIC with a partition like Slot.2-1-1 also had a
redfish entry for the "base"  interface like Slot.2-1, however this is not true
on all devices.  Some only have the partition-style names.   Therefore we change
the logic: instead of including only a fixed pattern of NIC names, we ignore any
interface that looks like a partition of an existing base NIC.
These sessions age out on their own, but repeatedly calling this code can use up
all the sessions on the device, which is annoying because it locks us out.
Fixes a copy-and-paste error in this code
We don't want this polluting stdout, which is what pprint does.  We wanted a
string, which is what pformat does.  In my ignorance I had used the wrong
function.
@stevekeay stevekeay force-pushed the nic-partition-names branch from af0c06e to 5c8aeb5 Compare November 7, 2024 16:23
@stevekeay stevekeay changed the title WIP: Get Interface data from NICs that don't have the separate partition info feat: Get Interface data from NICs that don't have the separate partition info Nov 7, 2024
@cardoe cardoe added this pull request to the merge queue Nov 7, 2024
Merged via the queue into main with commit f269400 Nov 7, 2024
23 of 24 checks passed
@cardoe cardoe deleted the nic-partition-names branch November 7, 2024 16:37
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

Successfully merging this pull request may close these issues.

3 participants