-
Notifications
You must be signed in to change notification settings - Fork 54
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
image: re-enable autologin for debug and console images #3355
Conversation
✅ Deploy Preview for constellation-docs canceled.
|
FYI: corrected the link to the nightly build in the PR description, it pointed to the debug one. Testing the images now. Change LGTM I think |
Unfortunately, it doesn't seem to work yet. Instead of being shown a login prompt, I just get no prompt at all, but also cannot give any input to the VM. |
27196dd
to
863d8e8
Compare
In mkosi v24 --autologin no longer works for ttyS consoles. Since the CSPs use those exclusively for their serial consoles, we need to replace this with another solution (see next commit)
863d8e8
to
cdcb6dd
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.
Thanks for fixing this, I'm going to try out the image now.
@@ -86,7 +86,6 @@ csp_settings = { | |||
}, | |||
}, | |||
"qemu": { | |||
"autologin": True, |
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 doesn't need a constellation.console
Kernel command line arg?
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.
QEMU should provide hvc0
, which mkosi enables by default now if I'm not mistaken
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.
But that alone does not grant autologin, does it?
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.
It should, but we'd need to keep the --autologin
option for that. Or what's your concern?
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.
Yes, my concern is that we can't log into QEMU images anymore if we take away the mkosi autologin and add our own based on the cmdline.
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.
I think I broke the fact that you could log into any qemu image even stable and nightly images. I'm in favor of deprecating the mkosi --autologin
for our own way. I will (try) to make this PR have the same behavior as before (i.e. enabling console for all images), though I'm not sure what the original reason was except for we can because it doesn't hurt security on qemu, but now that we have https://github.com/edgelesssys/constellation/tree/main/dev-docs/howto/bare-metal there might be a use-case to also have qemu images where one cannot log in.
image/sysroot-tree/usr/lib/systemd/system/serial-getty@ttyS0.service.d/autologin.conf
Outdated
Show resolved
Hide resolved
This replaces the mkosi --autologin solution with a getty systemd unit for ttyS0. Note that both console and debug images hace their consoles enabled.
cdcb6dd
to
a2c1419
Compare
Re-verified: |
In mkosi v24 --autologin no longer works for ttyS consoles. Since the CSPs use those exclusively for their serial consoles, we need to replace this with another solution. Since it seems the simplest, I just created the systemd unit myself and made it conditional on the kernel cmdline.
Console:
https://github.com/edgelesssys/constellation/actions/runs/10856407864https://github.com/edgelesssys/constellation/actions/runs/10874367218https://github.com/edgelesssys/constellation/actions/runs/10874697856https://github.com/edgelesssys/constellation/actions/runs/10892773346
Debug:
https://github.com/edgelesssys/constellation/actions/runs/10856416476https://github.com/edgelesssys/constellation/actions/runs/10874954823https://github.com/edgelesssys/constellation/actions/runs/10892782667
Sanity Check / nightly:
https://github.com/edgelesssys/constellation/actions/runs/10856431020https://github.com/edgelesssys/constellation/actions/runs/10874956962https://github.com/edgelesssys/constellation/actions/runs/10892766154
I have not yet tested the images, but if the console still isn't there I might have missedTested all 3 images now. Feel free to re-test.enable serial-getty@tty0.service
in20-constellation-base.preset
Just to be extra sure, I think we should add a manual serial console enabled check for the next release in the release steps. What do you think?
Checklist