mirror of
https://github.com/apache/cloudstack
synced 2026-08-30 00:52:15 +00:00
Merge pull request #637 from @DaanHoogland
Cloudstack 8656 adding messages to empty catch blocks
* pr/637:
CLOUDSTACK-8656: debug messages on interupted exceptions
CLOUDSTACK-8656: code in comment removed
CLOUDSTACK-8656: filling empty catch block with info messages using regexp "catch\s*\(\s*(Exception|Throwable)\s*\w*\)\s*\{\s*\}"
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
This commit is contained in:
commit
c9857cae25
@ -464,6 +464,7 @@ public class AgentShell implements IAgentShell, Daemon {
|
||||
while (!_exit)
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] AgentShell was interupted.");
|
||||
}
|
||||
|
||||
} catch (final ConfigurationException e) {
|
||||
|
||||
@ -70,32 +70,6 @@ public class AddVpnUserCmdTest extends TestCase {
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
* @Test public void testExecuteVpnUserNotFound() {
|
||||
*
|
||||
* EntityManager entityManager = Mockito.mock(EntityManager.class);
|
||||
*
|
||||
* Mockito.when(entityManager.findById(VpnUser.class,
|
||||
* Mockito.anyLong())).thenReturn(null);
|
||||
*
|
||||
* addVpnUserCmd._entityMgr = entityManager; try { addVpnUserCmd.execute();
|
||||
* } catch (Exception e) { }
|
||||
*
|
||||
* }
|
||||
*
|
||||
*
|
||||
* @Test public void testExecuteVpnUserFound() {
|
||||
*
|
||||
* EntityManager entityManager = Mockito.mock(EntityManager.class);
|
||||
* addVpnUserCmd._entityMgr = entityManager;
|
||||
*
|
||||
* VpnUser vpnUser = Mockito.mock(VpnUser.class);
|
||||
* Mockito.when(entityManager.findById(VpnUser.class,
|
||||
* Mockito.anyLong())).thenReturn(vpnUser); addVpnUserCmd.execute();
|
||||
*
|
||||
* }
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void testCreateSuccess() {
|
||||
|
||||
|
||||
@ -91,7 +91,8 @@ public class OVAProcessor extends AdapterBase implements Processor {
|
||||
long size = getTemplateVirtualSize(file.getParent(), file.getName());
|
||||
return size;
|
||||
} catch (Exception e) {
|
||||
|
||||
s_logger.info("[ignored]"
|
||||
+ "failed to get virtual template size for ova: " + e.getLocalizedMessage());
|
||||
}
|
||||
return file.length();
|
||||
}
|
||||
|
||||
@ -77,7 +77,8 @@ public class VmdkProcessor extends AdapterBase implements Processor {
|
||||
long size = getTemplateVirtualSize(file.getParent(), file.getName());
|
||||
return size;
|
||||
} catch (Exception e) {
|
||||
|
||||
s_logger.info("[ignored]"
|
||||
+ "failed to get template virtual size for vmdk: " + e.getLocalizedMessage());
|
||||
}
|
||||
return file.length();
|
||||
}
|
||||
|
||||
@ -483,6 +483,8 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust
|
||||
try {
|
||||
prevCh.close();
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "failed to get close resource for previous channel Socket: " + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
if (ch == null || ch == prevCh) {
|
||||
|
||||
@ -611,7 +611,10 @@ public class EngineHostDaoImpl extends GenericDaoBase<EngineHostVO, Long> implem
|
||||
l.add(info);
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
s_logger.error("sql exception while getting running hosts: " + e.getLocalizedMessage());
|
||||
} catch (Throwable e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "caught something while getting running hosts: " + e.getLocalizedMessage());
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ public class VmRulesetLogDaoImpl extends GenericDaoBase<VmRulesetLogVO, Long> im
|
||||
try {
|
||||
Thread.sleep(delayMs);
|
||||
} catch (InterruptedException ie) {
|
||||
|
||||
s_logger.debug("[ignored] interupted while inserting security group rule log.");
|
||||
}
|
||||
} else
|
||||
s_logger.warn("Caught another deadlock exception while retrying inserting security group rule log, giving up");
|
||||
|
||||
@ -41,12 +41,12 @@ import com.cloud.utils.db.DB;
|
||||
import com.cloud.utils.db.Filter;
|
||||
import com.cloud.utils.db.GenericDaoBase;
|
||||
import com.cloud.utils.db.GenericSearchBuilder;
|
||||
import com.cloud.utils.db.UpdateBuilder;
|
||||
import com.cloud.utils.db.JoinBuilder.JoinType;
|
||||
import com.cloud.utils.db.SearchBuilder;
|
||||
import com.cloud.utils.db.SearchCriteria;
|
||||
import com.cloud.utils.db.SearchCriteria.Func;
|
||||
import com.cloud.utils.db.TransactionLegacy;
|
||||
import com.cloud.utils.db.UpdateBuilder;
|
||||
import com.cloud.vm.VMInstanceVO;
|
||||
import com.cloud.vm.dao.VMInstanceDao;
|
||||
|
||||
@ -208,6 +208,8 @@ public class SnapshotDaoImpl extends GenericDaoBase<SnapshotVO, Long> implements
|
||||
return rs.getLong(1);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "caught something while getting sec. host id: " + ex.getLocalizedMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -276,7 +278,7 @@ public class SnapshotDaoImpl extends GenericDaoBase<SnapshotVO, Long> implements
|
||||
|
||||
@Override
|
||||
public List<SnapshotVO> listByInstanceId(long instanceId, Snapshot.State... status) {
|
||||
SearchCriteria<SnapshotVO> sc = this.InstanceIdSearch.create();
|
||||
SearchCriteria<SnapshotVO> sc = InstanceIdSearch.create();
|
||||
|
||||
if (status != null && status.length != 0) {
|
||||
sc.setParameters("status", (Object[])status);
|
||||
@ -289,7 +291,7 @@ public class SnapshotDaoImpl extends GenericDaoBase<SnapshotVO, Long> implements
|
||||
|
||||
@Override
|
||||
public List<SnapshotVO> listByStatus(long volumeId, Snapshot.State... status) {
|
||||
SearchCriteria<SnapshotVO> sc = this.StatusSearch.create();
|
||||
SearchCriteria<SnapshotVO> sc = StatusSearch.create();
|
||||
sc.setParameters("volumeId", volumeId);
|
||||
sc.setParameters("status", (Object[])status);
|
||||
return listBy(sc, null);
|
||||
@ -311,7 +313,7 @@ public class SnapshotDaoImpl extends GenericDaoBase<SnapshotVO, Long> implements
|
||||
|
||||
@Override
|
||||
public List<SnapshotVO> listAllByStatus(Snapshot.State... status) {
|
||||
SearchCriteria<SnapshotVO> sc = this.StatusSearch.create();
|
||||
SearchCriteria<SnapshotVO> sc = StatusSearch.create();
|
||||
sc.setParameters("status", (Object[])status);
|
||||
return listBy(sc, null);
|
||||
}
|
||||
|
||||
@ -274,7 +274,9 @@ 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);
|
||||
} catch (InterruptedException e) {}
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while waiting for cache copy completion.");
|
||||
}
|
||||
s_logger.debug("waken up");
|
||||
|
||||
now = new Date();
|
||||
|
||||
@ -170,6 +170,7 @@ public class ClusterServiceServletContainer {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e1) {
|
||||
s_logger.debug("[ignored] interupted while waiting to retry running the servlet container.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -144,6 +144,7 @@ public class Merovingian2 extends StandardMBean implements MerovingianMBean {
|
||||
}
|
||||
Thread.sleep(5000);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while aquiring " + key);
|
||||
}
|
||||
}
|
||||
String msg = "Timed out on acquiring lock " + key + " . Waited for " + ((InaccurateClock.getTime() - startTime)/1000) + "seconds";
|
||||
|
||||
@ -54,6 +54,7 @@ public class GlobalLockTest {
|
||||
Thread.sleep(jobDuration * 1000);
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while testing global lock.");
|
||||
} finally {
|
||||
if (locked) {
|
||||
boolean unlocked = WorkLock.unlock();
|
||||
|
||||
@ -23,6 +23,8 @@ import java.util.Map;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.apache.cloudstack.framework.serializer.MessageSerializer;
|
||||
import org.apache.cloudstack.framework.transport.TransportEndpoint;
|
||||
import org.apache.cloudstack.framework.transport.TransportEndpointSite;
|
||||
@ -32,10 +34,11 @@ import org.apache.cloudstack.managed.context.ManagedContextRunnable;
|
||||
import com.cloud.utils.concurrency.NamedThreadFactory;
|
||||
|
||||
public class ClientTransportProvider implements TransportProvider {
|
||||
final static Logger s_logger = Logger.getLogger(ClientTransportProvider.class);
|
||||
public static final int DEFAULT_WORKER_POOL_SIZE = 5;
|
||||
|
||||
private Map<Integer, ClientTransportEndpointSite> _endpointSites = new HashMap<Integer, ClientTransportEndpointSite>();
|
||||
private Map<String, ClientTransportEndpointSite> _attachedMap = new HashMap<String, ClientTransportEndpointSite>();
|
||||
private final Map<Integer, ClientTransportEndpointSite> _endpointSites = new HashMap<Integer, ClientTransportEndpointSite>();
|
||||
private final Map<String, ClientTransportEndpointSite> _attachedMap = new HashMap<String, ClientTransportEndpointSite>();
|
||||
|
||||
private MessageSerializer _messageSerializer;
|
||||
|
||||
@ -69,6 +72,8 @@ public class ClientTransportProvider implements TransportProvider {
|
||||
try {
|
||||
_connection.connect(_serverAddress, _serverPort);
|
||||
} catch (Throwable e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error during ipc client initialization: " + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -326,6 +326,7 @@ public class MessageBusBase implements MessageBus {
|
||||
try {
|
||||
wait();
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while guarding re-entrance on message bus.");
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
|
||||
@ -41,6 +41,7 @@ public class MessageDetector implements MessageSubscriber {
|
||||
try {
|
||||
wait(timeoutInMiliseconds);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while waiting on any message.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,13 +18,17 @@
|
||||
*/
|
||||
package org.apache.cloudstack.framework.sampleserver;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
public class SampleManagementServer {
|
||||
private static final Logger s_logger = Logger.getLogger(SampleManagementServer.class);
|
||||
|
||||
public void mainLoop() {
|
||||
while (true) {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] .");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,6 +22,11 @@ import javax.inject.Inject;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.apache.cloudstack.framework.messagebus.MessageBus;
|
||||
import org.apache.cloudstack.framework.messagebus.MessageDetector;
|
||||
import org.apache.cloudstack.framework.messagebus.MessageSubscriber;
|
||||
import org.apache.cloudstack.framework.messagebus.PublishScope;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@ -29,14 +34,10 @@ import org.mockito.Mockito;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import org.apache.cloudstack.framework.messagebus.MessageBus;
|
||||
import org.apache.cloudstack.framework.messagebus.MessageDetector;
|
||||
import org.apache.cloudstack.framework.messagebus.MessageSubscriber;
|
||||
import org.apache.cloudstack.framework.messagebus.PublishScope;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations = "classpath:/MessageBusTestContext.xml")
|
||||
public class TestMessageBus extends TestCase {
|
||||
private static final Logger s_logger = Logger.getLogger(TestMessageBus.class);
|
||||
|
||||
@Inject
|
||||
MessageBus _messageBus;
|
||||
@ -128,6 +129,7 @@ public class TestMessageBus extends TestCase {
|
||||
try {
|
||||
Thread.sleep(3000);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] .");
|
||||
}
|
||||
_messageBus.publish(null, "Host", PublishScope.GLOBAL, null);
|
||||
}
|
||||
@ -148,6 +150,7 @@ public class TestMessageBus extends TestCase {
|
||||
try {
|
||||
thread.join();
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] .");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,6 +20,7 @@ import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.inject.Inject;
|
||||
|
||||
@ -166,25 +167,35 @@ public class VmWorkJobDaoImpl extends GenericDaoBase<VmWorkJobVO, Long> implemen
|
||||
public void doInTransactionWithoutResult(TransactionStatus status) {
|
||||
TransactionLegacy txn = TransactionLegacy.currentTxn();
|
||||
|
||||
PreparedStatement pstmt = null;
|
||||
try {
|
||||
pstmt = txn.prepareAutoCloseStatement(
|
||||
try (
|
||||
PreparedStatement pstmt = txn
|
||||
.prepareAutoCloseStatement(
|
||||
"DELETE FROM vm_work_job WHERE id IN (SELECT id FROM async_job WHERE (job_dispatcher='VmWorkJobPlaceHolder' OR job_dispatcher='VmWorkJobDispatcher') AND job_init_msid=?)");
|
||||
) {
|
||||
pstmt.setLong(1, msid);
|
||||
|
||||
pstmt.execute();
|
||||
} catch (SQLException e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "SQL failed to delete vm work job: " + e.getLocalizedMessage());
|
||||
} catch (Throwable e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "caught an error during delete vm work job: " + e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
pstmt = txn.prepareAutoCloseStatement(
|
||||
try (
|
||||
PreparedStatement pstmt = txn.prepareAutoCloseStatement(
|
||||
"DELETE FROM async_job WHERE (job_dispatcher='VmWorkJobPlaceHolder' OR job_dispatcher='VmWorkJobDispatcher') AND job_init_msid=?");
|
||||
) {
|
||||
pstmt.setLong(1, msid);
|
||||
|
||||
pstmt.execute();
|
||||
} catch (SQLException e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "SQL failed to delete async job: " + e.getLocalizedMessage());
|
||||
} catch (Throwable e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "caught an error during delete async job: " + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -61,6 +61,7 @@ public class AsyncJobManagerTest extends TestCase {
|
||||
try {
|
||||
Thread.sleep(3000);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] .");
|
||||
}
|
||||
|
||||
s_logger.info("wakeup");
|
||||
@ -119,6 +120,7 @@ public class AsyncJobManagerTest extends TestCase {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] .");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -52,6 +52,7 @@ public class AsyncJobTestDispatcher extends AdapterBase implements AsyncJobDispa
|
||||
try {
|
||||
Thread.sleep(interval);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] .");
|
||||
}
|
||||
|
||||
_asyncJobMgr.completeAsyncJob(job.getId(), Status.SUCCEEDED, 0, null);
|
||||
|
||||
@ -23,6 +23,8 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.mysql.jdbc.BalanceStrategy;
|
||||
import com.mysql.jdbc.Connection;
|
||||
import com.mysql.jdbc.ConnectionImpl;
|
||||
@ -30,6 +32,7 @@ import com.mysql.jdbc.LoadBalancingConnectionProxy;
|
||||
import com.mysql.jdbc.SQLError;
|
||||
|
||||
public class StaticStrategy implements BalanceStrategy {
|
||||
private static final Logger s_logger = Logger.getLogger(StaticStrategy.class);
|
||||
|
||||
public StaticStrategy() {
|
||||
}
|
||||
@ -91,6 +94,7 @@ public class StaticStrategy implements BalanceStrategy {
|
||||
try {
|
||||
Thread.sleep(250);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while fail over in progres.");
|
||||
}
|
||||
|
||||
// start fresh
|
||||
|
||||
@ -303,6 +303,7 @@ public class BareMetalResourceBase extends ManagerBase implements ServerResource
|
||||
try {
|
||||
TimeUnit.SECONDS.sleep(1);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while waiting to retry running script.");
|
||||
}
|
||||
continue;
|
||||
} else if (res == null) {
|
||||
|
||||
@ -2382,6 +2382,7 @@ public class HypervDirectConnectResource extends ServerResourceBase implements S
|
||||
try {
|
||||
Thread.sleep(5000);
|
||||
} catch (InterruptedException ex) {
|
||||
s_logger.debug("[ignored] interupted while waiting to retry connecting to vm after exception: "+e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
@ -2396,6 +2397,7 @@ public class HypervDirectConnectResource extends ServerResourceBase implements S
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException ex) {
|
||||
s_logger.debug("[ignored] interupted while connecting to vm.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -160,13 +160,13 @@ public class KVMHAMonitor extends KVMHABase implements Runnable {
|
||||
try {
|
||||
monitorThread.join();
|
||||
} catch (InterruptedException e) {
|
||||
|
||||
s_logger.debug("[ignored] interupted joining monitor.");
|
||||
}
|
||||
|
||||
try {
|
||||
Thread.sleep(_heartBeatUpdateFreq);
|
||||
} catch (InterruptedException e) {
|
||||
|
||||
s_logger.debug("[ignored] interupted between heartbeats.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -286,6 +286,7 @@ public class KVMStoragePoolManager {
|
||||
try {
|
||||
Thread.sleep(30000);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while trying to get storage pool.");
|
||||
}
|
||||
cnt++;
|
||||
}
|
||||
|
||||
@ -22,6 +22,7 @@ import java.util.Formatter;
|
||||
|
||||
import javax.ejb.Local;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.cloud.simulator.MockConfigurationVO;
|
||||
@ -33,11 +34,12 @@ import com.cloud.utils.db.TransactionLegacy;
|
||||
@Component
|
||||
@Local(value = {MockConfigurationDao.class})
|
||||
public class MockConfigurationDaoImpl extends GenericDaoBase<MockConfigurationVO, Long> implements MockConfigurationDao {
|
||||
private SearchBuilder<MockConfigurationVO> _searchByDcIdName;
|
||||
private SearchBuilder<MockConfigurationVO> _searchByDcIDPodIdName;
|
||||
private SearchBuilder<MockConfigurationVO> _searchByDcIDPodIdClusterIdName;
|
||||
private SearchBuilder<MockConfigurationVO> _searchByDcIDPodIdClusterIdHostIdName;
|
||||
private SearchBuilder<MockConfigurationVO> _searchByGlobalName;
|
||||
final static Logger s_logger = Logger.getLogger(MockConfigurationDaoImpl.class);
|
||||
private final SearchBuilder<MockConfigurationVO> _searchByDcIdName;
|
||||
private final SearchBuilder<MockConfigurationVO> _searchByDcIDPodIdName;
|
||||
private final SearchBuilder<MockConfigurationVO> _searchByDcIDPodIdClusterIdName;
|
||||
private final SearchBuilder<MockConfigurationVO> _searchByDcIDPodIdClusterIdHostIdName;
|
||||
private final SearchBuilder<MockConfigurationVO> _searchByGlobalName;
|
||||
|
||||
public MockConfigurationDaoImpl() {
|
||||
_searchByGlobalName = createSearchBuilder();
|
||||
@ -131,16 +133,16 @@ public class MockConfigurationDaoImpl extends GenericDaoBase<MockConfigurationVO
|
||||
formatter.format(" and removed is NULL ORDER BY id ASC LIMIT 1 for update");
|
||||
formatter.close();
|
||||
|
||||
PreparedStatement pstmt = null;
|
||||
try {
|
||||
String sql = search.toString();
|
||||
pstmt = txn.prepareAutoCloseStatement(sql);
|
||||
ResultSet rs = pstmt.executeQuery();
|
||||
String sql = search.toString();
|
||||
try (
|
||||
PreparedStatement pstmt = txn.prepareAutoCloseStatement(sql);
|
||||
ResultSet rs = pstmt.executeQuery();) {
|
||||
if (rs.next()) {
|
||||
return toEntityBean(rs, false);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
s_logger.info("[ignored]"
|
||||
+ "error while executing dynamically build search: " + e.getLocalizedMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -321,6 +321,7 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw
|
||||
try {
|
||||
_hostScanScheduler.awaitTermination(3000, TimeUnit.MILLISECONDS);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while stopping<:/.");
|
||||
}
|
||||
|
||||
shutdownCleanup();
|
||||
|
||||
@ -1187,12 +1187,12 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager {
|
||||
|
||||
if (vmMo == null) {
|
||||
String msg = "Unable to find VM for CreateVMSnapshotCommand";
|
||||
s_logger.debug(msg);
|
||||
s_logger.info(msg);
|
||||
|
||||
return new CreateVMSnapshotAnswer(cmd, false, msg);
|
||||
} else {
|
||||
if (vmMo.getSnapshotMor(vmSnapshotName) != null) {
|
||||
s_logger.debug("VM snapshot " + vmSnapshotName + " already exists");
|
||||
s_logger.info("VM snapshot " + vmSnapshotName + " already exists");
|
||||
} else if (!vmMo.createSnapshot(vmSnapshotName, vmSnapshotDesc, snapshotMemory, quiescevm)) {
|
||||
return new CreateVMSnapshotAnswer(cmd, false, "Unable to create snapshot due to esxi internal failed");
|
||||
}
|
||||
@ -1212,6 +1212,8 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager {
|
||||
vmMo.removeSnapshot(vmSnapshotName, false);
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error during snapshot remove: " + e1.getLocalizedMessage());
|
||||
}
|
||||
|
||||
return new CreateVMSnapshotAnswer(cmd, false, e.getMessage());
|
||||
@ -1309,6 +1311,8 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager {
|
||||
}
|
||||
}
|
||||
catch (Exception ex) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error getting managed object refference: " + ex.getLocalizedMessage());
|
||||
}
|
||||
|
||||
// not managed storage, so use the standard way of getting a ManagedObjectReference for a datastore
|
||||
|
||||
@ -784,6 +784,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
|
||||
Thread.currentThread();
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while trying to get mac.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -4818,6 +4819,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
|
||||
try {
|
||||
Thread.sleep(5000);
|
||||
} catch (InterruptedException ex) {
|
||||
s_logger.debug("[ignored] interupted while waiting to retry connect after failure.", e);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
@ -4832,6 +4834,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException ex) {
|
||||
s_logger.debug("[ignored] interupted while waiting to retry connect.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -954,6 +954,7 @@ public class NetscalerResource implements ServerResource {
|
||||
try {
|
||||
Thread.sleep(10000);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while waiting for netscaler to be 'up'.");
|
||||
}
|
||||
ns refreshNsObj = new ns();
|
||||
refreshNsObj.set_id(newVpx.get_id());
|
||||
@ -1695,7 +1696,8 @@ public class NetscalerResource implements ServerResource {
|
||||
return site;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
s_logger.info("[ignored]"
|
||||
+ "error getting site: " + e.getLocalizedMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -16,32 +16,6 @@
|
||||
// under the License.
|
||||
package com.cloud.network.ovs;
|
||||
|
||||
import com.cloud.agent.api.Answer;
|
||||
import com.cloud.agent.api.Command;
|
||||
import com.cloud.agent.api.OvsCreateTunnelAnswer;
|
||||
import com.cloud.agent.api.OvsCreateTunnelCommand;
|
||||
import com.cloud.agent.api.OvsDestroyBridgeCommand;
|
||||
import com.cloud.agent.api.OvsDestroyTunnelCommand;
|
||||
import com.cloud.agent.api.OvsFetchInterfaceAnswer;
|
||||
import com.cloud.agent.api.OvsFetchInterfaceCommand;
|
||||
import com.cloud.agent.api.OvsSetupBridgeCommand;
|
||||
import com.cloud.agent.api.OvsVpcPhysicalTopologyConfigCommand;
|
||||
import com.cloud.agent.api.OvsVpcRoutingPolicyConfigCommand;
|
||||
import com.cloud.network.dao.NetworkDao;
|
||||
import com.cloud.network.dao.NetworkVO;
|
||||
import com.cloud.network.vpc.NetworkACLVO;
|
||||
import com.cloud.network.vpc.NetworkACLItemDao;
|
||||
import com.cloud.network.vpc.NetworkACLItemVO;
|
||||
import com.cloud.network.vpc.dao.VpcDao;
|
||||
import com.cloud.network.vpc.VpcManager;
|
||||
import com.cloud.network.vpc.VpcVO;
|
||||
import com.cloud.network.vpc.dao.NetworkACLDao;
|
||||
import com.cloud.utils.fsm.StateMachine2;
|
||||
import com.cloud.vm.VMInstanceVO;
|
||||
import com.cloud.vm.dao.VMInstanceDao;
|
||||
import com.cloud.vm.Nic;
|
||||
import com.cloud.vm.NicVO;
|
||||
import com.cloud.vm.VirtualMachine;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -53,14 +27,25 @@ import javax.inject.Inject;
|
||||
import javax.naming.ConfigurationException;
|
||||
import javax.persistence.EntityExistsException;
|
||||
|
||||
import org.apache.cloudstack.framework.messagebus.MessageBus;
|
||||
import org.apache.cloudstack.framework.messagebus.MessageSubscriber;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
|
||||
import org.apache.cloudstack.framework.messagebus.MessageBus;
|
||||
import org.apache.cloudstack.framework.messagebus.MessageSubscriber;
|
||||
|
||||
import com.cloud.agent.AgentManager;
|
||||
import com.cloud.agent.api.Answer;
|
||||
import com.cloud.agent.api.Command;
|
||||
import com.cloud.agent.api.OvsCreateTunnelAnswer;
|
||||
import com.cloud.agent.api.OvsCreateTunnelCommand;
|
||||
import com.cloud.agent.api.OvsDestroyBridgeCommand;
|
||||
import com.cloud.agent.api.OvsDestroyTunnelCommand;
|
||||
import com.cloud.agent.api.OvsFetchInterfaceAnswer;
|
||||
import com.cloud.agent.api.OvsFetchInterfaceCommand;
|
||||
import com.cloud.agent.api.OvsSetupBridgeCommand;
|
||||
import com.cloud.agent.api.OvsVpcPhysicalTopologyConfigCommand;
|
||||
import com.cloud.agent.api.OvsVpcRoutingPolicyConfigCommand;
|
||||
import com.cloud.agent.manager.Commands;
|
||||
import com.cloud.configuration.Config;
|
||||
import com.cloud.exception.AgentUnavailableException;
|
||||
@ -73,24 +58,39 @@ import com.cloud.network.Network;
|
||||
import com.cloud.network.Networks.BroadcastDomainType;
|
||||
import com.cloud.network.Networks.TrafficType;
|
||||
import com.cloud.network.PhysicalNetworkTrafficType;
|
||||
import com.cloud.network.dao.NetworkDao;
|
||||
import com.cloud.network.dao.NetworkVO;
|
||||
import com.cloud.network.dao.PhysicalNetworkTrafficTypeDao;
|
||||
import com.cloud.network.ovs.dao.OvsTunnel;
|
||||
import com.cloud.network.ovs.dao.OvsTunnelInterfaceDao;
|
||||
import com.cloud.network.ovs.dao.OvsTunnelInterfaceVO;
|
||||
import com.cloud.network.ovs.dao.OvsTunnelNetworkDao;
|
||||
import com.cloud.network.ovs.dao.OvsTunnelNetworkVO;
|
||||
import com.cloud.network.ovs.dao.OvsTunnel;
|
||||
import com.cloud.network.ovs.dao.VpcDistributedRouterSeqNoDao;
|
||||
import com.cloud.network.ovs.dao.VpcDistributedRouterSeqNoVO;
|
||||
import com.cloud.network.vpc.NetworkACLItemDao;
|
||||
import com.cloud.network.vpc.NetworkACLItemVO;
|
||||
import com.cloud.network.vpc.NetworkACLVO;
|
||||
import com.cloud.network.vpc.VpcManager;
|
||||
import com.cloud.network.vpc.VpcVO;
|
||||
import com.cloud.network.vpc.dao.NetworkACLDao;
|
||||
import com.cloud.network.vpc.dao.VpcDao;
|
||||
import com.cloud.utils.component.ManagerBase;
|
||||
import com.cloud.utils.concurrency.NamedThreadFactory;
|
||||
import com.cloud.utils.db.DB;
|
||||
import com.cloud.utils.db.TransactionStatus;
|
||||
import com.cloud.utils.db.Transaction;
|
||||
import com.cloud.utils.db.TransactionCallback;
|
||||
import com.cloud.utils.fsm.StateListener;
|
||||
import com.cloud.utils.db.TransactionStatus;
|
||||
import com.cloud.utils.exception.CloudRuntimeException;
|
||||
import com.cloud.utils.fsm.StateListener;
|
||||
import com.cloud.utils.fsm.StateMachine2;
|
||||
import com.cloud.vm.Nic;
|
||||
import com.cloud.vm.NicVO;
|
||||
import com.cloud.vm.VMInstanceVO;
|
||||
import com.cloud.vm.VirtualMachine;
|
||||
import com.cloud.vm.dao.DomainRouterDao;
|
||||
import com.cloud.vm.dao.NicDao;
|
||||
import com.cloud.vm.dao.VMInstanceDao;
|
||||
|
||||
@Component
|
||||
@Local(value = {OvsTunnelManager.class})
|
||||
@ -510,7 +510,8 @@ public class OvsTunnelManagerImpl extends ManagerBase implements OvsTunnelManage
|
||||
Answer ans = _agentMgr.send(host.getId(), cmd);
|
||||
handleDestroyBridgeAnswer(ans, host.getId(), nw.getId());
|
||||
} catch (Exception e) {
|
||||
|
||||
s_logger.info("[ignored]"
|
||||
+ "exception while removing host from networks: " + e.getLocalizedMessage());
|
||||
}
|
||||
} else {
|
||||
List<Long> vmIds = _ovsNetworkToplogyGuru.getActiveVmsInNetworkOnHost(nw.getId(), host.getId(), true);
|
||||
@ -770,7 +771,8 @@ public class OvsTunnelManagerImpl extends ManagerBase implements OvsTunnelManage
|
||||
try {
|
||||
remoteIp = getGreEndpointIP(hostDetails, network);
|
||||
} catch (Exception e) {
|
||||
|
||||
s_logger.info("[ignored]"
|
||||
+ "error getting GRE endpoint: " + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
OvsVpcPhysicalTopologyConfigCommand.Host host = new OvsVpcPhysicalTopologyConfigCommand.Host(hostId, remoteIp);
|
||||
|
||||
@ -20,9 +20,9 @@ package org.apache.cloudstack.storage.datastore.lifecycle;
|
||||
|
||||
import java.text.NumberFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
@ -43,9 +43,6 @@ import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
|
||||
import org.apache.cloudstack.storage.datastore.util.SolidFireUtil;
|
||||
import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper;
|
||||
|
||||
import com.cloud.template.TemplateManager;
|
||||
import com.cloud.user.AccountDetailsDao;
|
||||
import com.cloud.user.AccountVO;
|
||||
import com.cloud.agent.AgentManager;
|
||||
import com.cloud.agent.api.Answer;
|
||||
import com.cloud.agent.api.CreateStoragePoolCommand;
|
||||
@ -56,19 +53,22 @@ import com.cloud.dc.ClusterDetailsVO;
|
||||
import com.cloud.dc.ClusterVO;
|
||||
import com.cloud.dc.dao.ClusterDao;
|
||||
import com.cloud.dc.dao.DataCenterDao;
|
||||
import com.cloud.host.dao.HostDao;
|
||||
import com.cloud.host.Host;
|
||||
import com.cloud.host.HostVO;
|
||||
import com.cloud.host.dao.HostDao;
|
||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||
import com.cloud.resource.ResourceManager;
|
||||
import com.cloud.storage.Storage.StoragePoolType;
|
||||
import com.cloud.storage.dao.StoragePoolHostDao;
|
||||
import com.cloud.storage.StorageManager;
|
||||
import com.cloud.storage.StoragePool;
|
||||
import com.cloud.storage.StoragePoolAutomation;
|
||||
import com.cloud.storage.StoragePoolHostVO;
|
||||
import com.cloud.storage.VMTemplateStoragePoolVO;
|
||||
import com.cloud.storage.dao.StoragePoolHostDao;
|
||||
import com.cloud.template.TemplateManager;
|
||||
import com.cloud.user.Account;
|
||||
import com.cloud.user.AccountDetailsDao;
|
||||
import com.cloud.user.AccountVO;
|
||||
import com.cloud.user.dao.AccountDao;
|
||||
import com.cloud.utils.exception.CloudRuntimeException;
|
||||
|
||||
@ -178,6 +178,8 @@ public class SolidFireSharedPrimaryDataStoreLifeCycle implements PrimaryDataStor
|
||||
lMinIops = Long.parseLong(minIops);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error getting minimals iops: " + ex.getLocalizedMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
@ -187,6 +189,8 @@ public class SolidFireSharedPrimaryDataStoreLifeCycle implements PrimaryDataStor
|
||||
lMaxIops = Long.parseLong(maxIops);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error getting maximal iops: " + ex.getLocalizedMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
@ -196,6 +200,8 @@ public class SolidFireSharedPrimaryDataStoreLifeCycle implements PrimaryDataStor
|
||||
lBurstIops = Long.parseLong(burstIops);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error getting iops bursts: " + ex.getLocalizedMessage());
|
||||
}
|
||||
|
||||
if (lMinIops > lMaxIops) {
|
||||
@ -526,7 +532,7 @@ public class SolidFireSharedPrimaryDataStoreLifeCycle implements PrimaryDataStor
|
||||
if (answer != null && answer.getResult()) {
|
||||
s_logger.info("Successfully deleted storage pool using Host ID " + host.getHostId());
|
||||
|
||||
HostVO hostVO = this._hostDao.findById(host.getHostId());
|
||||
HostVO hostVO = _hostDao.findById(host.getHostId());
|
||||
|
||||
if (hostVO != null) {
|
||||
clusterId = hostVO.getClusterId();
|
||||
|
||||
@ -38,9 +38,6 @@ import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.TrustManager;
|
||||
import javax.net.ssl.X509TrustManager;
|
||||
|
||||
import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
|
||||
import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
|
||||
import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailVO;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.auth.AuthScope;
|
||||
@ -53,12 +50,16 @@ import org.apache.http.conn.ssl.SSLSocketFactory;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.DefaultHttpClient;
|
||||
import org.apache.http.impl.conn.BasicClientConnectionManager;
|
||||
|
||||
import org.apache.cloudstack.utils.security.SSLUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
||||
import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
|
||||
import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailVO;
|
||||
import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
|
||||
import org.apache.cloudstack.utils.security.SSLUtils;
|
||||
|
||||
import com.cloud.dc.ClusterDetailsDao;
|
||||
import com.cloud.dc.ClusterDetailsVO;
|
||||
import com.cloud.host.Host;
|
||||
@ -68,6 +69,7 @@ import com.cloud.user.AccountDetailsDao;
|
||||
import com.cloud.utils.exception.CloudRuntimeException;
|
||||
|
||||
public class SolidFireUtil {
|
||||
private static final Logger s_logger = Logger.getLogger(SolidFireUtil.class);
|
||||
public static final String PROVIDER_NAME = "SolidFire";
|
||||
public static final String SHARED_PROVIDER_NAME = "SolidFireShared";
|
||||
|
||||
@ -1272,7 +1274,7 @@ public class SolidFireUtil {
|
||||
}
|
||||
|
||||
private static final class VolumeToDeleteParams {
|
||||
private long volumeID;
|
||||
private final long volumeID;
|
||||
|
||||
private VolumeToDeleteParams(final long lVolumeId) {
|
||||
volumeID = lVolumeId;
|
||||
@ -1291,7 +1293,7 @@ public class SolidFireUtil {
|
||||
}
|
||||
|
||||
private static final class VolumeToPurgeParams {
|
||||
private long volumeID;
|
||||
private final long volumeID;
|
||||
|
||||
private VolumeToPurgeParams(final long lVolumeId) {
|
||||
volumeID = lVolumeId;
|
||||
@ -1309,8 +1311,8 @@ public class SolidFireUtil {
|
||||
}
|
||||
|
||||
private static final class SnapshotToCreateParams {
|
||||
private long volumeID;
|
||||
private String name;
|
||||
private final long volumeID;
|
||||
private final String name;
|
||||
|
||||
private SnapshotToCreateParams(final long lVolumeId, final String snapshotName) {
|
||||
volumeID = lVolumeId;
|
||||
@ -1330,7 +1332,7 @@ public class SolidFireUtil {
|
||||
}
|
||||
|
||||
private static final class SnapshotToDeleteParams {
|
||||
private long snapshotID;
|
||||
private final long snapshotID;
|
||||
|
||||
private SnapshotToDeleteParams(final long lSnapshotId) {
|
||||
snapshotID = lSnapshotId;
|
||||
@ -1348,8 +1350,8 @@ public class SolidFireUtil {
|
||||
}
|
||||
|
||||
private static final class RollbackToInitiateParams {
|
||||
private long volumeID;
|
||||
private long snapshotID;
|
||||
private final long volumeID;
|
||||
private final long snapshotID;
|
||||
|
||||
private RollbackToInitiateParams(final long lVolumeId, final long lSnapshotId) {
|
||||
volumeID = lVolumeId;
|
||||
@ -1368,9 +1370,9 @@ public class SolidFireUtil {
|
||||
}
|
||||
|
||||
private static final class CloneToCreateParams {
|
||||
private long volumeID;
|
||||
private long snapshotID;
|
||||
private String name;
|
||||
private final long volumeID;
|
||||
private final long snapshotID;
|
||||
private final String name;
|
||||
|
||||
private CloneToCreateParams(final long lVolumeId, final long lSnapshotId, final String cloneName) {
|
||||
volumeID = lVolumeId;
|
||||
@ -1456,7 +1458,7 @@ public class SolidFireUtil {
|
||||
}
|
||||
|
||||
private static final class AccountToRemoveParams {
|
||||
private long accountID;
|
||||
private final long accountID;
|
||||
|
||||
private AccountToRemoveParams(final long lAccountId) {
|
||||
accountID = lAccountId;
|
||||
@ -1565,7 +1567,7 @@ public class SolidFireUtil {
|
||||
}
|
||||
|
||||
private static final class VagToDeleteParams {
|
||||
private long volumeAccessGroupID;
|
||||
private final long volumeAccessGroupID;
|
||||
|
||||
private VagToDeleteParams(final long lVagId) {
|
||||
volumeAccessGroupID = lVagId;
|
||||
@ -1772,6 +1774,8 @@ public class SolidFireUtil {
|
||||
try {
|
||||
httpClient.getConnectionManager().shutdown();
|
||||
} catch (Exception t) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error shutting down http client: " + t.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,7 +40,6 @@ import javax.ejb.Local;
|
||||
import javax.inject.Inject;
|
||||
import javax.naming.ConfigurationException;
|
||||
|
||||
import com.cloud.utils.fsm.StateMachine2;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
@ -107,6 +106,7 @@ import com.cloud.utils.db.TransactionCallbackWithException;
|
||||
import com.cloud.utils.db.TransactionStatus;
|
||||
import com.cloud.utils.exception.CloudRuntimeException;
|
||||
import com.cloud.utils.fsm.StateListener;
|
||||
import com.cloud.utils.fsm.StateMachine2;
|
||||
import com.cloud.utils.net.NetUtils;
|
||||
import com.cloud.vm.Nic;
|
||||
import com.cloud.vm.NicProfile;
|
||||
@ -200,10 +200,7 @@ public class SecurityGroupManagerImpl extends ManagerBase implements SecurityGro
|
||||
try {
|
||||
work();
|
||||
} catch (Throwable th) {
|
||||
try {
|
||||
s_logger.error("Problem with SG work", th);
|
||||
} catch (Throwable th2) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -216,10 +213,7 @@ public class SecurityGroupManagerImpl extends ManagerBase implements SecurityGro
|
||||
cleanupUnfinishedWork();
|
||||
//processScheduledWork();
|
||||
} catch (Throwable th) {
|
||||
try {
|
||||
s_logger.error("Problem with SG Cleanup", th);
|
||||
} catch (Throwable th2) {
|
||||
}
|
||||
s_logger.error("Problem with SG Cleanup", th);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -221,6 +221,7 @@ public class SnapshotManagerImpl extends ManagerBase implements SnapshotManager,
|
||||
try {
|
||||
Thread.sleep(_pauseInterval * 1000);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while retry cmd.");
|
||||
}
|
||||
|
||||
s_logger.debug("Retrying...");
|
||||
|
||||
@ -61,6 +61,7 @@ public class SystemVmLoadScanner<T> {
|
||||
try {
|
||||
_capacityScanScheduler.awaitTermination(1000, TimeUnit.MILLISECONDS);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while stopping systemvm load scanner.");
|
||||
}
|
||||
|
||||
_capacityScanLock.releaseRef();
|
||||
|
||||
@ -20,12 +20,15 @@ import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import streamer.debug.FakeSink;
|
||||
|
||||
/**
|
||||
* Source element, which reads data from InputStream.
|
||||
*/
|
||||
public class InputStreamSource extends BaseElement {
|
||||
private static final Logger s_logger = Logger.getLogger(InputStreamSource.class);
|
||||
|
||||
protected InputStream is;
|
||||
protected SocketWrapperImpl socketWrapper;
|
||||
@ -148,10 +151,14 @@ public class InputStreamSource extends BaseElement {
|
||||
try {
|
||||
is.close();
|
||||
} catch (IOException e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "io error on input stream: " + e.getLocalizedMessage());
|
||||
}
|
||||
try {
|
||||
sendEventToAllPads(Event.STREAM_CLOSE, Direction.OUT);
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error sending an event to all pods: " + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -20,9 +20,12 @@ import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import streamer.debug.FakeSource;
|
||||
|
||||
public class OutputStreamSink extends BaseElement {
|
||||
private static final Logger s_logger = Logger.getLogger(OutputStreamSink.class);
|
||||
|
||||
protected OutputStream os;
|
||||
protected SocketWrapperImpl socketWrapper;
|
||||
@ -110,10 +113,14 @@ public class OutputStreamSink extends BaseElement {
|
||||
try {
|
||||
os.close();
|
||||
} catch (IOException e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "io error on output: " + e.getLocalizedMessage());
|
||||
}
|
||||
try {
|
||||
sendEventToAllPads(Event.STREAM_CLOSE, Direction.IN);
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error sending output close event: " + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -16,18 +16,9 @@
|
||||
// under the License.
|
||||
package streamer;
|
||||
|
||||
import org.apache.cloudstack.utils.security.SSLUtils;
|
||||
import org.apache.cloudstack.utils.security.SecureSSLSocketFactory;
|
||||
import streamer.debug.MockServer;
|
||||
import streamer.debug.MockServer.Packet;
|
||||
import streamer.ssl.SSLState;
|
||||
import streamer.ssl.TrustAllX509TrustManager;
|
||||
import static streamer.debug.MockServer.Packet.PacketType.CLIENT;
|
||||
import static streamer.debug.MockServer.Packet.PacketType.SERVER;
|
||||
|
||||
import javax.net.SocketFactory;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.SSLSocket;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
import javax.net.ssl.TrustManager;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
@ -35,10 +26,24 @@ import java.net.InetSocketAddress;
|
||||
import java.net.Socket;
|
||||
import java.util.HashMap;
|
||||
|
||||
import static streamer.debug.MockServer.Packet.PacketType.CLIENT;
|
||||
import static streamer.debug.MockServer.Packet.PacketType.SERVER;
|
||||
import javax.net.SocketFactory;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.SSLSocket;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
import javax.net.ssl.TrustManager;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.apache.cloudstack.utils.security.SSLUtils;
|
||||
import org.apache.cloudstack.utils.security.SecureSSLSocketFactory;
|
||||
|
||||
import streamer.debug.MockServer;
|
||||
import streamer.debug.MockServer.Packet;
|
||||
import streamer.ssl.SSLState;
|
||||
import streamer.ssl.TrustAllX509TrustManager;
|
||||
|
||||
public class SocketWrapperImpl extends PipelineImpl implements SocketWrapper {
|
||||
private static final Logger s_logger = Logger.getLogger(SocketWrapperImpl.class);
|
||||
|
||||
protected InputStreamSource source;
|
||||
protected OutputStreamSink sink;
|
||||
@ -172,19 +177,27 @@ public class SocketWrapperImpl extends PipelineImpl implements SocketWrapper {
|
||||
try {
|
||||
handleEvent(Event.STREAM_CLOSE, Direction.IN);
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error sending input close event: " + e.getLocalizedMessage());
|
||||
}
|
||||
try {
|
||||
handleEvent(Event.STREAM_CLOSE, Direction.OUT);
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error sending output close event: " + e.getLocalizedMessage());
|
||||
}
|
||||
try {
|
||||
if (sslSocket != null)
|
||||
sslSocket.close();
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error closing ssl socket: " + e.getLocalizedMessage());
|
||||
}
|
||||
try {
|
||||
socket.close();
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error closing socket: " + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
// under the License.
|
||||
package streamer.apr;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.tomcat.jni.Socket;
|
||||
|
||||
import streamer.BaseElement;
|
||||
@ -26,6 +27,7 @@ import streamer.Event;
|
||||
import streamer.Link;
|
||||
|
||||
public class AprSocketSink extends BaseElement {
|
||||
private static final Logger s_logger = Logger.getLogger(AprSocketSink.class);
|
||||
|
||||
protected AprSocketWrapperImpl socketWrapper;
|
||||
protected Long socket;
|
||||
@ -117,6 +119,8 @@ public class AprSocketSink extends BaseElement {
|
||||
try {
|
||||
sendEventToAllPads(Event.STREAM_CLOSE, Direction.IN);
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "failing sending sink event to all pads: " + e.getLocalizedMessage());
|
||||
}
|
||||
socketWrapper.shutdown();
|
||||
}
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
// under the License.
|
||||
package streamer.apr;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.tomcat.jni.Socket;
|
||||
|
||||
import streamer.BaseElement;
|
||||
@ -29,6 +30,7 @@ import streamer.Link;
|
||||
* Source element, which reads data from InputStream.
|
||||
*/
|
||||
public class AprSocketSource extends BaseElement {
|
||||
private static final Logger s_logger = Logger.getLogger(AprSocketSource.class);
|
||||
|
||||
protected AprSocketWrapperImpl socketWrapper;
|
||||
protected Long socket;
|
||||
@ -162,6 +164,8 @@ public class AprSocketSource extends BaseElement {
|
||||
try {
|
||||
sendEventToAllPads(Event.STREAM_CLOSE, Direction.OUT);
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "failing sending source event to all pads: " + e.getLocalizedMessage());
|
||||
}
|
||||
socketWrapper.shutdown();
|
||||
}
|
||||
|
||||
@ -23,6 +23,7 @@ import java.io.IOException;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.tomcat.jni.Address;
|
||||
import org.apache.tomcat.jni.Error;
|
||||
import org.apache.tomcat.jni.Library;
|
||||
@ -46,6 +47,7 @@ import streamer.ssl.SSLState;
|
||||
import sun.security.x509.X509CertImpl;
|
||||
|
||||
public class AprSocketWrapperImpl extends PipelineImpl implements SocketWrapper {
|
||||
private static final Logger s_logger = Logger.getLogger(AprSocketWrapperImpl.class);
|
||||
|
||||
static {
|
||||
try {
|
||||
@ -198,10 +200,14 @@ public class AprSocketWrapperImpl extends PipelineImpl implements SocketWrapper
|
||||
try {
|
||||
handleEvent(Event.STREAM_CLOSE, Direction.IN);
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "handling stream close event failed on input: " + e.getLocalizedMessage());
|
||||
}
|
||||
try {
|
||||
handleEvent(Event.STREAM_CLOSE, Direction.OUT);
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "handling event close event failed on output: " + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@ -216,6 +222,8 @@ public class AprSocketWrapperImpl extends PipelineImpl implements SocketWrapper
|
||||
// Socket.shutdown(socket, Socket.APR_SHUTDOWN_READWRITE);
|
||||
Pool.destroy(pool);
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "failure during network cleanup: " + e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -22,6 +22,7 @@ import java.io.OutputStream;
|
||||
import java.security.SecureRandom;
|
||||
import java.security.Security;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.bouncycastle.asn1.x509.X509CertificateStructure;
|
||||
import org.bouncycastle.crypto.tls.CertificateVerifyer;
|
||||
import org.bouncycastle.crypto.tls.TlsProtocolHandler;
|
||||
@ -34,6 +35,7 @@ import streamer.ssl.SSLState;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class BcoSocketWrapperImpl extends SocketWrapperImpl {
|
||||
private static final Logger s_logger = Logger.getLogger(BcoSocketWrapperImpl.class);
|
||||
|
||||
static {
|
||||
Security.addProvider(new BouncyCastleProvider());
|
||||
@ -95,19 +97,27 @@ public class BcoSocketWrapperImpl extends SocketWrapperImpl {
|
||||
try {
|
||||
handleEvent(Event.STREAM_CLOSE, Direction.IN);
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "failure handling close event for bso input stream: " + e.getLocalizedMessage());
|
||||
}
|
||||
try {
|
||||
handleEvent(Event.STREAM_CLOSE, Direction.OUT);
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "failure handling close event for bso output stream: " + e.getLocalizedMessage());
|
||||
}
|
||||
try {
|
||||
if (bcoSslSocket != null)
|
||||
bcoSslSocket.close();
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "failure handling close event for bso socket: " + e.getLocalizedMessage());
|
||||
}
|
||||
try {
|
||||
socket.close();
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "failure handling close event for socket: " + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -27,11 +27,14 @@ import java.util.Arrays;
|
||||
import javax.net.ssl.SSLSocket;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
public class MockServer implements Runnable {
|
||||
private static final Logger s_logger = Logger.getLogger(MockServer.class);
|
||||
|
||||
private boolean shutdown = false;
|
||||
private ServerSocket serverSocket;
|
||||
private Packet[] packets;
|
||||
private final Packet[] packets;
|
||||
private Throwable exception;
|
||||
private boolean shutdowned;
|
||||
|
||||
@ -131,14 +134,20 @@ public class MockServer implements Runnable {
|
||||
try {
|
||||
is.close();
|
||||
} catch (Throwable e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "in stream close failed: " + e.getLocalizedMessage());
|
||||
}
|
||||
try {
|
||||
os.close();
|
||||
} catch (Throwable e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "out stream close failed: " + e.getLocalizedMessage());
|
||||
}
|
||||
try {
|
||||
serverSocket.close();
|
||||
} catch (Throwable e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "server socket close failed: " + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
|
||||
@ -230,6 +230,7 @@ public abstract class ConsoleProxyClientBase implements ConsoleProxyClient, Cons
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] Console proxy was interupted while waiting for viewer to become ready.");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@ -260,18 +261,6 @@ public abstract class ConsoleProxyClientBase implements ConsoleProxyClient, Cons
|
||||
if (s_logger.isTraceEnabled())
|
||||
s_logger.trace("Ajax client start, frame buffer w: " + width + ", " + height);
|
||||
|
||||
/*
|
||||
int retry = 0;
|
||||
tracker.initCoverageTest();
|
||||
while(!tracker.hasFullCoverage() && retry < 10) {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
retry++;
|
||||
}
|
||||
*/
|
||||
|
||||
List<TileInfo> tiles = tracker.scan(true);
|
||||
String imgUrl = prepareAjaxImage(tiles, true);
|
||||
String updateUrl = prepareAjaxSession(true);
|
||||
@ -353,6 +342,7 @@ public abstract class ConsoleProxyClientBase implements ConsoleProxyClient, Cons
|
||||
try {
|
||||
tileDirtyEvent.wait(3000);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] Console proxy ajax update was interupted while waiting for viewer to become ready.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ public class ConsoleProxyGCThread extends Thread {
|
||||
|
||||
private final static int MAX_SESSION_IDLE_SECONDS = 180;
|
||||
|
||||
private Hashtable<String, ConsoleProxyClient> connMap;
|
||||
private final Hashtable<String, ConsoleProxyClient> connMap;
|
||||
private long lastLogScan = 0;
|
||||
|
||||
public ConsoleProxyGCThread(Hashtable<String, ConsoleProxyClient> connMap) {
|
||||
@ -54,6 +54,8 @@ public class ConsoleProxyGCThread extends Thread {
|
||||
try {
|
||||
file.delete();
|
||||
} catch (Throwable e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "failed to delete file: " + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -109,6 +111,7 @@ public class ConsoleProxyGCThread extends Thread {
|
||||
try {
|
||||
Thread.sleep(5000);
|
||||
} catch (InterruptedException ex) {
|
||||
s_logger.debug("[ignored] Console proxy was interupted during GC.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ public class VncClient {
|
||||
private DataInputStream is;
|
||||
private DataOutputStream os;
|
||||
|
||||
private VncScreenDescription screen = new VncScreenDescription();
|
||||
private final VncScreenDescription screen = new VncScreenDescription();
|
||||
|
||||
private VncClientPacketSender sender;
|
||||
private VncServerPacketReceiver receiver;
|
||||
@ -86,7 +86,7 @@ public class VncClient {
|
||||
}
|
||||
|
||||
public VncClient(ConsoleProxyClientListener clientListener) {
|
||||
this.noUI = true;
|
||||
noUI = true;
|
||||
this.clientListener = clientListener;
|
||||
}
|
||||
|
||||
@ -108,6 +108,8 @@ public class VncClient {
|
||||
try {
|
||||
is.close();
|
||||
} catch (Throwable e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "failed to close resource for input: " + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@ -115,6 +117,8 @@ public class VncClient {
|
||||
try {
|
||||
os.close();
|
||||
} catch (Throwable e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "failed to get close resource for output: " + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,6 +126,8 @@ public class VncClient {
|
||||
try {
|
||||
socket.close();
|
||||
} catch (Throwable e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "failed to get close resource for socket: " + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -139,14 +145,14 @@ public class VncClient {
|
||||
}
|
||||
|
||||
RawHTTP tunnel = new RawHTTP("CONNECT", host, port, path, session, useSSL);
|
||||
this.socket = tunnel.connect();
|
||||
socket = tunnel.connect();
|
||||
doConnect(sid);
|
||||
}
|
||||
|
||||
public void connectTo(String host, int port, String password) throws UnknownHostException, IOException {
|
||||
// Connect to server
|
||||
s_logger.info("Connecting to VNC server " + host + ":" + port + "...");
|
||||
this.socket = new Socket(host, port);
|
||||
socket = new Socket(host, port);
|
||||
doConnect(password);
|
||||
}
|
||||
|
||||
@ -187,7 +193,7 @@ public class VncClient {
|
||||
frame.setVisible(false);
|
||||
frame.dispose();
|
||||
}
|
||||
this.shutdown();
|
||||
shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -802,6 +802,7 @@ public class ApiCommand {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while during async job result query.");
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
|
||||
@ -262,6 +262,8 @@ public class StressTestDirectAttach {
|
||||
int stopResponseCode = executeStop(server, developerServer, username);
|
||||
s_logger.info("stop response code: " + stopResponseCode);
|
||||
} catch (Exception e1) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error executing stop during stress test: " + e1.getLocalizedMessage());
|
||||
}
|
||||
} finally {
|
||||
NDC.clear();
|
||||
@ -1335,6 +1337,7 @@ public class StressTestDirectAttach {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while during async job result query.");
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
|
||||
@ -347,6 +347,8 @@ public class TestClientWithAPI {
|
||||
int stopResponseCode = executeStop(server, developerServer, username, true);
|
||||
s_logger.info("stop response code: " + stopResponseCode);
|
||||
} catch (Exception e1) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error executing stop during api test: " + e1.getLocalizedMessage());
|
||||
}
|
||||
} finally {
|
||||
NDC.clear();
|
||||
@ -2271,6 +2273,7 @@ public class TestClientWithAPI {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while during async job result query.");
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
|
||||
@ -56,6 +56,8 @@ public class AddAndDeleteAISO extends AbstractSeleniumTestCase {
|
||||
selenium.click("//div[" + i + "]/div/div[2]/span/span");
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error during clicking test on iso: " + e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
for (int second = 0;; second++) {
|
||||
@ -65,6 +67,8 @@ public class AddAndDeleteAISO extends AbstractSeleniumTestCase {
|
||||
if (selenium.isVisible("//div[@id='after_action_info_container_on_top']"))
|
||||
break;
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error during visibility test of iso: " + e.getLocalizedMessage());
|
||||
}
|
||||
Thread.sleep(10000);
|
||||
}
|
||||
@ -101,6 +105,8 @@ public class AddAndDeleteAISO extends AbstractSeleniumTestCase {
|
||||
if (selenium.isVisible("after_action_info_container_on_top"))
|
||||
break;
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error checking visibility after test completion for iso: " + e.getLocalizedMessage());
|
||||
}
|
||||
Thread.sleep(1000);
|
||||
}
|
||||
|
||||
@ -56,6 +56,8 @@ public class AddAndDeleteATemplate extends AbstractSeleniumTestCase {
|
||||
selenium.click("//div[" + i + "]/div/div[2]/span/span");
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error during clicking test on template: " + e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
for (int second = 0;; second++) {
|
||||
@ -65,6 +67,8 @@ public class AddAndDeleteATemplate extends AbstractSeleniumTestCase {
|
||||
if (selenium.isVisible("//div[@id='after_action_info_container_on_top']"))
|
||||
break;
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error during visibility test of template: " + e.getLocalizedMessage());
|
||||
}
|
||||
Thread.sleep(10000);
|
||||
}
|
||||
@ -101,6 +105,8 @@ public class AddAndDeleteATemplate extends AbstractSeleniumTestCase {
|
||||
if (selenium.isVisible("after_action_info_container_on_top"))
|
||||
break;
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error checking visibility after test completion for template: " + e.getLocalizedMessage());
|
||||
}
|
||||
Thread.sleep(1000);
|
||||
}
|
||||
|
||||
@ -48,6 +48,8 @@ public class UIScenarioTest extends AbstractSeleniumTestCase {
|
||||
if (selenium.isVisible("//div/p[@id='after_action_info']"))
|
||||
break;
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error during visibility test after start vm: " + e.getLocalizedMessage());
|
||||
}
|
||||
Thread.sleep(10000);
|
||||
}
|
||||
@ -64,6 +66,8 @@ public class UIScenarioTest extends AbstractSeleniumTestCase {
|
||||
if (selenium.isVisible("//div/p[@id='after_action_info']"))
|
||||
break;
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error during visibility test after stop vm: " + e.getLocalizedMessage());
|
||||
}
|
||||
Thread.sleep(10000);
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ public class ConsoleProxy implements Runnable {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
|
||||
s_logger.debug("[ignored] interupted.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -82,7 +82,8 @@ public class IpSqlGenerator {
|
||||
out.close();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
s_logger.info("[ignored]"
|
||||
+ "error during ip insert generator: " + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,7 +42,8 @@ public class SqlDataGenerator {
|
||||
out.flush();
|
||||
out.close();
|
||||
} catch (Exception e) {
|
||||
|
||||
s_logger.info("[ignored]"
|
||||
+ "error during sql generation: " + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -197,6 +197,8 @@ public class TestClient {
|
||||
String url = server + "?email=" + username + "&password=" + username + "&command=stop";
|
||||
client.executeMethod(new GetMethod(url));
|
||||
} catch (Exception e1) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error while executing last resort stop attampt: " + e1.getLocalizedMessage());
|
||||
}
|
||||
} finally {
|
||||
NDC.clear();
|
||||
|
||||
@ -34,9 +34,11 @@ import java.security.spec.RSAPublicKeySpec;
|
||||
import javax.crypto.Cipher;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
||||
|
||||
public class RSAHelper {
|
||||
final static Logger s_logger = Logger.getLogger(RSAHelper.class);
|
||||
|
||||
static {
|
||||
BouncyCastleProvider provider = new BouncyCastleProvider();
|
||||
@ -79,6 +81,8 @@ public class RSAHelper {
|
||||
byte[] encrypted = cipher.doFinal(content.getBytes());
|
||||
returnString = Base64.encodeBase64String(encrypted);
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error during public key encryption: " + e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
return returnString;
|
||||
|
||||
@ -95,10 +95,7 @@ public class InaccurateClock extends StandardMBean implements InaccurateClockMBe
|
||||
try {
|
||||
time = System.currentTimeMillis();
|
||||
} catch (Throwable th) {
|
||||
try {
|
||||
s_logger.error("Unable to time", th);
|
||||
} catch (Throwable th2) {
|
||||
}
|
||||
s_logger.error("Unable to time", th);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1333,6 +1333,7 @@ public class HypervisorHostHelper {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while waiting to config vm.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -16,6 +16,8 @@
|
||||
// under the License.
|
||||
package com.cloud.hypervisor.vmware.mo;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.vmware.vim25.LocalizableMessage;
|
||||
import com.vmware.vim25.LocalizedMethodFault;
|
||||
import com.vmware.vim25.ManagedObjectReference;
|
||||
@ -25,6 +27,7 @@ import com.vmware.vim25.TaskInfoState;
|
||||
import com.cloud.hypervisor.vmware.util.VmwareContext;
|
||||
|
||||
public class TaskMO extends BaseMO {
|
||||
private static final Logger s_logger = Logger.getLogger(TaskMO.class);
|
||||
public TaskMO(VmwareContext context, ManagedObjectReference morTask) {
|
||||
super(context, morTask);
|
||||
}
|
||||
@ -68,6 +71,8 @@ public class TaskMO extends BaseMO {
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "error retrieving failure info for task : " + e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
|
||||
@ -243,6 +243,7 @@ public class VirtualMachineMO extends BaseMO {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while dealing with vm questions.");
|
||||
}
|
||||
}
|
||||
s_logger.info("VM Question monitor stopped");
|
||||
@ -289,6 +290,7 @@ public class VirtualMachineMO extends BaseMO {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while powering of vm.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -321,6 +323,7 @@ public class VirtualMachineMO extends BaseMO {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while powering of vm unconditionaly.");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@ -354,6 +357,7 @@ public class VirtualMachineMO extends BaseMO {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while pausing after power off.");
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
@ -477,6 +481,7 @@ public class VirtualMachineMO extends BaseMO {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while waiting for snapshot to be done.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1405,6 +1410,7 @@ public class VirtualMachineMO extends BaseMO {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while handling vm question about iso detach.");
|
||||
}
|
||||
}
|
||||
s_logger.info("VM Question monitor stopped");
|
||||
@ -2572,6 +2578,7 @@ public class VirtualMachineMO extends BaseMO {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
s_logger.debug("[ignored] interupted while handling vm question about umount tools install.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -16,6 +16,22 @@
|
||||
// under the License.
|
||||
package com.cloud.hypervisor.vmware.util;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import javax.net.ssl.HostnameVerifier;
|
||||
import javax.net.ssl.HttpsURLConnection;
|
||||
import javax.net.ssl.SSLSession;
|
||||
import javax.xml.ws.BindingProvider;
|
||||
import javax.xml.ws.WebServiceException;
|
||||
import javax.xml.ws.handler.MessageContext;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.vmware.vim25.DynamicProperty;
|
||||
import com.vmware.vim25.InvalidCollectorVersionFaultMsg;
|
||||
import com.vmware.vim25.InvalidPropertyFaultMsg;
|
||||
@ -38,22 +54,9 @@ import com.vmware.vim25.TraversalSpec;
|
||||
import com.vmware.vim25.UpdateSet;
|
||||
import com.vmware.vim25.VimPortType;
|
||||
import com.vmware.vim25.VimService;
|
||||
|
||||
import org.apache.cloudstack.utils.security.SSLUtils;
|
||||
import org.apache.cloudstack.utils.security.SecureSSLSocketFactory;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import javax.net.ssl.HostnameVerifier;
|
||||
import javax.net.ssl.HttpsURLConnection;
|
||||
import javax.net.ssl.SSLSession;
|
||||
import javax.xml.ws.BindingProvider;
|
||||
import javax.xml.ws.WebServiceException;
|
||||
import javax.xml.ws.handler.MessageContext;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
/**
|
||||
* A wrapper class to handle Vmware vsphere connection and disconnection.
|
||||
@ -95,6 +98,8 @@ public class VmwareClient {
|
||||
|
||||
vimService = new VimService();
|
||||
} catch (Exception e) {
|
||||
s_logger.info("[ignored]"
|
||||
+ "failed to trust all certificates blindly: " + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -632,6 +632,7 @@ public class VmwareContext {
|
||||
try {
|
||||
Thread.sleep(CONNECT_RETRY_INTERVAL);
|
||||
} catch (InterruptedException ex) {
|
||||
s_logger.debug("[ignored] interupted while connecting.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -653,7 +653,8 @@ public class VmwareHelper {
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
|
||||
s_logger.info("[ignored]"
|
||||
+ "failed toi get message for exception: " + e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
return ExceptionUtil.toString(e, printStack);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user