From nobody Thu Jan 13 18:29:32 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F127A1953169 for ; Thu, 13 Jan 2022 18:29:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JZXyh3Hbgz3KwC for ; Thu, 13 Jan 2022 18:29:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3F3CC252E3 for ; Thu, 13 Jan 2022 18:29:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 20DITWa9041878 for ; Thu, 13 Jan 2022 18:29:32 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 20DITWHC041877 for bugs@FreeBSD.org; Thu, 13 Jan 2022 18:29:32 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 256137] service(8) "service -R" restarts local daemons in wrong order. Date: Thu, 13 Jan 2022 18:29:32 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: mike.543@cd74.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642098572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+hwgisoK8sAs0+NEBjuhpR99EWHdde6W/hEY2+RJHFg=; b=V7o35yaW0qY9fIWgb+Ydrx30mJX14whU3XSA4NH8qd2fdwfXy97qjUgg1Ymo202+JEEZRm MqeA40xG+lgh5UqCfVOPQXZGwFekcjThExFCn/Kh/viI1xbWO1Yfg28HL5kyXlMrrDrSy9 Td+B5Lr9DBoPoGcJa3+sMYCobTlg/s2fWxOqxA/nBzjPTnpH5bKZcJhM4NjIhJtYct9rsU tnaIPn+SyDplPxAAoo/FntOcF06nrByJdbOyR4fRJq1o3uXBFNF4bx2e2xYxSb483jfWk+ EuZGQb5AdZBH86+TJPqs2C3WtFsrznIL/csVJHH4+NvW0V0JEghjmNGRxnqMTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642098572; a=rsa-sha256; cv=none; b=nmpJAa4uEKCV9nSZxduY1aV5xe5JZxVZmNVAFa115bMgkbBc50smRiNAO4N1UlarTL0uVB JhQ+36oor1i4l6dAIbeJoSBawJrLU3/tu/cYI9qsQDv5MDwNt9wdh8Sy6kwP8cOxriGSoA 3ifuqOF0pkikcVRE5+SW+S7o7I3HDmY3QBtKhAJrzAUhlht2CTgFBmI1PCRIN2yBBJ4GV0 duYadFLHeo/YJZHh7kA05aJLgv7LmWjlov36ENUXpsRUwmJ6Wu4lcKPN700g3n0/t7B4XJ 16Tif/WKDvWucEac2GjkluUT+Q64NNbxDsTZXskrPrLCQgMSe99QC2quYrSXSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D256137 --- Comment #2 from MikeM --- Some of the detail from the thread in the FreeBSD forum I cited... =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D I notice that the start order of services is different in service -R than either service -r or rcorder /etc/rc.d/* /usr/local/etc/rc.d/*. Some details... Note that lines containing services that don't matter in th= is comparison were replaced by {...} to keep things short. rcorder /etc/rc.d/* /usr/local/etc/rc.d/* Code: {...} /etc/rc.d/FILESYSTEMS {...} /usr/local/etc/rc.d/unbound /etc/rc.d/local_unbound /etc/rc.d/NETWORKING {...} /usr/local/etc/rc.d/nginx /usr/local/etc/rc.d/php-fpm {...} service -r Code: {...} /etc/rc.d/FILESYSTEMS {...} /usr/local/etc/rc.d/unbound /etc/rc.d/local_unbound /etc/rc.d/NETWORKING {...} /usr/local/etc/rc.d/nginx {...} /usr/local/etc/rc.d/php-fpm {...} service -R Code: Stopping nsd. Stopping openntpd. Stopping php_fpm. Waiting for PIDS: 86331. {...} Stopping unbound. Stopping nginx. Performing sanity check on nginx configuration: nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder "stg-e1.o.lencr.org" in the certificate "/usr/local/etc/certs/public/www.example.com.crt" nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful Starting nginx. nginx: [warn] "ssl_stapling" ignored, host not found in OCSP responder "stg-e1.o.lencr.org" in the certificate "/usr/local/etc/certs/public/www.example..com.crt" Obtaining a trust anchor... Starting unbound. {...} Starting php_fpm. {...} Notice that in service -R, and only service -R, unbound is started after ng= inx. So I guess my question becomes, why doesn't service -R follow the restart o= rder that service -r and rcorder show? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D -------------------------- or correct? operation it needs this patch Code: --- /usr/sbin/service 2021-04-09 09:25:01.000000000 +0300 +++ /tmp/service 2022-01-06 14:16:29.217498000 +0200 @@ -85,9 +85,10 @@ skip=3D"$skip -s nojail" fi [ -n "$local_startup" ] && find_local_scripts_new - files=3D`rcorder ${skip} ${local_rc} 2>/dev/null` + files=3D`rcorder ${skip} /etc/rc.d/* ${local_rc} 2>/dev/null` for file in `reverse_list ${files}`; do + [ "$file" !=3D ${file#/etc/rc.d/} ] && continue if grep -q ^rcvar $file; then eval `grep ^name=3D $file` eval `grep ^rcvar $file` @@ -98,6 +99,7 @@ fi done for file in $files; do + [ "$file" !=3D ${file#/etc/rc.d/} ] && continue if grep -q ^rcvar $file; then eval `grep ^name=3D $file` eval `grep ^rcvar $file` ----------------------------------------- I applied the patch, and it seems to fix the issue I was seeing... =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D The patch looks to work quite well for my use case. Here's the output produced (with irrelevant lines shown as {...} to keep it short...) # service -R Code: {...} Stopping nginx. Waiting for PIDS: 4460. {...} Stopping unbound. Waiting for PIDS: 68586. Obtaining a trust anchor... Starting unbound. {...} Performing sanity check on nginx configuration: nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful Starting nginx. {...} =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D There's some more detail in the cited thread, but the above is the important gist of it. thx. --=20 You are receiving this mail because: You are the assignee for the bug.=