*** This bug is a duplicate of bug 1849156 ***
    https://bugs.launchpad.net/bugs/1849156

This isn't exactly the same issue as bug 1849156 (that is about ntp
condition check conflict, this is virtualbox), but it's close enough as
the cause is the same - the drop-in file simply checking for the
presence of specific executable files, instead of checking for running
process/service.

I'm duping to that bug, but if you disagree please feel free to un-dup.

** This bug has been marked a duplicate of bug 1849156
   systemd-timesyncd.service broken on upgrade to 19.10 if ntp was installed

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1854582

Title:
  systemd-timesyncd.service not starting

Status in systemd package in Ubuntu:
  New

Bug description:
  Kubuntu -19.10 (though I believe the problem also exists on prior
  versions)

  Time synchronization not working:

  ----------
  greenman@Crynfyd19.10 /lib/systemd/system$ timedatectl status
                 Local time: Sat 2019-11-30 08:21:57 PST
             Universal time: Sat 2019-11-30 16:21:57 UTC
                   RTC time: Sat 2019-11-30 16:21:57
                  Time zone: America/Los_Angeles (PST, -0800)
  System clock synchronized: no
                NTP service: inactive
            RTC in local TZ: no

  greenman@Crynfyd19.10 /lib/systemd/system$ sudo systemctl status 
systemd-timesyncd.service
  ● systemd-timesyncd.service - Network Time Synchronization
     Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; 
vendor preset: enabled)
    Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
             └─disable-with-time-daemon.conf
     Active: inactive (dead) since Sat 2019-11-30 08:21:28 PST; 2min 0s ago
  Condition: start condition failed at Sat 2019-11-30 08:23:15 PST; 12s ago
             └─ ConditionFileIsExecutable=!/usr/sbin/VBoxService was not met
       Docs: man:systemd-timesyncd.service(8)
   Main PID: 813 (code=exited, status=0/SUCCESS)
     Status: "Shutting down..."

  Nov 30 07:29:50 Crynfyd systemd[1]: Starting Network Time Synchronization...
  Nov 30 07:29:51 Crynfyd systemd[1]: Started Network Time Synchronization.
  Nov 30 07:30:21 Crynfyd systemd-timesyncd[813]: Synchronized to time server 
for the first time 91.189.
  Nov 30 08:21:28 Crynfyd systemd[1]: Stopping Network Time Synchronization...
  Nov 30 08:21:28 Crynfyd systemd[1]: systemd-timesyncd.service: Succeeded.
  Nov 30 08:21:28 Crynfyd systemd[1]: Stopped Network Time Synchronization.
  Nov 30 08:23:15 Crynfyd systemd[1]: Condition check resulted in Network Time 
Synchronization being ski

  ----------

  The problem has to do with the file 
  /lib/systemd/system/systemd-timesyncd.service.d/disable-with-time-daemon.conf;

  ----------
  greenman@Crynfyd19.10 /lib/systemd/system/systemd-timesyncd.service.d$ cat 
disable-with-time-daemon.conf
  [Unit]
  # don't run timesyncd if we have another NTP daemon installed
  ConditionFileIsExecutable=!/usr/sbin/ntpd
  ConditionFileIsExecutable=!/usr/sbin/openntpd
  ConditionFileIsExecutable=!/usr/sbin/chronyd
  ConditionFileIsExecutable=!/usr/sbin/VBoxService
  ----------

  I do have virtualbox installed, but not running, so VBoxService is not 
running.
  This means that although the binary is there, it is not providing time sync 
services, so the system is not time syncing.  If I remove the line 
"ConditionFileIsExecutable=!/usr/sbin/VBoxService" from the file and restart, 
all is well:

  ----------
  greenman@Crynfyd19.10 /lib/systemd/system/systemd-timesyncd.service.d$ sudo 
systemctl daemon-reload
  greenman@Crynfyd19.10 /lib/systemd/system/systemd-timesyncd.service.d$ sudo 
systemctl restart systemd-timesyncd.service
  greenman@Crynfyd19.10 /lib/systemd/system/systemd-timesyncd.service.d$ 
timedatectl status
                 Local time: Sat 2019-11-30 08:29:43 PST
             Universal time: Sat 2019-11-30 16:29:43 UTC
                   RTC time: Sat 2019-11-30 16:29:43
                  Time zone: America/Los_Angeles (PST, -0800)
  System clock synchronized: yes
                NTP service: active
            RTC in local TZ: no
  ----------

  So instead of testing just for the existence of the binary, which is
  resulting in no time sync service, what it probably should do is check
  for a running process, and allow the service to start if no other time
  syncing service is running.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1854582/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to