Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moabrsv module #91

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.modules
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,9 @@ Module: misc/netgroup
Package: pdsh-mod-netgroup
Description: Allows list of targets to be build from netgroups.
Conflicts: misc/genders, misc/dshgroup, misc/nodeattr

Module: misc/moabrsv
Package: pdsh-mod-moabrsv
Description: Allows list of targets to be build from Moab reservations.
Conflicts: None
Requires: libxml2
54 changes: 54 additions & 0 deletions config/ac_moabrsv.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
##*****************************************************************************
## $Id$
##*****************************************************************************
# AUTHOR:
# Troy Baer <[email protected]>
#
# SYNOPSIS:
# AC_MOABRSV
#
# DESCRIPTION:
# Checks for whether to include moabrsv module
#
##*****************************************************************************

AC_DEFUN([AC_MOABRSV],
[
#
# Check for whether to build moabrsv module
#
AC_MSG_CHECKING([for whether to build moabrsv module])
AC_ARG_WITH([moabrsv],
AC_HELP_STRING([--with-moabrsv],
[support running pdsh under MOABRSV allocation]),
[ case "$withval" in
yes) ac_with_moabrsv=yes ;;
no) ac_with_moabrsv=no ;;
*) AC_MSG_RESULT([doh!])
AC_MSG_ERROR([bad value "$withval" for --with-moabrsv]) ;;
esac
]
)
AC_MSG_RESULT([${ac_with_moabrsv=no}])

if test "$ac_with_moabrsv" = "yes"; then

AC_CHECK_LIB([xml2], [xmlInitParser],
[ac_have_libxml2=yes],
[ac_have_libxml2=no], [-lxml2])

if test "$ac_have_libxml2" != "yes"; then
AC_MSG_NOTICE([Cannot support moabrsv without libxml2.])
else
ac_have_moabrsv=yes
AC_ADD_STATIC_MODULE("moabrsv")
MOABRSV_LIBS="-lxml2"
MOABRSV_CPPFLAGS="-I/usr/include/libxml2"
AC_DEFINE([HAVE_MOABRSV], [1], [Define if you have moabrsv.])
fi
fi

AC_SUBST(HAVE_MOABRSV)
AC_SUBST(MOABRSV_LIBS)
AC_SUBST(MOABRSV_CPPFLAGS)
])
6 changes: 6 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,12 @@ AM_CONDITIONAL([WITH_SLURM], [test "$ac_have_slurm" = "yes"])
AC_TORQUE
AM_CONDITIONAL([WITH_TORQUE], [test "$ac_have_torque" = "yes"])

#
# Determine whether to to build moabrsv module (support running under Moab reservation)
#
AC_MOABRSV
AM_CONDITIONAL([WITH_MOABRSV], [test "$ac_have_moabrsv" = "yes"])

#
# Determine whether to build dshgroup module
# (support dsh-style /etc/dsh/group/%s ~/.dsh/group/%s files)
Expand Down
10 changes: 10 additions & 0 deletions doc/pdsh.1.in
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,16 @@ a Torque allocation).
Target list of nodes allocated to the Torque job \fIjobid\fR. This option
may be used multiple times to target multiple Torque jobs.

.SH "moabrsv module options"
The \fBmoabrsv\fI module allows \fBpdsh\fR to target nodes based on
Moab reservations. Similar to the slurm and torque modules, the
\fBmoabrsv\fR module is typically called after all other node
selection options have been processed.
.TP
.I "-r rsvid[,rsvid,...]"
Target list of nodes allocated to the Moab reservation \fIrsvid\fR. This option
may be used multiple times to target multiple Moab reservations.

.SH "rms module options"
The \fBrms\fR module allows pdsh to target nodes based on an RMS
resource. The \fBrms\fR module is typically called after all other
Expand Down
19 changes: 19 additions & 0 deletions pdsh.spec
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ Requires: pdsh-rcmd
%{expand: %pdsh_opt machines}
%{expand: %pdsh_opt slurm}
%{expand: %pdsh_opt torque}
%{expand: %pdsh_opt moabrsv}
%{expand: %pdsh_opt rms}

#
Expand Down Expand Up @@ -117,6 +118,7 @@ Requires: pdsh-rcmd
%{?_with_pam:BuildRequires: pam-devel}
%{?_with_slurm:BuildRequires: slurm-devel}
%{?_with_torque:BuildRequires: torque-devel}
%{?_with_moabrsv:BuildRequires: libxml2-devel}


##############################################################################
Expand Down Expand Up @@ -279,6 +281,13 @@ Requires: torque
Pdsh module providing support for gathering the list of target nodes
from an allocated Torque job.

%package mod-moabrsv
Summary: Provides support for running pdsh under Moab reservations
Group: System Environment/Base
Requires: libxml2
%description mod-moabrsv
Pdsh module providing support for gathering the list of target nodes
from a Moab reservation.


##############################################################################
Expand Down Expand Up @@ -482,6 +491,13 @@ rm -rf "$RPM_BUILD_ROOT"
%endif
##############################################################################

%if %{?_with_moabrsv:1}%{!?_with_moabrsv:0}
%files mod-moabrsv
%defattr(-,root,root)
%{_libdir}/pdsh/moabrsv.*
%endif
##############################################################################

%if %{?_with_qshell:1}%{!?_with_qshell:0}
%files qshd
%defattr(-,root,root)
Expand Down Expand Up @@ -513,6 +529,9 @@ fi
##############################################################################

%changelog
* Fri Mar 21 2017 Troy Baer <[email protected]>
- add mod-moabrsv package

* Tue Jul 20 2016 Albert Chu <[email protected]>
- update URL to point to github URL
- update Source to not point to sourceforge repo
Expand Down
13 changes: 12 additions & 1 deletion src/modules/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ if WITH_TORQUE
TORQUE_MODULE = torque.la
endif

if WITH_MOABRSV
MOABRSV_MODULE = moabrsv.la
endif

if WITH_DSHGROUP
DSHGROUP_MODULE = dshgroup.la
endif
Expand Down Expand Up @@ -116,6 +120,7 @@ pkglib_LTLIBRARIES = \
$(KRB4_MODULE) \
$(SLURM_MODULE) \
$(TORQUE_MODULE) \
$(MOABRSV_MODULE) \
$(DSHGROUP_MODULE) \
$(NETGROUP_MODULE) \
$(EXEC_MODULE)
Expand Down Expand Up @@ -144,6 +149,8 @@ EXTRA_libmods_la_SOURCES = \
sdr.c \
k4cmd.c \
slurm.c \
torque.c \
moabrsv.c \
dshgroup.c \
netgroup.c \
xcpucmd.c \
Expand All @@ -161,7 +168,8 @@ libmods_la_LDFLAGS = \
$(KRB_LIBS) \
$(GENDERS_LIBS) \
$(SLURM_LIBS) \
$(TORQUE_LIBS)
$(TORQUE_LIBS) \
$(MOABRSV_LIBS)


xrcmd_la_SOURCES = xrcmd.c
Expand Down Expand Up @@ -203,6 +211,9 @@ slurm_la_LDFLAGS = $(MODULE_FLAGS) $(SLURM_LIBS)
torque_la_SOURCES = torque.c
torque_la_LDFLAGS = $(MODULE_FLAGS) $(TORQUE_LIBS)
torque_la_CPPFLAGS = $(TORQUE_CPPFLAGS)
moabrsv_la_SOURCES = moabrsv.c
moabrsv_la_LDFLAGS = $(MODULE_FLAGS) $(MOABRSV_LIBS)
moabrsv_la_CPPFLAGS = $(MOABRSV_CPPFLAGS)
dshgroup_la_SOURCES = dshgroup.c
dshgroup_la_LDFLAGS = $(MODULE_FLAGS)
netgroup_la_SOURCES = netgroup.c
Expand Down
Loading