-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Podman Machine VM config does not get created when an Ignition file is provided #23544
Comments
I would welcome a PR and nice find! The behavior is like so. If the user provides an ignition file, we do no additional ignition changes (so no ready unit). And yes, we should be writing a JSON and we should write a regression test as such with your PR (just init and check the json is there, we dont have to start it). lmk if you need any help with this one. |
I am running into this bug as well. Is there a work-around that can be used in the meantime? |
@baude I've been trying to figure out a work-around for this issue by either modifying the default ignition file and replacing it with my own, or creating the missing JSON file. When I try the above methods and then try
Is there documentation somewhere for me to learn how to do this manually or add the necessary units to my butane file? Also, is that right that an ignition file that has been tested to work on FCOS running elsewhere (e.g on a VPS) would have problems starting using |
…passed. This bug was first described in containers#23544. Signed-off-by: Graceson Aufderheide <[email protected]>
…ignition-path is passed. This bug was first described in containers#23544. Signed-off-by: Graceson Aufderheide <[email protected]>
a bug where podman machine init does not create all the machine files when ignition-path is used. Signed-off-by: Graceson Aufderheide <[email protected]>
a bug where podman machine init does not create all the necessary machine files when ignition-path is used. Signed-off-by: Graceson Aufderheide <[email protected]>
a bug where podman machine init does not create all the necessary machine files when ignition-path is used. Signed-off-by: Graceson Aufderheide <[email protected]>
a bug where podman machine init does not create all the necessary machine files when ignition-path is used. Signed-off-by: Graceson Aufderheide <[email protected]>
a bug where podman machine init does not create all the necessary machine files when ignition-path is used. Signed-off-by: Graceson Aufderheide <[email protected]>
a bug where podman machine init does not create all the necessary machine files when ignition-path is used. Signed-off-by: Graceson Aufderheide <[email protected]>
a bug where podman machine init does not create all the necessary machine files when ignition-path is used. Signed-off-by: Graceson Aufderheide <[email protected]>
What is the progress of this ? Do we know what constitute service.ready yet - Also can someone maybe point me to more reading material on it - I also would like a workaround - I mean for those that don't included SSH authorize public keys and users and potentially only specify other things in their ignition file, it would have been nice to be able to have a working podman machine afterwards. Any details regarding that service.ready unit will help! |
Fix the issue where podman machine init does not create all the necessary machine files when ignition-path is used. Fixes: containers#23544 Signed-off-by: Graceson Aufderheide <[email protected]>
Fix the issue where podman machine init does not create all the necessary machine files when ignition-path is used. Fixes: containers#23544 Signed-off-by: Graceson Aufderheide <[email protected]>
Fix the issue where podman machine init does not create all the necessary machine files when ignition-path is used. Fixes: containers#23544 Signed-off-by: Graceson Aufderheide <[email protected]>
Fix the issue where podman machine init does not create all the necessary machine files when ignition-path is used. Fixes: containers#23544 Signed-off-by: Graceson Aufderheide <[email protected]>
Fix the issue where podman machine init does not create all the necessary machine files when ignition-path is used. Fixes: containers#23544 Signed-off-by: Graceson Aufderheide <[email protected]>
Issue Description
Whenever the
--ignition-path
argument is provided topodman machine init
, Podman silently fails to write the<machine-name>.json
config file. If I add the--now
flag or when I try to runpodman machine start <machine-name>
, I get the following error:Steps to reproduce the issue
Steps to reproduce the issue
podman machine init --ignition-path=./ignition.json
.podman machine start
.Describe the results you received
Whenever I run
podman machine init --ignition-path=./ignition.json
, it fails to create thepodman-machine-default.json
andpodman-machine-default.ign
files. Running this with--log-level=debug
below provides the following output:Trying to start the machine, I get the following output:
Neither the
podman-machine-default.json
file nor thepodman-machine-default.ign
files were created:By comparison, omitting the
--ignition-path
flag yields the following normal behaviors:When this happens, I can start the Podman VM normally. Additionally, I can see that the config files were created as expected:
Describe the results you expected
I would have expected the
podman-machine-default.json
file to be created and the VM should be able to start by runningpodman machine start <vm-name>
.podman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
No
Additional environment details
Additional environment details
Additional information
This only occurs whenever the
--ignition-path=
option is provided topodman machine init
. Otherwise, it works as it should. I did a bit of debugging and code spelunking to try to figure out how / why this is happening, and found this:https://github.com/containers/podman/blob/main/pkg/machine/shim/host.go#L193-L198
So essentially, we return early and never make it to this part:
https://github.com/containers/podman/blob/main/pkg/machine/shim/host.go#L237-L247
I feel like I have enough context that I can submit a PR to fix this issue. However, what I'm not sure of is what the preferred behavior should be whenever a user provides their own Ignition config. In other words, should the
ready.service
unit be added to the user-provided Ignition config or should the user-provided Ignition config be used as-is:https://github.com/containers/podman/blob/main/pkg/machine/shim/host.go#L200-L220
Personally, I'm of the opinion that the
ready.service
unit should not be added to user-supplied Ignition, but I could be persuaded otherwise. Anyway, please let me know if there is any further information that would be helpful here.The text was updated successfully, but these errors were encountered: