gfs2-utils: master - gfs2-utils build: Add test coverage option
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=99ec0b8d...
Commit: 99ec0b8d3d26fc24e945ac515c001baf352b39ee
Parent: 3f25d8886ecfc685b243b71a39ffccc77acfabfb
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Wed Sep 17 18:36:36 2014 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Wed Sep 17 18:36:36 2014 +0100
gfs2-utils build: Add test coverage option
Add an --enable-gcov configure option to simplify building with the
required flags to generate test coverage reports.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
configure.ac | 15 ++++++++++++++-
doc/README.tests | 12 ++++++++++++
2 files changed, 26 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index b93eec9..a978e52 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,7 +68,7 @@ test x"$YACC" = x && AC_MSG_ERROR([bison not found])
# args. Global CFLAGS are ignored during this test.
cc_supports_flag() {
local CFLAGS="$@"
- AC_MSG_CHECKING([whether $CC supports "$@"])
+ AC_MSG_CHECKING([whether $CC supports $CFLAGS])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main(){return 0;}])],
[RC=0; AC_MSG_RESULT([yes])],
[RC=1; AC_MSG_RESULT([no])])
@@ -89,6 +89,9 @@ check_lib_no_libs() {
AC_ARG_ENABLE([debug],
[ --enable-debug enable debug build. ],
[ default="no" ])
+AC_ARG_ENABLE([gcov],
+ [ --enable-gcov enable coverage instrumentation.],
+ [ default="no" ])
# We use the Check framework for unit tests
PKG_CHECK_MODULES([check], [check >= 0.9.8],
@@ -166,6 +169,15 @@ else
GDB_FLAGS="-g"
fi
+# gcov works without optimization
+if test "x${enable_gcov}" = xyes; then
+ GCOV_CFLAGS="-fprofile-arcs -ftest-coverage"
+ if ! cc_supports_flag $GCOV_CFLAGS; then
+ AC_MSG_ERROR([your compiler does not support coverage instrumentation])
+ fi
+ OPT_CFLAGS="-O0 $GCOV_CFLAGS"
+fi
+
# extra warnings
EXTRA_WARNINGS=""
@@ -223,3 +235,4 @@ AC_CONFIG_FILES([Makefile
AC_OUTPUT
test x"$have_check" = "xyes" || AC_MSG_NOTICE([package 'check' not found; unit tests will not be built])
+test x"${enable_gcov}" = "xyes" && AC_MSG_NOTICE([code coverage enabled; optimization will be disabled])
diff --git a/doc/README.tests b/doc/README.tests
index fa35803..79f51f6 100644
--- a/doc/README.tests
+++ b/doc/README.tests
@@ -40,3 +40,15 @@ Documentation for Autotest, including the AT_* macros used to define tests, can
be found in the autoconf manual at:
http://www.gnu.org/software/autoconf/manual/index.html
+
+Test coverage instrumentation can be enabled using the --enable-gcov option at
+the configure stage. Once the tools have been built and run with this option
+enabled, coverage data will be written to files in the source directories for
+use by tools such as gcov or lcov. For example, to generate a HTML report of
+testsuite code coverage, using lcov, in a directory named 'coverage':
+
+ ./autogen.sh
+ ./configure --enable-gcov
+ make check
+ lcov --directory . -c -o gfs2-utils.info
+ genhtml -o coverage gfs2-utils.info
9 years, 7 months
gfs2-utils: master - libgfs2: Move old rgrp layout functions into fsck.gfs2
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=3f25d888...
Commit: 3f25d8886ecfc685b243b71a39ffccc77acfabfb
Parent: 54c5ee8ee1b5bf008400d1c86af3a44f15eb4970
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Wed Sep 17 16:19:07 2014 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Wed Sep 17 16:19:07 2014 +0100
libgfs2: Move old rgrp layout functions into fsck.gfs2
fsck.gfs2 is now the only user of compute_rgrp_layout and how_many_rgrps
and it requires them for discovery of resource groups when the rindex is
unreliable. Move them out of libgfs2 and into fsck.gfs2. New code should
use lgfs2_rgrps_plan() instead.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/fsck/rgrepair.c | 118 +++++++++++++++++++++++++++++++++++++++++
gfs2/libgfs2/fs_geometry.c | 126 --------------------------------------------
gfs2/libgfs2/libgfs2.h | 4 --
3 files changed, 118 insertions(+), 130 deletions(-)
diff --git a/gfs2/fsck/rgrepair.c b/gfs2/fsck/rgrepair.c
index dd197d6..12e474b 100644
--- a/gfs2/fsck/rgrepair.c
+++ b/gfs2/fsck/rgrepair.c
@@ -590,6 +590,124 @@ static int gfs2_rindex_rebuild(struct gfs2_sbd *sdp, int *num_rgs,
return 0;
}
+#define DIV_RU(x, y) (((x) + (y) - 1) / (y))
+
+/**
+ * how_many_rgrps - figure out how many RG to put in a subdevice
+ * @w: the command line
+ * @dev: the device
+ *
+ * Returns: the number of RGs
+ */
+static uint64_t how_many_rgrps(struct gfs2_sbd *sdp, struct device *dev, int rgsize_specified)
+{
+ uint64_t nrgrp;
+ uint32_t rgblocks1, rgblocksn, bitblocks1, bitblocksn;
+ int bitmap_overflow = 0;
+
+ while (1) {
+ nrgrp = DIV_RU(dev->length, (sdp->rgsize << 20) / sdp->bsize);
+
+ /* check to see if the rg length overflows max # bitblks */
+ bitblocksn = rgblocks2bitblocks(sdp->bsize, dev->length / nrgrp, &rgblocksn);
+ /* calculate size of the first rgrp */
+ bitblocks1 = rgblocks2bitblocks(sdp->bsize, dev->length - (nrgrp - 1) * (dev->length / nrgrp),
+ &rgblocks1);
+ if (bitblocks1 > 2149 || bitblocksn > 2149) {
+ bitmap_overflow = 1;
+ if (sdp->rgsize <= GFS2_DEFAULT_RGSIZE) {
+ fprintf(stderr, "error: It is not possible "
+ "to use the entire device with "
+ "block size %u bytes.\n",
+ sdp->bsize);
+ exit(-1);
+ }
+ sdp->rgsize -= GFS2_DEFAULT_RGSIZE; /* smaller rgs */
+ continue;
+ }
+ if (bitmap_overflow ||
+ rgsize_specified || /* If user specified an rg size or */
+ nrgrp <= GFS2_EXCESSIVE_RGS || /* not an excessive # or */
+ sdp->rgsize >= 2048) /* we reached the max rg size */
+ break;
+
+ sdp->rgsize += GFS2_DEFAULT_RGSIZE; /* bigger rgs */
+ }
+
+ log_debug(" rg sz = %"PRIu32"\n nrgrp = %"PRIu64"\n", sdp->rgsize, nrgrp);
+
+ return nrgrp;
+}
+
+/**
+ * compute_rgrp_layout - figure out where the RG in a FS are
+ */
+static void compute_rgrp_layout(struct gfs2_sbd *sdp, struct osi_root *rgtree, int rgsize_specified)
+{
+ struct device *dev;
+ struct rgrp_tree *rl, *rlast = NULL;
+ struct osi_node *n, *next = NULL;
+ unsigned int rgrp = 0, nrgrp, rglength;
+ uint64_t rgaddr;
+
+ sdp->new_rgrps = 0;
+ dev = &sdp->device;
+
+ /* If this is a new file system, compute the length and number */
+ /* of rgs based on the size of the device. */
+ /* If we have existing RGs (i.e. gfs2_grow) find the last one. */
+ if (!rgtree->osi_node) {
+ dev->length -= sdp->sb_addr + 1;
+ nrgrp = how_many_rgrps(sdp, dev, rgsize_specified);
+ rglength = dev->length / nrgrp;
+ sdp->new_rgrps = nrgrp;
+ } else {
+ uint64_t old_length, new_chunk;
+
+ printf("Existing resource groups:\n");
+ for (rgrp = 0, n = osi_first(rgtree); n; n = next, rgrp++) {
+ next = osi_next(n);
+ rl = (struct rgrp_tree *)n;
+
+ printf("%d: start: %" PRIu64 " (0x%"
+ PRIx64 "), length = %"PRIu64" (0x%"
+ PRIx64 ")\n", rgrp + 1, rl->start, rl->start,
+ rl->length, rl->length);
+ rlast = rl;
+ }
+ rlast->start = rlast->ri.ri_addr;
+ rglength = rgrp_size(rlast);
+ rlast->length = rglength;
+ old_length = rlast->ri.ri_addr + rglength;
+ new_chunk = dev->length - old_length;
+ sdp->new_rgrps = new_chunk / rglength;
+ nrgrp = rgrp + sdp->new_rgrps;
+ }
+
+ if (rgrp < nrgrp)
+ printf("\nNew resource groups:\n");
+ for (; rgrp < nrgrp; rgrp++) {
+ if (rgrp) {
+ rgaddr = rlast->start + rlast->length;
+ rl = rgrp_insert(rgtree, rgaddr);
+ rl->length = rglength;
+ } else {
+ rgaddr = sdp->sb_addr + 1;
+ rl = rgrp_insert(rgtree, rgaddr);
+ rl->length = dev->length -
+ (nrgrp - 1) * (dev->length / nrgrp);
+ }
+ rl->start = rgaddr;
+ printf("%d: start: %" PRIu64 " (0x%"
+ PRIx64 "), length = %"PRIu64" (0x%"
+ PRIx64 ")\n", rgrp + 1, rl->start, rl->start,
+ rl->length, rl->length);
+ rlast = rl;
+ }
+
+ sdp->rgrps = nrgrp;
+}
+
/*
* gfs2_rindex_calculate - calculate what the rindex should look like
* in a perfect world (trust_lvl == open_minded)
diff --git a/gfs2/libgfs2/fs_geometry.c b/gfs2/libgfs2/fs_geometry.c
index c378dba..59b5ef7 100644
--- a/gfs2/libgfs2/fs_geometry.c
+++ b/gfs2/libgfs2/fs_geometry.c
@@ -15,132 +15,6 @@
#include "libgfs2.h"
#include "config.h"
-#define DIV_RU(x, y) (((x) + (y) - 1) / (y))
-
-/**
- * how_many_rgrps - figure out how many RG to put in a subdevice
- * @w: the command line
- * @dev: the device
- *
- * Returns: the number of RGs
- */
-
-uint64_t how_many_rgrps(struct gfs2_sbd *sdp, struct device *dev, int rgsize_specified)
-{
- uint64_t nrgrp;
- uint32_t rgblocks1, rgblocksn, bitblocks1, bitblocksn;
- int bitmap_overflow = 0;
-
- while (TRUE) {
- nrgrp = DIV_RU(dev->length, (sdp->rgsize << 20) / sdp->bsize);
-
- /* check to see if the rg length overflows max # bitblks */
- bitblocksn = rgblocks2bitblocks(sdp->bsize, dev->length / nrgrp, &rgblocksn);
- /* calculate size of the first rgrp */
- bitblocks1 = rgblocks2bitblocks(sdp->bsize, dev->length - (nrgrp - 1) * (dev->length / nrgrp),
- &rgblocks1);
- if (bitblocks1 > 2149 || bitblocksn > 2149) {
- bitmap_overflow = 1;
- if (sdp->rgsize <= GFS2_DEFAULT_RGSIZE) {
- fprintf(stderr, "error: It is not possible "
- "to use the entire device with "
- "block size %u bytes.\n",
- sdp->bsize);
- exit(-1);
- }
- sdp->rgsize -= GFS2_DEFAULT_RGSIZE; /* smaller rgs */
- continue;
- }
- if (bitmap_overflow ||
- rgsize_specified || /* If user specified an rg size or */
- nrgrp <= GFS2_EXCESSIVE_RGS || /* not an excessive # or */
- sdp->rgsize >= 2048) /* we reached the max rg size */
- break;
-
- sdp->rgsize += GFS2_DEFAULT_RGSIZE; /* bigger rgs */
- }
-
- if (cfg_debug)
- printf(" rg sz = %"PRIu32"\n nrgrp = %"PRIu64"\n",
- sdp->rgsize, nrgrp);
-
- return nrgrp;
-}
-
-/**
- * compute_rgrp_layout - figure out where the RG in a FS are
- * @w: the command line
- *
- * Returns: a list of rgrp_list_t structures
- */
-
-void compute_rgrp_layout(struct gfs2_sbd *sdp, struct osi_root *rgtree,
- int rgsize_specified)
-{
- struct device *dev;
- struct rgrp_tree *rl, *rlast = NULL;
- struct osi_node *n, *next = NULL;
- unsigned int rgrp = 0, nrgrp, rglength;
- uint64_t rgaddr;
-
- sdp->new_rgrps = 0;
- dev = &sdp->device;
-
- /* If this is a new file system, compute the length and number */
- /* of rgs based on the size of the device. */
- /* If we have existing RGs (i.e. gfs2_grow) find the last one. */
- if (!rgtree->osi_node) {
- dev->length -= sdp->sb_addr + 1;
- nrgrp = how_many_rgrps(sdp, dev, rgsize_specified);
- rglength = dev->length / nrgrp;
- sdp->new_rgrps = nrgrp;
- } else {
- uint64_t old_length, new_chunk;
-
- printf("Existing resource groups:\n");
- for (rgrp = 0, n = osi_first(rgtree); n; n = next, rgrp++) {
- next = osi_next(n);
- rl = (struct rgrp_tree *)n;
-
- printf("%d: start: %" PRIu64 " (0x%"
- PRIx64 "), length = %"PRIu64" (0x%"
- PRIx64 ")\n", rgrp + 1, rl->start, rl->start,
- rl->length, rl->length);
- rlast = rl;
- }
- rlast->start = rlast->ri.ri_addr;
- rglength = rgrp_size(rlast);
- rlast->length = rglength;
- old_length = rlast->ri.ri_addr + rglength;
- new_chunk = dev->length - old_length;
- sdp->new_rgrps = new_chunk / rglength;
- nrgrp = rgrp + sdp->new_rgrps;
- }
-
- if (rgrp < nrgrp)
- printf("\nNew resource groups:\n");
- for (; rgrp < nrgrp; rgrp++) {
- if (rgrp) {
- rgaddr = rlast->start + rlast->length;
- rl = rgrp_insert(rgtree, rgaddr);
- rl->length = rglength;
- } else {
- rgaddr = sdp->sb_addr + 1;
- rl = rgrp_insert(rgtree, rgaddr);
- rl->length = dev->length -
- (nrgrp - 1) * (dev->length / nrgrp);
- }
- rl->start = rgaddr;
- printf("%d: start: %" PRIu64 " (0x%"
- PRIx64 "), length = %"PRIu64" (0x%"
- PRIx64 ")\n", rgrp + 1, rl->start, rl->start,
- rl->length, rl->length);
- rlast = rl;
- }
-
- sdp->rgrps = nrgrp;
-}
-
/**
* Given a number of blocks in a resource group, return the number of blocks
* needed for bitmaps. Also calculate the adjusted number of free data blocks
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index 10df2d4..604a7de 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -424,10 +424,6 @@ extern int gfs2_set_bitmap(lgfs2_rgrp_t rg, uint64_t blkno, int state);
/* fs_geometry.c */
extern uint32_t rgblocks2bitblocks(const unsigned int bsize, const uint32_t rgblocks,
uint32_t *ri_data) __attribute__((nonnull(3)));
-extern uint64_t how_many_rgrps(struct gfs2_sbd *sdp, struct device *dev,
- int rgsize_specified);
-extern void compute_rgrp_layout(struct gfs2_sbd *sdp, struct osi_root *rgtree,
- int rgsize_specified);
extern int build_rgrps(struct gfs2_sbd *sdp, int write);
/* fs_ops.c */
9 years, 7 months
fence-agents: master - [build] Unify make clean
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=316ecf...
Commit: 316ecfbad27231ced5c383d16a4f06a1679c90da
Parent: a1e5c374e44202b54d10ac78b0be40f760a6115a
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Thu Sep 18 16:22:30 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Thu Sep 18 16:22:30 2014 +0200
[build] Unify make clean
---
fence/agents/alom/Makefile.am | 3 ---
fence/agents/amt/Makefile.am | 3 ---
fence/agents/apc/Makefile.am | 3 ---
fence/agents/apc_snmp/Makefile.am | 3 ---
fence/agents/bladecenter/Makefile.am | 3 ---
fence/agents/brocade/Makefile.am | 3 ---
fence/agents/cisco_mds/Makefile.am | 3 ---
fence/agents/cisco_ucs/Makefile.am | 3 ---
fence/agents/docker/Makefile.am | 3 ---
fence/agents/drac/Makefile.am | 3 ---
fence/agents/drac5/Makefile.am | 3 ---
fence/agents/dummy/Makefile.am | 3 ---
fence/agents/eaton_snmp/Makefile.am | 3 ---
fence/agents/eps/Makefile.am | 3 ---
fence/agents/hds_cb/Makefile.am | 3 ---
fence/agents/hpblade/Makefile.am | 3 ---
fence/agents/ibmblade/Makefile.am | 3 ---
fence/agents/ifmib/Makefile.am | 3 ---
fence/agents/ilo/Makefile.am | 4 ----
fence/agents/ilo_moonshot/Makefile.am | 3 ---
fence/agents/ilo_mp/Makefile.am | 3 ---
fence/agents/ilo_ssh/Makefile.am | 3 ---
fence/agents/intelmodular/Makefile.am | 3 ---
fence/agents/ipdu/Makefile.am | 3 ---
fence/agents/ipmilan/Makefile.am | 3 ---
fence/agents/kdump/Makefile.am | 1 -
fence/agents/ldom/Makefile.am | 3 ---
fence/agents/lib/Makefile.am | 3 ---
fence/agents/lpar/Makefile.am | 3 ---
fence/agents/netio/Makefile.am | 3 ---
fence/agents/ovh/Makefile.am | 3 ---
fence/agents/pve/Makefile.am | 3 ---
fence/agents/raritan/Makefile.am | 3 ---
fence/agents/rhevm/Makefile.am | 3 ---
fence/agents/rsa/Makefile.am | 3 ---
fence/agents/rsb/Makefile.am | 3 ---
fence/agents/sanbox2/Makefile.am | 3 ---
fence/agents/virsh/Makefile.am | 3 ---
fence/agents/vmware/Makefile.am | 3 ---
fence/agents/vmware_soap/Makefile.am | 3 ---
fence/agents/wti/Makefile.am | 3 ---
fence/agents/xenapi/Makefile.am | 3 ---
make/fencebuild.mk | 4 ++++
43 files changed, 4 insertions(+), 125 deletions(-)
diff --git a/fence/agents/alom/Makefile.am b/fence/agents/alom/Makefile.am
index 5900c2b..1051726 100644
--- a/fence/agents/alom/Makefile.am
+++ b/fence/agents/alom/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/amt/Makefile.am b/fence/agents/amt/Makefile.am
index 77b1b6d..5237f87 100644
--- a/fence/agents/amt/Makefile.am
+++ b/fence/agents/amt/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -p test -a test
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/apc/Makefile.am b/fence/agents/apc/Makefile.am
index 3699ca0..051ac24 100644
--- a/fence/agents/apc/Makefile.am
+++ b/fence/agents/apc/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/apc_snmp/Makefile.am b/fence/agents/apc_snmp/Makefile.am
index afc202d..759fc03 100644
--- a/fence/agents/apc_snmp/Makefile.am
+++ b/fence/agents/apc_snmp/Makefile.am
@@ -17,6 +17,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/bladecenter/Makefile.am b/fence/agents/bladecenter/Makefile.am
index 883051f..09358b5 100644
--- a/fence/agents/bladecenter/Makefile.am
+++ b/fence/agents/bladecenter/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/brocade/Makefile.am b/fence/agents/brocade/Makefile.am
index cf0f85b..6ff704d 100644
--- a/fence/agents/brocade/Makefile.am
+++ b/fence/agents/brocade/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/cisco_mds/Makefile.am b/fence/agents/cisco_mds/Makefile.am
index ce31dbd..c6a19de 100644
--- a/fence/agents/cisco_mds/Makefile.am
+++ b/fence/agents/cisco_mds/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n fc1/1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/cisco_ucs/Makefile.am b/fence/agents/cisco_ucs/Makefile.am
index ae913ce..cc81ee6 100644
--- a/fence/agents/cisco_ucs/Makefile.am
+++ b/fence/agents/cisco_ucs/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/docker/Makefile.am b/fence/agents/docker/Makefile.am
index a232902..5e623f7 100644
--- a/fence/agents/docker/Makefile.am
+++ b/fence/agents/docker/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/drac/Makefile.am b/fence/agents/drac/Makefile.am
index a57fbf9..178da39 100644
--- a/fence/agents/drac/Makefile.am
+++ b/fence/agents/drac/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/drac5/Makefile.am b/fence/agents/drac5/Makefile.am
index 8218181..8324764 100644
--- a/fence/agents/drac5/Makefile.am
+++ b/fence/agents/drac5/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/dummy/Makefile.am b/fence/agents/dummy/Makefile.am
index c04bbf5..0c160a5 100644
--- a/fence/agents/dummy/Makefile.am
+++ b/fence/agents/dummy/Makefile.am
@@ -13,6 +13,3 @@ man_MANS = $(TARGET).8
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/eaton_snmp/Makefile.am b/fence/agents/eaton_snmp/Makefile.am
index 16c141f..415c2b6 100644
--- a/fence/agents/eaton_snmp/Makefile.am
+++ b/fence/agents/eaton_snmp/Makefile.am
@@ -16,6 +16,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/eps/Makefile.am b/fence/agents/eps/Makefile.am
index e7e0d8a..c3d6762 100644
--- a/fence/agents/eps/Makefile.am
+++ b/fence/agents/eps/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/hds_cb/Makefile.am b/fence/agents/hds_cb/Makefile.am
index c5199a6..f36fca1 100644
--- a/fence/agents/hds_cb/Makefile.am
+++ b/fence/agents/hds_cb/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/hpblade/Makefile.am b/fence/agents/hpblade/Makefile.am
index 10df51a..a5fc2b1 100644
--- a/fence/agents/hpblade/Makefile.am
+++ b/fence/agents/hpblade/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/ibmblade/Makefile.am b/fence/agents/ibmblade/Makefile.am
index cfcd4e6..47b83d7 100644
--- a/fence/agents/ibmblade/Makefile.am
+++ b/fence/agents/ibmblade/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/ifmib/Makefile.am b/fence/agents/ifmib/Makefile.am
index f6538fe..74ba950 100644
--- a/fence/agents/ifmib/Makefile.am
+++ b/fence/agents/ifmib/Makefile.am
@@ -16,6 +16,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/ilo/Makefile.am b/fence/agents/ilo/Makefile.am
index 598469b..c8bdf63 100644
--- a/fence/agents/ilo/Makefile.am
+++ b/fence/agents/ilo/Makefile.am
@@ -17,10 +17,6 @@ FENCE_TEST_ARGS = -l test -p test -a test
$(SYMTARGET): $(TARGET)
cp $^ $@
-
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET) $(SYMTARGET)
diff --git a/fence/agents/ilo_moonshot/Makefile.am b/fence/agents/ilo_moonshot/Makefile.am
index b66c46b..d6e12d7 100644
--- a/fence/agents/ilo_moonshot/Makefile.am
+++ b/fence/agents/ilo_moonshot/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/ilo_mp/Makefile.am b/fence/agents/ilo_mp/Makefile.am
index 48901c6..fdf265c 100644
--- a/fence/agents/ilo_mp/Makefile.am
+++ b/fence/agents/ilo_mp/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/ilo_ssh/Makefile.am b/fence/agents/ilo_ssh/Makefile.am
index d67d7d1..3605e3c 100644
--- a/fence/agents/ilo_ssh/Makefile.am
+++ b/fence/agents/ilo_ssh/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -p test -a test
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/intelmodular/Makefile.am b/fence/agents/intelmodular/Makefile.am
index fdc0625..837fcee 100644
--- a/fence/agents/intelmodular/Makefile.am
+++ b/fence/agents/intelmodular/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/ipdu/Makefile.am b/fence/agents/ipdu/Makefile.am
index 46857a4..8b16284 100644
--- a/fence/agents/ipdu/Makefile.am
+++ b/fence/agents/ipdu/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/ipmilan/Makefile.am b/fence/agents/ipmilan/Makefile.am
index e2bc697..fba2198 100644
--- a/fence/agents/ipmilan/Makefile.am
+++ b/fence/agents/ipmilan/Makefile.am
@@ -20,6 +20,3 @@ $(SYMTARGET): $(TARGET)
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET) $(SYMTARGET)
diff --git a/fence/agents/kdump/Makefile.am b/fence/agents/kdump/Makefile.am
index f90a873..2195f64 100644
--- a/fence/agents/kdump/Makefile.am
+++ b/fence/agents/kdump/Makefile.am
@@ -18,4 +18,3 @@ FENCE_TEST_ARGS = -n test
include $(top_srcdir)/make/agentccheck.mk
check: xml-check.fence_kdump
-
diff --git a/fence/agents/ldom/Makefile.am b/fence/agents/ldom/Makefile.am
index e4989fb..8a58536 100644
--- a/fence/agents/ldom/Makefile.am
+++ b/fence/agents/ldom/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/lib/Makefile.am b/fence/agents/lib/Makefile.am
index 4cf4b9f..38281bc 100644
--- a/fence/agents/lib/Makefile.am
+++ b/fence/agents/lib/Makefile.am
@@ -23,6 +23,3 @@ rngdir = ${CLUSTERDATA}/relaxng
rng_DATA = $(XSL) $(FASRNG)
include $(top_srcdir)/make/fencebuild.mk
-
-clean-local:
- rm -f $(TARGET) *.pyc
diff --git a/fence/agents/lpar/Makefile.am b/fence/agents/lpar/Makefile.am
index cc7557f..ae4fb5e 100644
--- a/fence/agents/lpar/Makefile.am
+++ b/fence/agents/lpar/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1 --managed 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/netio/Makefile.am b/fence/agents/netio/Makefile.am
index 461c1e0..8820b8e 100644
--- a/fence/agents/netio/Makefile.am
+++ b/fence/agents/netio/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/ovh/Makefile.am b/fence/agents/ovh/Makefile.am
index f833751..f0d3f29 100644
--- a/fence/agents/ovh/Makefile.am
+++ b/fence/agents/ovh/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/pve/Makefile.am b/fence/agents/pve/Makefile.am
index 37c43a4..792ec24 100644
--- a/fence/agents/pve/Makefile.am
+++ b/fence/agents/pve/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/raritan/Makefile.am b/fence/agents/raritan/Makefile.am
index 99e6a04..bd751d0 100644
--- a/fence/agents/raritan/Makefile.am
+++ b/fence/agents/raritan/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/rhevm/Makefile.am b/fence/agents/rhevm/Makefile.am
index a8b22e1..e50d747 100644
--- a/fence/agents/rhevm/Makefile.am
+++ b/fence/agents/rhevm/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/rsa/Makefile.am b/fence/agents/rsa/Makefile.am
index eacacd6..2536c7c 100644
--- a/fence/agents/rsa/Makefile.am
+++ b/fence/agents/rsa/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/rsb/Makefile.am b/fence/agents/rsb/Makefile.am
index dc4cde0..5556020 100644
--- a/fence/agents/rsb/Makefile.am
+++ b/fence/agents/rsb/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/sanbox2/Makefile.am b/fence/agents/sanbox2/Makefile.am
index 345d1a4..f9c7c30 100644
--- a/fence/agents/sanbox2/Makefile.am
+++ b/fence/agents/sanbox2/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/virsh/Makefile.am b/fence/agents/virsh/Makefile.am
index 661d140..7dd0fa2 100644
--- a/fence/agents/virsh/Makefile.am
+++ b/fence/agents/virsh/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/vmware/Makefile.am b/fence/agents/vmware/Makefile.am
index 9a4f860..e0cd910 100644
--- a/fence/agents/vmware/Makefile.am
+++ b/fence/agents/vmware/Makefile.am
@@ -14,6 +14,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/vmware_soap/Makefile.am b/fence/agents/vmware_soap/Makefile.am
index 0030dff..15e6748 100644
--- a/fence/agents/vmware_soap/Makefile.am
+++ b/fence/agents/vmware_soap/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/wti/Makefile.am b/fence/agents/wti/Makefile.am
index acd7bec..17b6f21 100644
--- a/fence/agents/wti/Makefile.am
+++ b/fence/agents/wti/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -a test -n 1
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/xenapi/Makefile.am b/fence/agents/xenapi/Makefile.am
index 144b8e4..1f05023 100644
--- a/fence/agents/xenapi/Makefile.am
+++ b/fence/agents/xenapi/Makefile.am
@@ -15,6 +15,3 @@ FENCE_TEST_ARGS = -l test -p test -n 1 --session-url http://test
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
include $(top_srcdir)/make/agentpycheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/make/fencebuild.mk b/make/fencebuild.mk
index 1c4be6b..015c6ac 100644
--- a/make/fencebuild.mk
+++ b/make/fencebuild.mk
@@ -21,3 +21,7 @@ $(TARGET): $(SRC)
if [ 0 -eq `echo "$(SRC)" | grep fence_ &> /dev/null; echo $$?` ]; then \
PYTHONPATH=$(abs_srcdir)/../lib:$(abs_builddir)/../lib $(top_srcdir)/fence/agents/lib/check_used_options.py $@; \
else true ; fi
+
+clean: clean-man
+ rm -f $(TARGET) $(SYMTARGET) *.pyc
+
9 years, 7 months
fence-agents: master - [build] Add XSLT for creating wiki
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=a1e5c3...
Commit: a1e5c374e44202b54d10ac78b0be40f760a6115a
Parent: 076b9def6a956a3b634f8475f8ddece22fc8c271
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Thu Sep 18 16:21:02 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Thu Sep 18 16:21:34 2014 +0200
[build] Add XSLT for creating wiki
---
fence/agents/lib/fence2wiki.xsl | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/fence/agents/lib/fence2wiki.xsl b/fence/agents/lib/fence2wiki.xsl
new file mode 100644
index 0000000..93853a0
--- /dev/null
+++ b/fence/agents/lib/fence2wiki.xsl
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:template match="/resource-agent">
+||- <xsl:value-of select="@shortdesc" /> (<xsl:value-of select="@name" />) =||
+|| stdin argument || command-line argument || description ||
+<xsl:apply-templates select="parameters/parameter" />
+-
+</xsl:template>
+
+<xsl:template match="parameters/parameter">|| <xsl:value-of select="@name" /> || <xsl:value-of select="getopt/@mixed" /> || <xsl:value-of select="shortdesc" />||
+</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
9 years, 7 months
fence-agents: master - [build] Create a new target for wiki export
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=076b9d...
Commit: 076b9def6a956a3b634f8475f8ddece22fc8c271
Parent: f8ef7d655c55c13abd26e569a5ab3c7129727c33
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Thu Sep 18 15:16:40 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Thu Sep 18 15:16:40 2014 +0200
[build] Create a new target for wiki export
Create a list of arguments in wiki format
---
make/fenceman.mk | 3 ++-
make/fencemanc.mk | 3 ++-
make/fencemanperl.mk | 3 ++-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/make/fenceman.mk b/make/fenceman.mk
index 163fe88..c3360b7 100644
--- a/make/fenceman.mk
+++ b/make/fenceman.mk
@@ -4,6 +4,7 @@
python $(@:%.8=%) -o metadata > .$@.tmp && \
xmllint --noout --relaxng $(abs_srcdir)/../lib/metadata.rng .$@.tmp && \
xsltproc $(top_srcdir)/fence/agents/lib/fence2man.xsl .$@.tmp > $@
+ xsltproc $(top_srcdir)/fence/agents/lib/fence2wiki.xsl .$@.tmp | grep -v '<?xml' > $(@:%.8=%.wiki)
clean-man:
- rm -f *.8 .*.8.tmp
+ rm -f *.8 .*.8.tmp *.wiki
diff --git a/make/fencemanc.mk b/make/fencemanc.mk
index 27e1aae..53156c5 100644
--- a/make/fencemanc.mk
+++ b/make/fencemanc.mk
@@ -3,6 +3,7 @@
./$^ -o metadata > .$@.tmp && \
xmllint --noout --relaxng $(top_srcdir)/fence/agents/lib/metadata.rng .$@.tmp && \
xsltproc $(top_srcdir)/fence/agents/lib/fence2man.xsl .$@.tmp > $@
+ xsltproc $(top_srcdir)/fence/agents/lib/fence2wiki.xsl .$@.tmp | grep -v '<?xml' > $(@:%.8=%.wiki)
clean-man:
- rm -f *.8 .*.8.tmp
+ rm -f *.8 .*.8.tmp *.wiki
diff --git a/make/fencemanperl.mk b/make/fencemanperl.mk
index ed7c9cc..0141aa8 100644
--- a/make/fencemanperl.mk
+++ b/make/fencemanperl.mk
@@ -3,6 +3,7 @@
perl $(TARGET) -o metadata > .$@.tmp && \
xmllint --noout --relaxng $(top_srcdir)/fence/agents/lib/metadata.rng .$@.tmp && \
xsltproc $(top_srcdir)/fence/agents/lib/fence2man.xsl .$@.tmp > $@
+ xsltproc $(top_srcdir)/fence/agents/lib/fence2wiki.xsl .$@.tmp | grep -v '<?xml' > $(@:%.8=%.wiki)
clean-man:
- rm -f *.8 .*.8.tmp
+ rm -f *.8 .*.8.tmp *.wiki
9 years, 7 months
fence-agents: master - [build] fence_scsi_check is generated during build time
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=f8ef7d...
Commit: f8ef7d655c55c13abd26e569a5ab3c7129727c33
Parent: 14f6c3bc1e60e038c0b4daa87b1d0bda0d873661
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Wed Aug 27 15:33:06 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Wed Sep 17 16:04:25 2014 +0200
[build] fence_scsi_check is generated during build time
---
fence/agents/scsi/Makefile.am | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/fence/agents/scsi/Makefile.am b/fence/agents/scsi/Makefile.am
index b2a4fbf..295d649 100644
--- a/fence/agents/scsi/Makefile.am
+++ b/fence/agents/scsi/Makefile.am
@@ -4,8 +4,7 @@ TARGET = fence_scsi
SRC = $(TARGET).py
-EXTRA_DIST = $(SRC) \
- fence_scsi_check
+EXTRA_DIST = $(SRC)
scsidatadir = $(CLUSTERDATA)
scsidata_SCRIPTS = fence_scsi_check
9 years, 7 months
fence-agents: master - fence_rhevm: Use https:// prefix also with --ssl-secure and --ssl-insecure
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=14f6c3...
Commit: 14f6c3bc1e60e038c0b4daa87b1d0bda0d873661
Parent: 004ce512d61867bcc981ae49c5fbf5ffb30172fa
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Wed Sep 17 14:28:25 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Wed Sep 17 14:28:25 2014 +0200
fence_rhevm: Use https:// prefix also with --ssl-secure and --ssl-insecure
---
fence/agents/rhevm/fence_rhevm.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fence/agents/rhevm/fence_rhevm.py b/fence/agents/rhevm/fence_rhevm.py
index 444fb56..1002097 100644
--- a/fence/agents/rhevm/fence_rhevm.py
+++ b/fence/agents/rhevm/fence_rhevm.py
@@ -76,7 +76,7 @@ def get_list(conn, options):
def send_command(opt, command, method="GET"):
## setup correct URL
- if opt.has_key("--ssl"):
+ if opt.has_key("--ssl") or opt.has_key("--ssl-secure") or opt.has_key("--ssl-insecure"):
url = "https:"
else:
url = "http:"
9 years, 7 months
cluster: RHEL65 - mount.gfs2: Don't leave mount group if mount returns EBUSY
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=ba234a47306...
Commit: ba234a47306013ba96658c3efa9b9d05dcf55380
Parent: aec36b98ca34a4ad75711e6a5534e6959390c2d8
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Thu Mar 27 00:48:00 2014 -0500
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Wed Sep 17 10:52:50 2014 +0100
mount.gfs2: Don't leave mount group if mount returns EBUSY
On attempting to mount a gfs2 fs a second time, mount.gfs2 would leave the
mount group causing problems for the first mounted fs. This patch adds a check
for EBUSY so that mount.gfs2 no longer leaves when the fs is already mounted.
Also the existing code was expecting errno to stay the same across library
calls so a new variable is added to store the value to prevent future errno
confusion.
Based on the original EBUSY fix by John Ruemker.
Resolves: rhbz#1141307
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/mount/mount.gfs2.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/gfs2/mount/mount.gfs2.c b/gfs2/mount/mount.gfs2.c
index d8e19a7..f1d6cfd 100644
--- a/gfs2/mount/mount.gfs2.c
+++ b/gfs2/mount/mount.gfs2.c
@@ -161,6 +161,7 @@ int main(int argc, char **argv)
struct gen_sb sb;
char *proto;
int rv = 0;
+ int mnterr = 0;
memset(&mo, 0, sizeof(mo));
memset(&sb, 0, sizeof(sb));
@@ -202,19 +203,19 @@ int main(int argc, char **argv)
die("error mounting lockproto %s\n", proto);
rv = mount(mo.dev, mo.dir, fsname, mo.flags, mo.extra_plus);
+ mnterr = errno;
if (rv) {
- log_debug("mount(2) failed error %d errno %d", rv, errno);
+ log_debug("mount(2) failed error %d errno %d", rv, mnterr);
mount_done_lockproto(proto, &mo, &sb, rv);
- if (!(mo.flags & MS_REMOUNT))
- umount_lockproto(proto, &mo, &sb, errno);
+ if (!(mo.flags & MS_REMOUNT) && mnterr != EBUSY)
+ umount_lockproto(proto, &mo, &sb, mnterr);
- if (errno == EBUSY)
+ if (mnterr == EBUSY)
die("%s already mounted or %s busy\n", mo.dev, mo.dir);
- else if (errno == EUSERS)
+ else if (mnterr == EUSERS)
die("Too many nodes mounting filesystem, no free journals\n");
- die("error mounting %s on %s: %s\n", mo.dev, mo.dir,
- strerror(errno));
+ die("error mounting %s on %s: %s\n", mo.dev, mo.dir, strerror(mnterr));
}
log_debug("mount(2) ok");
mount_done_lockproto(proto, &mo, &sb, 0);
9 years, 7 months
fence-agents: master - fence_zvm: Add support for 'on', improve documentation
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=004ce5...
Commit: 004ce512d61867bcc981ae49c5fbf5ffb30172fa
Parent: ad16ebe302d8f7acee25afc767c03128a0daf98c
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Mon Sep 15 15:05:25 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Mon Sep 15 15:05:25 2014 +0200
fence_zvm: Add support for 'on', improve documentation
Author: Neale Ferguson
---
fence/agents/zvm/fence_zvm.8 | 2 +-
fence/agents/zvm/fence_zvm.c | 38 +++++++++++++++++++++-----------------
fence/agents/zvm/fence_zvmip.8 | 2 +-
fence/agents/zvm/fence_zvmip.c | 38 +++++++++++++++++++++-----------------
4 files changed, 44 insertions(+), 36 deletions(-)
diff --git a/fence/agents/zvm/fence_zvm.8 b/fence/agents/zvm/fence_zvm.8
index 359436e..8c0d35a 100644
--- a/fence/agents/zvm/fence_zvm.8
+++ b/fence/agents/zvm/fence_zvm.8
@@ -52,7 +52,7 @@ forcibly terminated. Currently, this option is ignored.
This option is used by fence_node(8) and is ignored by fence_zvm.
.TP
\fIaction = < action >\fP
-Fencing action: "off" - fence off device; "metadata" - display device metadata; "status" - state of device
+Fencing action: "off" - deactivate virtual machine; "on" - activate virtual machine; "metadata" - display device metadata" - describe fence agent parameters; "status" - state of virtual machine
.TP
\fIport = < target >\fP
Name of virtual machine to recycle.
diff --git a/fence/agents/zvm/fence_zvm.c b/fence/agents/zvm/fence_zvm.c
index e5a7c2b..524e21e 100644
--- a/fence/agents/zvm/fence_zvm.c
+++ b/fence/agents/zvm/fence_zvm.c
@@ -699,15 +699,15 @@ get_options_stdin (zvm_driver_t *zvm)
if (!strcasecmp (opt, "action")) {
if (strcasecmp(arg, "off") == 0) {
- fence = 0;
- } else if (strcasecmp(arg, "on") == 0) {
fence = 1;
- } else if (strcasecmp(arg, "metadata") == 0) {
+ } else if (strcasecmp(arg, "on") == 0) {
fence = 2;
- } else if (strcasecmp(arg, "status") == 0) {
+ } else if (strcasecmp(arg, "metadata") == 0) {
fence = 3;
- } else {
+ } else if (strcasecmp(arg, "status") == 0) {
fence = 4;
+ } else {
+ fence = 5;
}
} else if (!strcasecmp (opt, "ipaddr")) {
lSrvName = MIN(strlen(arg), sizeof(zvm->smapiSrv));
@@ -738,7 +738,7 @@ get_options_stdin (zvm_driver_t *zvm)
zvm->delay = DEFAULT_DELAY;
}
} else if (!strcasecmp (opt, "help")) {
- fence = 4;
+ fence = 5;
}
}
return(fence);
@@ -769,15 +769,15 @@ get_options(int argc, char **argv, zvm_driver_t *zvm)
break;
case 'o' :
if (strcasecmp(optarg, "off") == 0) {
- fence = 0;
- } else if (strcasecmp(optarg, "on") == 0) {
fence = 1;
- } else if (strcasecmp(optarg, "metadata") == 0) {
+ } else if (strcasecmp(optarg, "on") == 0) {
fence = 2;
- } else if (strcasecmp(optarg, "status") == 0) {
+ } else if (strcasecmp(optarg, "metadata") == 0) {
fence = 3;
- } else {
+ } else if (strcasecmp(optarg, "status") == 0) {
fence = 4;
+ } else {
+ fence = 5;
}
break;
case 'a' :
@@ -807,7 +807,7 @@ get_options(int argc, char **argv, zvm_driver_t *zvm)
memcpy(zvm->node, optarg, lSrvNode);
break;
default :
- fence = 4;
+ fence = 5;
}
}
return(fence);
@@ -874,22 +874,26 @@ main(int argc, char **argv)
fence = get_options_stdin(&zvm);
switch(fence) {
- case 0 : // OFF
+ case 0 : // OFFON
+ if ((rc = check_parm(&zvm)) == 0)
+ rc = zvm_smapi_imageRecycle(&zvm);
+ break;
+ case 1 : // OFF
if ((rc = check_parm(&zvm)) == 0)
rc = zvm_smapi_imageDeactivate(&zvm);
break;
- case 1 : // ON
+ case 2 : // ON
if ((rc = check_parm(&zvm)) == 0)
rc = zvm_smapi_imageActivate(&zvm);
break;
- case 2 : // METADATA
+ case 3 : // METADATA
rc = zvm_metadata();
break;
- case 3 : // STATUS
+ case 4 : // STATUS
if ((rc = check_parm(&zvm)) == 0)
rc = zvm_smapi_imageQuery(&zvm);
break;
- case 4 :
+ case 5 :
rc = usage();
}
closelog();
diff --git a/fence/agents/zvm/fence_zvmip.8 b/fence/agents/zvm/fence_zvmip.8
index 8217d61..6b01425 100644
--- a/fence/agents/zvm/fence_zvmip.8
+++ b/fence/agents/zvm/fence_zvmip.8
@@ -55,7 +55,7 @@ Display usage information
This option is used by fence_node(8) and is ignored by fence_zvmip.
.TP
\fIaction = < action >\fP
-Fencing action: "off" - fence off device; "metadata" - display device metadata; "status" - state of device
+Fencing action: "off" - deactivate virtual machine; "on" - activate virtual machine; "metadata" - display device metadata" - describe fence agent parameters; "status" - state of virtual machine
.TP
\fIplug = < plug >\fP
Name of virtual machine to recycle.
diff --git a/fence/agents/zvm/fence_zvmip.c b/fence/agents/zvm/fence_zvmip.c
index 3342bc6..bd7c536 100644
--- a/fence/agents/zvm/fence_zvmip.c
+++ b/fence/agents/zvm/fence_zvmip.c
@@ -677,15 +677,15 @@ get_options_stdin (zvm_driver_t *zvm)
if (!strcasecmp (opt, "action")) {
if (strcasecmp(arg, "off") == 0) {
- fence = 0;
- } else if (strcasecmp(arg, "on") == 0) {
fence = 1;
- } else if (strcasecmp(arg, "metadata") == 0) {
+ } else if (strcasecmp(arg, "on") == 0) {
fence = 2;
- } else if (strcasecmp(arg, "status") == 0) {
+ } else if (strcasecmp(arg, "metadata") == 0) {
fence = 3;
- } else {
+ } else if (strcasecmp(arg, "status") == 0) {
fence = 4;
+ } else {
+ fence = 5;
}
} else if (!strcasecmp (opt, "ipaddr")) {
lSrvName = MIN(strlen(arg), sizeof(zvm->smapiSrv)-1);
@@ -712,7 +712,7 @@ get_options_stdin (zvm_driver_t *zvm)
zvm->timeOut = DEFAULT_TIMEOUT;
}
} else if (!strcasecmp (opt, "help")) {
- fence = 2;
+ fence = 5;
}
}
return(fence);
@@ -746,15 +746,15 @@ get_options(int argc, char **argv, zvm_driver_t *zvm)
break;
case 'o' :
if (strcasecmp(optarg, "off") == 0) {
- fence = 0;
- } else if (strcasecmp(optarg, "on") == 0) {
fence = 1;
- } else if (strcasecmp(optarg, "metadata") == 0) {
+ } else if (strcasecmp(optarg, "on") == 0) {
fence = 2;
- } else if (strcasecmp(optarg, "status") == 0) {
+ } else if (strcasecmp(optarg, "metadata") == 0) {
fence = 3;
- } else {
+ } else if (strcasecmp(optarg, "status") == 0) {
fence = 4;
+ } else {
+ fence = 5;
}
break;
case 'p' :
@@ -784,7 +784,7 @@ get_options(int argc, char **argv, zvm_driver_t *zvm)
}
break;
default :
- fence = 4;
+ fence = 5;
}
}
return(fence);
@@ -944,22 +944,26 @@ main(int argc, char **argv)
fence = get_options_stdin(&zvm);
switch(fence) {
- case 0 : // OFF
+ case 0 : // OFFON
+ if ((rc = check_parm(&zvm)) == 0)
+ rc = zvm_smapi_imageRecycle(&zvm);
+ break;
+ case 1 : // OFF
if ((rc = check_parm(&zvm)) == 0)
rc = zvm_smapi_imageDeactivate(&zvm);
break;
- case 1 : // ON
+ case 2 : // ON
if ((rc = check_parm(&zvm)) == 0)
rc = zvm_smapi_imageActivate(&zvm);
break;
- case 2 : // METADATA
+ case 3 : // METADATA
rc = zvm_metadata();
break;
- case 3 : // STATUS
+ case 4 : // STATUS
if ((rc = check_parm(&zvm)) == 0)
rc = zvm_smapi_imageQuery(&zvm);
break;
- case 4 :
+ case 5 :
rc = usage();
}
closelog();
9 years, 7 months
fence-agents: master - fence_zvm: Fixes for better upstream inclusion
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=ad16eb...
Commit: ad16ebe302d8f7acee25afc767c03128a0daf98c
Parent: a4cbf5ba86d196b236cc58ad2dee2f3317e1ee10
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Fri Sep 12 21:02:59 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Fri Sep 12 21:02:59 2014 +0200
fence_zvm: Fixes for better upstream inclusion
---
fence/agents/zvm/Makefile.am | 7 +++++++
fence/agents/zvm/fence_zvm.c | 1 +
fence/agents/zvm/fence_zvmip.c | 1 +
3 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/fence/agents/zvm/Makefile.am b/fence/agents/zvm/Makefile.am
index 2439985..62eb862 100644
--- a/fence/agents/zvm/Makefile.am
+++ b/fence/agents/zvm/Makefile.am
@@ -1,5 +1,7 @@
MAINTAINERCLEANFILES = Makefile.in
+TARGET = fence_zvmip
+
sbin_PROGRAMS = fence_zvm fence_zvmip
noinst_HEADERS = fence_zvm.h
@@ -12,6 +14,11 @@ fence_zvmip_CFLAGS = -D_GNU_SOURCE
dist_man_MANS = fence_zvm.8 fence_zvmip.8
+#include $(top_srcdir)/make/fencemanc.mk
+
+clean-local:
+ rm -f $(sbin_PROGRAMS)
+
FENCE_TEST_ARGS = -n test -a test -p test -u test
include $(top_srcdir)/make/agentccheck.mk
diff --git a/fence/agents/zvm/fence_zvm.c b/fence/agents/zvm/fence_zvm.c
index 2ec4be9..e5a7c2b 100644
--- a/fence/agents/zvm/fence_zvm.c
+++ b/fence/agents/zvm/fence_zvm.c
@@ -599,6 +599,7 @@ zvm_metadata()
fprintf (stdout, "<longdesc>");
fprintf (stdout, "The fence_zvm agent is intended to be used with with z/VM SMAPI service.");
fprintf (stdout, "</longdesc>\n");
+ fprintf (stdout, "<vendor-url>http://www.ibm.com</vendor-url>\n");
fprintf (stdout, "<parameters>\n");
diff --git a/fence/agents/zvm/fence_zvmip.c b/fence/agents/zvm/fence_zvmip.c
index 94c9e2e..3342bc6 100644
--- a/fence/agents/zvm/fence_zvmip.c
+++ b/fence/agents/zvm/fence_zvmip.c
@@ -804,6 +804,7 @@ zvm_metadata()
fprintf (stdout, "<longdesc>");
fprintf (stdout, "The fence_zvm agent is intended to be used with with z/VM SMAPI service via TCP/IP");
fprintf (stdout, "</longdesc>\n");
+ fprintf (stdout, "<vendor-url>http://www.ibm.com</vendor-url>\n");
fprintf (stdout, "<parameters>\n");
9 years, 7 months