[fence-virt] * Mon Oct 15 2012 Ryan McCabe <rmccabe at redhat.com> - 0.3.0-6 - Add a -w (delay) option. - Return fai

Ryan McCabe rmccabe at fedoraproject.org
Mon Oct 15 18:38:31 UTC 2012


commit 65786b0e959081e92ad631c5178339d37288907a
Author: Ryan McCabe <rmccabe at redhat.com>
Date:   Mon Oct 15 14:38:19 2012 -0400

    * Mon Oct 15 2012 Ryan McCabe <rmccabe at redhat.com> - 0.3.0-6
    - Add a -w (delay) option.
    - Return failure when attempting to fence a nonexistent domain
    - Improve man pages

 Fix-typo-in-fence_virt-8-man-page.patch            |   30 +++++++
 ...ce_virt.conf-man-page-description-of-hash.patch |   28 +++++++
 Return-failure-for-nonexistent-domains.patch       |   61 ++++++++++++++
 add-a-delay-w-option.patch                         |   86 ++++++++++++++++++++
 fence-virt.spec                                    |   16 ++++-
 5 files changed, 220 insertions(+), 1 deletions(-)
---
diff --git a/Fix-typo-in-fence_virt-8-man-page.patch b/Fix-typo-in-fence_virt-8-man-page.patch
new file mode 100644
index 0000000..1545547
--- /dev/null
+++ b/Fix-typo-in-fence_virt-8-man-page.patch
@@ -0,0 +1,30 @@
+From b35ac70bf29b4137ca30d5cb4a33ad6f7ba00059 Mon Sep 17 00:00:00 2001
+From: Ryan McCabe <rmccabe at redhat.com>
+Date: Mon, 8 Oct 2012 10:54:25 -0400
+Subject: [PATCH] fence_virt: Fix typo in fence_virt(8) man page
+
+Fix the description of when serial/vmchannel parameters are accepted.
+
+Signed-off-by: Ryan McCabe <rmccabe at redhat.com>
+---
+ man/fence_virt.8 | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/man/fence_virt.8 b/man/fence_virt.8
+index 57869da..14406ce 100644
+--- a/man/fence_virt.8
++++ b/man/fence_virt.8
+@@ -100,8 +100,8 @@ Specify if using fence_virt with older fence_xvmd installations
+ which are using UUIDs.  Fence_virtd ignores this parameter.
+ 
+ .SH SERIAL/VMCHANNEL PARAMETERS
+-These parameters are used only when using fence_virt in multicast mode
+-(e.g. by running fence_xvm).
++These parameters are used only when using fence_virt in serial mode
++(e.g. by running fence_virt).
+ 
+ .TP
+ .B -D
+-- 
+1.7.11.7
+
diff --git a/Improve-fence_virt.conf-man-page-description-of-hash.patch b/Improve-fence_virt.conf-man-page-description-of-hash.patch
new file mode 100644
index 0000000..fd00207
--- /dev/null
+++ b/Improve-fence_virt.conf-man-page-description-of-hash.patch
@@ -0,0 +1,28 @@
+From 96ff88d44f69869528d24ad4d37c41fc6ca95057 Mon Sep 17 00:00:00 2001
+From: Lon Hohberger <lhh at redhat.com>
+Date: Wed, 25 Jul 2012 11:10:54 -0400
+Subject: [PATCH] Improve fence_virt.conf man page description of 'hash'
+
+Signed-off-by: Lon Hohberger <lhh at redhat.com>
+Acked-by: Ryan McCabe <rmccabe at redhat.com>
+Acked-by: Jaroslav Kortus <jkortus at redhat.com>
+---
+ man/fence_virt.conf.5 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/man/fence_virt.conf.5 b/man/fence_virt.conf.5
+index c9e8243..364233c 100644
+--- a/man/fence_virt.conf.5
++++ b/man/fence_virt.conf.5
+@@ -83,7 +83,7 @@ the shared key file to use (default: /etc/cluster/fence_xvm.key).
+ .TP
+ .B hash
+ .
+-the hashing algorithm to use for packet signing (default: sha256, but could
++the weakest hashing algorithm allowed for client requests.  Clients may send packets with stronger hashes than the one specified, but not weaker ones.  (default: sha256, but could
+ be sha1, sha512, or none)
+ 
+ .TP
+-- 
+1.7.11.7
+
diff --git a/Return-failure-for-nonexistent-domains.patch b/Return-failure-for-nonexistent-domains.patch
new file mode 100644
index 0000000..95057aa
--- /dev/null
+++ b/Return-failure-for-nonexistent-domains.patch
@@ -0,0 +1,61 @@
+From 98e332e2432c9cf559cd55e3ff8489f658328021 Mon Sep 17 00:00:00 2001
+From: Ryan McCabe <rmccabe at redhat.com>
+Date: Mon, 8 Oct 2012 10:53:13 -0400
+Subject: [PATCH] fence_virt: Return failure for nonexistent domains
+
+Return failure instead of success if a user attempts an operation
+on a domain that does not exist.
+
+Signed-off-by: Ryan McCabe <rmccabe at redhat.com>
+---
+ server/checkpoint.c | 4 ++--
+ server/libvirt.c    | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/server/checkpoint.c b/server/checkpoint.c
+index 408003f..3ac7e6b 100644
+--- a/server/checkpoint.c
++++ b/server/checkpoint.c
+@@ -393,7 +393,7 @@ do_off(const char *vm_name)
+ 
+ 		if (vdp)
+ 			virDomainFree(vdp);
+-		return 0;
++		return 1;
+ 	}
+ 
+ 	syslog(LOG_NOTICE, "Destroying domain %s\n", vm_name);
+@@ -452,7 +452,7 @@ do_reboot(const char *vm_name)
+ 			   "do - domain does not exist\n");
+ 		if (vdp)
+ 			virDomainFree(vdp);
+-		return 0;
++		return 1;
+ 	}
+ 
+ 	syslog(LOG_NOTICE, "Rebooting domain %s\n", vm_name);
+diff --git a/server/libvirt.c b/server/libvirt.c
+index ac93f18..12bb8ad 100644
+--- a/server/libvirt.c
++++ b/server/libvirt.c
+@@ -178,7 +178,7 @@ libvirt_off(const char *vm_name, const char *src,
+ 
+ 		if (vdp)
+ 			virDomainFree(vdp);
+-		return 0;
++		return 1;
+ 	}
+ 
+ 	syslog(LOG_NOTICE, "Destroying domain %s\n", vm_name);
+@@ -320,7 +320,7 @@ libvirt_reboot(const char *vm_name, const char *src,
+ 			   "do - domain does not exist\n");
+ 		if (vdp)
+ 			virDomainFree(vdp);
+-		return 0;
++		return 1;
+ 	}
+ 
+ 	syslog(LOG_NOTICE, "Rebooting domain %s\n", vm_name);
+-- 
+1.7.11.7
+
diff --git a/add-a-delay-w-option.patch b/add-a-delay-w-option.patch
new file mode 100644
index 0000000..73b127f
--- /dev/null
+++ b/add-a-delay-w-option.patch
@@ -0,0 +1,86 @@
+diff -ur a/client/main.c b/client/main.c
+--- a/client/main.c	2010-01-15 08:03:56.000000000 -0500
++++ b/client/main.c	2012-10-15 14:28:43.430961223 -0400
+@@ -56,10 +56,10 @@
+ 
+ 	args_init(&args);
+ 	if (!strcmp(basename(argv[0]), "fence_xvm")) {
+-       		my_options = "di:a:p:r:C:c:k:M:H:uo:t:?hV";
++       		my_options = "di:a:p:r:C:c:k:M:H:uo:t:?hVw:";
+ 		args.mode = MODE_MULTICAST;
+ 	} else {
+-       		my_options = "dD:P:A:p:M:H:o:t:?hV";
++       		my_options = "dD:P:A:p:M:H:o:t:?hVw:";
+ 		args.mode = MODE_SERIAL;
+ 	}
+ 
+@@ -115,6 +115,9 @@
+ 		return 0;
+ 	}
+ 
++	if (args.delay > 0)
++		sleep(args.delay);
++
+ 	switch(args.mode) {
+ 	case MODE_MULTICAST:
+ 		ret = mcast_fence_virt(&args);
+diff -ur a/client/options.c b/client/options.c
+--- a/client/options.c	2011-09-20 11:19:56.000000000 -0400
++++ b/client/options.c	2012-10-15 14:27:00.034407993 -0400
+@@ -318,6 +318,18 @@
+ 	}
+ }
+ 
++static inline void
++assign_delay(fence_virt_args_t *args, struct arg_info *arg, char *value)
++{
++	if (!value)
++		return;
++
++	args->delay = atoi(value);
++	if (args->timeout <= 0) {
++		printf("Invalid delay: '%s'\n", value);
++		args->flags |= F_ERR;
++	}
++}
+ 
+ static inline void
+ assign_help(fence_virt_args_t *args, struct arg_info *arg, char *value)
+@@ -489,6 +501,11 @@
+ 	  "URI for Hypervisor (default: auto detect)",
+ 	  assign_uri },
+ 	  
++	{ 'w', "-w <delay>", "delay",
++	  0, "string", "0",
++	  "Fencing delay (in seconds; default=0)",
++	  assign_delay },
++
+ 	{ 'V', "-V", NULL,
+ 	  0, "boolean", "0",
+  	  "Display version and exit", 
+diff -ur a/include/options.h b/include/options.h
+--- a/include/options.h	2010-01-14 16:38:19.000000000 -0500
++++ b/include/options.h	2012-10-15 14:27:00.034407993 -0400
+@@ -44,6 +44,7 @@
+ 	client_mode_t mode;
+ 	int debug;
+ 	int timeout;
++	int delay;
+ 	int retr_time;
+ 	arg_flags_t flags;
+ 
+diff -ur a/man/fence_virt.8 b/man/fence_virt.8
+--- a/man/fence_virt.8	2012-10-15 14:27:51.869181554 -0400
++++ b/man/fence_virt.8	2012-10-15 14:27:00.034407993 -0400
+@@ -44,6 +44,11 @@
+ . 
+ Fencing timeout (in seconds) (Default Value: 30)
+ 
++.TP
++.B -w
++. 
++Fencing delay (in seconds). The fence agent will wait the specified number of seconds before attempting a fencing operation. (Default Value: 0)
++
+ .SH MULTICAST PARAMETERS
+ These parameters are used only when using fence_virt in multicast mode
+ (e.g. by running fence_xvm).
diff --git a/fence-virt.spec b/fence-virt.spec
index f199e63..925a959 100644
--- a/fence-virt.spec
+++ b/fence-virt.spec
@@ -1,12 +1,16 @@
 Name:		fence-virt
 Version:	0.3.0
-Release:	5%{?dist}
+Release:	6%{?dist}
 Summary:	A pluggable fencing framework for virtual machines
 Group:		System Environment/Base
 License:	GPLv2+
 URL:		http://fence-virt.sourceforge.net
 Source0:	http://voxel.dl.sourceforge.net/project/fence-virt/%{name}-%{version}.tar.gz
 Patch0: qpid-build.patch
+Patch1: add-a-delay-w-option.patch
+Patch2: Improve-fence_virt.conf-man-page-description-of-hash.patch
+Patch3: Return-failure-for-nonexistent-domains.patch
+Patch4: Fix-typo-in-fence_virt-8-man-page.patch
 
 BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
@@ -85,6 +89,11 @@ to track VMs across multiple hosts.
 %prep
 %setup -q
 %patch0 -p1 -b .qpid-build
+%patch1 -p1 -b .add-a-delay-w-option
+%patch2 -p1 -b .Improve-fence_virt.conf-man-page-description-of-hash
+%patch3 -p1 -b .Return-failure-for-nonexistent-domains
+%patch4 -p1 -b .Fix-typo-in-fence_virt-8-man-page
+
 
 %build
 ./autogen.sh
@@ -173,6 +182,11 @@ fi
 
 
 %changelog
+* Mon Oct 15 2012 Ryan McCabe <rmccabe at redhat.com> - 0.3.0-6
+- Add a -w (delay) option.
+- Return failure when attempting to fence a nonexistent domain
+- Improve man pages
+
 * Thu Jul 19 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.3.0-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list