|
79 | 79 | import com.cloud.configuration.dao.ConfigurationDao; |
80 | 80 | import com.cloud.dc.DataCenterVO; |
81 | 81 | import com.cloud.dc.HostPodVO; |
82 | | -import com.cloud.dc.VlanVO; |
83 | 82 | import com.cloud.dc.Vlan.VlanType; |
| 83 | +import com.cloud.dc.VlanVO; |
84 | 84 | import com.cloud.dc.dao.DataCenterDao; |
85 | 85 | import com.cloud.dc.dao.HostPodDao; |
86 | 86 | import com.cloud.dc.dao.VlanDao; |
|
101 | 101 | import com.cloud.exception.StorageUnavailableException; |
102 | 102 | import com.cloud.ha.HighAvailabilityManager; |
103 | 103 | import com.cloud.host.Host; |
104 | | -import com.cloud.host.HostVO; |
105 | 104 | import com.cloud.host.Host.Type; |
| 105 | +import com.cloud.host.HostVO; |
106 | 106 | import com.cloud.host.dao.HostDao; |
107 | 107 | import com.cloud.info.ConsoleProxyConnectionInfo; |
108 | 108 | import com.cloud.info.ConsoleProxyInfo; |
|
113 | 113 | import com.cloud.info.RunningHostInfoAgregator.ZoneHostInfo; |
114 | 114 | import com.cloud.maid.StackMaid; |
115 | 115 | import com.cloud.network.IpAddrAllocator; |
116 | | -import com.cloud.network.NetworkConfigurationVO; |
117 | | -import com.cloud.network.NetworkManager; |
118 | 116 | import com.cloud.network.IpAddrAllocator.networkInfo; |
119 | 117 | import com.cloud.network.Network.TrafficType; |
| 118 | +import com.cloud.network.NetworkConfigurationVO; |
| 119 | +import com.cloud.network.NetworkManager; |
120 | 120 | import com.cloud.network.dao.IPAddressDao; |
121 | 121 | import com.cloud.offering.NetworkOffering; |
122 | 122 | import com.cloud.offerings.NetworkOfferingVO; |
|
128 | 128 | import com.cloud.storage.StorageManager; |
129 | 129 | import com.cloud.storage.StoragePoolVO; |
130 | 130 | import com.cloud.storage.VMTemplateHostVO; |
| 131 | +import com.cloud.storage.VMTemplateStorageResourceAssoc.Status; |
131 | 132 | import com.cloud.storage.VMTemplateVO; |
132 | 133 | import com.cloud.storage.VolumeVO; |
133 | | -import com.cloud.storage.VMTemplateStorageResourceAssoc.Status; |
134 | 134 | import com.cloud.storage.dao.GuestOSDao; |
135 | 135 | import com.cloud.storage.dao.VMTemplateDao; |
136 | 136 | import com.cloud.storage.dao.VMTemplateHostDao; |
|
159 | 159 | import com.cloud.vm.State; |
160 | 160 | import com.cloud.vm.VMInstanceVO; |
161 | 161 | import com.cloud.vm.VirtualMachine; |
| 162 | +import com.cloud.vm.VirtualMachine.Event; |
162 | 163 | import com.cloud.vm.VirtualMachineGuru; |
163 | 164 | import com.cloud.vm.VirtualMachineManager; |
164 | 165 | import com.cloud.vm.VirtualMachineName; |
165 | 166 | import com.cloud.vm.VirtualMachineProfile; |
166 | 167 | import com.cloud.vm.VmManager; |
167 | | -import com.cloud.vm.VirtualMachine.Event; |
168 | 168 | import com.cloud.vm.dao.ConsoleProxyDao; |
169 | 169 | import com.cloud.vm.dao.VMInstanceDao; |
170 | 170 | import com.google.gson.Gson; |
@@ -529,7 +529,7 @@ private boolean hasPreviousSession(ConsoleProxyVO proxy, VMInstanceVO vm) { |
529 | 529 | @Override |
530 | 530 | public ConsoleProxyVO startProxy(long proxyVmId, long startEventId) { |
531 | 531 | try { |
532 | | - return start(proxyVmId, startEventId); |
| 532 | + return start2(proxyVmId, startEventId); |
533 | 533 | } catch (StorageUnavailableException e) { |
534 | 534 | s_logger.warn("Exception while trying to start console proxy", e); |
535 | 535 | return null; |
@@ -885,7 +885,7 @@ public ConsoleProxyVO startNewConsoleProxy(long dataCenterId) { |
885 | 885 | if (s_logger.isDebugEnabled()) |
886 | 886 | s_logger.debug("Assign console proxy from a newly started instance for request from data center : " + dataCenterId); |
887 | 887 |
|
888 | | - Map<String, Object> context = createProxyInstance(dataCenterId); |
| 888 | + Map<String, Object> context = createProxyInstance2(dataCenterId); |
889 | 889 |
|
890 | 890 | long proxyVmId = (Long) context.get("proxyVmId"); |
891 | 891 | if (proxyVmId == 0) { |
@@ -925,7 +925,7 @@ public ConsoleProxyVO startNew(long dataCenterId) { |
925 | 925 | if (s_logger.isDebugEnabled()) |
926 | 926 | s_logger.debug("Assign console proxy from a newly started instance for request from data center : " + dataCenterId); |
927 | 927 |
|
928 | | - Map<String, Object> context = createProxyInstance(dataCenterId); |
| 928 | + Map<String, Object> context = createProxyInstance2(dataCenterId); |
929 | 929 |
|
930 | 930 | long proxyVmId = (Long) context.get("proxyVmId"); |
931 | 931 | if (proxyVmId == 0) { |
@@ -1467,7 +1467,7 @@ private void checkPendingProxyVMs() { |
1467 | 1467 | try { |
1468 | 1468 | if (proxyLock.lock(ACQUIRE_GLOBAL_LOCK_TIMEOUT_FOR_SYNC)) { |
1469 | 1469 | try { |
1470 | | - readyProxy = start(readyProxy.getId(), 0); |
| 1470 | + readyProxy = start2(readyProxy.getId(), 0); |
1471 | 1471 | } finally { |
1472 | 1472 | proxyLock.unlock(); |
1473 | 1473 | } |
@@ -2451,7 +2451,7 @@ public boolean applyCustomCertToNewProxy(StartupProxyCommand cmd){ |
2451 | 2451 | if(certList.size()>0){ |
2452 | 2452 | CertificateVO cert = certList.get(0);//there will only be 1 cert in db for now |
2453 | 2453 | String certStr = cert.getCertificate(); |
2454 | | - long proxyVmId = ((StartupProxyCommand)cmd).getProxyVmId(); |
| 2454 | + long proxyVmId = (cmd).getProxyVmId(); |
2455 | 2455 | ConsoleProxyVO consoleProxy = _consoleProxyDao.findById(proxyVmId); |
2456 | 2456 | //find corresponding host |
2457 | 2457 | if(consoleProxy!=null){ |
|
0 commit comments