-
Notifications
You must be signed in to change notification settings - Fork 88
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
process-user-data: create generic file provider for userdata #2172
base: main
Are you sure you want to change the base?
process-user-data: create generic file provider for userdata #2172
Conversation
5898e39
to
337136e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. I will try and test it in my mkosi libvirt e2e test once I've validated (or given up on) the separate mkoki cloud-init approach
The docker provider currently looks up a certain path to find a user data file. We can generalize this to use it also for config disks. In mkosi the process-user-data service has a soft dependency on a mount unit that will mount a confidisk with the label "cidata". the service can then consume the userdata from the mount point. This will enable mkosi x86_64 images to work on libvirt unmodified. Signed-off-by: Magnus Kulke <[email protected]>
337136e
to
f08f4b5
Compare
FYI my test run that uses this rather than initdata is failing: https://github.com/stevenhorsman/cloud-api-adaptor/actions/runs/12071315597/job/33663455543 and it looks like pull image is going wrong. I will try and debug this locally to see if I can work out what's happening with daemon.json etc |
yes, I can see the same on azure:
|
gah, it's not consistent, sometimes the container will come up. NAME READY STATUS RESTARTS AGE
kube-relay 1/1 Running 0 9m20s
nginx-caa-66759984cb-29mdw 0/1 RunContainerError 0 2m30s
nginx-caa-66759984cb-2tc9k 0/1 CrashLoopBackOff 1 (17s ago) 2m30s
nginx-caa-66759984cb-9z9cp 1/1 Running 0 2m30s
nginx-caa-66759984cb-dxgqr 0/1 RunContainerError 0 2m30s
nginx-caa-66759984cb-kbl4t 0/1 ContainerCreating 0 2m30s
nginx-caa-66759984cb-q8mw7 1/1 Running 0 2m30s
nginx-caa-66759984cb-rt49k 0/1 CrashLoopBackOff 1 (19s ago) 2m30s
nginx-caa-66759984cb-stlnq 1/1 Running 0 2m30s
nginx-caa-66759984cb-w6chl 0/1 CrashLoopBackOff 1 (17s ago) 2m30s
nginx-caa-66759984cb-x8bml 0/1 CrashLoopBackOff 1 (18s ago) 2m30s |
Yeah, I saw a few tests that passed too. Sorry for the lack of debug info, my test VM's kcli seems to be on strike:
so I'm setting up a new test env, which means a new mkosi image build with a different ssh key, so I might not have much usefulness tonight! |
This might be user error, but when logging into the VM I'm seeing:
|
yeah, this is not pretty, but not an error, i think. it tries to measure initdata.digest as a non-criticial post-execution step, even if it's not present. I didn't invest too much into it, since attestation-agent was supposed to handle that in the near future. but we can probably do something like a path watcher that will trigger only if |
Sorry, I'm not too worried about the initdata message, just posting the full log. I think the |
oh. yes, good catch. this means that |
It does:
that's why I think it might be user error here. I'm doing a build with some debug added to pud to try and check I'm even using the correct version of code... |
if it is present then it's maybe a race condition. Can you restart the process-user-data unit to see whether it picks up the file? or compare the timestamps of the logs unit and the process-user-data unit? |
Ok, so after rebuilding everything with my dodgy debug I have some more results:
I retried I used exactly the same deployment and images for these runs, so I'm not sure why I tried a 4th and 5th time and they both works, so the failure doesn't seem "sticky" either (but might be in the CI due to name clashing or something over incomplete cleanup) |
it looks like there's a (race) condition that will prevent the |
The docker provider currently looks up a certain path to find a user data file. We can generalize this to use it also for config disks.
In mkosi the process-user-data service has a soft dependency on a mount unit that will mount a confidisk with the label "cidata". the service can then consume the userdata from the mount point.
This will enable mkosi x86_64 images to work on libvirt unmodified.