mirror of https://github.com/apache/cloudstack.git
ensure elb vm is managed by elb manager
This commit is contained in:
parent
e936a52f10
commit
61fd6a79c8
|
|
@ -68,6 +68,21 @@ public class DomainRouterVO extends VMInstanceVO implements VirtualRouter {
|
|||
super(id, serviceOfferingId, name, name, Type.DomainRouter, templateId, hypervisorType, guestOSId, domainId, accountId, haEnabled);
|
||||
this.networkId = networkId;
|
||||
}
|
||||
|
||||
public DomainRouterVO(long id,
|
||||
long serviceOfferingId,
|
||||
String name,
|
||||
long templateId,
|
||||
HypervisorType hypervisorType,
|
||||
long guestOSId,
|
||||
long domainId,
|
||||
long accountId,
|
||||
long networkId,
|
||||
boolean haEnabled,
|
||||
VirtualMachine.Type vmType) {
|
||||
super(id, serviceOfferingId, name, name, vmType, templateId, hypervisorType, guestOSId, domainId, accountId, haEnabled);
|
||||
this.networkId = networkId;
|
||||
}
|
||||
|
||||
public void setPublicIpAddress(String publicIpAddress) {
|
||||
this.publicIpAddress = publicIpAddress;
|
||||
|
|
|
|||
|
|
@ -432,7 +432,12 @@ setup_elbvm() {
|
|||
[ "$ETH2_IP" == "0.0.0.0" ] && public_ip=$ETH0_IP
|
||||
echo "$public_ip $NAME" >> /etc/hosts
|
||||
|
||||
setup_sshd $ETH0_IP
|
||||
if [ "$SSHONGUEST" == "true" ]
|
||||
then
|
||||
setup_sshd $ETH0_IP
|
||||
else
|
||||
setup_sshd $ETH1_IP
|
||||
fi
|
||||
|
||||
enable_fwding 0
|
||||
enable_svc haproxy 0
|
||||
|
|
|
|||
|
|
@ -481,7 +481,7 @@ public class ElasticLoadBalancerManagerImpl implements
|
|||
|
||||
|
||||
elbVm = new DomainRouterVO(id, _elasticLbVmOffering.getId(), VirtualMachineName.getSystemVmName(id, _instance, _elbVmNamePrefix), template.getId(), template.getHypervisorType(), template.getGuestOSId(),
|
||||
owner.getDomainId(), owner.getId(), guestNetwork.getId(), _elasticLbVmOffering.getOfferHA());
|
||||
owner.getDomainId(), owner.getId(), guestNetwork.getId(), _elasticLbVmOffering.getOfferHA(), VirtualMachine.Type.ElasticLoadBalancerVm);
|
||||
elbVm.setRole(Role.LB);
|
||||
elbVm = _itMgr.allocate(elbVm, template, _elasticLbVmOffering, networks, plan, null, owner);
|
||||
//TODO: create usage stats
|
||||
|
|
@ -745,12 +745,7 @@ public class ElasticLoadBalancerManagerImpl implements
|
|||
releaseIp(lb.getSourceIpAddressId(), userId, caller);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DomainRouterVO findByName(String name) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public DomainRouterVO findByName(String name) {
|
||||
if (!VirtualMachineName.isValidSystemVmName(name, _instance, _elbVmNamePrefix)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue