mirror of https://github.com/apache/cloudstack.git
Finally domr and instance running again.
This commit is contained in:
parent
5f90a8adb0
commit
4ccf4361d1
|
|
@ -265,7 +265,7 @@ public class ConsoleProxyManagerImpl implements ConsoleProxyManager, VirtualMach
|
|||
private AsyncJobManager _asyncMgr;
|
||||
|
||||
@Inject
|
||||
private VmManager _vmMgr;
|
||||
private VmManager _itMgr;
|
||||
|
||||
@Inject
|
||||
private ClusterManager _clMgr;
|
||||
|
|
@ -551,7 +551,7 @@ public class ConsoleProxyManagerImpl implements ConsoleProxyManager, VirtualMach
|
|||
ConsoleProxyVO proxy = _consoleProxyDao.findById(proxyVmId);
|
||||
AccountVO systemAcct = _accountMgr.getSystemAccount();
|
||||
UserVO systemUser = _accountMgr.getSystemUser();
|
||||
return _vmMgr.start(proxy, null, systemUser, systemAcct);
|
||||
return _itMgr.start(proxy, null, systemUser, systemAcct);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -1078,7 +1078,7 @@ public class ConsoleProxyManagerImpl implements ConsoleProxyManager, VirtualMach
|
|||
}
|
||||
ConsoleProxyVO proxy = new ConsoleProxyVO(id, _serviceOffering.getId(), name, _template.getId(), _template.getGuestOSId(), dataCenterId, systemAcct.getDomainId(), systemAcct.getId(), 0);
|
||||
try {
|
||||
VirtualMachineProfile<ConsoleProxyVO> vmProfile = _vmMgr.allocate(proxy, _template, _serviceOffering, networks, plan, systemAcct);
|
||||
proxy = _itMgr.allocate(proxy, _template, _serviceOffering, networks, plan, systemAcct);
|
||||
} catch (InsufficientCapacityException e) {
|
||||
s_logger.warn("InsufficientCapacity", e);
|
||||
throw new CloudRuntimeException("Insufficient capacity exception", e);
|
||||
|
|
@ -2344,7 +2344,7 @@ public class ConsoleProxyManagerImpl implements ConsoleProxyManager, VirtualMach
|
|||
if (haMgr != null) {
|
||||
haMgr.registerHandler(VirtualMachine.Type.ConsoleProxy, this);
|
||||
}
|
||||
_vmMgr.registerGuru(VirtualMachine.Type.ConsoleProxy, this);
|
||||
_itMgr.registerGuru(VirtualMachine.Type.ConsoleProxy, this);
|
||||
|
||||
boolean useLocalStorage = Boolean.parseBoolean(configs.get(Config.SystemVMUseLocalStorage.key()));
|
||||
String networkRateStr = _configDao.getValue("network.throttling.rate");
|
||||
|
|
|
|||
|
|
@ -2056,7 +2056,7 @@ public class DomainRouterManagerImpl implements DomainRouterManager, DomainRoute
|
|||
s_logger.debug("Creating the router " + id);
|
||||
}
|
||||
|
||||
String sourceNatIp = _networkMgr.assignSourceNatIpAddress(owner, dest.getDataCenter());
|
||||
//String sourceNatIp = _networkMgr.assignSourceNatIpAddress(owner, dest.getDataCenter());
|
||||
|
||||
List<NetworkOfferingVO> offerings = _networkMgr.getSystemAccountNetworkOfferings(NetworkOfferingVO.SystemVmControlNetwork);
|
||||
NetworkOfferingVO controlOffering = offerings.get(0);
|
||||
|
|
@ -2067,7 +2067,7 @@ public class DomainRouterManagerImpl implements DomainRouterManager, DomainRoute
|
|||
List<NetworkConfigurationVO> publicConfigs = _networkMgr.setupNetworkConfiguration(_systemAcct, publicOffering, plan);
|
||||
NicProfile defaultNic = new NicProfile();
|
||||
defaultNic.setDefaultNic(true);
|
||||
defaultNic.setIp4Address(sourceNatIp);
|
||||
//defaultNic.setIp4Address(sourceNatIp);
|
||||
defaultNic.setDeviceId(2);
|
||||
networks.add(new Pair<NetworkConfigurationVO, NicProfile>(publicConfigs.get(0), defaultNic));
|
||||
NicProfile gatewayNic = new NicProfile();
|
||||
|
|
@ -2081,7 +2081,7 @@ public class DomainRouterManagerImpl implements DomainRouterManager, DomainRoute
|
|||
networks.add(new Pair<NetworkConfigurationVO, NicProfile>(controlConfig, null));
|
||||
|
||||
router = new DomainRouterVO(id, _offering.getId(), VirtualMachineName.getRouterName(id, _instance), _template.getId(), _template.getGuestOSId(), owner.getDomainId(), owner.getId(), guestConfig.getId(), _offering.getOfferHA());
|
||||
_itMgr.allocate(router, _template, _offering, networks, plan, owner);
|
||||
router = _itMgr.allocate(router, _template, _offering, networks, plan, owner);
|
||||
}
|
||||
|
||||
return _itMgr.start(router, null, _accountMgr.getSystemUser(), _accountMgr.getSystemAccount());
|
||||
|
|
@ -2089,7 +2089,7 @@ public class DomainRouterManagerImpl implements DomainRouterManager, DomainRoute
|
|||
|
||||
@Override
|
||||
public boolean finalizeVirtualMachineProfile(VirtualMachineProfile<DomainRouterVO> profile, DeployDestination dest, ReservationContext context) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
StringBuilder buf = profile.getBootArgsBuilder();
|
||||
buf.append(" template=domP type=router");
|
||||
buf.append(" name=").append(profile.getHostName());
|
||||
NicProfile controlNic = null;
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ public class MauriceMoss implements VmManager, ClusterManagerListener {
|
|||
}
|
||||
|
||||
@Override @DB
|
||||
public <T extends VMInstanceVO> VirtualMachineProfile<T> allocate(T vm,
|
||||
public <T extends VMInstanceVO> T allocate(T vm,
|
||||
VMTemplateVO template,
|
||||
ServiceOfferingVO serviceOffering,
|
||||
Pair<? extends DiskOfferingVO, Long> rootDiskOffering,
|
||||
|
|
@ -175,11 +175,11 @@ public class MauriceMoss implements VmManager, ClusterManagerListener {
|
|||
s_logger.debug("Allocation completed for VM: " + vm);
|
||||
}
|
||||
|
||||
return vmProfile;
|
||||
return vm;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends VMInstanceVO> VirtualMachineProfile<T> allocate(T vm,
|
||||
public <T extends VMInstanceVO> T allocate(T vm,
|
||||
VMTemplateVO template,
|
||||
ServiceOfferingVO serviceOffering,
|
||||
Long rootSize,
|
||||
|
|
@ -195,7 +195,7 @@ public class MauriceMoss implements VmManager, ClusterManagerListener {
|
|||
}
|
||||
|
||||
@Override
|
||||
public <T extends VMInstanceVO> VirtualMachineProfile<T> allocate(T vm,
|
||||
public <T extends VMInstanceVO> T allocate(T vm,
|
||||
VMTemplateVO template,
|
||||
ServiceOfferingVO serviceOffering,
|
||||
List<Pair<NetworkConfigurationVO, NicProfile>> networks,
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ import com.cloud.storage.StoragePoolVO;
|
|||
import com.cloud.storage.VMTemplateVO;
|
||||
import com.cloud.user.AccountVO;
|
||||
import com.cloud.uservm.UserVm;
|
||||
import com.cloud.utils.component.Manager;
|
||||
import com.cloud.utils.exception.ExecutionException;
|
||||
import com.cloud.vm.VirtualMachine.Event;
|
||||
|
||||
|
|
@ -46,7 +45,7 @@ import com.cloud.vm.VirtualMachine.Event;
|
|||
* UserVmManager contains all of the code to work with user VMs.
|
||||
*
|
||||
*/
|
||||
public interface UserVmManager extends Manager, VirtualMachineManager<UserVmVO> {
|
||||
public interface UserVmManager extends VirtualMachineManager<UserVmVO> {
|
||||
|
||||
static final int MAX_USER_DATA_LENGTH_BYTES = 2048;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -187,6 +187,7 @@ import com.cloud.utils.PasswordGenerator;
|
|||
import com.cloud.utils.component.Adapters;
|
||||
import com.cloud.utils.component.ComponentLocator;
|
||||
import com.cloud.utils.component.Inject;
|
||||
import com.cloud.utils.component.Manager;
|
||||
import com.cloud.utils.concurrency.NamedThreadFactory;
|
||||
import com.cloud.utils.db.DB;
|
||||
import com.cloud.utils.db.GlobalLock;
|
||||
|
|
@ -204,7 +205,7 @@ import com.cloud.vm.dao.InstanceGroupVMMapDao;
|
|||
import com.cloud.vm.dao.UserVmDao;
|
||||
|
||||
@Local(value={UserVmManager.class, UserVmService.class})
|
||||
public class UserVmManagerImpl implements UserVmManager, UserVmService, VirtualMachineGuru<UserVmVO> {
|
||||
public class UserVmManagerImpl implements UserVmManager, UserVmService, VirtualMachineGuru<UserVmVO>, Manager, VirtualMachineManager<UserVmVO> {
|
||||
private static final Logger s_logger = Logger.getLogger(UserVmManagerImpl.class);
|
||||
private static final int ACQUIRE_GLOBAL_LOCK_TIMEOUT_FOR_COOPERATION = 3; // 3 seconds
|
||||
|
||||
|
|
|
|||
|
|
@ -46,10 +46,9 @@ import com.cloud.exception.StorageUnavailableException;
|
|||
import com.cloud.storage.VMTemplateVO;
|
||||
import com.cloud.storage.Volume;
|
||||
import com.cloud.uservm.UserVm;
|
||||
import com.cloud.utils.component.Manager;
|
||||
import com.cloud.utils.exception.ExecutionException;
|
||||
|
||||
public interface UserVmService extends Manager {
|
||||
public interface UserVmService {
|
||||
/**
|
||||
* Destroys one virtual machine
|
||||
* @param userId the id of the user performing the action
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import com.cloud.utils.component.Manager;
|
|||
*/
|
||||
public interface VmManager extends Manager {
|
||||
|
||||
<T extends VMInstanceVO> VirtualMachineProfile<T> allocate(T vm,
|
||||
<T extends VMInstanceVO> T allocate(T vm,
|
||||
VMTemplateVO template,
|
||||
ServiceOfferingVO serviceOffering,
|
||||
Pair<? extends DiskOfferingVO, Long> rootDiskOffering,
|
||||
|
|
@ -51,7 +51,7 @@ public interface VmManager extends Manager {
|
|||
DeploymentPlan plan,
|
||||
Account owner) throws InsufficientCapacityException, StorageUnavailableException;
|
||||
|
||||
<T extends VMInstanceVO> VirtualMachineProfile<T> allocate(T vm,
|
||||
<T extends VMInstanceVO> T allocate(T vm,
|
||||
VMTemplateVO template,
|
||||
ServiceOfferingVO serviceOffering,
|
||||
Long rootSize,
|
||||
|
|
@ -60,7 +60,7 @@ public interface VmManager extends Manager {
|
|||
DeploymentPlan plan,
|
||||
Account owner) throws InsufficientCapacityException, StorageUnavailableException;
|
||||
|
||||
<T extends VMInstanceVO> VirtualMachineProfile<T> allocate(T vm,
|
||||
<T extends VMInstanceVO> T allocate(T vm,
|
||||
VMTemplateVO template,
|
||||
ServiceOfferingVO serviceOffering,
|
||||
List<Pair<NetworkConfigurationVO, NicProfile>> networkProfiles,
|
||||
|
|
|
|||
Loading…
Reference in New Issue