Skip to content

mantle/platform: add BindMountHostRO Machine Option#4513

Merged
dustymabe merged 4 commits into
coreos:mainfrom
dustymabe:dusty-kola-mount-cosa
Apr 1, 2026
Merged

mantle/platform: add BindMountHostRO Machine Option#4513
dustymabe merged 4 commits into
coreos:mainfrom
dustymabe:dusty-kola-mount-cosa

Conversation

@dustymabe
Copy link
Copy Markdown
Member

The BindMountHostRO will allow someone to specify host (COSA) paths to mount into the started VM machine. It's very similar to the existing --qemu-bind-ro option today.

Part of this work is to enable running the bind mounted COSA filesystem as a container inside our test VMs without having to pull new containers down. See the discussion at coreos/fedora-coreos-config#4051 (comment)

We also here add in stress-ng since coreos/fedora-coreos-config#4051 needs it to test numad.

See individual commit messages for rationale about each change.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the ability to bind mount host directories into QEMU machines via MachineOptions and the --qemu-bind-ro flag. It unifies the parsing logic for bind options into the platform package and updates the test harness to support these mounts in external tests. Feedback includes correcting an inconsistency in the help text, addressing a breaking change in flag behavior where a comma-separated source/destination pair is now required, fixing a redundant slice expression, and resolving minor grammatical and typographical errors in error messages and comments.

Comment thread mantle/cmd/kola/options.go Outdated
Comment thread mantle/platform/machine/qemu/cluster.go Outdated
Comment thread mantle/platform/platform.go Outdated
Comment thread mantle/platform/qemu.go Outdated
The statement in the original commit d812406 says:

```
This one doesn't support configuring the path because we can't
reliably change the Ignition config here...
```

but we can just modify the config here so let's add destination support
and also relocate and reuse the parseBindOpt function from qemuexec.go
that's used for --bind-ro over there.
The previous check only rejected AppendKernelArgs. Use
reflect.DeepEqual against a zero-value MachineOptions to catch any
machine option being set on a non-exclusive test.

Written-by: <anthropic/claude-opus-4.6>
This extends what was already supported via the CLI --qemu-bind-ro
switch, but to MachineOptions which can be set directly or mapped
into from external test metadata.
For testing numad as part of [1]. The thinking is that we'll
bind mount in COSA into the VM and run a container based on the
COSA rootfs that spanws stress-ng.

[1] coreos/fedora-coreos-config#4051
@dustymabe dustymabe force-pushed the dusty-kola-mount-cosa branch from 0a07211 to 38c8f7f Compare March 30, 2026 20:50
@dustymabe
Copy link
Copy Markdown
Member Author

/retest

Copy link
Copy Markdown
Member

@angelcerveraroldan angelcerveraroldan left a comment

Choose a reason for hiding this comment

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

LGTM

@dustymabe
Copy link
Copy Markdown
Member Author

will wait for FCOS releases today to finish up and then I'll merge this.

@dustymabe dustymabe merged commit b31b011 into coreos:main Apr 1, 2026
4 checks passed
@dustymabe dustymabe deleted the dusty-kola-mount-cosa branch April 1, 2026 11:36
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.

2 participants