14.2. Initiating a soft reboot
You can detect and prepare the system for a soft reboot when the system administrator runs bootc upgrade, bootc switch, or bootc rollback by using one of the two options:
-
--soft-reboot=auto: It automatically prepares the system if soft-reboot is possible and will not error out if the system is not capable of soft-reboot. -
--soft-reboot=required: Automatically prepares the system if soft reboot is possible, but it errors out if the system is not capable of a soft reboot.
These options enable you to manage when the limited downtime is required by stopping an --apply operation or informing you not to call reboot as bootc has not exited cleanly.
Prerequisites
- You have information about the current status of the system.
Procedure
Perform an update, switch, or rollback operation by using the
bootctool to stage the new container image. Otherwise, the soft re-executes the current userspace.$ sudo bootc update --soft-reboot=required --applyInitiate a soft reboot, for example, while running bootc switch:
$ sudo bootc switch --soft-reboot=required --apply quay.io/test_rh/soft-reboot:1
Verification
Verify the soft reboot is completed:
$ systemctl show --value --property SoftRebootsCount 1Check the new
soft reboot:yesflag:$ sudo bootc status --verbose