Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commi…
Commit: 8a97abd04b8492310c1095413c5cf26bbf98e395
Parent: f31f957471dea5d955758db98226a727405248d7
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Mon Apr 4 15:19:57 2011 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Mon Apr 4 15:19:57 2011 +0200
fence_ipmilan: Correct return code for diag operation
Return code for diag operation should be 0.
Resolves: rhbz#655764
---
fence/agents/ipmilan/ipmilan.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/fence/agents/ipmilan/ipmilan.c b/fence/agents/ipmilan/ipmilan.c
index 040babf..177d216 100644
--- a/fence/agents/ipmilan/ipmilan.c
+++ b/fence/agents/ipmilan/ipmilan.c
@@ -1195,6 +1195,15 @@ metaout:
if (!strcasecmp(op, "monitor"))
translated_ret = ret;
+
+ if (!strcasecmp(op, "diaf")) {
+ /** .. but when a system receive the DIAG signal , it
+ ** switches to a kdump kernel, but the machine is always
+ ** "on" during the dump phase. It only become temporarily
+ ** "off" at the end of the dump just before rebooting.
+ **/
+ translated_ret = 0;
+ }
return translated_ret;
}
Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commi…
Commit: f31f957471dea5d955758db98226a727405248d7
Parent: 1ef8f0605ef021a7f0045d9be19497ef95a2a16e
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Mon Apr 4 15:11:59 2011 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Mon Apr 4 15:11:59 2011 +0200
fence_ipmilan: returns incorrect status on monitor op if chassis is powered off
There is a bug in fence_ipmilan agent: it exits with result code 2 on
"monitor"/"status" command if chassis is powered off. Instead it should return
0 because "monitor" command should return fence device status, not chassis
status.
Reported and patch proposed by Vladislav Bogdanov
Resolves: rhbz#690735
---
fence/agents/ipmilan/ipmilan.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/fence/agents/ipmilan/ipmilan.c b/fence/agents/ipmilan/ipmilan.c
index d34ced5..040babf 100644
--- a/fence/agents/ipmilan/ipmilan.c
+++ b/fence/agents/ipmilan/ipmilan.c
@@ -1192,5 +1192,9 @@ metaout:
else
printf("Failed\n");
}
+
+ if (!strcasecmp(op, "monitor"))
+ translated_ret = ret;
+
return translated_ret;
}
Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commi…
Commit: 0144619d57737bd8eba90e6b6c6b5f2bbb45247c
Parent: 2be096c234ea7f4592c36759ba965a0f2c1879dc
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Mon Apr 4 14:43:36 2011 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Mon Apr 4 14:43:36 2011 +0200
library: Add support for UUID (-U / --uuid / uuid)
Fence agents can use --uuid as a replacement for --port. This is very
useful in a case of virtual machines that have both UUID and name.
Patch proposed by Matt Clark
---
fence/agents/lib/fencing.py.py | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 8bd6f45..32b5d2b 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -386,7 +386,14 @@ all_opt = {
"default" : "1",
"required" : "0",
"shortdesc" : "Count of attempts to retry power on",
- "order" : 201 }
+ "order" : 201 },
+ "uuid" : {
+ "getopt" : "U:",
+ "longopt" : "uuid",
+ "help" : "-U, --uuid UUID of the VM to fence.",
+ "required" : "0",
+ "shortdesc" : "The UUID of the virtual machine to fence.",
+ "order" : 1}
}
common_opt = [ "retry_on", "delay" ]
@@ -687,7 +694,7 @@ def check_input(device_opt, opt):
if 0 == os.path.isfile(options["-k"]):
fail_usage("Failed: Identity file " + options["-k"] + " does not exist")
- if (0 == ["list", "monitor"].count(options["-o"].lower())) and (0 == options.has_key("-n")) and (device_opt.count("port")):
+ if (0 == ["list", "monitor"].count(options["-o"].lower())) and (0 == options.has_key("-n") and 0 == options.has_key("-U")) and (device_opt.count("port")):
fail_usage("Failed: You have to enter plug number")
if options.has_key("-S"):