fix devcloud router start

Conflicts:

	plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XcpOssResource.java
This commit is contained in:
Edison Su 2014-03-27 15:32:37 -07:00
parent f84fc12d26
commit 3d0b739950
2 changed files with 18 additions and 18 deletions

View File

@ -80,7 +80,7 @@ public class XcpOssResource extends CitrixResourceBase {
}
@Override
protected VBD createPatchVbd(Connection conn, String vmName, VM vm) throws XmlRpcException, XenAPIException {
protected synchronized VBD createPatchVbd(Connection conn, String vmName, VM vm) throws XmlRpcException, XenAPIException {
if (_host.localSRuuid != null) {
//create an iso vdi on it
String result = callHostPlugin(conn, "vmops", "createISOVHD", "uuid", _host.localSRuuid);

View File

@ -55,7 +55,7 @@ def gethostvmstats(session, args):
def setup_iscsi(session, args):
uuid=args['uuid']
try:
cmd = ["bash", "/usr/lib/xcp/bin/setup_iscsi.sh", uuid]
cmd = ["b", "/opt/cloud/bin/setup_iscsi.sh", uuid]
txt = util.pread2(cmd)
except:
txt = ''
@ -66,7 +66,7 @@ def setup_iscsi(session, args):
def getgateway(session, args):
mgmt_ip = args['mgmtIP']
try:
cmd = ["bash", "/usr/lib/xcp/bin/network_info.sh", "-g", mgmt_ip]
cmd = ["bash", "/opt/cloud/bin/network_info.sh", "-g", mgmt_ip]
txt = util.pread2(cmd)
except:
txt = ''
@ -77,7 +77,7 @@ def getgateway(session, args):
def preparemigration(session, args):
uuid = args['uuid']
try:
cmd = ["/usr/lib/xcp/bin/make_migratable.sh", uuid]
cmd = ["/opt/cloud/bin/make_migratable.sh", uuid]
util.pread2(cmd)
txt = 'success'
except:
@ -89,7 +89,7 @@ def preparemigration(session, args):
@echo
def setIptables(session, args):
try:
'''cmd = ["/bin/bash", "/usr/lib/xcp/bin/setupxenserver.sh"]
'''cmd = ["/bin/bash", "/opt/cloud/bin/setupxenserver.sh"]
txt = util.pread2(cmd)'''
txt = 'success'
except:
@ -118,7 +118,7 @@ def pingdomr(session, args):
def kill_copy_process(session, args):
namelabel = args['namelabel']
try:
cmd = ["bash", "/usr/lib/xcp/bin/kill_copy_process.sh", namelabel]
cmd = ["bash", "/opt/cloud/bin/kill_copy_process.sh", namelabel]
txt = util.pread2(cmd)
except:
txt = 'false'
@ -133,7 +133,7 @@ def pingxenserver(session, args):
def ipassoc(session, args):
sargs = args['args']
cmd = sargs.split(' ')
cmd.insert(0, "/usr/lib/xcp/bin/ipassoc.sh")
cmd.insert(0, "/opt/cloud/bin/ipassoc.sh")
cmd.insert(0, "/bin/bash")
try:
txt = util.pread2(cmd)
@ -147,7 +147,7 @@ def ipassoc(session, args):
def pingtest(session, args):
sargs = args['args']
cmd = sargs.split(' ')
cmd.insert(0, "/usr/lib/xcp/bin/pingtest.sh")
cmd.insert(0, "/opt/cloud/bin/pingtest.sh")
cmd.insert(0, "/bin/bash")
try:
txt = util.pread2(cmd)
@ -162,7 +162,7 @@ def pingtest(session, args):
def savePassword(session, args):
sargs = args['args']
cmd = sargs.split(' ')
cmd.insert(0, "/usr/lib/xcp/bin/save_password_to_domr.sh")
cmd.insert(0, "/opt/cloud/bin/save_password_to_domr.sh")
cmd.insert(0, "/bin/bash")
try:
txt = util.pread2(cmd)
@ -177,7 +177,7 @@ def savePassword(session, args):
def saveDhcpEntry(session, args):
sargs = args['args']
cmd = sargs.split(' ')
cmd.insert(0, "/usr/lib/xcp/bin/dhcp_entry.sh")
cmd.insert(0, "/opt/cloud/bin/dhcp_entry.sh")
cmd.insert(0, "/bin/bash")
try:
txt = util.pread2(cmd)
@ -192,7 +192,7 @@ def saveDhcpEntry(session, args):
def lt2p_vpn(session, args):
sargs = args['args']
cmd = sargs.split(' ')
cmd.insert(0, "/usr/lib/xcp/bin/l2tp_vpn.sh")
cmd.insert(0, "/opt/cloud/bin/l2tp_vpn.sh")
cmd.insert(0, "/bin/bash")
try:
txt = util.pread2(cmd)
@ -239,7 +239,7 @@ def setLinkLocalIP(session, args):
def setFirewallRule(session, args):
sargs = args['args']
cmd = sargs.split(' ')
cmd.insert(0, "/usr/lib/xcp/bin/call_firewall.sh")
cmd.insert(0, "/opt/cloud/bin/call_firewall.sh")
cmd.insert(0, "/bin/bash")
try:
txt = util.pread2(cmd)
@ -254,7 +254,7 @@ def setFirewallRule(session, args):
def setLoadBalancerRule(session, args):
sargs = args['args']
cmd = sargs.split(' ')
cmd.insert(0, "/usr/lib/xcp/bin/call_loadbalancer.sh")
cmd.insert(0, "/opt/cloud/bin/call_loadbalancer.sh")
cmd.insert(0, "/bin/bash")
try:
txt = util.pread2(cmd)
@ -300,7 +300,7 @@ def deleteFile(session, args):
def networkUsage(session, args):
sargs = args['args']
cmd = sargs.split(' ')
cmd.insert(0, "/usr/lib/xcp/bin/networkUsage.sh")
cmd.insert(0, "/opt/cloud/bin/networkUsage.sh")
cmd.insert(0, "/bin/bash")
try:
txt = util.pread2(cmd)
@ -1350,7 +1350,7 @@ def network_rules(session, args):
def checkRouter(session, args):
sargs = args['args']
cmd = sargs.split(' ')
cmd.insert(0, "/usr/lib/xcp/bin/getRouterStatus.sh")
cmd.insert(0, "/opt/cloud/bin/getRouterStatus.sh")
cmd.insert(0, "/bin/bash")
try:
txt = util.pread2(cmd)
@ -1364,7 +1364,7 @@ def checkRouter(session, args):
def bumpUpPriority(session, args):
sargs = args['args']
cmd = sargs.split(' ')
cmd.insert(0, "/usr/lib/xcp/bin/bumpUpPriority.sh")
cmd.insert(0, "/opt/cloud/bin/bumpUpPriority.sh")
cmd.insert(0, "/bin/bash")
try:
txt = util.pread2(cmd)
@ -1446,7 +1446,7 @@ def createISOVHD(session, args):
def routerProxy(session, args):
sargs = args['args']
cmd = sargs.split(' ')
cmd.insert(0, "/usr/lib/xcp/bin/router_proxy.sh")
cmd.insert(0, "/opt/cloud/bin/router_proxy.sh")
cmd.insert(0, "/bin/bash")
try:
txt = util.pread2(cmd)
@ -1462,7 +1462,7 @@ def routerProxy(session, args):
def getDomRVersion(session, args):
sargs = args['args']
cmd = sargs.split(' ')
cmd.insert(0, "/usr/lib/xcp/bin/getDomRVersion.sh")
cmd.insert(0, "/opt/cloud/bin/getDomRVersion.sh")
cmd.insert(0, "/bin/bash")
try:
txt = util.pread2(cmd)