Skip to content

[nexus] Support allocating external IP addresses for internal services#1611

Merged
smklein merged 6 commits into
mainfrom
allocate-service-ips
Sep 6, 2022
Merged

[nexus] Support allocating external IP addresses for internal services#1611
smklein merged 6 commits into
mainfrom
allocate-service-ips

Conversation

@smklein

@smklein smklein commented Aug 17, 2022

Copy link
Copy Markdown
Collaborator

Extends the allocation of external IPs to also support "service IPs", which are not associated with instances.

  • Modifies the instance_external_ip table to let the project be optional. A "service IP" is one where the project and instance IDs are both "NULL".
  • Modifies the external IP allocation CTE to support this new type of provision.
    • While I was there, fixed the idempotence of provisioniong when out of IP pool space for all external IP allocations.

Part of #1530
Fixes #1610

@smklein smklein requested a review from bnaecker August 17, 2022 05:42
Comment thread nexus/src/db/queries/external_ip.rs
Comment thread nexus/src/db/queries/external_ip.rs
Comment thread nexus/src/db/datastore/instance_external_ip.rs
Comment thread common/src/sql/dbinit.sql
Comment thread common/src/sql/dbinit.sql
Comment thread nexus/src/db/queries/external_ip.rs

@bnaecker bnaecker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for finding / fixing the idempotency edge case, and the tests look great! I've got a few questions around constraints and the new IpSource field.

@smklein

smklein commented Aug 22, 2022

Copy link
Copy Markdown
Collaborator Author

Thanks for finding / fixing the idempotency edge case, and the tests look great! I've got a few questions around constraints and the new IpSource field.

All comments addressed - this should be ready for re-review!

@bnaecker bnaecker self-requested a review August 22, 2022 19:44
Comment thread nexus/db-model/src/external_ip.rs

@bnaecker bnaecker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Excellent, thanks for taking another pass. Looks great!

@smklein smklein merged commit 628fa2d into main Sep 6, 2022
@smklein smklein deleted the allocate-service-ips branch September 6, 2022 18:06
smklein added a commit that referenced this pull request Sep 6, 2022
leftwo pushed a commit that referenced this pull request Jan 28, 2025
Crucible changes are:
Add early rejection of IOs if too many Downstairs are inactive (#1565)
Fix missing write stats in Oximeter. (#1617)
Shrink replay buffer (#1616)
Update tokio to 1.40 (#1611)

Propolis changes are:
crates: move host CPUID queries from cpuid-gen to cpuid-utils (#843)
leftwo added a commit that referenced this pull request Jan 29, 2025
Crucible changes are:
Add early rejection of IOs if too many Downstairs are inactive (#1565) 
Fix missing write stats in Oximeter. (#1617)
Shrink replay buffer (#1616)
Update tokio to 1.40 (#1611)

Propolis changes are:
crates: move host CPUID queries from cpuid-gen to cpuid-utils (#843)

---------

Co-authored-by: Alan Hanson <alan@oxide.computer>
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.

External IP allocation is not idempotent when out of addresses

2 participants