oxidecomputer / oxidecomputer/omicron

internet gateways allow the same ip pool to be attached multiple times

Open
#7,413 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

Internet gateways allow the same IP Pool to be attached multiple times. A single IP Pool should only be able to be attached to an internet gateway at most 1 time.

Steps to Reproduce

These steps were done on the colo rack with the pre-existing private IP Pool. If you don't have an IP Pool to use create one first.

Create a VPC.

oxide vpc create \
    --project $project \
    --description 'foo' \
    --dns-name foo \
    --name foo

Attach the same IP Pool multiple times to the default internet gateway in the newly created VPC.

for i in $(seq 0 3)
    oxide internet-gateway ip-pool attach \
        --project $project \
        --vpc foo \
        --gateway default \
        --ip-pool private \
        --name private \
        --description 'Private'
end

Observe the same IP Pool is listed multiple times.

CLI:

> oxide internet-gateway ip-pool list \
    --project $project \
    --vpc foo \
    --gateway default
[
  {
    "description": "Automatically attached default IP pool",
    "id": "faca1d51-d86b-4d74-8c4e-c685bc8a0f6f",
    "internet_gateway_id": "cad1df41-f8d1-484e-9c8b-65ba1766949a",
    "ip_pool_id": "a4720b36-006b-49fc-a029-583528f18a4d",
    "name": "default",
    "time_created": "2025-01-28T18:04:25.680445Z",
    "time_modified": "2025-01-28T18:04:25.680445Z"
  }, {
    "description": "Private",
    "id": "e1d007c1-3f16-49e2-b521-d16454f0e5da",
    "internet_gateway_id": "cad1df41-f8d1-484e-9c8b-65ba1766949a",
    "ip_pool_id": "fbec3335-9178-486f-90d2-315d9098ca6f",
    "name": "private",
    "time_created": "2025-01-28T18:04:38.407809Z",
    "time_modified": "2025-01-28T18:04:38.407809Z"
  }, {
    "description": "Private",
    "id": "695efc6b-6628-4b45-88b7-f90cbca9d9a8",
    "internet_gateway_id": "cad1df41-f8d1-484e-9c8b-65ba1766949a",
    "ip_pool_id": "fbec3335-9178-486f-90d2-315d9098ca6f",
    "name": "private",
    "time_created": "2025-01-28T18:04:40.528980Z",
    "time_modified": "2025-01-28T18:04:40.528980Z"
  }, {
    "description": "Private",
    "id": "5888c78d-f99b-4565-afca-8e871a8463c0",
    "internet_gateway_id": "cad1df41-f8d1-484e-9c8b-65ba1766949a",
    "ip_pool_id": "fbec3335-9178-486f-90d2-315d9098ca6f",
    "name": "private",
    "time_created": "2025-01-28T18:04:40.102891Z",
    "time_modified": "2025-01-28T18:04:40.102891Z"
  }
]

UI:

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the duplicate attachment with the oxide internet-gateway ip-pool attach command, then use oxide internet-gateway ip-pool list to inspect the result. Trace the internet-gateway IP-pool attach API and make the completed behavior reject or prevent a second attachment of the same pool, so the pool appears at most once.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.