From be21f667d0b09b34581ed401991fed7ceef01447 Mon Sep 17 00:00:00 2001 From: Nathaniel Clark Date: Wed, 15 May 2019 14:09:00 -0400 Subject: [PATCH] Revert "LU-8384 scripts: Add scripts to systemd for EL7" This reverts commit 420d8c09887ff178508be0434373f74b5ef7ae6e. This prevents lustre from starting correctly, as seen in LU-12298 Signed-off-by: Nathaniel Clark Change-Id: Ib0a7e85079d1aea27b3a09496a2bf02c698c294c Reviewed-on: https://review.whamcloud.com/34872 Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Tested-by: Jenkins Reviewed-by: Oleg Drokin --- lustre.spec.in | 6 +----- lustre/scripts/Makefile.am | 4 +--- lustre/scripts/lustre | 9 +-------- lustre/scripts/systemd/Makefile.am | 4 +--- lustre/scripts/systemd/lustre.service.in | 16 ---------------- 5 files changed, 4 insertions(+), 35 deletions(-) delete mode 100644 lustre/scripts/systemd/lustre.service.in diff --git a/lustre.spec.in b/lustre.spec.in index 0476ac6..8782a91 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -394,12 +394,12 @@ echo '%{_sysconfdir}/ha.d/resource.d/Lustre' >>lustre.files # systemd is on redhat, fedora, and suse %if %{with systemd} echo '%{_unitdir}/lnet.service' >>lustre.files -echo '%{_unitdir}/lustre.service' >>lustre.files %endif %if %{_vendor}=="redhat" # The following scripts are Red Hat specific %if %{with servers} +echo '%{_sysconfdir}/init.d/lustre' >>lustre.files echo '%{_sysconfdir}/sysconfig/lustre' >>lustre.files %if %{with gss_keyring} echo '%{_sysconfdir}/init.d/lsvcgss' >>lustre.files @@ -409,7 +409,6 @@ echo '%{_sysconfdir}/sysconfig/lsvcgss' >>lustre.files %if %{without systemd} echo '%{_sysconfdir}/init.d/lnet' >>lustre.files -echo '%{_sysconfdir}/init.d/lustre' >>lustre.files %endif %endif %if %{with gss_keyring} @@ -573,18 +572,15 @@ echo '%{_sbindir}/wiretest' >>lustre-tests.files %post %if %{with systemd} %systemd_post lnet.service -%systemd_post lustre.service %endif %preun %if %{with systemd} -%systemd_preun lustre.service %systemd_preun lnet.service %endif %postun %if %{with systemd} -%systemd_postun_with_restart lustre.service %systemd_postun_with_restart lnet.service %endif diff --git a/lustre/scripts/Makefile.am b/lustre/scripts/Makefile.am index 3757519..f834235 100644 --- a/lustre/scripts/Makefile.am +++ b/lustre/scripts/Makefile.am @@ -48,9 +48,7 @@ init_SCRIPTS += lnet endif if SERVER -if !HAVE_SYSTEMD init_SCRIPTS += lustre -endif if GSS_KEYRING init_SCRIPTS += lsvcgss endif @@ -87,7 +85,7 @@ endif # UTILS EXTRA_DIST = license-status lustre_rmmod ldev lc_mon lhbadm \ lc_servip lustre_routes_config lustre_routes_conversion \ $(addsuffix .in,$(genscripts)) lfs_migrate lustre_req_history \ - lsvcgss lc_common haconfig Lustre.ha_v2 dkms.mkconf \ + lustre lsvcgss lc_common haconfig Lustre.ha_v2 dkms.mkconf \ zfsobj2fid ko2iblnd-probe statechange-lustre.sh CLEANFILES = $(genscripts) diff --git a/lustre/scripts/lustre b/lustre/scripts/lustre index cf5403e..5fb6806 100644 --- a/lustre/scripts/lustre +++ b/lustre/scripts/lustre @@ -1,19 +1,12 @@ #!/bin/bash # # lustre This shell script takes care of starting and stopping -# the lustre services. +# the lustre services. # # chkconfig: - 60 20 # description: Part of the lustre file system. # probe: true # config: /etc/sysconfig/lustre -### BEGIN INIT INFO -# Provides: lustre -# Required-Start: openibd -# Defalt-Start: - -# Default-Stop: 0 1 6 -# Description: Lustre init script -### END INIT INFO PATH=/sbin:/usr/sbin:/bin:/usr/bin diff --git a/lustre/scripts/systemd/Makefile.am b/lustre/scripts/systemd/Makefile.am index 47f7fe7..340f6f1 100644 --- a/lustre/scripts/systemd/Makefile.am +++ b/lustre/scripts/systemd/Makefile.am @@ -1,9 +1,8 @@ # These are scripts that are generated from .in files -genunitfiles = lnet.service lustre.service +genunitfiles = lnet.service if HAVE_SYSTEMD systemdsystemunit_DATA = lnet.service -systemdsystemunit_DATA += lustre.service endif EXTRA_DIST = $(addsuffix .in,$(genunitfiles)) @@ -12,5 +11,4 @@ CLEANFILES = $(genunitfiles) $(genunitfiles): %: %.in sed -e 's,@sbindir\@,$(sbindir),g' \ - -e 's,@bindir\@,$(bindir),g' \ -e 's,@sysconfdir\@,$(sysconfdir),g' $< > $@ diff --git a/lustre/scripts/systemd/lustre.service.in b/lustre/scripts/systemd/lustre.service.in deleted file mode 100644 index 26d907d..0000000 --- a/lustre/scripts/systemd/lustre.service.in +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=Lustre shutdown -After=network.target network-online.target lnet.service -DefaultDependencies=false -Conflicts=umount.target - -[Service] -Type=oneshot -RemainAfterExit=true -ExecStart=/bin/true -ExecStop=@bindir@/umount -a -t lustre -ExecStop=@sbindir@/lustre_rmmod - -[Install] -WantedBy=sysinit.target -WantedBy=final.target -- 1.8.3.1