mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fix some log messages that do not match with their function (#2796)
This commit is contained in:
parent
f867f4a7c6
commit
e57003f93f
@ -52,8 +52,7 @@ public class VirtualMachinePowerStateSyncImpl implements VirtualMachinePowerStat
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void processHostVmStateReport(long hostId, Map<String, HostVmStateReportEntry> report) {
|
public void processHostVmStateReport(long hostId, Map<String, HostVmStateReportEntry> report) {
|
||||||
if (s_logger.isDebugEnabled())
|
s_logger.debug("Process host VM state report. host: " + hostId);
|
||||||
s_logger.debug("Process host VM state report from ping process. host: " + hostId);
|
|
||||||
|
|
||||||
Map<Long, VirtualMachine.PowerState> translatedInfo = convertVmStateReport(report);
|
Map<Long, VirtualMachine.PowerState> translatedInfo = convertVmStateReport(report);
|
||||||
processReport(hostId, translatedInfo);
|
processReport(hostId, translatedInfo);
|
||||||
|
|||||||
@ -169,7 +169,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
|
|||||||
txn.commit();
|
txn.commit();
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
txn.rollback();
|
txn.rollback();
|
||||||
s_logger.error("error saving account to cloud_usage db", ex);
|
s_logger.error("error updating account to cloud_usage db", ex);
|
||||||
throw new CloudRuntimeException(ex.getMessage());
|
throw new CloudRuntimeException(ex.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -237,7 +237,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
|
|||||||
txn.commit();
|
txn.commit();
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
txn.rollback();
|
txn.rollback();
|
||||||
s_logger.error("error saving user stats to cloud_usage db", ex);
|
s_logger.error("error updating user stats to cloud_usage db", ex);
|
||||||
throw new CloudRuntimeException(ex.getMessage());
|
throw new CloudRuntimeException(ex.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -340,7 +340,7 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
|
|||||||
txn.commit();
|
txn.commit();
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
txn.rollback();
|
txn.rollback();
|
||||||
s_logger.error("error saving vm disk stats to cloud_usage db", ex);
|
s_logger.error("error updating vm disk stats to cloud_usage db", ex);
|
||||||
throw new CloudRuntimeException(ex.getMessage());
|
throw new CloudRuntimeException(ex.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -375,8 +375,8 @@ public class XenServerStorageProcessor implements StorageProcessor {
|
|||||||
isoURL = iso.getName();
|
isoURL = iso.getName();
|
||||||
} else {
|
} else {
|
||||||
if (!(store instanceof NfsTO)) {
|
if (!(store instanceof NfsTO)) {
|
||||||
s_logger.debug("Can't attach a iso which is not created on nfs: ");
|
s_logger.debug("Can't detach a iso which is not created on nfs: ");
|
||||||
return new AttachAnswer("Can't attach a iso which is not created on nfs: ");
|
return new AttachAnswer("Can't detach a iso which is not created on nfs: ");
|
||||||
}
|
}
|
||||||
final NfsTO nfsStore = (NfsTO) store;
|
final NfsTO nfsStore = (NfsTO) store;
|
||||||
isoURL = nfsStore.getUrl() + nfsStore.getPathSeparator() + data.getPath();
|
isoURL = nfsStore.getUrl() + nfsStore.getPathSeparator() + data.getPath();
|
||||||
@ -417,11 +417,11 @@ public class XenServerStorageProcessor implements StorageProcessor {
|
|||||||
|
|
||||||
return new DettachAnswer(disk);
|
return new DettachAnswer(disk);
|
||||||
} catch (final XenAPIException e) {
|
} catch (final XenAPIException e) {
|
||||||
final String msg = "Failed to dettach volume" + " for uuid: " + data.getPath() + " due to " + e.toString();
|
final String msg = "Failed to detach volume" + " for uuid: " + data.getPath() + " due to " + e.toString();
|
||||||
s_logger.warn(msg, e);
|
s_logger.warn(msg, e);
|
||||||
return new DettachAnswer(msg);
|
return new DettachAnswer(msg);
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
final String msg = "Failed to dettach volume" + " for uuid: " + data.getPath() + " due to " + e.getMessage();
|
final String msg = "Failed to detach volume" + " for uuid: " + data.getPath() + " due to " + e.getMessage();
|
||||||
s_logger.warn(msg, e);
|
s_logger.warn(msg, e);
|
||||||
return new DettachAnswer(msg);
|
return new DettachAnswer(msg);
|
||||||
}
|
}
|
||||||
@ -1775,7 +1775,7 @@ public class XenServerStorageProcessor implements StorageProcessor {
|
|||||||
vdi.forget(conn);
|
vdi.forget(conn);
|
||||||
return new IntroduceObjectAnswer(cmd.getDataTO());
|
return new IntroduceObjectAnswer(cmd.getDataTO());
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
s_logger.debug("Failed to introduce object", e);
|
s_logger.debug("Failed to forget object", e);
|
||||||
return new Answer(cmd, false, e.toString());
|
return new Answer(cmd, false, e.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -389,7 +389,7 @@ public class NetScalerControlCenterResource implements ServerResource {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (shouldRetry(numRetries)) {
|
if (shouldRetry(numRetries)) {
|
||||||
s_logger.debug("Retrying the command NetScalerImplementNetworkCommand retry count: " + numRetries );
|
s_logger.debug("Retrying the command NetScalerImplementNetworkCommand retry count: " + numRetries, e);
|
||||||
return retry(cmd, numRetries);
|
return retry(cmd, numRetries);
|
||||||
} else {
|
} else {
|
||||||
return new Answer(cmd, false, e.getMessage());
|
return new Answer(cmd, false, e.getMessage());
|
||||||
@ -397,7 +397,7 @@ public class NetScalerControlCenterResource implements ServerResource {
|
|||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if (shouldRetry(numRetries)) {
|
if (shouldRetry(numRetries)) {
|
||||||
s_logger.debug("Retrying the command NetScalerImplementNetworkCommand retry count: " + numRetries );
|
s_logger.debug("Retrying the command NetScalerImplementNetworkCommand retry count: " + numRetries, e);
|
||||||
return retry(cmd, numRetries);
|
return retry(cmd, numRetries);
|
||||||
} else {
|
} else {
|
||||||
return new Answer(cmd, false, e.getMessage());
|
return new Answer(cmd, false, e.getMessage());
|
||||||
|
|||||||
@ -175,7 +175,7 @@ public abstract class Action {
|
|||||||
String errorMessage = responseToErrorMessage(putMethod);
|
String errorMessage = responseToErrorMessage(putMethod);
|
||||||
putMethod.releaseConnection();
|
putMethod.releaseConnection();
|
||||||
s_logger.error("Failed to update object : " + errorMessage);
|
s_logger.error("Failed to update object : " + errorMessage);
|
||||||
throw new NeutronRestApiException("Failed to create object : " + errorMessage);
|
throw new NeutronRestApiException("Failed to update object : " + errorMessage);
|
||||||
}
|
}
|
||||||
} catch (NeutronRestApiException e) {
|
} catch (NeutronRestApiException e) {
|
||||||
s_logger.error("NeutronRestApiException caught while trying to execute HTTP Method on the Neutron Controller", e);
|
s_logger.error("NeutronRestApiException caught while trying to execute HTTP Method on the Neutron Controller", e);
|
||||||
@ -207,7 +207,7 @@ public abstract class Action {
|
|||||||
String errorMessage = responseToErrorMessage(putMethod);
|
String errorMessage = responseToErrorMessage(putMethod);
|
||||||
putMethod.releaseConnection();
|
putMethod.releaseConnection();
|
||||||
s_logger.error("Failed to update object : " + errorMessage);
|
s_logger.error("Failed to update object : " + errorMessage);
|
||||||
throw new NeutronRestApiException("Failed to create object : " + errorMessage);
|
throw new NeutronRestApiException("Failed to update object : " + errorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
return putMethod.getResponseBodyAsString();
|
return putMethod.getResponseBodyAsString();
|
||||||
@ -244,8 +244,8 @@ public abstract class Action {
|
|||||||
if (deleteMethod.getStatusCode() != HttpStatus.SC_NO_CONTENT) {
|
if (deleteMethod.getStatusCode() != HttpStatus.SC_NO_CONTENT) {
|
||||||
String errorMessage = responseToErrorMessage(deleteMethod);
|
String errorMessage = responseToErrorMessage(deleteMethod);
|
||||||
deleteMethod.releaseConnection();
|
deleteMethod.releaseConnection();
|
||||||
s_logger.error("Failed to update object : " + errorMessage);
|
s_logger.error("Failed to delete object : " + errorMessage);
|
||||||
throw new NeutronRestApiException("Failed to create object : " + errorMessage);
|
throw new NeutronRestApiException("Failed to delete object : " + errorMessage);
|
||||||
}
|
}
|
||||||
} catch (NeutronRestApiException e) {
|
} catch (NeutronRestApiException e) {
|
||||||
s_logger.error("NeutronRestApiException caught while trying to execute HTTP Method on the Neutron Controller", e);
|
s_logger.error("NeutronRestApiException caught while trying to execute HTTP Method on the Neutron Controller", e);
|
||||||
|
|||||||
@ -513,7 +513,7 @@ StaticNatServiceProvider, IpDeployer {
|
|||||||
final List<DomainRouterVO> routers = _routerDao.listByNetworkAndRole(
|
final List<DomainRouterVO> routers = _routerDao.listByNetworkAndRole(
|
||||||
network.getId(), Role.VIRTUAL_ROUTER);
|
network.getId(), Role.VIRTUAL_ROUTER);
|
||||||
if (routers == null || routers.isEmpty()) {
|
if (routers == null || routers.isEmpty()) {
|
||||||
s_logger.debug("Virtual router elemnt doesn't need to apply firewall rules on the backend; virtual "
|
s_logger.debug("Virtual router elemnt doesn't need to apply load balancing rules on the backend; virtual "
|
||||||
+ "router doesn't exist in the network "
|
+ "router doesn't exist in the network "
|
||||||
+ network.getId());
|
+ network.getId());
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -132,7 +132,7 @@ public class OvsGuestNetworkGuru extends GuestNetworkGuru {
|
|||||||
.findById(physicalNetworkId);
|
.findById(physicalNetworkId);
|
||||||
|
|
||||||
if (!canHandle(offering, nwType, physnet)) {
|
if (!canHandle(offering, nwType, physnet)) {
|
||||||
s_logger.debug("Refusing to design this network");
|
s_logger.debug("Refusing to implement this network");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
NetworkVO implemented = (NetworkVO)super.implement(network, offering,
|
NetworkVO implemented = (NetworkVO)super.implement(network, offering,
|
||||||
|
|||||||
@ -576,7 +576,7 @@ public class OvsTunnelManagerImpl extends ManagerBase implements OvsTunnelManage
|
|||||||
Answer[] answers = _agentMgr.send(hostId, cmds);
|
Answer[] answers = _agentMgr.send(hostId, cmds);
|
||||||
handleSetupBridgeAnswer(answers);
|
handleSetupBridgeAnswer(answers);
|
||||||
} catch (OperationTimedoutException | AgentUnavailableException e) {
|
} catch (OperationTimedoutException | AgentUnavailableException e) {
|
||||||
s_logger.warn("Ovs Tunnel network created tunnel failed", e);
|
s_logger.warn("Ovs Tunnel network created bridge failed", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// now that bridge is setup, populate network acl's before the VM gets created
|
// now that bridge is setup, populate network acl's before the VM gets created
|
||||||
|
|||||||
@ -295,7 +295,7 @@ public class SAMLUtils {
|
|||||||
X509EncodedKeySpec spec = keyFactory.getKeySpec(key, X509EncodedKeySpec.class);
|
X509EncodedKeySpec spec = keyFactory.getKeySpec(key, X509EncodedKeySpec.class);
|
||||||
return new String(org.bouncycastle.util.encoders.Base64.encode(spec.getEncoded()), Charset.forName("UTF-8"));
|
return new String(org.bouncycastle.util.encoders.Base64.encode(spec.getEncoded()), Charset.forName("UTF-8"));
|
||||||
} catch (InvalidKeySpecException e) {
|
} catch (InvalidKeySpecException e) {
|
||||||
s_logger.error("Unable to create KeyFactory:" + e.getMessage());
|
s_logger.error("Unable to get KeyFactory:" + e.getMessage());
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -313,7 +313,7 @@ public class SAMLUtils {
|
|||||||
PKCS8EncodedKeySpec.class);
|
PKCS8EncodedKeySpec.class);
|
||||||
return new String(org.bouncycastle.util.encoders.Base64.encode(spec.getEncoded()), Charset.forName("UTF-8"));
|
return new String(org.bouncycastle.util.encoders.Base64.encode(spec.getEncoded()), Charset.forName("UTF-8"));
|
||||||
} catch (InvalidKeySpecException e) {
|
} catch (InvalidKeySpecException e) {
|
||||||
s_logger.error("Unable to create KeyFactory:" + e.getMessage());
|
s_logger.error("Unable to get KeyFactory:" + e.getMessage());
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -332,7 +332,7 @@ public class SAMLUtils {
|
|||||||
try {
|
try {
|
||||||
return keyFactory.generatePublic(x509KeySpec);
|
return keyFactory.generatePublic(x509KeySpec);
|
||||||
} catch (InvalidKeySpecException e) {
|
} catch (InvalidKeySpecException e) {
|
||||||
s_logger.error("Unable to create PrivateKey from privateKey string:" + e.getMessage());
|
s_logger.error("Unable to create PublicKey from PublicKey string:" + e.getMessage());
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1003,7 +1003,7 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
|
|||||||
try {
|
try {
|
||||||
success = success && applyIngressFirewallRules(ipId, _accountMgr.getSystemAccount());
|
success = success && applyIngressFirewallRules(ipId, _accountMgr.getSystemAccount());
|
||||||
} catch (ResourceUnavailableException ex) {
|
} catch (ResourceUnavailableException ex) {
|
||||||
s_logger.warn("Failed to apply port forwarding rules for ip id=" + ipId);
|
s_logger.warn("Failed to apply firewall rules for ip id=" + ipId);
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -770,8 +770,8 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
|
|||||||
} else if (router.getState() == State.Stopped) {
|
} else if (router.getState() == State.Stopped) {
|
||||||
s_logger.debug("Router " + router + " is in Stopped state, not sending deleteRemoteAccessVpn command to it");
|
s_logger.debug("Router " + router + " is in Stopped state, not sending deleteRemoteAccessVpn command to it");
|
||||||
} else {
|
} else {
|
||||||
s_logger.warn("Failed to delete remote access VPN: domR " + router + " is not in right state " + router.getState());
|
s_logger.warn("Failed to stop remote access VPN: domR " + router + " is not in right state " + router.getState());
|
||||||
throw new ResourceUnavailableException("Failed to delete remote access VPN: domR is not in right state " + router.getState(), DataCenter.class,
|
throw new ResourceUnavailableException("Failed to stop remote access VPN: domR is not in right state " + router.getState(), DataCenter.class,
|
||||||
router.getDataCenterId());
|
router.getDataCenterId());
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -2496,9 +2496,7 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager,
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s_logger.isDebugEnabled()) {
|
s_logger.debug("Propagating resource request event:" + event.toString() + " to agent:" + agentId);
|
||||||
s_logger.debug("Propagating agent change request event:" + event.toString() + " to agent:" + agentId);
|
|
||||||
}
|
|
||||||
final Command[] cmds = new Command[1];
|
final Command[] cmds = new Command[1];
|
||||||
cmds[0] = new PropagateResourceEventCommand(agentId, event);
|
cmds[0] = new PropagateResourceEventCommand(agentId, event);
|
||||||
|
|
||||||
|
|||||||
@ -329,15 +329,15 @@ public class CAManagerImpl extends ManagerBase implements CAManager {
|
|||||||
try {
|
try {
|
||||||
certificate.checkValidity(now.plusDays(CertExpiryAlertPeriod.valueIn(host.getClusterId())).toDate());
|
certificate.checkValidity(now.plusDays(CertExpiryAlertPeriod.valueIn(host.getClusterId())).toDate());
|
||||||
} catch (final CertificateExpiredException | CertificateNotYetValidException e) {
|
} catch (final CertificateExpiredException | CertificateNotYetValidException e) {
|
||||||
LOG.warn("Certificate is going to expire for " + hostDescription);
|
LOG.warn("Certificate is going to expire for " + hostDescription, e);
|
||||||
if (AutomaticCertRenewal.valueIn(host.getClusterId())) {
|
if (AutomaticCertRenewal.valueIn(host.getClusterId())) {
|
||||||
try {
|
try {
|
||||||
LOG.debug("Attempting certificate auto-renewal for " + hostDescription);
|
LOG.debug("Attempting certificate auto-renewal for " + hostDescription, e);
|
||||||
boolean result = caManager.provisionCertificate(host, false, null);
|
boolean result = caManager.provisionCertificate(host, false, null);
|
||||||
if (result) {
|
if (result) {
|
||||||
LOG.debug("Succeeded in auto-renewing certificate for " + hostDescription);
|
LOG.debug("Succeeded in auto-renewing certificate for " + hostDescription, e);
|
||||||
} else {
|
} else {
|
||||||
LOG.debug("Failed in auto-renewing certificate for " + hostDescription);
|
LOG.debug("Failed in auto-renewing certificate for " + hostDescription, e);
|
||||||
}
|
}
|
||||||
} catch (final Throwable ex) {
|
} catch (final Throwable ex) {
|
||||||
LOG.warn("Failed to auto-renew certificate for " + hostDescription + ", with error=", ex);
|
LOG.warn("Failed to auto-renew certificate for " + hostDescription + ", with error=", ex);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user