-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inserting a NetworkInterface
should allow the caller to specify the slot
#5056
Comments
This was referenced Feb 14, 2024
jgallagher
added a commit
that referenced
this issue
Feb 15, 2024
…5065) This makes a several minor changes to plumb slots through: * `IncompleteNetworkInterface` now stores an optional slot, just like it stores an optional IP/MAC address * In `network_interfaces::InsertQuery`, if the incoming slot is set, we use it directly instead of running the `NextItem`-based subquery * Adds a partial index to ensure uniqueness of a slot within a single `parent_id` (I believe this is correct, but would love confirmation from someone more familiar!) * `IncompleteNetworkInterface::new_service()` now takes a _non-optional_ IP, MAC address, and slot. This matches how it was called in all non-test code. * Tweaked the Nexus internal API used for RSS handoff to include the slot in the description of NICs. This is a partial fix for #5056, and should produce correct behavior on new systems that run through RSS, even without a fix for #5055 (because we bypass `NextItem` altogether with this change). In particular, I think this should unblock testing of #5045 on madrid / testbeds. It does not address the already-recorded-NICs-with-incorrect-slots on systems like dogfood; I'll take care of that in a subsequent PR.
jgallagher
added a commit
that referenced
this issue
Feb 15, 2024
…ist-eips` (#5064) This PR has some omdb commands I wanted during dev/debug of #5045. It expands the output of `list-vnics` to include the parent's ID (particularly useful when trying to determine the external IP of a specific Nexus instance, for example): ``` IP PORTS KIND STATE OWNER_KIND OWNER_ID OWNER_DESCRIPTION 10.1.1.3/32 0/65535 floating Attached instance 4e6fb33a-7ba2-4a5e-abc5-dc9b047c01e0 v6/some-vm2 10.1.1.4/32 0/16383 SNAT Attached instance 4e6fb33a-7ba2-4a5e-abc5-dc9b047c01e0 v6/some-vm2 10.1.1.5/32 0/65535 ephemeral Attached instance 4e6fb33a-7ba2-4a5e-abc5-dc9b047c01e0 v6/some-vm2 172.20.26.1/32 0/65535 floating Attached service edd99650-5df1-4241-815d-253e4ef2399c ExternalDns 172.20.26.2/32 0/65535 floating Attached service f500d564-c40a-4eca-ac8a-a26b435f2037 ExternalDns 172.20.26.3/32 0/65535 floating Attached service 65a11c18-7f59-41ac-b9e7-680627f996e7 Nexus 172.20.26.4/32 0/65535 floating Attached service 20b100d0-84c3-4119-aa9b-0c632b0b6a3a Nexus 172.20.26.5/32 0/65535 floating Attached service 2898657e-4141-4c05-851b-147bffc6bbbd Nexus 172.20.26.6/32 0/16383 SNAT Attached service c3ec3d1a-3172-4d36-bfd3-f54a04d5ba55 Ntp ``` and adds a `list-vnics` command to show allocated vnics: ``` IP MAC SLOT PRIMARY KIND SUBNET PARENT_ID DESCRIPTION 172.30.0.5/32 A8:40:25:F8:A5:8C 1 true instance 172.30.0.0/22 2a4afdda-e269-48bc-913f-01ad57c50543 default primary interface for p4 172.30.0.5/32 A8:40:25:F5:AF:F0 1 true instance 172.30.0.0/22 be705808-d507-4693-9a97-186c92970e7b default primary interface for updateinst 172.30.0.5/32 A8:40:25:F7:3B:00 1 true instance 172.30.0.0/22 0ab1939f-af6e-4ea2-a155-71f210e937fc a sample nic 172.30.1.5/32 A8:40:25:FF:B0:9C 1 true service 172.30.1.0/24 edd99650-5df1-4241-815d-253e4ef2399c external_dns service vNIC 172.30.1.6/32 A8:40:25:FF:D0:B4 1 true service 172.30.1.0/24 f500d564-c40a-4eca-ac8a-a26b435f2037 external_dns service vNIC 172.30.2.5/32 A8:40:25:FF:A6:83 1 true service 172.30.2.0/24 65a11c18-7f59-41ac-b9e7-680627f996e7 nexus service vNIC 172.30.2.6/32 A8:40:25:FF:B4:C1 1 true service 172.30.2.0/24 20b100d0-84c3-4119-aa9b-0c632b0b6a3a nexus service vNIC 172.30.2.7/32 A8:40:25:FF:C6:59 0 true service 172.30.2.0/24 2898657e-4141-4c05-851b-147bffc6bbbd nexus service vNIC 172.30.3.5/32 A8:40:25:FF:B2:52 1 true service 172.30.3.0/24 c3ec3d1a-3172-4d36-bfd3-f54a04d5ba55 ntp service vNIC 172.30.3.6/32 A8:40:25:FF:A0:F9 1 true service 172.30.3.0/24 6ea2684c-115e-48a6-8453-ab52d1cecd73 ntp service vNIC ``` (This command immediately revealed issues with the slot number recording on dogfood, which led to opening #5056.)
jgallagher
added a commit
that referenced
this issue
Feb 15, 2024
This is the second half of the fix for #5056. #5065 (already merged) fixed _how_ we were getting service NICs with nonzero slot values, and this PR adds a schema migration to apply a one-time fix to any existing service NICs with nonzero slot values. This matters to the Reconfigurator, because currently the NICs sled-agent thinks it has don't match the NICs recorded in CRDB (differing only by slot number). Closes #5056.
jgallagher
added a commit
that referenced
this issue
Feb 15, 2024
This is the second half of the fix for #5056. #5065 (already merged) fixed _how_ we were getting service NICs with nonzero slot values, and this PR adds a schema migration to apply a one-time fix to any existing service NICs with nonzero slot values. This matters to the Reconfigurator, because currently the NICs sled-agent thinks it has don't match the NICs recorded in CRDB (differing only by slot number). Closes #5056.
jgallagher
added a commit
that referenced
this issue
Feb 16, 2024
This is the second half of the fix for #5056. #5065 (already merged) fixed _how_ we were getting service NICs with nonzero slot values, and this PR adds a schema migration to apply a one-time fix to any existing service NICs with nonzero slot values. This matters to the Reconfigurator, because currently the NICs sled-agent thinks it has don't match the NICs recorded in CRDB (differing only by slot number). Closes #5056.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When RSS is creating
NetworkInterface
s to send to sled-agent, it chooses a slot number (and always choosesslot: 0
; e.g., here for Nexus instances). After Nexus receives the handoff from RSS upon completion RSS copmletion, Nexus converts the RSS-createdNetworkInterface
s toIncompleteNetworkInterface
s.IncompleteNetworkInterface
allows the caller to specify the NIC ID, MAC, and IP, all of which we do; however, it does not allow specifying theslot
. The slot is chosen by aNextItem
query helper, which may choose any slot from 0-7; see #5055.This leads to some inconsistency that may be a little painful as we work on the reconfiguration system. The inventory system collects
NetworkInterface
s as a part of collecting each sled's service zone configuration; these are the values chosen by RSS. On dogfood, we see that each has aslot
of 0, as expected:However, the
network_interfaces
table that was populated by Nexus during the RSS handoff has one NIC withslot=0
, and the rest haveslot=1
:There are two issues here:
The text was updated successfully, but these errors were encountered: