Bug 44290 - sa-compile fails if time is not synchronized, for example in KVM after suspend-to-disk
sa-compile fails if time is not synchronized, for example in KVM after suspen...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Spamassassin
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.3
Assigned To: Sönke Schwardt-Krummrich
Stefan Gohmann
: interim-4
: 46562 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-04 16:57 CEST by Philipp Hahn
Modified: 2018-03-14 14:37 CET (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 7: Crash: Bug causes crash or data loss
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.160
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

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2017-04-04 16:57:06 CEST
If the time of a virtual machine is way behind and the package "sa-compile" is updated, it tries to compile a new rule set using "make": if the time of the host is not synchronized to wall-clock time, it fails or get stuck in an endless loop:

>sa-compile (3.4.0-6) wird eingerichtet ...
>Running sa-compile (may take a long time)
>make: Warning: File '/usr/lib/x86_64-linux-gnu/perl/5.20/Config.pm' has modification time 5294396 s in the future
>make: *** [Makefile] Error 1
>command 'make >>/tmp/.spamassassin16826NwEno2tmp/log' failed: exit 2
>dpkg: Fehler beim Bearbeiten des Paketes sa-compile (--configure):
> Unterprozess installiertes post-installation-Skript gab den Fehlerwert 25 zurück

If this happens during the upgrade, the upgrade aborts with an exit status <>0
Comment 1 Philipp Hahn univentionstaff 2018-03-09 09:47:26 CET
*** Bug 46562 has been marked as a duplicate of this bug. ***
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2018-03-09 11:35:52 CET
(In reply to Stefan Gohmann from bug 46562 comment #1)
> Maybe we should abort the upgrade in preup.sh if the time is before 2018-03-01?

As discussed, I implemented a short check in preup.sh to see if the system date is at least 2018.

---[cut]---
WARNING: The system date (2018-03-09) does not seem to be correct.
         Please set a current system time before the update, otherwise the
         update will fail if Spamassassin is installed.
         
         This check can be disabled by setting the UCR variable
         update43/ignore_system_date to yes.
---[cut]---

Package: univention-updater
Version: 13.0.1-33A~4.3.0.201803091023
Branch: ucs_4.3-0

univention-updater (13.0.1-33)
70124b03b9bf | Bug #44290: check in preup.sh if system date is up to date
Comment 3 Stefan Gohmann univentionstaff 2018-03-09 14:01:40 CET
Test with an old date: OK (aborts)

Test with an old date and update43/ignore_system_date=yes: OK

Test with current date: OK

I've added the bug number to an existing entry:

[4.3-0 5f78765f3c] Added Bug #44290 to changelog
Comment 4 Stefan Gohmann univentionstaff 2018-03-14 14:37:42 CET
UCS 4.3 has been released:
 https://docs.software-univention.de/release-notes-4.3-0-en.html
 https://docs.software-univention.de/release-notes-4.3-0-de.html

If this error occurs again, please use "Clone This Bug".