From patchwork Sat Jan 20 00:27:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 10176179 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4275A601C2 for ; Sat, 20 Jan 2018 00:28:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2560A286AE for ; Sat, 20 Jan 2018 00:28:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 18F9C286B9; Sat, 20 Jan 2018 00:28:03 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 84407286AE for ; Sat, 20 Jan 2018 00:28:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7B77F4E918; Sat, 20 Jan 2018 00:28:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D70895C881; Sat, 20 Jan 2018 00:27:59 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A754F4ED37; Sat, 20 Jan 2018 00:27:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w0K0RvID002537 for ; Fri, 19 Jan 2018 19:27:57 -0500 Received: by smtp.corp.redhat.com (Postfix) id B059860C8D; Sat, 20 Jan 2018 00:27:57 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9DA3360C4A; Sat, 20 Jan 2018 00:27:54 +0000 (UTC) Received: from smtp.nue.novell.com (smtp.nue.novell.com [195.135.221.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DF9D081DEB; Sat, 20 Jan 2018 00:27:52 +0000 (UTC) Received: from emea4-mta.ukb.novell.com ([10.120.13.87]) by smtp.nue.novell.com with ESMTP (TLS encrypted); Sat, 20 Jan 2018 01:27:51 +0100 Received: from apollon.suse.de.de (nwb-a10-snat.microfocus.com [10.120.13.202]) by emea4-mta.ukb.novell.com with ESMTP (TLS encrypted); Sat, 20 Jan 2018 00:27:46 +0000 From: Martin Wilck To: Christophe Varoqui , Benjamin Marzinski , dm-devel@redhat.com Date: Sat, 20 Jan 2018 01:27:23 +0100 Message-Id: <20180120002723.10653-1-mwilck@suse.com> In-Reply-To: <20180119002916.10323-15-mwilck@suse.com> References: <20180119002916.10323-15-mwilck@suse.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sat, 20 Jan 2018 00:27:54 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sat, 20 Jan 2018 00:27:54 +0000 (UTC) for IP:'195.135.221.5' DOMAIN:'smtp.nue.novell.com' HELO:'smtp.nue.novell.com' FROM:'mwilck@suse.com' RCPT:'' X-RedHat-Spam-Score: -2.301 (RCVD_IN_DNSWL_MED, SPF_PASS) 195.135.221.5 smtp.nue.novell.com 195.135.221.5 smtp.nue.novell.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.25 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: dm-devel@redhat.com Cc: Xose Vazquez Perez , Martin Wilck Subject: [dm-devel] [FIX for 14/16] multipath.rules: set job properties for systemd-run correctly X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Sat, 20 Jan 2018 00:28:01 +0000 (UTC) X-Virus-Scanned: ClamAV using ClamSMTP The default dependencies must be turned off for both the timer and the service unit, otherwise systemd-run will wait for sysinit.target. Moreover, fix these bugs: - never run the logic if DM_MULTIPATH_DEVICE_PATH!=2 - reset DM_MULTIPATH_DEVICE_PATH to "" on timer expiry Signed-off-by: Martin Wilck --- multipath/multipath.rules | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/multipath/multipath.rules b/multipath/multipath.rules index 6b4a418d0009..659aa586d46e 100644 --- a/multipath/multipath.rules +++ b/multipath/multipath.rules @@ -62,8 +62,9 @@ ENV{DM_MULTIPATH_DEVICE_PATH}=="1", ENV{ID_FS_TYPE}="mpath_member", \ # DM_MULTIPATH_WAIT_DONE ensures that this happens only once. # (But see "special case" exception above). -ENV{DM_MULTIPATH_WAIT_DONE}=="1", GOTO="end_mpath" ENV{DM_MULTIPATH_DEVICE_PATH}!="2", GOTO="end_mpath" +ENV{DM_MULTIPATH_WAIT_DONE}=="1", ENV{DM_MULTIPATH_DEVICE_PATH}="", \ + GOTO="end_mpath" # Default timeout values for the timer. Use early udev rules files to customize. # Timeouts are in seconds after system boot, and seconds after first path @@ -77,6 +78,6 @@ ENV{DM_MULTIPATH_SAVED_FS_TYPE}=="", ENV{DM_MULTIPATH_SAVED_FS_TYPE}="dm_multipa ENV{ID_FS_TYPE}="maybe_mpath_member" ENV{DM_MULTIPATH_DEVICE_PATH}="1" ENV{SYSTEMD_READY}="0" -RUN+="/usr/bin/systemd-run --action change --on-boot $env{FIND_MULTIPATHS_BOOT_TMO} --on-active $env{FIND_MULTIPATHS_PATH_TMO} /usr/bin/udevadm trigger $sys$devpath" +RUN+="/usr/bin/systemd-run --no-block --timer-property DefaultDependencies=no --property DefaultDependencies=no --on-boot $env{FIND_MULTIPATHS_BOOT_TMO} --on-active $env{FIND_MULTIPATHS_PATH_TMO} /usr/bin/udevadm --action change trigger $sys$devpath" LABEL="end_mpath"