Skip to content

Conversation

@bnaecker
Copy link
Collaborator

  • Updates the current external IP allocation query to handle both
    floating and ephemeral IPs, by assuming that the whole port range is
    already reserved for any existing IP address.
  • Add public datastore methods for creating SNAT and Ephemeral IPs,
    delegating to private method for the actual query running/handling
  • Updates sagas to include UUID generation for external IPs as separate
    steps, for idempotency, and to create Ephemeral IPs if they're
    requested. Also rework instance creation/migration sagas to select the
    Ephemeral IP address, if one was requested, or the SNAT if not.
  • Adds optional restriction of IP Pools to a project. This adds the
    project ID or name in a bunch of places, and updates the external IP
    allocation query to only consider pools which are unrestricted, or
    whose project ID matches the one of the instance we're allocating an
    IP for. This relies on a new index on the instance_external_ip
    table, which induces an undesirable sorting (by project, not IP), so
    we add a new sorting criterion to the query.
  • Adds tests, especially for the external IP table's check constraints
    which verify integrity of the name / description / instance ID for
    different kinds of addresses, and for restriction of an IP pool to a
    project.
  • Plumb the external IPs up to Nexus's public API, including instance
    creation and an endpoint for listing external IPs for an instance.
  • Adds integration tests for assignment of Ephemeral IPs and authz tests
    for the endpoint(s)

- Updates the current external IP allocation query to handle both
  floating and ephemeral IPs, by assuming that the whole port range is
  already reserved for any existing IP address.
- Add public datastore methods for creating SNAT and Ephemeral IPs,
  delegating to private method for the actual query running/handling
- Updates sagas to include UUID generation for external IPs as separate
  steps, for idempotency, and to create Ephemeral IPs if they're
  requested. Also rework instance creation/migration sagas to select the
  Ephemeral IP address, if one was requested, or the SNAT if not.
- Adds optional restriction of IP Pools to a project. This adds the
  project ID or name in a bunch of places, and updates the external IP
  allocation query to only consider pools which are unrestricted, or
  whose project ID matches the one of the instance we're allocating an
  IP for. This relies on a new index on the `instance_external_ip`
  table, which induces an undesirable sorting (by project, not IP), so
  we add a new sorting criterion to the query.
- Adds tests, especially for the external IP table's check constraints
  which verify integrity of the name / description / instance ID for
  different kinds of addresses, and for restriction of an IP pool to a
  project.
- Plumb the external IPs up to Nexus's public API, including instance
  creation and an endpoint for listing external IPs for an instance.
- Adds integration tests for assignment of Ephemeral IPs and authz tests
  for the endpoint(s)
@bnaecker bnaecker requested review from davepacheco and smklein July 18, 2022 20:57
@bnaecker
Copy link
Collaborator Author

Should resolve #1458. There are still some TODOs, which I'll be moving into issues.

Copy link
Collaborator

@smklein smklein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, looks good. Biggest questions relate to undo actions within the sagas.

- More comments and links to issues
- Better handling of external IP vs SNAT IPs during instance
  provision/migrate
- Revert bad MAC address
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.

4 participants