diff --git a/Makefile b/Makefile index 3fe5678..cbf896d 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,7 @@ rpms: production cleandist tarball mkdir -p _topdir/{BUILD,S{PEC,OURCE,RPM}S,RPMS/noarch} cp dist/chroma-agent-*.tar.gz _topdir/SOURCES cp chroma-agent-init.sh _topdir/SOURCES + cp lustre-modules-init.sh _topdir/SOURCES cp chroma-agent.spec _topdir/SPECS rpmbuild --define "_topdir $$(pwd)/_topdir" \ --define "version $(PACKAGE_VERSION)" \ diff --git a/chroma-agent.spec b/chroma-agent.spec index c68fc3b..51385d9 100644 --- a/chroma-agent.spec +++ b/chroma-agent.spec @@ -9,6 +9,7 @@ Version: %{version} Release: %{release} Source0: %{name}-%{version}.tar.gz Source1: chroma-agent-init.sh +Source2: lustre-modules-init.sh License: Proprietary Group: Development/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot @@ -45,6 +46,7 @@ rm -rf %{buildroot} %{__python} setup.py install --skip-build --install-lib=%{python_sitelib} --install-scripts=%{_bindir} --root=%{buildroot} mkdir -p $RPM_BUILD_ROOT/etc/init.d/ cp %{SOURCE1} $RPM_BUILD_ROOT/etc/init.d/chroma-agent +cp %{SOURCE2} $RPM_BUILD_ROOT/etc/init.d/lustre-modules touch management.files cat <>management.files @@ -70,6 +72,7 @@ rm -rf %{buildroot} %post chkconfig chroma-agent on +chkconfig lustre-modules on # disable SELinux -- it prevents both lustre and pacemaker from working sed -ie 's/^SELINUX=.*$/SELINUX=disabled/' /etc/selinux/config # the above only disables on the next boot. disable it currently, also @@ -82,6 +85,7 @@ chkconfig corosync on %files -f base.files %defattr(-,root,root) %attr(0755,root,root)/etc/init.d/chroma-agent +%attr(0755,root,root)/etc/init.d/lustre-modules %{_bindir}/chroma-agent* %{python_sitelib}/chroma_agent-*.egg-info/* diff --git a/chroma_agent/action_plugins/manage_lnet.py b/chroma_agent/action_plugins/manage_lnet.py index 8d00a6e..c216f9d 100644 --- a/chroma_agent/action_plugins/manage_lnet.py +++ b/chroma_agent/action_plugins/manage_lnet.py @@ -20,6 +20,9 @@ def stop_lnet(args): def load_lnet(args): try_run(["modprobe", "lnet"]) + # hack for HYD-1263 - Fix or work around LU-1279 - failure trying to mount two targets at the same time after boot + # should be removed when LU-1279 is fixed + try_run(["modprobe", "lustre"]) def unload_lnet(args): diff --git a/lustre-modules-init.sh b/lustre-modules-init.sh new file mode 100644 index 0000000..2bf0eeb --- /dev/null +++ b/lustre-modules-init.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# +# lustre This loads the lustre modules +# +# chkconfig: 2345 11 99 +# description: This loads the Lustre modules. + + +PATH=/sbin:/bin:/usr/bin:/usr/sbin + +# Source function library. +. /etc/init.d/functions + +# Check that we are root ... so non-root users stop here +test $EUID = 0 || exit 4 + +RETVAL=0 + +start(){ + echo -n "Loading Lustre module stack..." + /sbin/modprobe lustre + RETVAL=$? + echo + return $RETVAL +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + : + ;; + *) + echo $"Usage: $0 {start|stop}" + RETVAL=3 +esac + +exit $RETVAL