LWN.net Logo

The road forward for systemd

The road forward for systemd

Posted May 27, 2010 0:05 UTC (Thu) by neilbrown (subscriber, #359)
In reply to: The road forward for systemd by clugstj
Parent article: The road forward for systemd

> Not everything that runs is accessed as a network service. What about "ntpd"?

ntpd is an interesting one. We cannot really make "gettimeofday" block until ntpd has affirmed that the system time is correct.

Most programs probably don't care if the system time is still just based on the cmos clock, or whether it has been synchronised to the Internet or to GPS or whatever yet. Maybe programs that do care need to check with e.g.

ntpdc -np | awk '$0 ~ /^*/ { print $7}'

rather than just assuming that they were started after 'ntpdate' had run...

I suspect there might be other similar hidden assumptions that need to be found out.


(Log in to post comments)

The road forward for systemd

Posted May 27, 2010 11:39 UTC (Thu) by Trelane (subscriber, #56877) [Link]

"We cannot really make "gettimeofday" block until ntpd has affirmed that the system time is correct."

Yes, especially since many computers (e.g. laptops) aren't always on the network!

The road forward for systemd

Posted May 27, 2010 13:27 UTC (Thu) by marcH (subscriber, #57642) [Link]

> ntpd is an interesting one.

I understand that ntpd is different. I do not yet see how it is interesting.

ntpd is different because it has to be always started whatever happens elsewhere. Surely systemd also caters for such "no-deps", no-brainer cases.

> We cannot really make "gettimeofday" block until ntpd has affirmed that the system time is correct.

And "we" never did, and systemd does not plan to (or does it?!)

So what difference could systemd make with respect to ntpd?

The road forward for systemd

Posted May 27, 2010 21:34 UTC (Thu) by neilbrown (subscriber, #359) [Link]

It is conceivable that someone might want to ensure that ntpdate runs to set the system time correctly before any NFS filesystems are mounted. Running 'make' across NFS can cause issues of times are not reasonably synchronised.

It is not clear to me that systemd allows you to specify this dependency as NFS mounts would all be done on-demand.

Whether or not this is a real issue I cannot say, but I think that from a theoretical standpoint it is at least interesting in that there could be a dependency between an on-demand service, and a service which cannot be demanded (if that makes sense).

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds