Skip to content

common: move machine marker file#822

Merged
baude merged 1 commit intocontainers:mainfrom
Luap99:machine-marker
May 5, 2026
Merged

common: move machine marker file#822
baude merged 1 commit intocontainers:mainfrom
Luap99:machine-marker

Conversation

@Luap99
Copy link
Copy Markdown
Member

@Luap99 Luap99 commented May 5, 2026

Move the marker file location to /etc/podman-machine. Because we want to overmount /etc/containers it means the /etc/containers/podman-machine file created by ignition gets shadowed otherwise.

However because ignition runs only once we should still support machines created on 5.X so keep a fallback that checks the older file as well if the first one is not found.

Also rework the logic to use sync.OnceValue and make it better unit testable.

@github-actions github-actions Bot added the common Related to "common" package label May 5, 2026
@Luap99
Copy link
Copy Markdown
Member Author

Luap99 commented May 5, 2026

Split out from #779 because I will need to have this change inside the machine images first before I can do the overmount of /etc/containers as otherwise CI cannot pass in podman as the inside podman would still look at the old path only containers/podman#28573

cc @baude @l0rd @ashley-cui

Copy link
Copy Markdown
Member

@ashley-cui ashley-cui left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

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

This is the first time I have heard of these marker files, so I have no opinion on whether this should happen (and I’ll trust experts); ACK to the implementation.

Comment thread common/pkg/machine/machine_test.go Outdated
Move the marker file location to /etc/podman-machine. Because we want to
overmount /etc/containers it means the /etc/containers/podman-machine
file created by ignition gets shadowed otherwise.

However because ignition runs only once we should still support machines
created on 5.X so keep a fallback that checks the older file as well if
the first one is not found.

Also rework the logic to use sync.OnceValue and make it better unit
testable.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
@Luap99 Luap99 force-pushed the machine-marker branch from 427946d to 403f83a Compare May 5, 2026 18:25
Copy link
Copy Markdown
Member

@baude baude left a comment

Choose a reason for hiding this comment

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

LGTM

@baude baude merged commit f2c719b into containers:main May 5, 2026
17 checks passed
@Luap99 Luap99 deleted the machine-marker branch May 6, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to "common" package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants