From 806c70c87ff983aa5e8c2e5f9b1fef960e1bc4dd Mon Sep 17 00:00:00 2001 From: frank Date: Wed, 31 Aug 2011 15:36:49 -0700 Subject: [PATCH] Bug 8966 - Oracle VM (OVM) support fix a ovs agent bug, wrong return value check --- ...e_reposExceptionDueToWrongReturnValueCheck.patch | 13 +++++++++++++ ovm/scripts/vm/hypervisor/ovm/configureOvm.sh | 7 +++++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 ovm/scripts/vm/hypervisor/ovm/Fixget_storage_reposExceptionDueToWrongReturnValueCheck.patch diff --git a/ovm/scripts/vm/hypervisor/ovm/Fixget_storage_reposExceptionDueToWrongReturnValueCheck.patch b/ovm/scripts/vm/hypervisor/ovm/Fixget_storage_reposExceptionDueToWrongReturnValueCheck.patch new file mode 100644 index 00000000000..7c41e555147 --- /dev/null +++ b/ovm/scripts/vm/hypervisor/ovm/Fixget_storage_reposExceptionDueToWrongReturnValueCheck.patch @@ -0,0 +1,13 @@ +diff --git a/OVSXUtility.py b/OVSXUtility.py +index 4a98bc8..1053ef7 100644 +--- a/OVSXUtility.py ++++ b/OVSXUtility.py +@@ -160,7 +160,7 @@ def get_storage_repos(): + l = parse_storage_repos() + for sr in l: + d = get_storage_free_space(sr) +- if d: ++ if len(d) > 0: + d_repos_space[sr] = d[sr] + + if not d_repos_space: diff --git a/ovm/scripts/vm/hypervisor/ovm/configureOvm.sh b/ovm/scripts/vm/hypervisor/ovm/configureOvm.sh index 2ad45ead698..e291b90441d 100755 --- a/ovm/scripts/vm/hypervisor/ovm/configureOvm.sh +++ b/ovm/scripts/vm/hypervisor/ovm/configureOvm.sh @@ -63,10 +63,13 @@ applyPatch() { } postSetup() { - openPortOnIptables 7777 tcp - openPortOnIptables 7777 udp + openPortOnIptables 7777 tcp # for OCFS2, maybe tcp only + openPortOnIptables 7777 udp + openPortOnIptables 3260 tcp # for ISCSI, maybe tcp only + openPortOnIptables 3260 udp applyPatch "/opt/ovs-agent-latest/OvmPatch.patch" 2 applyPatch "/opt/ovs-agent-latest/OvmDontTouchOCFS2ClusterWhenAgentStart.patch" 1 + applyPatch "/opt/ovs-agent-latest/Fixget_storage_reposExceptionDueToWrongReturnValueCheck.patch" 1 stopHeartbeat