Skip to content

Commit

Permalink
mdmonitor: Abandon custom configuration files
Browse files Browse the repository at this point in the history
Operating system vendors are customizing mdmonitor service beacause
the default form is not satifying for them (expect SUSE). As a result,
support is complicated (maintainers have to check the system) and man page
is not detailed.

I propose to abandon custom configuration files via sysconfig and keep
it inside mdadm.conf only.

Detailed comment in service for OSV maintainers is added to help with
transition.

Signed-off-by: Mariusz Tkaczyk <[email protected]>
  • Loading branch information
mtkaczyk committed Oct 10, 2024
1 parent bafa5cc commit a7a5e67
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 53 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ install-systemd: systemd/[email protected]
$(INSTALL) -D -m 755 .install.tmp.3 $(DESTDIR)$(SYSTEMD_DIR)-shutdown/$$file ; \
rm -f .install.tmp.3; \
done
if [ -f /etc/SuSE-release -o -n "$(SUSE)" ] ;then $(INSTALL) -D -m 755 systemd/SUSE-mdadm_env.sh $(DESTDIR)$(LIB_DIR)/mdadm_env.sh ;fi

install-bin: mdadm mdmon
$(INSTALL) -D $(STRIP) -m 755 mdadm $(DESTDIR)$(BINDIR)/mdadm
Expand Down
48 changes: 0 additions & 48 deletions systemd/SUSE-mdadm_env.sh

This file was deleted.

19 changes: 15 additions & 4 deletions systemd/mdmonitor.service
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,18 @@ DefaultDependencies=no
Documentation=man:mdadm(8)

[Service]
Environment= MDADM_MONITOR_ARGS=--scan
EnvironmentFile=-/run/sysconfig/mdadm
ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
ExecStart=BINDIR/mdadm --monitor $MDADM_MONITOR_ARGS
# For Maintainers:
# We need to provide consistent mdmonitor configuration man page to the users. We don't want to get
# asked continuously how it can be configured.
# /etc/sysconfig/mdadm or /etc/sysconfig/mdmonitor or whatever else, should be abandoned.
# Following parameters should be customized via mdadm.conf only:
# - MONITORDELAY (do not set --delay in service)
# - MAILADDR (do not set --mail in service)
# - MAILFROM (not settable from cmdline)
# - PROGRAM (do not set --program or --alert in service)
#
# Following parameters can be customized in service:
# - --syslog (configure syslog logging)
# - --fork (Type=forking must be added, not recommended and not needed with systemd)
# - --pid-file (allowed only when --fork selected)
ExecStart=BINDIR/mdadm --monitor --scan

0 comments on commit a7a5e67

Please sign in to comment.