Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: da220abc1de33c59cef58f23433d434ceab3638f
Parent: 4ad333b7009ada0af3c1a2a5ad8f9815fb67b582
Author: Lon Hohberger <lhh(a)redhat.com>
AuthorDate: Fri Oct 30 17:23:03 2009 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Fri Oct 30 17:23:03 2009 -0400
resource-agents: Report bad config from vm.sh
Resolves: rhbz#529926
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
rgmanager/src/resources/vm.sh | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/rgmanager/src/resources/vm.sh b/rgmanager/src/resources/vm.sh
index df0c9b7..02bb5ff 100755
--- a/rgmanager/src/resources/vm.sh
+++ b/rgmanager/src/resources/vm.sh
@@ -585,11 +585,24 @@ validate_all()
echo "Management tool: virsh"
export OCF_RESKEY_use_virsh=1
else
+ if [ "$OCF_RESKEY_hypervisor" != "xen" ]; then
+ ocf_log err "Cannot use $OCF_RESKEY_hypervisor hypervisor with 'path'
attribute"
+ return $OCF_ERR_ARGS
+ fi
+
echo "Management tool: xm"
export OCF_RESKEY_use_virsh=0
fi
fi
+ if [ "$OCF_RESKEY_use_virsh" = "0" ]; then
+ if [ "$OCF_RESKEY_hypervisor" = "qemu" ] ||
+ [ "$OCF_RESKEY_hypervisor" = "kvm" ]; then
+ ocf_log err "Cannot use $OCF_RESKEY_hypervisor hypervisor without using
virsh"
+ return $OCF_ERR_ARGS
+ fi
+ fi
+
#
# Set the hypervisor URI
#