mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-7313 Fixed issues in provisioning vpx in SDX from CS
This commit is contained in:
parent
50185b7c3a
commit
0f528df228
@ -931,7 +931,7 @@ public class NetscalerResource implements ServerResource {
|
||||
" as there are no admin profile to use for creating VPX."));
|
||||
}
|
||||
String profileName = profiles[0].get_name();
|
||||
ns_obj.set_profile_name(profileName);
|
||||
ns_obj.set_profile_name("ns_nsroot_profile");
|
||||
|
||||
// use the first VPX image of the available VPX images on the SDX to create an instance of VPX
|
||||
// TODO: should enable the option to choose the template while adding the SDX device in to CloudStack
|
||||
@ -959,7 +959,7 @@ public class NetscalerResource implements ServerResource {
|
||||
// wait for VPX instance to start-up
|
||||
long startTick = System.currentTimeMillis();
|
||||
long startWaitMilliSeconds = 600000;
|
||||
while (!newVpx.get_state().equalsIgnoreCase("up") && System.currentTimeMillis() - startTick < startWaitMilliSeconds) {
|
||||
while (!newVpx.get_instance_state().equalsIgnoreCase("up") && System.currentTimeMillis() - startTick < startWaitMilliSeconds) {
|
||||
try {
|
||||
Thread.sleep(10000);
|
||||
} catch (InterruptedException e) {
|
||||
@ -970,7 +970,7 @@ public class NetscalerResource implements ServerResource {
|
||||
}
|
||||
|
||||
// if vpx instance never came up then error out
|
||||
if (!newVpx.get_state().equalsIgnoreCase("up")) {
|
||||
if (!newVpx.get_instance_state().equalsIgnoreCase("up")) {
|
||||
return new Answer(cmd, new ExecutionException("Failed to start VPX instance " + vpxName + " created on the netscaler SDX device " + _ip));
|
||||
}
|
||||
|
||||
@ -981,6 +981,8 @@ public class NetscalerResource implements ServerResource {
|
||||
while (System.currentTimeMillis() - startTick < nsServiceWaitMilliSeconds) {
|
||||
try {
|
||||
nitro_service _netscalerService = new nitro_service(cmd.getLoadBalancerIP(), "https");
|
||||
_netscalerService.set_certvalidation(false);
|
||||
_netscalerService.set_hostnameverification(false);
|
||||
_netscalerService.set_credential(username, password);
|
||||
apiCallResult = _netscalerService.login();
|
||||
if (apiCallResult.errorcode == 0) {
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
package com.cloud.network;
|
||||
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -519,8 +520,13 @@ public abstract class ExternalLoadBalancerDeviceManagerImpl extends AdapterBase
|
||||
null, false);
|
||||
String publicIPNetmask = publicIp.getVlanNetmask();
|
||||
String publicIPgateway = publicIp.getVlanGateway();
|
||||
String publicIPVlanTag = publicIp.getVlanTag();
|
||||
String publicIP = publicIp.getAddress().toString();
|
||||
String publicIPVlanTag="";
|
||||
try {
|
||||
publicIPVlanTag = BroadcastDomainType.getValue(publicIp.getVlanTag());
|
||||
} catch (URISyntaxException e) {
|
||||
s_logger.error("Failed to parse public ip vlan tag" + e.getMessage());
|
||||
}
|
||||
|
||||
String url =
|
||||
"https://" + lbIP + "?publicinterface=" + publicIf + "&privateinterface=" + privateIf + "&lbdevicededicated=" + dedicatedLb +
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user