Skip to contentSkip to conversation

multipathd: service unit fixes

PATCH In review [email protected] 2 participants 7 messages Dec 7, 2021 – Dec 9, 2021 Device mapper

lore
Share & tools
lore
#0 lore raw

cover multipathd: service unit fixes

From: Martin Wilck <[email protected]>

Hi Christophe, hi Ben,

this set drops some directives from multipathd's service unit which are to the best of my knowledge obsolete or redundant. It is part of an effort to eliminate the differences between the service unit we ship and the one which is shipped by dracut. The ultimate goal is to drop the multipathd.service file in dracut and use ours, which will make it easier to apply changes in the future.

I'll create a dracut pull request that goes with this set.

Regards
Martin

Martin Wilck (4):
multipathd.service: remove LimitCORE=infinity directive multipathd.service: don't load SCSI device handler modules multipathd.service: add dependency on initrd-cleanup.service multipathd.service: drop dependencies on iscsi and iscsid

 multipathd/multipathd.service | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Signature · 7 lines
2.34.0


--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel
#1 lore raw

PATCH 1/4 multipathd.service: remove LimitCORE=infinity directive

From: Martin Wilck <[email protected]>

This would normally be set by general system policy. According to systemd-system.conf(5), it is set to infinity by default anyway in systemd. If a user changes this in systemd-system.conf, the setting should also apply to multipathd. Users who don't wont this can still use drop-ins to change the specific settings.

---
 multipathd/multipathd.service | 1 -
 1 file changed, 1 deletion(-)
multipathd/multipathd.service +0 -1
index 1919b38..6d09768 100644
@@ -14,7 +14,6 @@ ConditionVirtualization=!container
 [Service]
 Type=notify
 NotifyAccess=main
-LimitCORE=infinity
 ExecStartPre=-/sbin/modprobe -a scsi_dh_alua scsi_dh_emc scsi_dh_rdac dm-multipath
 ExecStart=/sbin/multipathd -d -s
 ExecReload=/sbin/multipathd reconfigure
Signature · 7 lines
2.34.0


--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel
#2 lore raw

PATCH 2/4 multipathd.service: don't load SCSI device handler modules

In reply to [email protected]

From: Martin Wilck <[email protected]>

The kernel has had an autoloading mechanism for SCSI device handlers since v4.3. No need to force loading them here again.

---
 multipathd/multipathd.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
multipathd/multipathd.service +1 -1
index 6d09768..5f2d637 100644
@@ -14,7 +14,7 @@ ConditionVirtualization=!container
 [Service]
 Type=notify
 NotifyAccess=main
-ExecStartPre=-/sbin/modprobe -a scsi_dh_alua scsi_dh_emc scsi_dh_rdac dm-multipath
+ExecStartPre=-/sbin/modprobe dm-multipath
 ExecStart=/sbin/multipathd -d -s
 ExecReload=/sbin/multipathd reconfigure
 TasksMax=infinity
Signature · 7 lines
2.34.0


--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel
#3 lore raw

PATCH 3/4 multipathd.service: add dependency on initrd-cleanup.service

In reply to [email protected]

From: Martin Wilck <[email protected]>

This is necessary in the initramfs. With this added, almost no differences between our shipped multipathd.service and the one shipped in dracut remain. The rest should be fixed in dracut.

---
 multipathd/multipathd.service | 2 ++
 1 file changed, 2 insertions(+)
multipathd/multipathd.service +2 -0
index 5f2d637..530f012 100644
@@ -5,8 +5,10 @@ Before=local-fs-pre.target blk-availability.service shutdown.target
 Wants=systemd-udevd-kernel.socket
 After=systemd-udevd-kernel.socket
 After=multipathd.socket systemd-remount-fs.service
+Before=initrd-cleanup.service
 DefaultDependencies=no
 Conflicts=shutdown.target
+Conflicts=initrd-cleanup.service
 ConditionKernelCommandLine=!nompath
 ConditionKernelCommandLine=!multipath=off
 ConditionVirtualization=!container
Signature · 7 lines
2.34.0


--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel
#4 lore raw

PATCH 4/4 multipathd.service: drop dependencies on iscsi and iscsid

In reply to [email protected]

From: Martin Wilck <[email protected]>

We've had "Before=" dependencies on iscsi.service and iscsid.service since this unit was first created. I'm not sure if we ever needed them. Since c9689b6 ("multipathd: Remove dependency on systemd-udev-settle.service"), we definitely don't. iscsi and iscsid sort themselves after network.target, and multipathd does not, thus these Before= dependencies are redundant.

Note: Before c9689b6, iSCSI was actually treated differently than other transports - we forced multipathd to be started after FC device detection, but before iSCSI device detection.

---
 multipathd/multipathd.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
multipathd/multipathd.service +1 -1
index 530f012..ae98034 100644
@@ -1,6 +1,6 @@
 [Unit]
 Description=Device-Mapper Multipath Device Controller
-Before=iscsi.service iscsid.service lvm2-activation-early.service
+Before=lvm2-activation-early.service
 Before=local-fs-pre.target blk-availability.service shutdown.target
 Wants=systemd-udevd-kernel.socket
 After=systemd-udevd-kernel.socket
Signature · 7 lines
2.34.0


--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel
maintainer Reviewed-by on the v1 series
#6 lore raw
In reply to [email protected]
Quoted 1 line · On Tue, Dec 07, 2021 at 09:03:58PM +0100, [email protected] wrote:

From: Martin Wilck <[email protected]>

For the set:

Quoted 15 lines

Hi Christophe, hi Ben,

this set drops some directives from multipathd's service unit which are to the best of my knowledge obsolete or redundant. It is part of an effort to eliminate the differences between the service unit we ship and the one which is shipped by dracut. The ultimate goal is to drop the multipathd.service file in dracut and use ours, which will make it easier to apply changes in the future.

I'll create a dracut pull request that goes with this set.

Regards
Martin

Quoted 11 lines

Martin Wilck (4):
multipathd.service: remove LimitCORE=infinity directive multipathd.service: don't load SCSI device handler modules multipathd.service: add dependency on initrd-cleanup.service multipathd.service: drop dependencies on iscsi and iscsid

 multipathd/multipathd.service | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Signature · 1 line
2.34.0

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel