Skip to content
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

manifest: wait for user input before rebooting when creating a bootc installer #714

Merged
merged 2 commits into from
Sep 6, 2024

Conversation

mvo5
Copy link
Contributor

@mvo5 mvo5 commented May 27, 2024

In issue #230 it was raised that it is undesirable to automatically reboot when the install is finished. So instead halt the install and show a message to the user.

This is a draft because it changes the existing behavior so users who rely on the auto-reboot (like our tests) will fail [0] - but if everyone is happy and we consider the old behavior a bug I will undraft it.

Closes: osbuild/bootc-image-builder#230

[0] We can fix this via https://github.com/osbuild/bootc-image-builder/compare/main...mvo5:handle-halt-instead-of-reboot?expand=1

@mvo5 mvo5 requested review from ondrejbudai and cgwalters May 27, 2024 16:10
@bcl
Copy link
Contributor

bcl commented May 28, 2024

I'm not sure of the exact setup where this is expected to be used, but in my experience you do want it to reboot when it is finished installing. In those cases you set things up so that the installer iso is booted once and on reboot it uses the disk that was just installed.

@achilleas-k
Copy link
Member

The issue could also be solved by putting the choice on the user: osbuild/bootc-image-builder#438

We could expose the unattended option in BIB too, which I would argue should imply reboot, and exposing all the options will let users stick to fully interactive or add their own full kickstart file to do whatever they want.

@cdrage
Copy link

cdrage commented Jun 4, 2024

Silly question, since this will wait for user input, is there a message that will say "free to remove removable media" or something like that, so that you can easily remove the USB stick / press continue?

I'm assuming you would remove whatever you have plugged in, hit next and now you have your OS.

@mvo5
Copy link
Contributor Author

mvo5 commented Jun 4, 2024

Silly question, since this will wait for user input, is there a message that will say "free to remove removable media" or something like that, so that you can easily remove the USB stick / press continue?

I'm assuming you would remove whatever you have plugged in, hit next and now you have your OS.

This is what it looks like:
Screenshot from 2024-06-04 19-08-15

@bcl
Copy link
Contributor

bcl commented Jun 4, 2024

Pulling the plug without a proper shutdown isn't safe. Anaconda keeps the target disk mounted until it shuts down or reboots.

Copy link

github-actions bot commented Jul 5, 2024

This PR is stale because it has been open 30 days with no activity. Remove "Stale" label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jul 5, 2024
@achilleas-k
Copy link
Member

What's the decision here? Do we still want this?

@achilleas-k achilleas-k removed the Stale label Jul 5, 2024
mvo5 added 2 commits August 1, 2024 16:18
In issue osbuild#230 it was raised that it is undesirable to automatically
reboot when the install is finished. So instead halt the install
and show a message to the user.

Closes: osbuild/bootc-image-builder#230
Out automatic tests need a way to know when the install is finished.
Before we could just trigger on a qmp:REBOOT event but with this
change the installer will wait for user input before doing a reboot.
Ejecting the cdrom tray is also done after the user confirmation
so triggering on qmp:DEVICE_TRAY_MOVED is also not an option.

Go the conservative route and just output on the serial port. This
has the added benefit that users on the serial port also get an
indication when the install is done.
Copy link

github-actions bot commented Sep 1, 2024

This PR is stale because it has been open 30 days with no activity. Remove "Stale" label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Sep 1, 2024
@mvo5 mvo5 removed the Stale label Sep 2, 2024
@achilleas-k achilleas-k added this pull request to the merge queue Sep 6, 2024
mvo5 added a commit to mvo5/bootc-image-builder that referenced this pull request Sep 6, 2024
This commit adds a new wait `event:serial-output` event to the
QEMU vm class and uses it in the `test_iso_installs` test to
accommodate the change to the ISO installer [0] that it no longer
automatically reboots but waits for the user to interact with
the system.

[0] osbuild/images#714
mvo5 added a commit to mvo5/bootc-image-builder that referenced this pull request Sep 6, 2024
This commit adds a new wait `event:serial-output` event to the
QEMU vm class and uses it in the `test_iso_installs` test to
accommodate the change to the ISO installer [0] that it no longer
automatically reboots but waits for the user to interact with
the system.

[0] osbuild/images#714
Merged via the queue into osbuild:main with commit bc26593 Sep 6, 2024
18 checks passed
mvo5 added a commit to mvo5/bootc-image-builder that referenced this pull request Sep 6, 2024
mvo5 added a commit to mvo5/bootc-image-builder that referenced this pull request Sep 6, 2024
This commit adds a new wait `event:serial-output` event to the
QEMU vm class and uses it in the `test_iso_installs` test to
accommodate the change to the ISO installer [0] that it no longer
automatically reboots but waits for the user to interact with
the system.

[0] osbuild/images#714
mvo5 added a commit to mvo5/bootc-image-builder that referenced this pull request Sep 6, 2024
This commit adds a new wait `event:serial-output` event to the
QEMU vm class and uses it in the `test_iso_installs` test to
accommodate the change to the ISO installer [0] that it no longer
automatically reboots but waits for the user to interact with
the system.

[0] osbuild/images#714
mvo5 added a commit to mvo5/images that referenced this pull request Sep 6, 2024
Small followup for osbuild#714 - to add an extra level of safety call
"sync" before signaling that the install is finished.
mvo5 added a commit to mvo5/bootc-image-builder that referenced this pull request Sep 6, 2024
This commit adds a new wait `event:serial-output` event to the
QEMU vm class and uses it in the `test_iso_installs` test to
accommodate the change to the ISO installer [0] that it no longer
automatically reboots but waits for the user to interact with
the system.

[0] osbuild/images#714
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.

Unattended ISO should not auto-reboot
5 participants