VCP : use routerProxy to call checkrouter script
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/251a91f5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/251a91f5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/251a91f5 Branch: refs/heads/vpc Commit: 251a91f5b3044f9f33109e2f6dde36b4b8d301a6 Parents: a08c9e7 Author: anthony <[email protected]> Authored: Wed Jun 6 16:08:14 2012 -0700 Committer: Alena Prokharchyk <[email protected]> Committed: Fri Jun 15 14:24:18 2012 -0700 ---------------------------------------------------------------------- .../xen/resource/CitrixResourceBase.java | 4 +- scripts/network/domr/getRouterStatus.sh | 42 --------------- scripts/vm/hypervisor/xenserver/vmops | 16 +----- scripts/vm/hypervisor/xenserver/xenserver56/patch | 1 - .../vm/hypervisor/xenserver/xenserver56fp1/patch | 1 - scripts/vm/hypervisor/xenserver/xenserver60/patch | 1 - wscript | 2 +- 7 files changed, 4 insertions(+), 63 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/251a91f5/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java ---------------------------------------------------------------------- diff --git a/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java b/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java index 30641c0..79582a4 100644 --- a/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java +++ b/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java @@ -1349,8 +1349,8 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe private CheckRouterAnswer execute(CheckRouterCommand cmd) { Connection conn = getConnection(); - String args = cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP); - String result = callHostPlugin(conn, "vmops", "checkRouter", "args", args); + String args = "checkrouter.sh " + cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP); + String result = callHostPlugin(conn, "vmops", "routerProxy", "args", args); if (result == null || result.isEmpty()) { return new CheckRouterAnswer(cmd, "CheckRouterCommand failed"); } http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/251a91f5/scripts/network/domr/getRouterStatus.sh ---------------------------------------------------------------------- diff --git a/scripts/network/domr/getRouterStatus.sh b/scripts/network/domr/getRouterStatus.sh deleted file mode 100755 index 04511b6..0000000 --- a/scripts/network/domr/getRouterStatus.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# Copyright 2012 Citrix Systems, Inc. Licensed under the -# Apache License, Version 2.0 (the "License"); you may not use this -# file except in compliance with the License. Citrix Systems, Inc. -# reserves all rights not expressly granted by the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Automatically generated by addcopyright.py at 04/03/2012 - -usage() { - printf "Usage:\n %s <domR eth1 ip> \n" $(basename $0) >&2 - printf " %s <domR eth1 ip> \n" $(basename $0) >&2 -} - -cert="/root/.ssh/id_rsa.cloud" -domRIp=$1 -shift - -check_gw() { - ping -c 1 -n -q $1 > /dev/null - if [ $? -gt 0 ] - then - sleep 1 - ping -c 1 -n -q $1 > /dev/null - fi - return $?; -} - - -check_gw "$domRIp" -if [ $? -gt 0 ] -then - exit 1 -fi - -ssh -p 3922 -q -o StrictHostKeyChecking=no -i $cert root@$domRIp "/root/checkrouter.sh" -exit $? http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/251a91f5/scripts/vm/hypervisor/xenserver/vmops ---------------------------------------------------------------------- diff --git a/scripts/vm/hypervisor/xenserver/vmops b/scripts/vm/hypervisor/xenserver/vmops index b99b766..daf07a0 100755 --- a/scripts/vm/hypervisor/xenserver/vmops +++ b/scripts/vm/hypervisor/xenserver/vmops @@ -1420,20 +1420,6 @@ def network_rules(session, args): util.SMlog("Failed to network rule !") @echo -def checkRouter(session, args): - sargs = args['args'] - cmd = sargs.split(' ') - cmd.insert(0, "/opt/xensource/bin/getRouterStatus.sh") - cmd.insert(0, "/bin/bash") - try: - txt = util.pread2(cmd) - except: - util.SMlog(" check router status fail! ") - txt = '' - - return txt - -@echo def bumpUpPriority(session, args): sargs = args['args'] cmd = sargs.split(' ') @@ -1462,6 +1448,6 @@ if __name__ == "__main__": "default_network_rules_systemvm":default_network_rules_systemvm, "get_rule_logs_for_vms":get_rule_logs_for_vms, "setLinkLocalIP":setLinkLocalIP, "lt2p_vpn":lt2p_vpn, - "cleanup_rules":cleanup_rules, "checkRouter":checkRouter, + "cleanup_rules":cleanup_rules, "bumpUpPriority":bumpUpPriority, "kill_copy_process":kill_copy_process}) http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/251a91f5/scripts/vm/hypervisor/xenserver/xenserver56/patch ---------------------------------------------------------------------- diff --git a/scripts/vm/hypervisor/xenserver/xenserver56/patch b/scripts/vm/hypervisor/xenserver/xenserver56/patch index a7dac08..82f16a9 100644 --- a/scripts/vm/hypervisor/xenserver/xenserver56/patch +++ b/scripts/vm/hypervisor/xenserver/xenserver56/patch @@ -44,7 +44,6 @@ create_privatetemplate_from_snapshot.sh=..,0755,/opt/xensource/bin upgrade_snapshot.sh=..,0755,/opt/xensource/bin cloud-clean-vlan.sh=..,0755,/opt/xensource/bin cloud-prepare-upgrade.sh=..,0755,/opt/xensource/bin -getRouterStatus.sh=../../../../network/domr/,0755,/opt/xensource/bin bumpUpPriority.sh=../../../../network/domr/,0755,/opt/xensource/bin swift=..,0755,/opt/xensource/bin swiftxen=..,0755,/etc/xapi.d/plugins http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/251a91f5/scripts/vm/hypervisor/xenserver/xenserver56fp1/patch ---------------------------------------------------------------------- diff --git a/scripts/vm/hypervisor/xenserver/xenserver56fp1/patch b/scripts/vm/hypervisor/xenserver/xenserver56fp1/patch index 9d4554d..345868e 100644 --- a/scripts/vm/hypervisor/xenserver/xenserver56fp1/patch +++ b/scripts/vm/hypervisor/xenserver/xenserver56fp1/patch @@ -43,7 +43,6 @@ create_privatetemplate_from_snapshot.sh=..,0755,/opt/xensource/bin upgrade_snapshot.sh=..,0755,/opt/xensource/bin cloud-clean-vlan.sh=..,0755,/opt/xensource/bin cloud-prepare-upgrade.sh=..,0755,/opt/xensource/bin -getRouterStatus.sh=../../../../network/domr/,0755,/opt/xensource/bin bumpUpPriority.sh=../../../../network/domr/,0755,/opt/xensource/bin swift=..,0755,/opt/xensource/bin swiftxen=..,0755,/etc/xapi.d/plugins http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/251a91f5/scripts/vm/hypervisor/xenserver/xenserver60/patch ---------------------------------------------------------------------- diff --git a/scripts/vm/hypervisor/xenserver/xenserver60/patch b/scripts/vm/hypervisor/xenserver/xenserver60/patch index f373900..4d6e971 100644 --- a/scripts/vm/hypervisor/xenserver/xenserver60/patch +++ b/scripts/vm/hypervisor/xenserver/xenserver60/patch @@ -48,7 +48,6 @@ create_privatetemplate_from_snapshot.sh=..,0755,/opt/xensource/bin upgrade_snapshot.sh=..,0755,/opt/xensource/bin cloud-clean-vlan.sh=..,0755,/opt/xensource/bin cloud-prepare-upgrade.sh=..,0755,/opt/xensource/bin -getRouterStatus.sh=../../../../network/domr/,0755,/opt/xensource/bin bumpUpPriority.sh=../../../../network/domr/,0755,/opt/xensource/bin swift=..,0755,/opt/xensource/bin swiftxen=..,0755,/etc/xapi.d/plugins http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/251a91f5/wscript ---------------------------------------------------------------------- diff --git a/wscript b/wscript index 4a6c389..6e2f5a1 100644 --- a/wscript +++ b/wscript @@ -4,7 +4,7 @@ # the following two variables are used by the target "waf dist" # if you change 'em here, you need to change it also in cloud.spec, add a %changelog entry there, and add an entry in debian/changelog -VERSION = '3.0.3.2012-06-06T19:22:49Z' +VERSION = '3.0.3.2012-06-06T21:28:42Z' APPNAME = 'cloud' import shutil,os
