[Bug 1771080] Re: gpsd should start after chrony if they are being used together

Mark Shuttleworth 1771080 at bugs.launchpad.net
Thu May 17 06:17:50 UTC 2018


On 05/17/2018 06:52 AM,  Christian Ehrhardt  wrote:
> GPSD calls systemd helpers for the service which will end up in *inst maintainer scripts.
> in d/rules are:
>   dh_systemd_enable -pgpsd                                                     
>   dh_installinit                                                               
>   dh_systemd_start -pgpsd --restart-after-upgrade
> That sequence should make it available and started after install in all cases.

On various systems that I have tried, simply installing gpsd does not
cause it to run on boot, you need to connect to the socket before gpsd
is actually started. That makes it unhelpful for chrony because it needs
to start automatically on boot. The unit files correctly handle the
sequencing (gpsd after chrony) but I needed to add a symlink for
multi-user.target in order to get gpsd running on boot without having
something to connect to the socket. chrony doesn't connect to the
socket, chrony makes it's own different socket that gpsd detects and
writes to, independently of the gpsd socket.

The odd thing is that one of my systems already had the multi-user
target, which is why THAT system had gpsd running on boot. I have
nothing in my command history there showing me creating it. This machine
is an older machine that has been upgraded since at least Xenial,
possibly even pre-Xenial, so it may be that an older gpsd package did
something.

The only surprise is needing to manually create the multi-user.target
dependency for use with chrony. Ideally, the gpsd packaging would detect
cases where chrony is offering it's special socket, and gpsd would be
activated accordingly, but I can't think of an obvious way to depend on
the existence of a file matching a particular filename schema
('/var/run/chrony.ttyXXX.sock'). If systemd does support that sort of
funky file-exists dependency, then we could try adding that.

Mark

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gpsd in Ubuntu.
https://bugs.launchpad.net/bugs/1771080

Title:
  gpsd should start after chrony if they are being used together

Status in chrony package in Ubuntu:
  Invalid
Status in gpsd package in Ubuntu:
  Invalid

Bug description:
  When using GPSD to provide a time signal over a socket to chrony, it
  is necessary to start gpsd after chrony (I think this is so that gpsd
  finds the /var/run/chrony.ttySX.sock file when it launches). gpsd
  tends to want to drop privileges quickly which makes it hard for it to
  find this file later, aiui.

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



More information about the foundations-bugs mailing list