mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
parent
1bd47d38cb
commit
11d45654a6
@ -232,7 +232,7 @@ public class CreateAutoScaleVmGroupCmd extends BaseAsyncCreateCmd {
|
||||
responseObject.setResponseName(getCommandName());
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
// TODO what will happen if Resource Layer fails in a step inbetween
|
||||
// TODO what will happen if Resource Layer fails in a step in between
|
||||
s_logger.warn("Failed to create autoscale vm group", ex);
|
||||
} finally {
|
||||
if (!success || vmGroup == null) {
|
||||
|
||||
@ -949,7 +949,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
||||
|
||||
/**
|
||||
* private transaction method to run over the objects and determine nic requirements
|
||||
* @return the total numer of nics required
|
||||
* @return the total number of nics required
|
||||
*/
|
||||
private int determineNumberOfNicsRequired() {
|
||||
int size = 0;
|
||||
@ -1183,7 +1183,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the locked IP, throwing an exeption if the locked IP is null or the locked IP is not in 'Free' state.
|
||||
* Validates the locked IP, throwing an exception if the locked IP is null or the locked IP is not in 'Free' state.
|
||||
*/
|
||||
protected void validateLockedRequestedIp(IPAddressVO ipVO, IPAddressVO lockedIpVO) {
|
||||
if (lockedIpVO == null) {
|
||||
@ -1605,7 +1605,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
||||
}
|
||||
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("Asking " + element.getName() + " to implemenet " + network);
|
||||
s_logger.debug("Asking " + element.getName() + " to implement " + network);
|
||||
}
|
||||
|
||||
if (!element.implement(network, offering, dest, context)) {
|
||||
@ -2498,7 +2498,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
||||
|
||||
//remove the secondary ip addresses corresponding to to this nic
|
||||
if (!removeVmSecondaryIpsOfNic(nic.getId())) {
|
||||
s_logger.debug("Removing nic " + nic.getId() + " secondary ip addreses failed");
|
||||
s_logger.debug("Removing nic " + nic.getId() + " secondary ip addresses failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -34,14 +34,14 @@ public interface ExternalFirewallDeviceDao extends GenericDao<ExternalFirewallDe
|
||||
/**
|
||||
* list the firewall devices added in to this physical network of certain provider type?
|
||||
* @param physicalNetworkId physical Network Id
|
||||
* @param providerName netwrok service provider name
|
||||
* @param providerName network service provider name
|
||||
*/
|
||||
List<ExternalFirewallDeviceVO> listByPhysicalNetworkAndProvider(long physicalNetworkId, String providerName);
|
||||
|
||||
/**
|
||||
* list the firewall devices added in to this physical network by their allocation state
|
||||
* @param physicalNetworkId physical Network Id
|
||||
* @param providerName netwrok service provider name
|
||||
* @param providerName network service provider name
|
||||
* @param allocationState firewall device allocation state
|
||||
* @return list of ExternalFirewallDeviceVO for the devices in the physical network with a device allocation state
|
||||
*/
|
||||
@ -50,7 +50,7 @@ public interface ExternalFirewallDeviceDao extends GenericDao<ExternalFirewallDe
|
||||
/**
|
||||
* list the load balancer devices added in to this physical network by the device status (enabled/disabled)
|
||||
* @param physicalNetworkId physical Network Id
|
||||
* @param providerName netwrok service provider name
|
||||
* @param providerName network service provider name
|
||||
* @param state firewall device status
|
||||
* @return list of ExternalFirewallDeviceVO for the devices in the physical network with a device state
|
||||
*/
|
||||
|
||||
@ -34,14 +34,14 @@ public interface ExternalLoadBalancerDeviceDao extends GenericDao<ExternalLoadBa
|
||||
/**
|
||||
* list the load balancer devices added in to this physical network of certain provider type?
|
||||
* @param physicalNetworkId physical Network Id
|
||||
* @param providerName netwrok service provider name
|
||||
* @param providerName network service provider name
|
||||
*/
|
||||
List<ExternalLoadBalancerDeviceVO> listByPhysicalNetworkAndProvider(long physicalNetworkId, String providerName);
|
||||
|
||||
/**
|
||||
* list the load balancer devices added in to this physical network by their allocation state
|
||||
* @param physicalNetworkId physical Network Id
|
||||
* @param providerName netwrok service provider name
|
||||
* @param providerName network service provider name
|
||||
* @param allocationState load balancer device allocation state
|
||||
* @return list of ExternalLoadBalancerDeviceVO for the devices in the physical network with a device allocation state
|
||||
*/
|
||||
@ -50,7 +50,7 @@ public interface ExternalLoadBalancerDeviceDao extends GenericDao<ExternalLoadBa
|
||||
/**
|
||||
* list the load balancer devices added in to this physical network by the device status (enabled/disabled)
|
||||
* @param physicalNetworkId physical Network Id
|
||||
* @param providerName netwrok service provider name
|
||||
* @param providerName network service provider name
|
||||
* @param state load balancer device status
|
||||
* @return list of ExternalLoadBalancerDeviceVO for the devices in the physical network with a device state
|
||||
*/
|
||||
@ -59,7 +59,7 @@ public interface ExternalLoadBalancerDeviceDao extends GenericDao<ExternalLoadBa
|
||||
/**
|
||||
* list the load balancer devices added in to this physical network by the managed type (external/cloudstack managed)
|
||||
* @param physicalNetworkId physical Network Id
|
||||
* @param providerName netwrok service provider name
|
||||
* @param providerName network service provider name
|
||||
* @param managed managed type
|
||||
* @return list of ExternalLoadBalancerDeviceVO for the devices in to this physical network of a managed type
|
||||
*/
|
||||
|
||||
@ -58,7 +58,7 @@ public interface IPAddressDao extends GenericDao<IPAddressVO, Long> {
|
||||
IPAddressVO findByAssociatedVmId(long vmId);
|
||||
|
||||
// for vm secondary ips case mapping is IP1--> vmIp1, IP2-->vmIp2, etc
|
||||
// This method is used when one vm is mapped to muliple to public ips
|
||||
// This method is used when one vm is mapped to multiple to public ips
|
||||
List<IPAddressVO> findAllByAssociatedVmId(long vmId);
|
||||
|
||||
IPAddressVO findByIpAndSourceNetworkId(long networkId, String ipAddress);
|
||||
|
||||
@ -304,7 +304,7 @@ public class IPAddressDaoImpl extends GenericDaoBase<IPAddressVO, Long> implemen
|
||||
|
||||
|
||||
// for vm secondary ips case mapping is IP1--> vmIp1, IP2-->vmIp2, etc
|
||||
// Used when vm is mapped to muliple to public ips
|
||||
// Used when vm is mapped to multiple to public ips
|
||||
@Override
|
||||
public List<IPAddressVO> findAllByAssociatedVmId(long vmId) {
|
||||
SearchCriteria<IPAddressVO> sc = AllFieldsSearch.create();
|
||||
|
||||
@ -1884,7 +1884,7 @@ public class Upgrade410to420 implements DbUpgrade {
|
||||
//Update all snapshots except KVM snapshots
|
||||
int rowCount = snapshotStoreInsert.executeUpdate();
|
||||
s_logger.debug("Inserted " + rowCount + " snapshots into snapshot_store_ref");
|
||||
//backsnap_id for KVM snapshots is complate path. CONCAT is not required
|
||||
//backsnap_id for KVM snapshots is complete path. CONCAT is not required
|
||||
try(PreparedStatement snapshotStoreInsert_2 =
|
||||
conn.prepareStatement("INSERT INTO `cloud`.`snapshot_store_ref` (store_id, snapshot_id, created, size, parent_snapshot_id, install_path, volume_id, update_count, ref_cnt, store_role, state) select sechost_id, id, created, size, prev_snap_id, backup_snap_id, volume_id, 0, 0, 'Image', 'Ready' from `cloud`.`snapshots` where status = 'BackedUp' and hypervisor_type = 'KVM' and sechost_id is not null and removed is null");) {
|
||||
rowCount = snapshotStoreInsert_2.executeUpdate();
|
||||
|
||||
@ -43,7 +43,7 @@ public class ConsoleProxyDaoImpl extends GenericDaoBase<ConsoleProxyVO, Long> im
|
||||
private static final Logger s_logger = Logger.getLogger(ConsoleProxyDaoImpl.class);
|
||||
|
||||
//
|
||||
// query SQL for returnning console proxy assignment info as following
|
||||
// query SQL for returning console proxy assignment info as following
|
||||
// proxy vm id, count of assignment
|
||||
//
|
||||
private static final String PROXY_ASSIGNMENT_MATRIX = "SELECT c.id, count(runningVm.id) AS count "
|
||||
@ -63,7 +63,7 @@ public class ConsoleProxyDaoImpl extends GenericDaoBase<ConsoleProxyVO, Long> im
|
||||
+ " WHERE v.type='ConsoleProxy' AND (v.state='Creating' OR v.state='Starting' OR v.state='Running' OR v.state='Migrating')" + " GROUP BY d.id, d.name";
|
||||
|
||||
//
|
||||
// query SQL for returnning running console proxy count at data center basis
|
||||
// query SQL for returning running console proxy count at data center basis
|
||||
//
|
||||
private static final String DATACENTER_PROXY_MATRIX =
|
||||
"SELECT d.id, d.name, count(dcid) as count"
|
||||
|
||||
@ -448,7 +448,7 @@ CREATE VIEW `cloud`.`template_view` AS
|
||||
|
||||
UPDATE configuration SET value='KVM,XenServer,VMware,BareMetal,Ovm,LXC,Hyperv' WHERE name='hypervisor.list';
|
||||
UPDATE `cloud`.`configuration` SET description="If set to true, will set guest VM's name as it appears on the hypervisor, to its hostname. The flag is supported for VMware hypervisor only" WHERE name='vm.instancename.flag';
|
||||
INSERT IGNORE INTO `cloud`.`configuration`(category, instance, component, name, value, description, default_value) VALUES ('Advanced', 'DEFAULT', 'management-server', 'implicit.host.tags', 'GPU', 'Tag hosts at the time of host disovery based on the host properties/capabilities ', 'GPU');
|
||||
INSERT IGNORE INTO `cloud`.`configuration`(category, instance, component, name, value, description, default_value) VALUES ('Advanced', 'DEFAULT', 'management-server', 'implicit.host.tags', 'GPU', 'Tag hosts at the time of host discovery based on the host properties/capabilities ', 'GPU');
|
||||
|
||||
DROP VIEW IF EXISTS `cloud`.`domain_router_view`;
|
||||
CREATE VIEW `cloud`.`domain_router_view` AS
|
||||
|
||||
@ -253,11 +253,11 @@ public class StorageCacheManagerImpl implements StorageCacheManager, Manager {
|
||||
if (obj != null) {
|
||||
State st = obj.getState();
|
||||
|
||||
long miliSeconds = 10000;
|
||||
long milliSeconds = 10000;
|
||||
long timeoutSeconds = 3600;
|
||||
long timeoutMiliSeconds = timeoutSeconds * 1000;
|
||||
long timeoutMilliSeconds = timeoutSeconds * 1000;
|
||||
Date now = new Date();
|
||||
long expiredEpoch = now.getTime() + timeoutMiliSeconds;
|
||||
long expiredEpoch = now.getTime() + timeoutMilliSeconds;
|
||||
Date expiredDate = new Date(expiredEpoch);
|
||||
|
||||
/*
|
||||
@ -273,7 +273,7 @@ public class StorageCacheManagerImpl implements StorageCacheManager, Manager {
|
||||
*/
|
||||
s_logger.debug("waiting cache copy completion type: " + typeName + ", id: " + obj.getObjectId() + ", lock: " + lock.hashCode());
|
||||
try {
|
||||
lock.wait(miliSeconds);
|
||||
lock.wait(milliSeconds);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interrupted while waiting for cache copy completion.");
|
||||
}
|
||||
|
||||
@ -177,7 +177,7 @@ public class StorageVMSnapshotStrategy extends DefaultVMSnapshotStrategy {
|
||||
thawAnswer = (FreezeThawVMAnswer) agentMgr.send(hostId, thawCmd);
|
||||
throw new CloudRuntimeException("Could not take snapshot for volume with id=" + vol.getId());
|
||||
}
|
||||
s_logger.info(String.format("Snapshot with id=%s, took %s miliseconds", snapInfo.getId(),
|
||||
s_logger.info(String.format("Snapshot with id=%s, took %s milliseconds", snapInfo.getId(),
|
||||
TimeUnit.MILLISECONDS.convert(elapsedTime(startSnapshtot), TimeUnit.NANOSECONDS)));
|
||||
}
|
||||
answer = new CreateVMSnapshotAnswer(ccmd, true, "");
|
||||
@ -185,7 +185,7 @@ public class StorageVMSnapshotStrategy extends DefaultVMSnapshotStrategy {
|
||||
thawAnswer = (FreezeThawVMAnswer) agentMgr.send(hostId, thawCmd);
|
||||
if (thawAnswer != null && thawAnswer.getResult()) {
|
||||
s_logger.info(String.format(
|
||||
"Virtual machne is thawed. The freeze of virtual machine took %s miliseconds.",
|
||||
"Virtual machne is thawed. The freeze of virtual machine took %s milliseconds.",
|
||||
TimeUnit.MILLISECONDS.convert(elapsedTime(startFreeze), TimeUnit.NANOSECONDS)));
|
||||
}
|
||||
} else {
|
||||
@ -219,7 +219,7 @@ public class StorageVMSnapshotStrategy extends DefaultVMSnapshotStrategy {
|
||||
throw new CloudRuntimeException(e.getMessage());
|
||||
} finally {
|
||||
if (thawAnswer == null && freezeAnswer != null) {
|
||||
s_logger.info(String.format("Freeze of virtual machine took %s miliseconds.", TimeUnit.MILLISECONDS
|
||||
s_logger.info(String.format("Freeze of virtual machine took %s milliseconds.", TimeUnit.MILLISECONDS
|
||||
.convert(elapsedTime(startFreeze), TimeUnit.NANOSECONDS)));
|
||||
try {
|
||||
thawAnswer = (FreezeThawVMAnswer) agentMgr.send(hostId, thawCmd);
|
||||
|
||||
@ -31,15 +31,15 @@ public class MessageDetector implements MessageSubscriber {
|
||||
_subjects = null;
|
||||
}
|
||||
|
||||
public void waitAny(long timeoutInMiliseconds) {
|
||||
if (timeoutInMiliseconds < 100) {
|
||||
s_logger.warn("waitAny is passed with a too short time-out interval. " + timeoutInMiliseconds + "ms");
|
||||
timeoutInMiliseconds = 100;
|
||||
public void waitAny(long timeoutInMilliseconds) {
|
||||
if (timeoutInMilliseconds < 100) {
|
||||
s_logger.warn("waitAny is passed with a too short time-out interval. " + timeoutInMilliseconds + "ms");
|
||||
timeoutInMilliseconds = 100;
|
||||
}
|
||||
|
||||
synchronized (this) {
|
||||
try {
|
||||
wait(timeoutInMiliseconds);
|
||||
wait(timeoutInMilliseconds);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interrupted while waiting on any message.");
|
||||
}
|
||||
|
||||
@ -117,12 +117,12 @@ public interface AsyncJobManager extends Manager {
|
||||
*
|
||||
* @param wakupTopicsOnMessageBus topic on message bus to wakeup the wait
|
||||
* @param checkIntervalInMilliSeconds time to break out wait for checking predicate condition
|
||||
* @param timeoutInMiliseconds time out to break out the whole wait process
|
||||
* @param timeoutInMilliseconds time out to break out the whole wait process
|
||||
* @param predicate
|
||||
* @return true, predicate condition is satisfied
|
||||
* false, wait is timed out
|
||||
*/
|
||||
boolean waitAndCheck(AsyncJob job, String[] wakupTopicsOnMessageBus, long checkIntervalInMilliSeconds, long timeoutInMiliseconds, Predicate predicate);
|
||||
boolean waitAndCheck(AsyncJob job, String[] wakupTopicsOnMessageBus, long checkIntervalInMilliSeconds, long timeoutInMilliseconds, Predicate predicate);
|
||||
|
||||
AsyncJob queryJob(long jobId, boolean updatePollTime);
|
||||
|
||||
|
||||
@ -758,7 +758,7 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean waitAndCheck(AsyncJob job, String[] wakeupTopicsOnMessageBus, long checkIntervalInMilliSeconds, long timeoutInMiliseconds, Predicate predicate) {
|
||||
public boolean waitAndCheck(AsyncJob job, String[] wakeupTopicsOnMessageBus, long checkIntervalInMilliSeconds, long timeoutInMilliseconds, Predicate predicate) {
|
||||
|
||||
MessageDetector msgDetector = new MessageDetector();
|
||||
String[] topics = Arrays.copyOf(wakeupTopicsOnMessageBus, wakeupTopicsOnMessageBus.length + 1);
|
||||
@ -767,7 +767,7 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
|
||||
msgDetector.open(_messageBus, topics);
|
||||
try {
|
||||
long startTick = System.currentTimeMillis();
|
||||
while (timeoutInMiliseconds < 0 || System.currentTimeMillis() - startTick < timeoutInMiliseconds) {
|
||||
while (timeoutInMilliseconds < 0 || System.currentTimeMillis() - startTick < timeoutInMilliseconds) {
|
||||
msgDetector.waitAny(checkIntervalInMilliSeconds);
|
||||
job = _jobDao.findById(job.getId());
|
||||
if (job != null && job.getStatus().done()) {
|
||||
|
||||
@ -198,7 +198,7 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager {
|
||||
}
|
||||
|
||||
//Fang: new command added;
|
||||
// Important! we need to sync file system before we can safely use tar to work around a linux kernal bug(or feature)
|
||||
// Important! we need to sync file system before we can safely use tar to work around a linux kernel bug(or feature)
|
||||
public String createOvaForVolume(VolumeObjectTO volume, int archiveTimeout) {
|
||||
DataStoreTO storeTO = volume.getDataStore();
|
||||
if (!(storeTO instanceof NfsTO)) {
|
||||
@ -1054,7 +1054,7 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager {
|
||||
}
|
||||
String exportDir = ova_metafile.getParent();
|
||||
s_logger.info("exportDir: " + exportDir);
|
||||
// Important! we need to sync file system before we can safely use tar to work around a linux kernal bug(or feature)
|
||||
// Important! we need to sync file system before we can safely use tar to work around a linux kernel bug(or feature)
|
||||
s_logger.info("Sync file system before we package OVA..., before tar ");
|
||||
s_logger.info("ova: " + ovaFileName + ", ovf:" + ovfFileName + ", vmdk:" + disks[0] + ".");
|
||||
Script commandSync = new Script(true, "sync", 0, s_logger);
|
||||
|
||||
@ -99,7 +99,7 @@ public class CitrixResourceBaseTest {
|
||||
|
||||
}
|
||||
|
||||
public void testGetPathFilesExeption() {
|
||||
public void testGetPathFilesException() {
|
||||
String patch = citrixResourceBase.getPatchFilePath();
|
||||
|
||||
PowerMockito.mockStatic(Script.class);
|
||||
|
||||
@ -43,7 +43,7 @@ public class XcpOssResourceTest extends CitrixResourceBaseTest {
|
||||
|
||||
@Test(expected = CloudRuntimeException.class)
|
||||
public void testGetFiles() {
|
||||
testGetPathFilesExeption();
|
||||
testGetPathFilesException();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@ -46,8 +46,8 @@ public class XcpServerResourceTest extends CitrixResourceBaseTest {
|
||||
}
|
||||
|
||||
@Test(expected = CloudRuntimeException.class)
|
||||
public void testGetFilesExeption() {
|
||||
testGetPathFilesExeption();
|
||||
public void testGetFilesException() {
|
||||
testGetPathFilesException();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@ -43,7 +43,7 @@ public class XenServer56FP1ResourceTest extends CitrixResourceBaseTest {
|
||||
|
||||
@Test(expected = CloudRuntimeException.class)
|
||||
public void testGetFiles() {
|
||||
testGetPathFilesExeption();
|
||||
testGetPathFilesException();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@ -47,7 +47,7 @@ public class XenServer56ResourceTest extends CitrixResourceBaseTest {
|
||||
|
||||
@Test(expected = CloudRuntimeException.class)
|
||||
public void testGetFiles() {
|
||||
testGetPathFilesExeption();
|
||||
testGetPathFilesException();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@ -43,7 +43,7 @@ public class XenServer56SP2ResourceTest extends CitrixResourceBaseTest {
|
||||
|
||||
@Test(expected = CloudRuntimeException.class)
|
||||
public void testGetFiles() {
|
||||
testGetPathFilesExeption();
|
||||
testGetPathFilesException();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@ -43,7 +43,7 @@ public class XenServer600ResourceTest extends CitrixResourceBaseTest {
|
||||
|
||||
@Test(expected = CloudRuntimeException.class)
|
||||
public void testGetFiles() {
|
||||
testGetPathFilesExeption();
|
||||
testGetPathFilesException();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@ -43,7 +43,7 @@ public class XenServer625ResourceTest extends CitrixResourceBaseTest {
|
||||
|
||||
@Test(expected = CloudRuntimeException.class)
|
||||
public void testGetFiles() {
|
||||
testGetPathFilesExeption();
|
||||
testGetPathFilesException();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@ -43,7 +43,7 @@ public class XenServer650ResourceTest extends CitrixResourceBaseTest {
|
||||
|
||||
@Test(expected = CloudRuntimeException.class)
|
||||
public void testGetFiles() {
|
||||
testGetPathFilesExeption();
|
||||
testGetPathFilesException();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@ -49,7 +49,7 @@ fi
|
||||
KS_PASS=$(sed -n '/keystore.passphrase/p' "$PROPS_FILE" 2>/dev/null | sed 's/keystore.passphrase=//g' 2>/dev/null)
|
||||
|
||||
if [ -z "${KS_PASS// }" ]; then
|
||||
echo "Failed to find keystore passphrase from file: $PROPS_FILE, quiting!"
|
||||
echo "Failed to find keystore passphrase from file: $PROPS_FILE, quitting!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@ -844,7 +844,7 @@ public enum Config {
|
||||
"The interval (in milliseconds) when vm stats are retrieved from agents.",
|
||||
null),
|
||||
VmDiskStatsInterval("Advanced", ManagementServer.class, Integer.class, "vm.disk.stats.interval", "0", "Interval (in seconds) to report vm disk statistics.", null),
|
||||
VolumeStatsInterval("Advanced", ManagementServer.class, Integer.class, "volume.stats.interval", "60000", "Interval (in miliseconds) to report volume statistics.", null),
|
||||
VolumeStatsInterval("Advanced", ManagementServer.class, Integer.class, "volume.stats.interval", "60000", "Interval (in milliseconds) to report volume statistics.", null),
|
||||
VmTransitionWaitInterval(
|
||||
"Advanced",
|
||||
ManagementServer.class,
|
||||
@ -1621,7 +1621,7 @@ public enum Config {
|
||||
String.class,
|
||||
"implicit.host.tags",
|
||||
"GPU",
|
||||
"Tag hosts at the time of host disovery based on the host properties/capabilities",
|
||||
"Tag hosts at the time of host discovery based on the host properties/capabilities",
|
||||
null),
|
||||
VpcCleanupInterval(
|
||||
"Advanced",
|
||||
|
||||
@ -4087,7 +4087,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService, C
|
||||
for (String vlanRange : listOfRanges) {
|
||||
String[] VnetRange = vlanRange.split("-");
|
||||
|
||||
// Init with [min,max] of VLAN. Actually 0x000 and 0xFFF are reserved by IEEE, shoudn't be used.
|
||||
// Init with [min,max] of VLAN. Actually 0x000 and 0xFFF are reserved by IEEE, shouldn't be used.
|
||||
long minVnet = MIN_VLAN_ID;
|
||||
long maxVnet = MAX_VLAN_ID;
|
||||
|
||||
|
||||
@ -198,8 +198,8 @@ public class MockServer implements Runnable {
|
||||
return shutdowned;
|
||||
}
|
||||
|
||||
public void waitUntilShutdowned(long timeToWaitMiliseconds) throws InterruptedException {
|
||||
long deadline = System.currentTimeMillis() + timeToWaitMiliseconds;
|
||||
public void waitUntilShutdowned(long timeToWaitMilliseconds) throws InterruptedException {
|
||||
long deadline = System.currentTimeMillis() + timeToWaitMilliseconds;
|
||||
while (!shutdowned && System.currentTimeMillis() < deadline) {
|
||||
Thread.sleep(10);
|
||||
}
|
||||
|
||||
@ -576,7 +576,7 @@ class TestSystemVmLocalStorage(cloudstackTestCase):
|
||||
ispersistent='true'
|
||||
)
|
||||
|
||||
# 3-list netwrok offerings
|
||||
# 3-list network offerings
|
||||
list_nw_of = NetworkOffering.list(self.apiclient,
|
||||
id=self.network_offering.id)
|
||||
self.assertEqual(
|
||||
|
||||
@ -721,7 +721,7 @@ class TestAddNetworkToVirtualMachine(cloudstackTestCase):
|
||||
|
||||
self.debug("Created network %s" % network_2.name)
|
||||
|
||||
self.debug("Trying to add netwrok %s to VM %s, this should fail" %
|
||||
self.debug("Trying to add network %s to VM %s, this should fail" %
|
||||
(network_2.name, virtual_machine.id))
|
||||
|
||||
with self.assertRaises(Exception) as e:
|
||||
|
||||
@ -4194,7 +4194,7 @@ class TestInstances(cloudstackTestCase):
|
||||
"Isolated Network Offerings with sourceNat enabled are not found"
|
||||
)
|
||||
"""
|
||||
Create Isolated netwrok with ip range
|
||||
Create Isolated network with ip range
|
||||
"""
|
||||
self.services["network"]["startip"] = "10.1.1.2"
|
||||
self.services["network"]["endip"] = "10.1.1.254"
|
||||
@ -4312,7 +4312,7 @@ class TestInstances(cloudstackTestCase):
|
||||
"Isolated Network Offerings with sourceNat enabled are not found"
|
||||
)
|
||||
"""
|
||||
Create Isolated netwrok with ip range
|
||||
Create Isolated network with ip range
|
||||
"""
|
||||
self.services["network"]["startip"] = "10.1.1.2"
|
||||
self.services["network"]["endip"] = "10.1.1.254"
|
||||
|
||||
@ -340,7 +340,7 @@ class TestBasicOperations(cloudstackTestCase):
|
||||
self.apiclient, id=(
|
||||
virtual_machine.nic[0].id + random_gen()))
|
||||
self.fail(
|
||||
"Adding secondary IP with wrong NIC id succeeded, it shoud have failed")
|
||||
"Adding secondary IP with wrong NIC id succeeded, it should have failed")
|
||||
except Exception as e:
|
||||
self.debug("Failed while adding secondary IP to wrong NIC")
|
||||
|
||||
|
||||
@ -52,11 +52,11 @@ import logging
|
||||
import random
|
||||
import time
|
||||
|
||||
class TestMulipleNicSupport(cloudstackTestCase):
|
||||
class TestMultipleNicSupport(cloudstackTestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.testClient = super(
|
||||
TestMulipleNicSupport,
|
||||
TestMultipleNicSupport,
|
||||
cls).getClsTestClient()
|
||||
cls.apiclient = cls.testClient.getApiClient()
|
||||
cls.testdata = cls.testClient.getParsedTestDataConfig()
|
||||
@ -70,7 +70,7 @@ class TestMulipleNicSupport(cloudstackTestCase):
|
||||
cls.skip = True
|
||||
return
|
||||
|
||||
cls.logger = logging.getLogger("TestMulipleNicSupport")
|
||||
cls.logger = logging.getLogger("TestMultipleNicSupport")
|
||||
cls.stream_handler = logging.StreamHandler()
|
||||
cls.logger.setLevel(logging.DEBUG)
|
||||
cls.logger.addHandler(cls.stream_handler)
|
||||
@ -255,7 +255,7 @@ class TestMulipleNicSupport(cloudstackTestCase):
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(self):
|
||||
super(TestMulipleNicSupport, self).tearDownClass()
|
||||
super(TestMultipleNicSupport, self).tearDownClass()
|
||||
|
||||
def setUp(self):
|
||||
if self.skip:
|
||||
@ -265,7 +265,7 @@ class TestMulipleNicSupport(cloudstackTestCase):
|
||||
return
|
||||
|
||||
def tearDown(self):
|
||||
super(TestMulipleNicSupport, self).tearDown()
|
||||
super(TestMultipleNicSupport, self).tearDown()
|
||||
|
||||
def verify_network_rules(self, vm_id):
|
||||
virtual_machine = VirtualMachine.list(
|
||||
|
||||
@ -39,11 +39,11 @@ from marvin.lib.common import (get_domain,
|
||||
|
||||
import logging
|
||||
|
||||
class TestMulipleNetworkCreation(cloudstackTestCase):
|
||||
class TestMultipleNetworkCreation(cloudstackTestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.testClient = super(
|
||||
TestMulipleNetworkCreation,
|
||||
TestMultipleNetworkCreation,
|
||||
cls).getClsTestClient()
|
||||
cls.apiclient = cls.testClient.getApiClient()
|
||||
cls.testdata = cls.testClient.getParsedTestDataConfig()
|
||||
@ -54,7 +54,7 @@ class TestMulipleNetworkCreation(cloudstackTestCase):
|
||||
cls.template = get_template(cls.apiclient, cls.zone.id)
|
||||
cls._cleanup = []
|
||||
|
||||
cls.logger = logging.getLogger("TestMulipleNetworkCreation")
|
||||
cls.logger = logging.getLogger("TestMultipleNetworkCreation")
|
||||
cls.stream_handler = logging.StreamHandler()
|
||||
cls.logger.setLevel(logging.DEBUG)
|
||||
cls.logger.addHandler(cls.stream_handler)
|
||||
@ -127,7 +127,7 @@ class TestMulipleNetworkCreation(cloudstackTestCase):
|
||||
allocationstate="Enabled"
|
||||
)
|
||||
# Cleanup resources used
|
||||
super(TestMulipleNetworkCreation, cls).tearDownClass()
|
||||
super(TestMultipleNetworkCreation, cls).tearDownClass()
|
||||
except Exception as e:
|
||||
raise Exception("Warning: Exception during cleanup : %s" % e)
|
||||
return
|
||||
@ -139,7 +139,7 @@ class TestMulipleNetworkCreation(cloudstackTestCase):
|
||||
return
|
||||
|
||||
def tearDown(self):
|
||||
super(TestMulipleNetworkCreation, self).tearDown()
|
||||
super(TestMultipleNetworkCreation, self).tearDown()
|
||||
|
||||
@attr(tags=["advanced"], required_hardware="false")
|
||||
def test_01_add_traffictype_for_untagged_networks(self):
|
||||
|
||||
@ -490,7 +490,7 @@ class TestRegionVpcOffering(cloudstackTestCase):
|
||||
vpcid=vpc.id
|
||||
)
|
||||
|
||||
self.debug("Adding NetwrokACl rules to make PF and LB accessible")
|
||||
self.debug("Adding NetworkACl rules to make PF and LB accessible")
|
||||
NetworkACL.create(
|
||||
self.apiclient,
|
||||
networkid=network.id,
|
||||
|
||||
@ -584,7 +584,7 @@ class TestSharedNetworks(cloudstackTestCase):
|
||||
# 6. No checks reqd
|
||||
# 7. a. listVirtualMachines should show both VMs in running state
|
||||
# in the user account and the admin account
|
||||
# b. VM's IPs shoud be in the range of the shared network ip ranges
|
||||
# b. VM's IPs should be in the range of the shared network ip ranges
|
||||
|
||||
# Create admin account
|
||||
self.admin_account = Account.create(
|
||||
@ -1974,7 +1974,7 @@ class TestSharedNetworks(cloudstackTestCase):
|
||||
# enabled offering
|
||||
# 4. listPhysicalNetworks should return at least one active
|
||||
# physical network
|
||||
# 5. network creation shoud PASS
|
||||
# 5. network creation should PASS
|
||||
# 6. network creation should FAIL since VLAN is already used by
|
||||
# previously created network
|
||||
|
||||
|
||||
@ -1004,7 +1004,7 @@ class TestVPC(cloudstackTestCase):
|
||||
vpcid=vpc.id
|
||||
)
|
||||
|
||||
self.debug("Adding NetwrokACl rules to make NAT rule accessible")
|
||||
self.debug("Adding NetworkACl rules to make NAT rule accessible")
|
||||
NetworkACL.create(
|
||||
self.apiclient,
|
||||
networkid=network_1.id,
|
||||
@ -1090,7 +1090,7 @@ class TestVPC(cloudstackTestCase):
|
||||
vm_3.name, vm_4.name))
|
||||
lb_rule.assign(self.apiclient, [vm_3, vm_4])
|
||||
|
||||
self.debug("Adding NetwrokACl rules to make PF and LB accessible")
|
||||
self.debug("Adding NetworkACl rules to make PF and LB accessible")
|
||||
NetworkACL.create(
|
||||
self.apiclient,
|
||||
networkid=network_2.id,
|
||||
@ -1350,7 +1350,7 @@ class TestVPC(cloudstackTestCase):
|
||||
vpcid=vpc.id
|
||||
)
|
||||
|
||||
self.debug("Adding NetwrokACl rules to make NAT rule accessible")
|
||||
self.debug("Adding NetworkACl rules to make NAT rule accessible")
|
||||
NetworkACL.create(
|
||||
self.apiclient,
|
||||
networkid=network_1.id,
|
||||
@ -1436,7 +1436,7 @@ class TestVPC(cloudstackTestCase):
|
||||
vm_3.name, vm_4.name))
|
||||
lb_rule.assign(self.apiclient, [vm_3, vm_4])
|
||||
|
||||
self.debug("Adding NetwrokACl rules to make PF and LB accessible")
|
||||
self.debug("Adding NetworkACl rules to make PF and LB accessible")
|
||||
NetworkACL.create(
|
||||
self.apiclient,
|
||||
networkid=network_2.id,
|
||||
|
||||
@ -481,7 +481,7 @@ class TestVPCDistributedRouterOffering(cloudstackTestCase):
|
||||
vpcid=vpc.id
|
||||
)
|
||||
|
||||
self.debug("Adding NetwrokACl rules to make PF and LB accessible")
|
||||
self.debug("Adding NetworkACl rules to make PF and LB accessible")
|
||||
NetworkACL.create(
|
||||
self.apiclient,
|
||||
networkid=network.id,
|
||||
|
||||
@ -1864,7 +1864,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase):
|
||||
"List public Ip for network should list the Ip addr"
|
||||
)
|
||||
|
||||
self.debug("Adding NetwrokACl rules to make PF and LB accessible")
|
||||
self.debug("Adding NetworkACl rules to make PF and LB accessible")
|
||||
nw_acl = NetworkACL.create(
|
||||
self.apiclient,
|
||||
networkid=network_1.id,
|
||||
@ -2023,7 +2023,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase):
|
||||
)
|
||||
self.cleanup.append(nat_rule)
|
||||
|
||||
self.debug("Adding NetwrokACl rules to make NAT rule accessible")
|
||||
self.debug("Adding NetworkACl rules to make NAT rule accessible")
|
||||
nat_acl = NetworkACL.create(
|
||||
self.apiclient,
|
||||
networkid=network_1.id,
|
||||
|
||||
@ -416,7 +416,7 @@ class TestVPCOffering(cloudstackTestCase):
|
||||
)
|
||||
self.cleanup.append(nat_rule)
|
||||
|
||||
self.logger.debug("Adding NetwrokACl rules to make PF and LB accessible")
|
||||
self.logger.debug("Adding NetworkACl rules to make PF and LB accessible")
|
||||
networkacl_1 = NetworkACL.create(
|
||||
self.apiclient,
|
||||
networkid=network.id,
|
||||
|
||||
@ -2046,7 +2046,7 @@ class TestVMDeployVPC(cloudstackTestCase):
|
||||
self.fail("Failed to enable static NAT on IP: %s - %s" % (
|
||||
public_ip_4.ipaddress.ipaddress, e))
|
||||
|
||||
self.debug("Adding NetwrokACl rules to make NAT rule accessible with network %s" % network_1.id)
|
||||
self.debug("Adding NetworkACl rules to make NAT rule accessible with network %s" % network_1.id)
|
||||
NetworkACL.create(
|
||||
self.apiclient,
|
||||
networkid=network_1.id,
|
||||
|
||||
@ -52,7 +52,7 @@ public class DateUtil {
|
||||
};
|
||||
|
||||
public static Date currentGMTTime() {
|
||||
// Date object always stores miliseconds offset based on GMT internally
|
||||
// Date object always stores milliseconds offset based on GMT internally
|
||||
return new Date();
|
||||
}
|
||||
|
||||
|
||||
@ -65,13 +65,13 @@ public class SynchronizationEvent {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean waitEvent(long timeOutMiliseconds) throws InterruptedException {
|
||||
public boolean waitEvent(long timeOutMilliseconds) throws InterruptedException {
|
||||
synchronized (this) {
|
||||
if (signalled)
|
||||
return true;
|
||||
|
||||
try {
|
||||
wait(timeOutMiliseconds);
|
||||
wait(timeOutMilliseconds);
|
||||
return signalled;
|
||||
} catch (InterruptedException e) {
|
||||
// TODO, we don't honor time out semantics when the waiting thread is interrupted
|
||||
|
||||
@ -130,6 +130,6 @@ public class ScriptTest {
|
||||
public void testFindScript() {
|
||||
Assume.assumeTrue(SystemUtils.IS_OS_LINUX);
|
||||
String script = Script.findScript("/bin", "pwd");
|
||||
Assert.assertNotNull("/bin/pwd shoud be there on linux", script);
|
||||
Assert.assertNotNull("/bin/pwd should be there on linux", script);
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ public class BaseMO {
|
||||
key = field.getKey();
|
||||
} catch (Exception e) {
|
||||
// assuming the exception is caused by concurrent operation from other places
|
||||
// so we retieve the key again
|
||||
// so we retrieve the key again
|
||||
key = getCustomFieldKey(fieldName);
|
||||
}
|
||||
}
|
||||
|
||||
@ -281,7 +281,7 @@ public class DatastoreMO extends BaseMO {
|
||||
return false;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
s_logger.error(String.format("Cannot move file to destination datastore due to file %s due to exeception %s", srcFullPath, e.getMessage()));
|
||||
s_logger.error(String.format("Cannot move file to destination datastore due to file %s due to exception %s", srcFullPath, e.getMessage()));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -307,7 +307,7 @@ public class DatastoreMO extends BaseMO {
|
||||
String url = getContext().composeDatastoreBrowseUrl(dcPair.second(), fullPath);
|
||||
|
||||
// TODO, VMware currently does not have a formal API to list Datastore directory content,
|
||||
// folloing hacking may have performance hit if datastore has a large number of files
|
||||
// following hacking may have performance hit if datastore has a large number of files
|
||||
return _context.listDatastoreDirContent(url);
|
||||
}
|
||||
|
||||
|
||||
@ -1088,7 +1088,7 @@ public class HostMO extends BaseMO implements VmwareHypervisorHost {
|
||||
|
||||
HostListSummaryQuickStats stats = getHostQuickStats();
|
||||
if (stats.getOverallCpuUsage() == null || stats.getOverallMemoryUsage() == null)
|
||||
throw new Exception("Unable to get valid overal CPU/Memory usage data, host may be disconnected");
|
||||
throw new Exception("Unable to get valid overall CPU/Memory usage data, host may be disconnected");
|
||||
|
||||
resourceSummary.setEffectiveCpu(totalCpu - stats.getOverallCpuUsage());
|
||||
|
||||
|
||||
@ -159,11 +159,11 @@ public class HttpNfcLeaseMO extends BaseMO {
|
||||
public void run() {
|
||||
while (!_done) {
|
||||
try {
|
||||
Thread.sleep(1000); // update progess every 1 second
|
||||
Thread.sleep(1000); // update progress every 1 second
|
||||
updateLeaseProgress(_percent);
|
||||
} catch (InterruptedException e) {
|
||||
if (s_logger.isInfoEnabled())
|
||||
s_logger.info("ProgressReporter is interrupted, quiting");
|
||||
s_logger.info("ProgressReporter is interrupted, quitting");
|
||||
break;
|
||||
} catch (Exception e) {
|
||||
s_logger.warn("Unexpected exception ", e);
|
||||
|
||||
@ -1866,7 +1866,7 @@ public class HypervisorHostHelper {
|
||||
|
||||
/**
|
||||
* deploys a new VM from a ovf spec. It ignores network, defaults locale to 'US'
|
||||
* @throws Exception shoud be a VmwareResourceException
|
||||
* @throws Exception should be a VmwareResourceException
|
||||
*/
|
||||
public static void importVmFromOVF(VmwareHypervisorHost host, String ovfFilePath, String vmName, DatastoreMO dsMo, String diskOption, ManagedObjectReference morRp,
|
||||
ManagedObjectReference morHost, String configurationId) throws CloudRuntimeException, IOException {
|
||||
|
||||
@ -1881,7 +1881,7 @@ public class VirtualMachineMO extends BaseMO {
|
||||
|
||||
// tar files into OVA
|
||||
if (packToOva) {
|
||||
// Important! we need to sync file system before we can safely use tar to work around a linux kernal bug(or feature)
|
||||
// Important! we need to sync file system before we can safely use tar to work around a linux kernel bug(or feature)
|
||||
s_logger.info("Sync file system before we package OVA...");
|
||||
|
||||
Script commandSync = new Script(true, "sync", 0, s_logger);
|
||||
|
||||
@ -550,7 +550,7 @@ public class VmwareContext {
|
||||
* Url for the query
|
||||
* https://vsphere-1.lab.vmops.com/folder/Fedora-clone-test?dcPath=cupertino&dsName=NFS+datastore
|
||||
*
|
||||
* Returned conent from vSphere
|
||||
* Returned content from vSphere
|
||||
*
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user