Bug 1295553

Summary: FutureFeature: Change Offline System Updates to Reboot Once
Product: [Fedora] Fedora Reporter: Joseph D. Wagner <joe>
Component: systemdAssignee: systemd-maint
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: rawhideCC: johannbg, lnykryn, msekleta, s, systemd-maint, zbyszek
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-10 13:40:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Joseph D. Wagner 2016-01-04 20:02:24 UTC
Description of problem: I have a dual boot system with LUKS.  When it reboots, I need to babysit it.  Currently, offline system updates:
 1) Reboots into system-update.target (so that all file systems are mounted but little else is running)
 2) Performs the update.
 3) Reboots second time (in case something in the base system was changed).

See http://freedesktop.org/wiki/Software/systemd/SystemUpdates/ for a more detailed description of the current process.

Proposed Change:
Change the shutdown/reboot process as follows:
1) All daemons/services are shutdown (shutdown.target)
2) **** Perform update here. ****  <= NEW
3) File systems are unmounted (umount.target)
4) System reboot/poweroff/halt (final.target)

Notes:
1) Reboots are reduced from two to one.
2) The only services still running at that point should be the same services as now when it boots into system-update.target.  Hence, the risks should be the same.
3) The shutdown process may need to be changed to allow long-running processes in proposed step #2.  It can't kill the update process thinking that shutdown is taking too long.

Comment 1 Lennart Poettering 2016-02-10 13:40:36 UTC
Sorry, but no. We do this excercise primarily to get the system into a defined state before update, and hence we reboot first. It's kinda the whole idea of the offline update concept.