You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clarify the notion of the primary interface for an instance #960
We're currently using the term "default" in Nexus to refer to what's called the primary interface in RFD 21. This issue tracks cleaning up at least the language around the primary interface, and possibly including a boolean or some other information in the network_interface table to indicate whether an interface is the primary for its instance.
The value of that is it makes it clear which IP addresses to publish in DNS, which one to use when doing NAT for an instance to reach the broader network, and probably other things. One drawback is the need to treat it specially, such as disallowing deletion, at least not without propagating the "primary" status to another interface.
There's a related point here, which may deserve its own issue. The current API for creating NICs in Nexus allows clients to specify one of three kinds of data when creating an instance. That's defined here, where the variants have the following interpretations:
None: Give the instance no NICs at all
Default: Give the instance exactly on interface, the primary. It will be in the VPC and VPC Subnet both named "default", and it will have an auto-assigned IP.
Custom: Specify zero or more items of this type, giving full control over all the parameters of each NIC.
I originally made it this way when I thought we'd also support attaching an existing NIC, which is no longer the case. And the issue is that the last variant actually subsumes the others.
For example, if you want no NICs, use a list of size zero. We can use default values on the fields of the NetworkInterfaceCreate struct to make specifying the "default case" of getting just one primary interface pretty straightforward. I'm not sure if this is worth it though, so I'd love some feedback from others on whether this is worth pursuing. cc @david-crespo@zephraph Wondering if y'all have initial thoughts here?
Yeah, I think these are better treated as two separate issues, since the first seems unambiguous — using "default" to mean "primary" internally is basically wrong and needs to be fixed. The instance create API question is separate and a bit more open-ended. #1003
Activity
bnaecker commentedon Apr 22, 2022
There's a related point here, which may deserve its own issue. The current API for creating NICs in Nexus allows clients to specify one of three kinds of data when creating an instance. That's defined here, where the variants have the following interpretations:
None: Give the instance no NICs at allDefault: Give the instance exactly on interface, the primary. It will be in the VPC and VPC Subnet both named"default", and it will have an auto-assigned IP.Custom: Specify zero or more items of this type, giving full control over all the parameters of each NIC.I originally made it this way when I thought we'd also support attaching an existing NIC, which is no longer the case. And the issue is that the last variant actually subsumes the others.
For example, if you want no NICs, use a list of size zero. We can use default values on the fields of the
NetworkInterfaceCreatestruct to make specifying the "default case" of getting just one primary interface pretty straightforward. I'm not sure if this is worth it though, so I'd love some feedback from others on whether this is worth pursuing. cc @david-crespo @zephraph Wondering if y'all have initial thoughts here?david-crespo commentedon May 3, 2022
Yeah, I think these are better treated as two separate issues, since the first seems unambiguous — using "default" to mean "primary" internally is basically wrong and needs to be fixed. The instance create API question is separate and a bit more open-ended. #1003
bnaecker commentedon Jun 3, 2022
Closed by #1143
Update Propolis and Crucible to latest
Update Propolis and Crucible to latest (#4195)