Bug 734831 - systemd: timedated can't work due to ntpd.service nonexistant
Summary: systemd: timedated can't work due to ntpd.service nonexistant
Status: RESOLVED FIXED
: 737518 (view as bug list)
Alias: None
Product: openSUSE 12.1
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Final
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Frederic Crozat
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-05 12:55 UTC by Ludwig Nussel
Modified: 2012-03-14 16:44 UTC (History)
5 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ludwig Nussel 2011-12-05 12:55:41 UTC
timedated checks for "ntpd.service" and exits if it's not found.
=>
1. the init script is called 'ntp' so it needs to check for ntp.service
2. timedated won't work if ntp isn't installed at all

due to 2. it should probably only disable ntp related features instead of failing right away.
Comment 1 Frederic Crozat 2011-12-05 13:10:32 UTC
ntp package is providing ntpd :
/etc/init.d/ntp:# Provides:       ntp ntpd xntpd

and it is correctly "advertised" by systemd :

systemctl status ntpd.service shows the same output as systemctl status ntp.service
Comment 2 Ludwig Nussel 2011-12-05 13:33:55 UTC
well, then the reason is different but the effect is the same :)

# dbus-send --system --print-reply --dest=org.freedesktop.timedate1 /org/freedesktop/timedate1 org.freedesktop.timedate1.SetTimezone string:Europe/Berlin boolean:false
Error org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)

/var/log/messages says

Dec  5 14:32:33 foobar dbus[737]: [system] Successfully activated service 'org.freedesktop.timedate1'
Dec  5 14:32:33 foobar systemd-timedated[2421]: Failed to issue method call: Access denied
Dec  5 14:32:33 foobar systemd-timedated[2421]: Failed to determine whether NTP is enabled: Input/output error
Dec  5 14:32:33 foobar systemd[1]: systemd-timedated.service: main process exited, code=exited, status=1
Dec  5 14:32:33 foobar systemd[1]: Unit systemd-timedated.service entered failed state.
Comment 3 Cristian Rodríguez 2011-12-15 20:10:14 UTC
Starting the unit only if PathExists=/var/lib/ntp may help..
Comment 4 Cristian Rodríguez 2012-01-07 04:50:42 UTC
*** Bug 737518 has been marked as a duplicate of this bug. ***
Comment 5 Dr. Werner Fink 2012-01-09 13:28:21 UTC
Add also maintainer of ntp ... hi Peter ;)
Comment 6 Vincent Untz 2012-01-20 10:39:23 UTC
(In reply to comment #2)
> Dec  5 14:32:33 foobar systemd-timedated[2421]: Failed to issue method call:
> Access denied
> Dec  5 14:32:33 foobar systemd-timedated[2421]: Failed to determine whether NTP
> is enabled: Input/output error

Apparently, this is the call that fails:

        m = dbus_message_new_method_call(
                        "org.freedesktop.systemd1",
                        "/org/freedesktop/systemd1",
                        "org.freedesktop.systemd1.Manager",
                        "GetUnitFileState");

(It's called with "ntpd.service" as argument)

I also can't call that method from d-feet (in Factory).
Comment 7 Vincent Untz 2012-01-20 10:41:24 UTC
Easy way to reproduce: systemctl is-enabled ntpd.service
Comment 8 Frederic Crozat 2012-01-23 14:57:14 UTC
is-enabled bug is another issue (I've reported it upstream, will be fixed)

after discussing with upstream, GetUnitFileState will work only with .service file and not initscript (because it would imply calling chkconfig from either timedated or pid 1, which is not acceptable by upstream).

We should provide a ntp.service which would shadow ntp initscript.

I think this can only be fixed for Factory (not a good idea to do such big change for a maintenance update for 12.1).
Comment 9 Frederic Crozat 2012-03-14 16:44:30 UTC
closing for 12.1, we've released an update which doesn't enforce ntpd to use timedated.