pkg issue after FreeBSD 11 upgrade

Matthew Seaman matthew at FreeBSD.org
Fri Aug 11 08:10:04 UTC 2017


On 10/08/2017 22:05, Cassiano Peixoto wrote:
> I ran into an issue after FreeBSD 11 upgrade. I have some meta ports that
> starts services like slapd.
> 
> Its has been working fine on 10-STABLE. But after FreeBSD
> 11-STABLE r321625M upgrade it stopped working.
> 
> Here is a simple example of my pkg-install.in script:
> 
> #!/bin/sh
> /usr/local/etc/rc.d/slapd stop
> /usr/local/etc/rc.d/slapd start
> 
> I can see its executing while upgrading a package:
> 
> Stopping slapd.
> Waiting for PIDS: 13875.
> Starting slapd.
> 
> But looking if the process is running, it's not:
> 
> # ps ax | grep slapd
> 14164  0  S+     0:00.00 grep slapd
> 
> Then I manually run the rc.d script and the service starts:
> 
> # /usr/local/etc/rc.d/slapd restart
> slapd not running? (check /var/run/openldap/slapd.pid).
> Starting slapd.
> 
> So my question is: something has changed on FreeBSD 11 not allowing this
> kind of execution?
> 
> BTW, I'm using pkg 1.10.1 and my ports collection is as same as I was using
> on FreeBSD 10.

Restarting daemons after upgrading is something the project has been
quite resistant to implementing.  Mostly because as soon as you start
looking into it in any depth the true complexity of doing that sort of
thing reliably for any conceivable system becomes apparent and you end
up muttering darkly about systemd and losing the will to live.

However, yes, restarting slapd -- it's clear that your script does get
called, but slapd fails to start at that point during the upgrade
process.  slapd is well known (at least to me) for failing to start
/silently/ -- you need to check the process is actually there after
trying to start it, and look at the logfiles and so forth.  It also
seems to quit at the slightest provocation, presumably to avoid any
potential for data corruption.

So check you logs to see why slapd didn't start.  It's quite possible
that it was simply that something else that slapd needed wasn't
available at that exact point during the upgrade process, and just
waiting until the upgrade had finished would sort things out.

	Cheers,

	Matthew

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20170811/b4f086c8/attachment.sig>


More information about the freebsd-ports mailing list