Bug 1249419 - Please remove ConditionVirtualization=no from systemd-timesyncd.service
Summary: Please remove ConditionVirtualization=no from systemd-timesyncd.service
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-02 20:17 UTC by Sitsofe Wheeler
Modified: 2015-08-10 09:53 UTC (History)
7 users (show)

Fixed In Version: systemd-219-21.fc22
Clone Of:
Environment:
Last Closed: 2015-08-10 09:53:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Sitsofe Wheeler 2015-08-02 20:17:51 UTC
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 21:24:13 UTC
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 21:26:28 UTC
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 05:33:46 UTC
Thanks for telling me about systemctl edit Zbigniew!

Comment 4 Fedora Update System 2015-08-04 12:57:13 UTC
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 22:27:42 UTC
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 05:56:53 UTC
Thanks Zbigniew - this update resolves my problem.

Comment 7 Fedora Update System 2015-08-10 09:53:00 UTC
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.