|
|
b4e205f |
From 574984d5f86ee32b41ee591da49a0745335053fd Mon Sep 17 00:00:00 2001
|
|
|
b4e205f |
From: Kay Sievers <kay@vrfy.org>
|
|
|
b4e205f |
Date: Sun, 15 Mar 2015 19:44:59 +0100
|
|
|
b4e205f |
Subject: [PATCH] timesyncd: enable timesyncd in virtual machines
|
|
|
b4e205f |
|
|
|
b4e205f |
On Fri, Mar 13, 2015 at 8:25 PM, Michael Marineau <michael.marineau@coreos.com> wrote:
|
|
|
b4e205f |
> Currently systemd-timesyncd.service includes
|
|
|
b4e205f |
> ConditionVirtualization=no, disabling it in both containers and
|
|
|
b4e205f |
> virtual machines. Each VM platform tends to deal with or ignore the
|
|
|
b4e205f |
> time problem in their own special ways, KVM/QEMU has the kernel time
|
|
|
b4e205f |
> source kvm-clock, Xen has had different schemes over the years, VMware
|
|
|
b4e205f |
> expects a userspace daemon sync the clock, and other platforms are
|
|
|
b4e205f |
> content to drift with the wind as far as I can tell.
|
|
|
b4e205f |
>
|
|
|
b4e205f |
> I don't know of a robust way to know if a platform needs a little
|
|
|
b4e205f |
> extra help from userspace to keep the clock sane or not but it seems
|
|
|
b4e205f |
> generally safer to try than to risk drifting. Does anyone know of a
|
|
|
b4e205f |
> reason to leave timesyncd off by default? Otherwise switching to
|
|
|
b4e205f |
> ConditionVirtualization=!container should be reasonable.
|
|
|
b4e205f |
|
|
|
b4e205f |
(cherry picked from commit 4b16233e59b3edd8338819dad275cc94b5e5f6e7)
|
|
|
b4e205f |
---
|
|
|
b4e205f |
units/systemd-timesyncd.service.in | 2 +-
|
|
|
b4e205f |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
b4e205f |
|
|
|
b4e205f |
diff --git a/units/systemd-timesyncd.service.in b/units/systemd-timesyncd.service.in
|
|
|
b4e205f |
index 39edafc8d2..8219c95a08 100644
|
|
|
b4e205f |
--- a/units/systemd-timesyncd.service.in
|
|
|
b4e205f |
+++ b/units/systemd-timesyncd.service.in
|
|
|
b4e205f |
@@ -9,7 +9,7 @@
|
|
|
b4e205f |
Description=Network Time Synchronization
|
|
|
b4e205f |
Documentation=man:systemd-timesyncd.service(8)
|
|
|
b4e205f |
ConditionCapability=CAP_SYS_TIME
|
|
|
b4e205f |
-ConditionVirtualization=no
|
|
|
b4e205f |
+ConditionVirtualization=!container
|
|
|
b4e205f |
DefaultDependencies=no
|
|
|
b4e205f |
RequiresMountsFor=/var/lib/systemd/clock
|
|
|
b4e205f |
After=systemd-remount-fs.service systemd-tmpfiles-setup.service systemd-sysusers.service
|