From e0aa1c6880f5423adfa9fa024f31990331041c67 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Thu, 13 Sep 2018 18:55:07 -0400 Subject: [PATCH] LU-11071 build: create lustre resource package for Ubuntu The new Ubuntu server support is missing on last package that RHEL currently supports. Enable Debian/Ubuntu packaging for the resource agent package. Test-Parameters: trivial Change-Id: I872ae6b1b02782155db14c5cc971607ca3e93d56 Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/33152 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Nathaniel Clark Reviewed-by: Li Dongyang Reviewed-by: Oleg Drokin --- autoMakefile.am | 5 ++++- debian/changelog | 6 ++++++ debian/control | 14 ++++++++++++ debian/control.main | 14 ++++++++++++ debian/lustre-resource-agents.dirs | 1 + debian/lustre-resource-agents.install | 1 + debian/rules | 25 +++++++++++++++++++++- lustre.spec.in | 5 ----- {contrib/scripts/pacemaker => lustre/conf}/Lustre | 0 lustre/conf/Makefile.am | 3 +++ .../scripts/pacemaker => lustre/conf}/healthLNET | 0 .../scripts/pacemaker => lustre/conf}/healthLUSTRE | 0 12 files changed, 67 insertions(+), 7 deletions(-) create mode 100644 debian/lustre-resource-agents.dirs create mode 100644 debian/lustre-resource-agents.install rename {contrib/scripts/pacemaker => lustre/conf}/Lustre (100%) rename {contrib/scripts/pacemaker => lustre/conf}/healthLNET (100%) rename {contrib/scripts/pacemaker => lustre/conf}/healthLUSTRE (100%) diff --git a/autoMakefile.am b/autoMakefile.am index d35d6e5..8460b6b 100644 --- a/autoMakefile.am +++ b/autoMakefile.am @@ -294,10 +294,13 @@ debs: undef.h m-a build $${KSRC:+-k $$KSRC} $${KVERS:+-l $$KVERS} -i -u $$(pwd) lustre && \ popd && \ VER=$$(sed -ne '1s/^lustre (\(.*-[0-9][0-9]*\)).*$$/\1/p' debian/changelog) && \ + if test "x@ENABLE_SERVER@" = "xyes"; then \ + DEB_SERVER_PKG="../lustre-resource-agents_$${VER}_*.deb"; \ + fi; \ mkdir -p debs && \ mv ../lustre-dev_$${VER}_*.deb ../lustre-source_$${VER}_all.deb \ ../lustre-iokit_$${VER}_*.deb ../lustre-tests_$${VER}_*.deb \ - ../lustre-*-utils_$${VER}_*.deb \ + ../lustre-*-utils_$${VER}_*.deb $${DEB_SERVER_PKG} \ ../lustre_$${VER}.dsc ../lustre_$${VER}_*.changes \ ../lustre_$${VER}.tar.gz ../lustre-*-modules-$${KVERS}_$${VER}_*.deb \ debs/ diff --git a/debian/changelog b/debian/changelog index 5a39ecc..31b2584 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +lustre (2.11.55-dirty-1) unstable; urgency=low + + * Automated changelog entry update + + -- Brian J. Murrell Thu, 13 Sep 2018 12:42:24 -0600 + lustre (2.11.52-108-g258f0cf-dirty-1) unstable; urgency=low * Automated changelog entry update diff --git a/debian/control b/debian/control index 00e6c5f..6e7593e 100644 --- a/debian/control +++ b/debian/control @@ -54,6 +54,20 @@ Description: Userspace utilities for the Lustre filesystem (server) If you only need to access the LFS cluster, install lustre-client-utils instead. +Package: lustre-resource-agents +Section: ha +Architecture: i386 powerpc ppc64el amd64 ia64 arm64 +Priority: optional +Depends: lustre-server-utils (= ${binary:Version}), resource-agents +Description: HA Resuable Cluster Resource Scripts for Lustre + Lustre is a scalable, secure, robust, highly-available cluster file system. + This release is maintained by Whamcloud and available from + https://wiki.whamcloud.com/ + . + This package provides a set of scripts to operate Lustre + resources in a High Availablity environment for both Pacemaker + and rgmanager. + Package: lustre-iokit Section: utils Architecture: i386 powerpc ppc64el amd64 ia64 arm64 diff --git a/debian/control.main b/debian/control.main index 00e6c5f..6e7593e 100644 --- a/debian/control.main +++ b/debian/control.main @@ -54,6 +54,20 @@ Description: Userspace utilities for the Lustre filesystem (server) If you only need to access the LFS cluster, install lustre-client-utils instead. +Package: lustre-resource-agents +Section: ha +Architecture: i386 powerpc ppc64el amd64 ia64 arm64 +Priority: optional +Depends: lustre-server-utils (= ${binary:Version}), resource-agents +Description: HA Resuable Cluster Resource Scripts for Lustre + Lustre is a scalable, secure, robust, highly-available cluster file system. + This release is maintained by Whamcloud and available from + https://wiki.whamcloud.com/ + . + This package provides a set of scripts to operate Lustre + resources in a High Availablity environment for both Pacemaker + and rgmanager. + Package: lustre-iokit Section: utils Architecture: i386 powerpc ppc64el amd64 ia64 arm64 diff --git a/debian/lustre-resource-agents.dirs b/debian/lustre-resource-agents.dirs new file mode 100644 index 0000000..afa8760 --- /dev/null +++ b/debian/lustre-resource-agents.dirs @@ -0,0 +1 @@ +usr/lib/ocf/resource.d/lustre diff --git a/debian/lustre-resource-agents.install b/debian/lustre-resource-agents.install new file mode 100644 index 0000000..c227d56 --- /dev/null +++ b/debian/lustre-resource-agents.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/ocf/resource.d/lustre/* usr/lib.ocf/resource.d/lustre diff --git a/debian/rules b/debian/rules index 6565c48..eeb32e0 100755 --- a/debian/rules +++ b/debian/rules @@ -81,10 +81,14 @@ SOURCE_PKG=lustre-source ifneq (,$(findstring server,$(DEB_BUILD_PROFILES))) UTILS_PKG=lustre-server-utils MODS_PKG=lustre-server-modules + RESOURCE_PKG=lustre-resource-agents + RESOURCE_TARGET=binary-$(RESOURCE_PKG) DKMS_PKG= else UTILS_PKG=lustre-client-utils MODS_PKG=lustre-client-modules + RESOURCE_TARGET= + RESOURCE_PKG= DKMS_PKG=lustre-client-modules-dkms endif @@ -202,7 +206,8 @@ build-stamp: patch-stamp configure-stamp # binary-arch: binary-$(UTILS_PKG) binary-$(TESTS_PKG) binary-$(DEV_PKG) \ # binary-$(MODS_PKG) binary-kern-mods binary-arch: binary-$(UTILS_PKG) binary-$(DEV_PKG) \ - binary-$(IOKIT_PKG) binary-$(TESTS_PKG) + binary-$(IOKIT_PKG) binary-$(TESTS_PKG) \ + $(RESOURCE_TARGET) binary-indep: binary-$(SOURCE_PKG) $(DKMS_TARGET) @@ -232,6 +237,24 @@ binary-$(UTILS_PKG): build-stamp dh_md5sums -p $(UTILS_PKG) dh_builddeb -p $(UTILS_PKG) +binary-$(RESOURCE_PKG): build-stamp + dh_testdir + dh_testroot + dh_installdirs -p $(RESOURCE_PKG) + dh_installdocs -p $(RESOURCE_PKG) + dh_installman -p $(RESOURCE_PKG) + dh_install -p $(RESOURCE_PKG) + dh_makeshlibs -p $(RESOURCE_PKG) + dh_installexamples -p $(RESOURCE_PKG) + dh_installchangelogs -p $(RESOURCE_PKG) lustre/ChangeLog + dh_compress -p $(RESOURCE_PKG) + dh_strip -p $(RESOURCE_PKG) + dh_installdeb -p $(RESOURCE_PKG) + dh_fixperms -p $(RESOURCE_PKG) + dh_gencontrol -p $(RESOURCE_PKG) + dh_md5sums -p $(RESOURCE_PKG) + dh_builddeb -p $(RESOURCE_PKG) + binary-$(IOKIT_PKG): build-stamp dh_testdir dh_testroot diff --git a/lustre.spec.in b/lustre.spec.in index fdd1026..f4f4acc 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -393,11 +393,6 @@ echo '%{_sysconfdir}/init.d/lnet' >>lustre.files %endif %endif -%if %{with servers} -mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/lustre/ -install -m 0755 contrib/scripts/pacemaker/* $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/lustre/ -%endif - # fc18 needs 'x' permission for library files find $RPM_BUILD_ROOT -name \*.so -type f -exec chmod +x {} \; diff --git a/contrib/scripts/pacemaker/Lustre b/lustre/conf/Lustre similarity index 100% rename from contrib/scripts/pacemaker/Lustre rename to lustre/conf/Lustre diff --git a/lustre/conf/Makefile.am b/lustre/conf/Makefile.am index a150daf..8f1927c 100644 --- a/lustre/conf/Makefile.am +++ b/lustre/conf/Makefile.am @@ -34,6 +34,7 @@ EXTRA_DIST = lustre.dtd lustre2ldif.xsl top.ldif \ 99-lustre.rules lustre ldev.conf ko2iblnd.conf lsvcgss \ + Lustre healthLNET healthLUSTRE \ lnet_routes.conf lnet.conf lgssc.conf sysconf_DATA = lnet.conf @@ -47,6 +48,8 @@ udevrulesdir = $(sysconfdir)/udev/rules.d udevrules_DATA = 99-lustre.rules if SERVER +pacemakerdir = $(prefix)/lib/ocf/resource.d/lustre +pacemaker_DATA = healthLNET healthLUSTRE Lustre if ZFS_ENABLED sysconf_DATA += ldev.conf endif diff --git a/contrib/scripts/pacemaker/healthLNET b/lustre/conf/healthLNET similarity index 100% rename from contrib/scripts/pacemaker/healthLNET rename to lustre/conf/healthLNET diff --git a/contrib/scripts/pacemaker/healthLUSTRE b/lustre/conf/healthLUSTRE similarity index 100% rename from contrib/scripts/pacemaker/healthLUSTRE rename to lustre/conf/healthLUSTRE -- 1.8.3.1