Bug 36233

Summary: maintenance shell after reboot due to fsck fail (mount date in the future)
Product: UCS Reporter: Florian Best <best>
Component: System setupAssignee: Philipp Hahn <hahn>
Status: CLOSED FIXED QA Contact: Florian Best <best>
Severity: normal    
Priority: P5 CC: gohmann, walkenhorst, wiesenthal
Version: UCS 4.0   
Target Milestone: UCS 4.0-0-errata   
Hardware: Other   
OS: Linux   
URL: http://manpages.debian.org/cgi-bin/man.cgi?query=e2fsck.conf&apropos=0&sektion=0&manpath=Debian+7.0+wheezy&format=html&locale=en
What kind of report is it?: --- What type of bug is this?: ---
Who will be affected by this bug?: --- How will those affected feel about the bug?: ---
User Pain: Enterprise Customer affected?:
School Customer affected?: ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: Bug group (optional):
Max CVSS v3 score:
Attachments: fsck fail screenshot

Description Florian Best univentionstaff 2014-10-20 13:01:14 CEST
Created attachment 6192 [details]
fsck fail screenshot

On the next reboot after an installation of a slave system the system ends up in a maintenance shell because fsck failed. fsck failed because the last mount time of the rootfs is in the future. There are different date/time set up between installation and reboot → The master had a time in the past. The slave got the date from the master while running univention-system-setup.
Comment 1 Philipp Hahn univentionstaff 2015-01-08 16:29:20 CET
For full text search:
> Checking root file system
> [....] Checking root gile system...fsck from util-linux 2.20.1
> /dev/mapper/vg_ucs-root: Superblock last mount time (Mon Oct 20 11:12:43 2014,
>         now = Fri Oct  3 13:34:53 2014) is in the future.
> 
> /dev/mapper/vg_ucs-root: UNEXPECTED INCONSISTENCY: RUN fsck MANUALLY.
>         (i.e., without -a or -p options)
> fsck dies with exit status 4
> failed (code 4)
> 
> [....] An automatic file system check (fsck) on the root filesystem failed. A manual fsck must be performed, then the system restarted. The fsck should be performed in maintenance mode with the root filesystem mounted in read-only mode. ...
> [....] The root filesystem is currently mounted in read-only mode. A maintenance shell will now be started. After performing system maintenance, press CONTROL-D to terminate the maintenance shell and restart the system. ...

Reproducer:
: > /forcefsck
date --set '2014-12-13 14:15:16+0200'
reboot

Fix:
printf '[options]\nbroken_system_clock = true\n' > /etc/e2fsck.conf
Comment 2 Philipp Hahn univentionstaff 2015-01-09 10:24:10 CET
r57212 | Bug #36233 base: ignore clock skew

Package: univention-base-files
Version: 4.0.6-1.178.201501091016
Branch: ucs_4.0-0
Scope: errata4.0-0

2014-12-15-univention-base-files.yaml
 The file system check now ignores clock skew problems, which previously required manual interaction.
r57213 | Bug #36233 base: e2fsck clock skew YAML
Comment 3 Philipp Hahn univentionstaff 2015-01-12 13:01:48 CET
(In reply to Philipp Hahn from comment #1)
> Reproducer:
> : > /forcefsck
> date --set '2014-12-13 14:15:16+0200'
hwclock --utc --systohc
> reboot
Comment 4 Florian Best univentionstaff 2015-01-12 13:22:16 CET
Fix: OK, big time differences does not end up in maintenance shell anymore.
Code: OK
YAML: OK
Comment 5 Janek Walkenhorst univentionstaff 2015-01-29 11:38:37 CET
<http://errata.univention.de/ucs/4.0/58.html>
Comment 6 Philipp Hahn univentionstaff 2017-05-02 15:29:44 CEST
*** Bug 27807 has been marked as a duplicate of this bug. ***