Bug 1249419 - Please remove ConditionVirtualization=no from systemd-timesyncd.service
Please remove ConditionVirtualization=no from systemd-timesyncd.service
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-02 16:17 EDT by Sitsofe Wheeler
Modified: 2015-08-10 05:53 EDT (History)
7 users (show)

See Also:
Fixed In Version: systemd-219-21.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-10 05:53:00 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sitsofe Wheeler 2015-08-02 16:17:51 EDT
Description of problem:
systemd-timesyncd can't be used to synchronise a guest VM's clock.

Version-Release number of selected component (if applicable):
systemd-219-20.fc22.x86_64

How reproducible:
Reproducible every time.

Steps to Reproduce:
1. grep ConditionVirtualization /usr/lib/systemd/system/systemd-timesyncd.service

Actual results:
ConditionVirtualization=no

Expected results:
(nothing)

Additional info:
Sadly you can't dictate that time synchronisation should not run just because the OS is running on virtualisation. It's true that the clock might be being synced some other way but you simply can't know and some guides will tell you to use NTP synchronisation in preference to hypervisor specific tools:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006427
https://lkml.org/lkml/2014/9/26/64

Always disabling it takes away the user's choice and leaves people baffled as to why things aren't working. I've got to admit that it would be useful if systemd logged when it abandoned a service due to failing a condition (e.g. "Not starting Time synchronisation because virtualisation=microsoft" etc).
Comment 1 Sitsofe Wheeler 2015-08-02 17:24:13 EDT
This looks like it's going to be made specific to containers in later systemd releases: https://github.com/systemd/systemd/commit/4b16233e59b3edd8338819dad275cc94b5e5f6e7 .
Comment 2 Zbigniew Jędrzejewski-Szmek 2015-08-02 17:26:28 EDT
OK, will backport the patch.

Note that you can always override the setting by using 'systemctl edit systemd-timesyncd' and adding '[Unit] ConditionVirtualization='.
Comment 3 Sitsofe Wheeler 2015-08-03 01:33:46 EDT
Thanks for telling me about systemctl edit Zbigniew!
Comment 4 Fedora Update System 2015-08-04 08:57:13 EDT
systemd-219-21.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/systemd-219-21.fc22
Comment 5 Fedora Update System 2015-08-05 18:27:42 EDT
Package systemd-219-21.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-219-21.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-12802/systemd-219-21.fc22
then log in and leave karma (feedback).
Comment 6 Sitsofe Wheeler 2015-08-07 01:56:53 EDT
Thanks Zbigniew - this update resolves my problem.
Comment 7 Fedora Update System 2015-08-10 05:53:00 EDT
systemd-219-21.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.