From a0a1066d30054540d853a067449b90f991b7554a Mon Sep 17 00:00:00 2001 From: Minh Diep Date: Mon, 12 Aug 2013 22:53:40 -0700 Subject: [PATCH] LU-3466 iokit: Make lustre-iokit a subpackage of lustre Remove build_iokit from lbuild Remove lustre-iokit.spec.in and merge with lustre.spec.in Use of --disable-iokit and remove support for building external Remove iokit script from main lustre package. Add lustre-iokit dependency to lustre-tests rpm Disable building iokit rpm for client build Signed-off-by: Minh Diep Change-Id: I34889b97b5bdbb201ee88d71e1668f419e640cdb Reviewed-on: http://review.whamcloud.com/7314 Reviewed-by: Brian J. Murrell Tested-by: Hudson Reviewed-by: James Simmons Reviewed-by: Christopher J. Morrone Tested-by: Maloo Reviewed-by: Oleg Drokin --- autoMakefile.am | 9 +++- autogen.sh | 2 +- config/lustre-build.m4 | 46 +++++++------------- contrib/lbuild/lbuild | 48 +++------------------ lustre-iokit/Makefile.am | 8 ---- lustre-iokit/autogen.sh | 21 --------- lustre-iokit/configure.ac | 19 --------- lustre-iokit/lustre-iokit.spec.in | 90 --------------------------------------- lustre.spec.in | 76 ++++++++++++++++++++++++++++++++- 9 files changed, 106 insertions(+), 213 deletions(-) delete mode 100644 lustre-iokit/autogen.sh delete mode 100644 lustre-iokit/configure.ac delete mode 100644 lustre-iokit/lustre-iokit.spec.in diff --git a/autoMakefile.am b/autoMakefile.am index e5fa239..0afd2ed 100644 --- a/autoMakefile.am +++ b/autoMakefile.am @@ -11,6 +11,8 @@ DIST_SUBDIRS := ldiskfs @SNMP_DIST_SUBDIR@ libsysio lustre-iokit @LIBCFS_SUBDIR@ @LDISKFS_ENABLED_FALSE@BUILD_OSD_LDISKFS = false @ZFS_ENABLED_TRUE@BUILD_OSD_ZFS = true @ZFS_ENABLED_FALSE@BUILD_OSD_ZFS = false +@BUILD_LUSTREIOKIT_TRUE@BUILD_LUSTREIOKIT = true +@BUILD_LUSTREIOKIT_FALSE@BUILD_LUSTREIOKIT = false AUTOMAKE_OPTIONS = foreign @@ -78,7 +80,6 @@ endif # LINUX endif # MODULES dist-hook: - $(RM) $(distdir)/lustre-iokit/*.spec find $(distdir) -name .deps -o \ -name CVS -o \ -name .svn -o \ @@ -145,6 +146,9 @@ rpms-real: @PACKAGE_TARNAME@.spec dist Makefile if [[ "X$(BUILD_OSD_ZFS)" = Xtrue ]]; then \ RPMARGS="$$RPMARGS --with zfs"; \ fi; \ + if [[ "X$(BUILD_LUSTREIOKIT)" = Xfalse ]]; then \ + RPMARGS="$$RPMARGS --without lustre_iokit"; \ + fi; \ echo "Building Lustre RPM with $$RPMARGS"; \ eval rpmbuild $$RPMARGS -ta $(distdir).tar.gz @@ -152,6 +156,9 @@ srpm-real: @PACKAGE_TARNAME@.spec dist Makefile if [[ "X$(BUILD_TESTS)" = Xfalse ]]; then \ RPMARGS="--without lustre_tests"; \ fi; \ + if [[ "X$(BUILD_LUSTREIOKIT)" = Xfalse ]]; then \ + RPMARGS="$$RPMARGS --without lustre_iokit"; \ + fi; \ eval rpmbuild $$RPMARGS -ts $(distdir).tar.gz rpms: diff --git a/autogen.sh b/autogen.sh index bf6a6a8..6edec5b 100644 --- a/autogen.sh +++ b/autogen.sh @@ -21,7 +21,7 @@ run_cmd() echo "Checking for a complete tree..." REQUIRED_DIRS="libcfs lnet lustre" OPTIONAL_DIRS="snmp portals" -CONFIGURE_DIRS="libsysio lustre-iokit" +CONFIGURE_DIRS="libsysio" for dir in $REQUIRED_DIRS ; do test -d "$dir" || \ diff --git a/config/lustre-build.m4 b/config/lustre-build.m4 index da3741f..5b132e8 100644 --- a/config/lustre-build.m4 +++ b/config/lustre-build.m4 @@ -232,41 +232,20 @@ AC_CONFIG_SUBDIRS([libsysio]) # # LB_PATH_LUSTREIOKIT # -# Handle internal/external lustre-iokit +# We no longer handle external lustre-iokit # AC_DEFUN([LB_PATH_LUSTREIOKIT], -[AC_ARG_WITH([lustre-iokit], - AC_HELP_STRING([--with-lustre-iokit=path], - [set path to lustre-iokit source (default is included lustre-iokit)]), +[AC_ARG_ENABLE([iokit], + AC_HELP_STRING([--disable-iokit], + [disable iokit (default is enable)]), [],[ - with_lustre_iokit='yes' + enable_iokit='yes' ]) -AC_MSG_CHECKING([location of lustre-iokit]) -enable_lustre_iokit="$with_lustre_iokit" -case x$with_lustre_iokit in - xyes) - AC_MSG_RESULT([internal]) - LB_CHECK_FILE([$srcdir/lustre-iokit/ior-survey/ior-survey],[],[ - AC_MSG_ERROR([A complete internal lustre-iokit was not found.]) - ]) - LUSTREIOKIT_SUBDIR="lustre-iokit" - LUSTREIOKIT="$PWD/lustre-iokit" - ;; - xno) - AC_MSG_RESULT([disabled]) - ;; - *) - AC_MSG_RESULT([$with_lustre_iokit]) - LB_CHECK_FILE([$with_lustre_iokit/ior-survey/ior_survey],[],[ - AC_MSG_ERROR([A complete (built) external lustre-iokit was not found.]) - ]) - LUSTREIOKIT="$with_lustre_iokit" - ;; -esac +AC_MSG_CHECKING([whether to build iokit]) +AC_MSG_RESULT([$enable_iokit]) +AS_IF([test "x$enable_iokit" = xyes], [LUSTREIOKIT_SUBDIR="lustre-iokit"], [LUSTREIOKIT_SUBDIR=""])[]dnl AC_SUBST(LUSTREIOKIT_SUBDIR) -# We have to configure even if we don't build here for make dist to work -AC_CONFIG_SUBDIRS([lustre-iokit]) -AM_CONDITIONAL(BUILD_LUSTREIOKIT, [test "x$with_lustre_iokit" != xno]) +AM_CONDITIONAL(BUILD_LUSTREIOKIT, [test "x$enable_iokit" = xyes]) ]) # Define no libcfs by default. @@ -587,6 +566,13 @@ AC_DEFUN([LB_CONFIG_FILES], contrib/scripts/Makefile ldiskfs/Makefile ldiskfs/autoMakefile + lustre-iokit/Makefile + lustre-iokit/obdfilter-survey/Makefile + lustre-iokit/ost-survey/Makefile + lustre-iokit/sgpdd-survey/Makefile + lustre-iokit/mds-survey/Makefile + lustre-iokit/ior-survey/Makefile + lustre-iokit/stats-collect/Makefile ) ]) diff --git a/contrib/lbuild/lbuild b/contrib/lbuild/lbuild index 17f62b5..575bd37 100755 --- a/contrib/lbuild/lbuild +++ b/contrib/lbuild/lbuild @@ -748,39 +748,6 @@ do_patch_linux() { } -build_iokit() { - local rpmbuildopt="$1" - - pushd lustre-iokit > /dev/null || return 255 - - if ! ./configure; then - echo "failed to configure in lustre-iokit" - popd >/dev/null # pushd lustre-iokit - return 255 - fi - - if ! make dist; then - echo "failed to make dist in lustre-iokit" - popd >/dev/null # pushd lustre-iokit - return 255 - fi - - if ! $RPMBUILD $rpmbuildopt lustre-iokit*.tar.gz \ - --define "_tmppath /var/tmp" \ - --define "_topdir $TOPDIR" 2>&1; then - popd >/dev/null # pushd lustre-iokit - return 255 - fi - - if $DO_SRC && ! $RPMBUILD -ts lustre-iokit*.tar.gz \ - --define "_tmppath /var/tmp" \ - --define "_topdir $TOPDIR" 2>&1; then - popd >/dev/null # pushd lustre-iokit - return 255 - fi - popd >/dev/null # pushd lustre-iokit -} - build_lustre() { local linux="$1" local linuxobj="$2" @@ -818,14 +785,6 @@ build_lustre() { fi fi - if $IOKITRPM; then - if ! build_iokit $rpmbuildopt; then - echo "failed to build lustre-iokit" - popd >/dev/null # pushd lustre - return 255 - fi - fi - # convert the $PATCHLESS boolean to an empty/not-empty boolean # as silly as this seems, it makes the syntax of the rpmbuild command # simpler and not need an eval to deal with the quotes in the quotes @@ -840,6 +799,11 @@ build_lustre() { lustre_tests="no" fi + local lustre_iokit="" + if ! $IOKITRPM; then + lustre_iokit="no" + fi + local osd_zfs="" if $OSDZFSRPM; then osd_zfs="yes" @@ -853,6 +817,7 @@ build_lustre() { $RPMBUILD $targets $rpmbuildopt "$LUSTRE" \ ${is_patchless:+--without servers} \ ${lustre_tests:+--without lustre_tests} \ + ${lustre_iokit:+--without lustre_iokit} \ ${osd_zfs:+--with zfs} \ ${osd_ldiskfs:+--with ldiskfs} \ ${FIND_REQUIRES:+--define "__find_requires $FIND_REQUIRES"} \ @@ -867,6 +832,7 @@ build_lustre() { if ! $RPMBUILD -ts "$LUSTRE" \ ${is_patchless:+--without servers} \ ${lustre_tests:+--without lustre_tests} \ + ${lustre_iokit:+--without lustre_iokit} \ ${FIND_REQUIRES:+--define "__find_requires $FIND_REQUIRES"} \ --define "configure_args $confoptions ${CONFIGURE_FLAGS}" \ --define "kdir $linux" \ diff --git a/lustre-iokit/Makefile.am b/lustre-iokit/Makefile.am index 02e4351..83dcb47 100644 --- a/lustre-iokit/Makefile.am +++ b/lustre-iokit/Makefile.am @@ -1,10 +1,2 @@ SUBDIRS = obdfilter-survey sgpdd-survey ost-survey ior-survey SUBDIRS += mds-survey stats-collect - -EXTRA_DIST = lustre-iokit.spec - -rpms rpm: dist - rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz - -srpm: dist - rpmbuild -ts $(PACKAGE)-$(VERSION).tar.gz diff --git a/lustre-iokit/autogen.sh b/lustre-iokit/autogen.sh deleted file mode 100644 index b491fce..0000000 --- a/lustre-iokit/autogen.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -fatal() { - local msg="$1" - - echo "FATAL: $msg" - exit 1 -} - -run_cmd() { - local cmd="$1" - - echo "Running $cmd..." - $cmd || fatal "$cmd failed!" -} - -run_cmd ${ACLOCAL:-aclocal} -run_cmd "${AUTOMAKE:-automake} -a -c" -run_cmd autoconf - -echo "Finished. Ready for ./configure ..." diff --git a/lustre-iokit/configure.ac b/lustre-iokit/configure.ac deleted file mode 100644 index 54d9a79..0000000 --- a/lustre-iokit/configure.ac +++ /dev/null @@ -1,19 +0,0 @@ -AC_PREREQ([2.57]) -AC_INIT([lustre-iokit],[2.3.65], [http://bugs.hpdd.intel.com/]) -AC_CONFIG_AUX_DIR([.]) -AM_INIT_AUTOMAKE -AC_PATH_PROGS(BASH, bash) -AC_PATH_PROGS(PERL, perl) -RELEASE="1" -AC_SUBST(RELEASE) - -AC_OUTPUT( -lustre-iokit.spec -Makefile -sgpdd-survey/Makefile -obdfilter-survey/Makefile -ost-survey/Makefile -ior-survey/Makefile -mds-survey/Makefile -stats-collect/Makefile -) diff --git a/lustre-iokit/lustre-iokit.spec.in b/lustre-iokit/lustre-iokit.spec.in deleted file mode 100644 index 8f4690d..0000000 --- a/lustre-iokit/lustre-iokit.spec.in +++ /dev/null @@ -1,90 +0,0 @@ -# lustre-iokit.spec -%define name @PACKAGE@ -%define version @VERSION@ -%define release @RELEASE@ - -Summary: The Lustre IO-Kit is a collection of benchmark tools for a cluster with the Lustre file system. -Name: %{name} -Version: %{version} -Release: %{release} -License: GPL -Group: Applications/System -Source: %{name}-%{version}.tar.gz -URL: http://wiki.whamcloud.com/ -BuildRoot: /var/tmp/%{name}-%{version}-root -Provides: %{name} = %{version} -BuildArch: noarch -Requires: python > 2.2, sg3_utils - -%description -This package includes five tools: -sgpdd-survey: -A test of the 'bare metal' performance, bypassing as much of the kernel as we can. Uses the sgp_dd utility. - -obdfilter-survey -This survey can be run in 3 modes to test disk I/O including the filesystem, -network I/O, and disk I/O via the network. The script does sequential I/O -with varying numbers of threads and objects (files) by using lctl::test_brw -to drive the echo_client connected to local or remote obdfilter instances, -or remote obdecho instances. - -ost-survey -This survey tests the client-to-disk performance of individual OSTs, and -ranks then for comparison. - -stats-collect -This script will collect IO stats on a defined set of nodes. - -ior-survey: -A script to run the IOR benchmark. The latest version can be downloaded from http://www.llnl.gov/asci/purple/benchmarks/limited/ior/ - -mds-survey: -This survey tests the local metadata performance using the echo_client to drive -the MDD layer to perform operations. It is run with multiple threads (to -simulate MDT service threads) locally on the MDS node, and does not need Lustre -clients in order to run - -%prep -%setup -qn %{name}-%{version} - -%build -rm -fr $RPM_BUILD_ROOT -./configure --prefix=/usr -make - -%install -make install DESTDIR=$RPM_BUILD_ROOT - -%files -/usr/bin/ior-survey -/usr/bin/parse-ior -/usr/bin/libecho -/usr/bin/obdfilter-survey -/usr/bin/plot-obdfilter -/usr/bin/plot-ost -/usr/bin/ost-survey -/usr/bin/sgpdd-survey -/usr/bin/plot-sgpdd -/usr/bin/lstats.sh -/usr/bin/gather_stats_everywhere.sh -/usr/bin/config.sh -/usr/bin/mds-survey -%doc obdfilter-survey/README.obdfilter-survey -%doc ior-survey/README.ior-survey -%doc ost-survey/README.ost-survey -%doc mds-survey/README.mds-survey -%doc sgpdd-survey/README.sgpdd-survey -%doc stats-collect/README.lstats.sh - - -%changelog -* Fri Jan 13 2012 Minh Diep -- Added mds-survey -* Fri Dec 30 2011 Minh Diep -- WhamCloud release for bug fixes -* Tue Jul 24 2007 Cliff White -- Added stats-collect -* Mon Apr 9 2007 Cliff White -- Merged with existing, changed to .in format. -* Thu Oct 4 2006 Kalpak Shah -- Created the spec file. diff --git a/lustre.spec.in b/lustre.spec.in index 95f8d73..8d2ccd0 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -5,6 +5,7 @@ %bcond_without ldiskfs %bcond_with zfs %bcond_without lustre_tests +%bcond_without lustre_iokit %if %{without servers} # --without servers overrides --with {ldiskfs|zfs} @@ -206,12 +207,48 @@ systems. Summary: Lustre testing framework Group: Development/Kernel Provides: %{name}-tests = %{version} -Requires: %{name} = %{version}, %{name}-modules = %{version} +Requires: %{name} = %{version}, %{name}-modules = %{version}, lustre-iokit %description tests This package contains a set of test binaries and scripts that are intended to be used by the Lustre testing framework. +%if %{with lustre_iokit} +%package -n lustre-iokit +Summary: The Lustre IO-Kit is a collection of benchmark tools for a cluster with the Lustre file system. +Group: Applications/System +Requires: python > 2.2, sg3_utils + +%description -n lustre-iokit +This package includes five tools: +sgpdd-survey: +A test of the 'bare metal' performance, bypassing as much of the kernel as we can. Uses the sgp_dd utility. + +obdfilter-survey +This survey can be run in 3 modes to test disk I/O including the filesystem, +network I/O, and disk I/O via the network. The script does sequential I/O +with varying numbers of threads and objects (files) by using lctl::test_brw +to drive the echo_client connected to local or remote obdfilter instances, +or remote obdecho instances. + +ost-survey +This survey tests the client-to-disk performance of individual OSTs, and +ranks then for comparison. + +stats-collect +This script will collect IO stats on a defined set of nodes. + +ior-survey: +A script to run the IOR benchmark. The latest version can be downloaded from +http://www.llnl.gov/asci/purple/benchmarks/limited/ior/ + +mds-survey: +This survey tests the local metadata performance using the echo_client to drive +the MDD layer to perform operations. It is run with multiple threads (to +simulate MDT service threads) locally on the MDS node, and does not need Lustre +clients in order to run +%endif + %if 0%{?suse_version} %debug_package %endif @@ -245,6 +282,9 @@ CONFIGURE_ARGS="$CONFIGURE_ARGS --enable-tests --enable-liblustre-tests" %else CONFIGURE_ARGS="$CONFIGURE_ARGS --disable-tests --disable-liblustre-tests" %endif +%if %{without lustre_iokit} +CONFIGURE_ARGS="$CONFIGURE_ARGS --disable-iokit" +%endif # if %%kdir was given, make sure it's not in the configure arguments if [ -n "%kdir" ]; then @@ -297,7 +337,16 @@ find $RPM_BUILD_ROOT -name '*.so' | xargs chmod +x cat >lustre.files <