oxidecomputer / oxidecomputer/omicron

Unable to access instance that is initially created without a network interface

Open
#5,500 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

When creating an instance in the console a user can select "none" for their network interface. This results in an a request that looks like:

{
    "name": "no-network",
    "hostname": "no-network",
    "description": "",
    "memory": 8589934592,
    "ncpus": 2,
    "disks": [
        {
            "type": "create",
            "name": "no-network-jammy-app-server-741cbe",
            "description": "Created as a boot disk for no-network",
            "size": 10737418240,
            "disk_source": {
                "type": "image",
                "image_id": "e50423ec-d67f-4cbb-8cf2-f25903fc44c7"
            }
        }
    ],
    "external_ips": [
        {
            "type": "ephemeral"
        }
    ],
    "start": true,
    "network_interfaces": {
        "type": "none"
    },
    "ssh_public_keys": [
        "fac00a73-ee31-41e6-8a09-a49bc81a6061"
    ]
}

This request will create an instance with no network interfaces, but it will also allocate an ephemeral external ip for the instance. As expected at this point there is no external connectivity for this instance. This leads to a few questions:

  • Should this be a valid instance state to request at the API level?
  • What is this external ip attached to on instance creation and startup?

After this I stopped the instance, created a new network interface on the instance and restarted the instance, expecting the ephemeral ip to be assigned to that interface. As far as I can tell though the instance still does not have any external connectivity.

I tried looking at the db representation of this, and it looks like the interface is marked as the primary:

root@[fd00:1122:3344:116::3]:32221/omicron> select id, kind, parent_id, ip, is_primary from network_interface where parent_id = 'bece4197-2435-46c7-a861-5775e5830720';
                   id                  |   kind   |              parent_id               |     ip     | is_primary
---------------------------------------+----------+--------------------------------------+------------+-------------
  f294a1ae-5b3a-4759-a8fa-c45082d3f18b | instance | bece4197-2435-46c7-a861-5775e5830720 | 172.30.0.5 |    true
(1 row)

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

Reproduce the console request with network_interfaces set to none and an ephemeral external IP, then inspect the instance creation and network-interface attachment paths. Compare the API response and the network_interface database state before and after adding an interface and restarting; done should define and implement consistent external-IP behavior for this configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, backend, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.