Skip to content

fix: use annotation for MirageOS net device name#690

Open
pocopepe wants to merge 1 commit into
urunc-dev:mainfrom
pocopepe:fix/315-mirage-net-annotation
Open

fix: use annotation for MirageOS net device name#690
pocopepe wants to merge 1 commit into
urunc-dev:mainfrom
pocopepe:fix/315-mirage-net-annotation

Conversation

@pocopepe
Copy link
Copy Markdown

Description

mirageos unikernels declare their network device names at build time through the solo5 manifest. the problem was urunc always hardcoded "service" as the device name, so if you built a unikernel with a different name it would just fail.
i added a new annotation com.urunc.unikernel.netDev so image builders can set the name at build time and urunc picks it up at runtime. if the annotation isn't there it falls back to "service" so existing images still work.

block device naming and multi network support i left for follow up prs as discussed.

Related issues

How was this tested?

go test ./pkg/unikontainers/unikernels/... -v -run TestMirageNetDevName

=== RUN   TestMirageNetDevName
=== RUN   TestMirageNetDevName/uses_net_device_name_from_annotation
=== PAUSE TestMirageNetDevName/uses_net_device_name_from_annotation
=== RUN   TestMirageNetDevName/falls_back_to_service_when_annotation_is_absent
=== PAUSE TestMirageNetDevName/falls_back_to_service_when_annotation_is_absent
=== CONT  TestMirageNetDevName/uses_net_device_name_from_annotation
=== CONT  TestMirageNetDevName/falls_back_to_service_when_annotation_is_absent
--- PASS: TestMirageNetDevName (0.00s)
    --- PASS: TestMirageNetDevName/uses_net_device_name_from_annotation (0.00s)
    --- PASS: TestMirageNetDevName/falls_back_to_service_when_annotation_is_absent (0.00s)
PASS
ok      github.com/urunc-dev/urunc/pkg/unikontainers/unikernels (cached)

LLM usage

Claude Sonnet 4.6

Checklist

  • I have read the contribution guide.
  • The linter passes locally (make lint).
  • The e2e tests of at least one tool pass locally (make test_ctr, make test_nerdctl, make test_docker, make test_crictl).
  • If LLMs were used: I have read the llm policy.

Fixes: urunc-dev#315
Signed-off-by: viju <avijusanjai@gmail.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 16, 2026

Deploy Preview for urunc canceled.

Name Link
🔨 Latest commit 22d34a8
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/6a08c8146eef4a0008e5804b

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.

Support multiple block and network devices over Solo5/MirageOS

1 participant