From patchwork Wed Nov 28 03:52:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 10701761 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A5B9313AD for ; Wed, 28 Nov 2018 03:52:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 957662CC4E for ; Wed, 28 Nov 2018 03:52:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 882BA2CC54; Wed, 28 Nov 2018 03:52:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,SUBJ_OBFU_PUNCT_FEW autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2519E2CC4E for ; Wed, 28 Nov 2018 03:52:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726972AbeK1OwU (ORCPT ); Wed, 28 Nov 2018 09:52:20 -0500 Received: from mx2.suse.de ([195.135.220.15]:38328 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726894AbeK1OwT (ORCPT ); Wed, 28 Nov 2018 09:52:19 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 85326AF70; Wed, 28 Nov 2018 03:52:11 +0000 (UTC) From: NeilBrown To: Steve Dickson Date: Wed, 28 Nov 2018 14:52:03 +1100 Subject: [PATCH nfs-utils] systemd/rpc-statd.service - add IgnoreOnIsolate=yes cc: linux-nfs@vger.kernel.org Message-ID: <87bm69q2os.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If you run systemctl isolate multi-user.target then all services not needed by multi-user.target are stopped. This currently includes rpc-statd, which is a problem. Systemd doesn't know that rpc-statd.service is needed by multi-user.target, or more accurately nfs-client.target, because sometimes it isn't. It is started dynamically by mount.nfs when a v3 or v2 filesystem is mounted (not when v4 is mounted) - so systemd doesn't see the connection. mount units default to IgnoreOnIsolate=yes, as mounts are expected to be left mounted when you run "systemctl isolate ....". As rpc-statd.service is started by a mount, and needed for some mounts, it makes sense for it to declare IgnoreOnIsolate=yes too. With this declaration in place rpc.statd remains running when systemctl isolate multi-user.target is run. Signed-off-by: NeilBrown --- systemd/rpc-statd.service | 1 + 1 file changed, 1 insertion(+) diff --git a/systemd/rpc-statd.service b/systemd/rpc-statd.service index f41ae2084f3c..1f4e6a8b92ab 100644 --- a/systemd/rpc-statd.service +++ b/systemd/rpc-statd.service @@ -7,6 +7,7 @@ Wants=network-online.target After=network-online.target nss-lookup.target rpcbind.socket PartOf=nfs-utils.service +IgnoreOnIsolate=yes [Service] Environment=RPC_STATD_NO_NOTIFY=1