Skip to content

Clarify the notion of the primary interface for an instance #960

Closed

Description

@bnaecker

See this thread for context.

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.

Activity

  1. bnaecker commented on Apr 22, 2022

    @bnaecker
    CollaboratorAuthor

    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?

  2. added
    api
    networking
    nexus
    on Apr 22, 2022
  3. david-crespo commented on May 3, 2022

    @david-crespo
    Contributor

    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

  4. bnaecker commented on Jun 3, 2022

    @bnaecker
    CollaboratorAuthor

    Closed by #1143

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    apinetworkingnexus

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions