mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
bug 7230: there was an issue trying to start user vms when the pool state is cancelmaintenance; fixing the same in 2.2RC2
status 7230: resolved fixed
This commit is contained in:
parent
d38f7fd56d
commit
0979b644ef
@ -140,7 +140,6 @@ public enum Config {
|
||||
// UpgradeURL("Advanced", ManagementServer.class, String.class, "upgrade.url", "http://example.com:8080/client/agent/update.zip", "The upgrade URL is the URL of the management server that agents will connect to in order to automatically upgrade.", null),
|
||||
SystemVMUseLocalStorage("Advanced", ManagementServer.class, Boolean.class, "system.vm.use.local.storage", "false", "Indicates whether to use local storage pools or shared storage pools for system VMs.", null),
|
||||
CPUOverprovisioningFactor("Advanced", ManagementServer.class, String.class, "cpu.overprovisioning.factor", "1", "Used for CPU overprovisioning calculation; available CPU will be (actualCpuCapacity * cpu.overprovisioning.factor)", null),
|
||||
NetworkType("Advanced", ManagementServer.class, String.class, "network.type", "vlan", "The type of network that this deployment will use.", "vlan,direct"),
|
||||
LinkLocalIpNums("Advanced", ManagementServer.class, Integer.class, "linkLocalIp.nums", "10", "The number of link local ip that needed by domR(in power of 2)", null),
|
||||
HypervisorDefaultType("Advanced", ManagementServer.class, String.class, "hypervisor.type", HypervisorType.KVM.toString(), "The type of hypervisor that this deployment will use.", "kvm,xenserver,vmware"),
|
||||
HypervisorList("Advanced", ManagementServer.class, String.class, "hypervisor.list", HypervisorType.KVM + "," + HypervisorType.XenServer + "," + HypervisorType.VmWare, "The list of hypervisors that this deployment will use.", "hypervisorList"),
|
||||
@ -199,6 +198,7 @@ public enum Config {
|
||||
CloudIdentifier("Hidden", ManagementServer.class, String.class, "cloud.identifier", null, "A unique identifier for the cloud.", null),
|
||||
SSOKey("Hidden", ManagementServer.class, String.class, "security.singlesignon.key", null, "A Single Sign-On key used for logging into the cloud", null),
|
||||
SSOAuthTolerance("Advanced", ManagementServer.class, Long.class, "security.singlesignon.tolerance.millis", "300000", "The allowable clock difference in milliseconds between when an SSO login request is made and when it is received.", null),
|
||||
NetworkType("Hidden", ManagementServer.class, String.class, "network.type", "vlan", "The type of network that this deployment will use.", "vlan,direct"),
|
||||
HashKey("Hidden", ManagementServer.class, String.class, "security.hash.key", null, "for generic key-ed hash", null);
|
||||
|
||||
private final String _category;
|
||||
|
||||
@ -2466,26 +2466,26 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag
|
||||
try {
|
||||
if(_userVmMgr.start(vmInstance.getId(), eventId) == null)
|
||||
{
|
||||
String msg = "There was an error starting the ssvm id: "+vmInstance.getId()+" on storage pool, cannot complete primary storage maintenance";
|
||||
String msg = "There was an error starting the user vm id: "+vmInstance.getId()+" on storage pool, cannot complete primary storage maintenance";
|
||||
s_logger.warn(msg);
|
||||
throw new ResourceUnavailableException(msg);
|
||||
}
|
||||
} catch (StorageUnavailableException e) {
|
||||
String msg = "There was an error starting the ssvm id: "+vmInstance.getId()+" on storage pool, cannot complete primary storage maintenance";
|
||||
String msg = "There was an error starting the user vm id: "+vmInstance.getId()+" on storage pool, cannot complete primary storage maintenance";
|
||||
s_logger.warn(msg,e);
|
||||
throw new ResourceUnavailableException(msg);
|
||||
} catch (InsufficientCapacityException e) {
|
||||
String msg = "There was an error starting the ssvm id: "+vmInstance.getId()+" on storage pool, cannot complete primary storage maintenance";
|
||||
String msg = "There was an error starting the user vm id: "+vmInstance.getId()+" on storage pool, cannot complete primary storage maintenance";
|
||||
s_logger.warn(msg,e);
|
||||
throw new ResourceUnavailableException(msg);
|
||||
} catch (ConcurrentOperationException e) {
|
||||
String msg = "There was an error starting the ssvm id: "+vmInstance.getId()+" on storage pool, cannot complete primary storage maintenance";
|
||||
String msg = "There was an error starting the user vm id: "+vmInstance.getId()+" on storage pool, cannot complete primary storage maintenance";
|
||||
s_logger.warn(msg,e);
|
||||
primaryStorage.setStatus(Status.ErrorInMaintenance);
|
||||
_storagePoolDao.persist(primaryStorage);
|
||||
throw new ResourceUnavailableException(msg);
|
||||
} catch (ExecutionException e) {
|
||||
String msg = "There was an error starting the ssvm id: "+vmInstance.getId()+" on storage pool, cannot complete primary storage maintenance";
|
||||
String msg = "There was an error starting the user vm id: "+vmInstance.getId()+" on storage pool, cannot complete primary storage maintenance";
|
||||
s_logger.warn(msg,e);
|
||||
throw new ResourceUnavailableException(msg);
|
||||
}
|
||||
|
||||
@ -1147,7 +1147,7 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, VirtualM
|
||||
throw new StorageUnavailableException("Could not find the pool for the root disk of vm"+vmId+", to confirm if it is Up or not");
|
||||
}else{
|
||||
//found pool
|
||||
if(!sp.getStatus().equals(com.cloud.host.Status.Up)){
|
||||
if(!sp.getStatus().equals(com.cloud.host.Status.Up) && !sp.getStatus().equals(com.cloud.host.Status.CancelMaintenance)){
|
||||
throw new StorageUnavailableException("Could not start the vm; the associated storage pool is in:"+sp.getStatus().toString()+" state");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user