From owner-freebsd-ports@freebsd.org Fri Aug 11 08:10:04 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36643DCA220 for ; Fri, 11 Aug 2017 08:10:04 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.117.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B760565F5F for ; Fri, 11 Aug 2017 08:10:03 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from liminal.local (unknown [IPv6:2001:8b0:151:1:1c1d:86a1:a200:b700]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 4566310B1 for ; Fri, 11 Aug 2017 08:10:00 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=FreeBSD.org Authentication-Results: smtp.infracaninophile.co.uk/4566310B1; dkim=none; dkim-atps=neutral Subject: Re: pkg issue after FreeBSD 11 upgrade To: freebsd-ports@freebsd.org References: From: Matthew Seaman Message-ID: <4c16c960-3b4a-75ab-41ed-51c8109b940a@FreeBSD.org> Date: Fri, 11 Aug 2017 09:09:59 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="9jSF9w5bpp8JT7x2j4JHpE7A8kbPHx6XI" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Aug 2017 08:10:04 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --9jSF9w5bpp8JT7x2j4JHpE7A8kbPHx6XI Content-Type: multipart/mixed; boundary="un3s2IolILiwJEK1kGkDPn7lv7qeATwJc"; protected-headers="v1" From: Matthew Seaman To: freebsd-ports@freebsd.org Message-ID: <4c16c960-3b4a-75ab-41ed-51c8109b940a@FreeBSD.org> Subject: Re: pkg issue after FreeBSD 11 upgrade References: In-Reply-To: --un3s2IolILiwJEK1kGkDPn7lv7qeATwJc Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable On 10/08/2017 22:05, Cassiano Peixoto wrote: > I ran into an issue after FreeBSD 11 upgrade. I have some meta ports th= at > starts services like slapd. >=20 > Its has been working fine on 10-STABLE. But after FreeBSD > 11-STABLE r321625M upgrade it stopped working. >=20 > Here is a simple example of my pkg-install.in script: >=20 > #!/bin/sh > /usr/local/etc/rc.d/slapd stop > /usr/local/etc/rc.d/slapd start >=20 > I can see its executing while upgrading a package: >=20 > Stopping slapd. > Waiting for PIDS: 13875. > Starting slapd. >=20 > But looking if the process is running, it's not: >=20 > # ps ax | grep slapd > 14164 0 S+ 0:00.00 grep slapd >=20 > Then I manually run the rc.d script and the service starts: >=20 > # /usr/local/etc/rc.d/slapd restart > slapd not running? (check /var/run/openldap/slapd.pid). > Starting slapd. >=20 > So my question is: something has changed on FreeBSD 11 not allowing thi= s > kind of execution? >=20 > BTW, I'm using pkg 1.10.1 and my ports collection is as same as I was u= sing > 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 --un3s2IolILiwJEK1kGkDPn7lv7qeATwJc-- --9jSF9w5bpp8JT7x2j4JHpE7A8kbPHx6XI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQJ8BAEBCgBmBQJZjWZYXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkAT0KkP/1O0jtg8MhyRD6LRFeYNfods G1YVYcZndXPRD5eNBed+I+z4oisAEDOUuvTFinfiooHKluZWmimbz6it+z9uxsU5 n7xKLo9quRnS37wey3R9ffA8wLVJ8ISNANOtLYWTO9P6US/9PmyhueFuCRS4wS0S 0LxalvMFZsDRhDY+BNUreDTdjgezD7zNiyS6GLY+idGV4EecloeAvk72ovPdugRS VdKyedkJ2iJJQ0c/tCbXu3O/+VUKnqQlEvAJiNFaaVCYNI1CrlzH7ZN3Ju8tOdFN eD9/xUxMkuW/nmC654CWqQFP3Zlf6BzeDrr3mi+VOpDDbnf6qx+tl8WLH+YABenI jeV/G1RDCLOYcodsZLLaKzKx2N3yUG7T2OmDH+g+Rto3uvkwMFiCOGioSzVsDCvV d+/nygGEEtX8FuFRK8D9PGkMGxazrH61W7Lny9j1MN8/jlOV4xcDyUIkOi80oUvm vOPRHWhIyhQbCQNMebto2xM3ZtqHAc0FuGghvdObbcjDR62FONYnSDBxvI10n6OW WLCU0bLu4MytCz2hrQFXX+hpXwr/H88aZwVEzx4Pq10w7dfTtaw8Fn7sOb4ZcKYn R6LVbUGmRBGy4EjUw1yGwFOoxbPD/K87+waKsfFFEkmIqk+0+Rs79Ze9Vvtuf6dr i2rIsqGMDiG43izFv39i =CRML -----END PGP SIGNATURE----- --9jSF9w5bpp8JT7x2j4JHpE7A8kbPHx6XI--