On Tue, Nov 14, 2017 at 11:27:03AM +0000, Stuart Henderson wrote:
> On 2017/11/14 11:18, Dimitris Papastamos wrote:
> > On Tue, Nov 14, 2017 at 11:15:48AM +0000, Stuart Henderson wrote:
> > > On 2017/11/14 11:05, Dimitris Papastamos wrote:
> > > > Hi,
> > > >
> > > > Since I've upgraded to 6.2 gitdaemon's pid file is no longer
> > > > generated. This was working as expected on 6.1.
> > > >
> > > > /etc/rc.conf.local
> > > >
> > > > ntpd_flags=-s
> > > > httpd_flags=
> > > > slowcgi_flags=
> > > > unbound_flags=
> > > > bgpd_flags=
> > > > ospfd_flags=
> > > >
> > > > gitdaemon_flags="--syslog --base-path=/home/git"
> > > > gitdaemon_user="_gitdaemon"
> > > > tincd_flags="-U _tinc --chroot -n 2f30"
> > > > pkg_scripts="tincd gitdaemon"
> > > >
> > > > # /etc/rc.d/gitdaemon start
> > > > gitdaemon(ok)
> > > >
> > > > # rcctl ls failed
> > > > gitdaemon
> > > >
> > > > # ps aux | grep git-daemon
> > > > _gitdaem 2294 0.0 0.0 1484 1472 ?? Is 11:00AM 0:00.01
> > > > /usr/local/libexec/git/git-daemon --detach --syslog
> > > > --base-path=/home/git
> > > > root 87449 0.0 0.0 132 352 p3 R+/6 11:04AM 0:00.00 grep
> > > > git-daemon
> > > >
> > > > # ls /var/run/git*
> > > > ls: /var/run/git*: No such file or directory
> > > > #
> > > >
> > >
> > > Looking at git-daemon's code, it only writes the file if --pid-file is
> > > given on the command line. I don't see any changes in this regard, I don't
> > > see any reason for the version that was in 6.1 to write a pid file either.
> > >
> > > This doesn't have anything to do with rcctl though. rcctl doesn't use
> > > pid files.
> >
> > Ah I see, I have incorrectly assumed the two are related. In any case,
> > I think rcctl ls failed didn't not flag gitdaemon as failed in 6.1. This
> > is my recollection, I could be wrong though.
>
> Perhaps something changed in git-daemon that caused it to start having
> a full path in the ps listing. This would fix that, but I don't know if
> there are any circumstances where it _wouldn't_ have the full path that
> this might then break. For that, it would be helpful to know where/when
> this changed in git.
Thing is, I already tried to modify /etc/rc.d/gitdaemon before I sent
the email just with a full path and it didn't work.
$ daemon_flags="--syslog --base-path=/home/git"
$ pexp="/usr/local/libexec/git/git-daemon --detach${daemon_flags:+
${daemon_flags}}"
$ echo $pexp
/usr/local/libexec/git/git-daemon --detach --syslog --base-path=/home/git
$ pgrep -q -xf "${pexp}"; echo $?
0
So far so good.
$ rcctl ls failed
gitdaemon
Maybe pexp is not propagated correctly?