[jira] [Commented] (CLOUDSTACK-10357) Log messages that do not match with their method function

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16444700#comment-16444700
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10357:
-

blueorangutan commented on issue #2580: CLOUDSTACK-10357 Improve log messages 
that do not match with their method function
URL: https://github.com/apache/cloudstack/pull/2580#issuecomment-382863109
 
 
   Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1961


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Log messages that do not match with their method function
> -
>
> Key: CLOUDSTACK-10357
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10357
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Zhenhao Li
>Priority: Minor
>  Labels: easyfix
>
> There are some possible copy and paste errors in the log messages (The 
> logging statement was copied from an old place to a new place, but the 
> message wasn't changed to adapt to the function of new place) which may cause 
> confusion when operators are reading the log messages. 
>  
> Here is a list of the related logging statements:
> *1. s_logger.debug("Failed to attach volume: " + vol.getPath() + ", due to ", 
> e);*
>       *Callsites:*
>  * _com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.*attachVolume()*,_
>  * com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.*dettachVolume()* 
>  
> *2. s_logger.debug("Failed to retrive the default label for management 
> traffic:" + "zone: " ...*
>       *Callsites:*
>  * com.cloud.network.NetworkModelImpl.*getDefaultManagementTrafficLabel()*,
>  * com.cloud.network.NetworkModelImpl.*getDefaultGuestTrafficLabel()*
>  
> *3. s_logger.error("Can not find the groupid " + groupId + " for scaling 
> up");*
>       *Callsites:*
>  * _com.cloud.network.as.AutoScaleManagerImpl.*doScaleDown()*,_
>  * com.cloud.network.as.AutoScaleManagerImpl.*doScaleUp()*
>  
> *4. s_logger.warn("No DNS entry found during configuration of 
> NfsSecondaryStorage");*
>       *Callsites:*
>  * _com.cloud.agent.resource.consoleproxy.*ConsoleProxyResource*.configure(),_
>  * 
> org.apache.cloudstack.storage.resource.*NfsSecondaryStorageResource*.configure()
>  
> *5. s_logger.trace("vCenter API trace - searchDatastore() done");*
>       *Callsites:*
>  * 
> com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO.*searchDatastoreSubFolders()*,
>  * com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO.*searchDatastore()*
>  
> *6. s_logger.trace("vCenter API trace - detachIso() done(failed)");*
>       *Callsites:*
>  * com.cloud.hypervisor.vmware.mo.VirtualMachineMO.*detachIso()*,
>  * com.cloud.hypervisor.vmware.mo.VirtualMachineMO.*attachIso()*
>  
> *7. s_logger.warn(String.format("unable to add baremetal RCT[%s]" ...*
>       *Callsites:*
>  * org.apache.cloudstack.api.*AddBaremetalRctCmd*.execute(),
>  * org.apache.cloudstack.api.*DeleteBaremetalRctCmd*.execute(),
>  
> *8. s_logger.debug("POST request to " + agentUri.toString() + " with contents 
> " + logMessage);*
>       *Callsites:*
>  * 
> com.cloud.network.resource.NetScalerControlCenterResource.*postHttpRequest()*,
>  * 
> com.cloud.network.resource.NetScalerControlCenterResource.*getHttpRequest()*,
>  
> *9. LOG.error("Failed to remove group due to:", e);*
>       *Callsites:*
>  * _org.apache.cloudstack.cloudian.client.CloudianClient.*removeGroup()*,_
>  * org.apache.cloudstack.cloudian.client.CloudianClient.*updateGroup()*
>  
> *10. s_logger.warn("Unable to initialize inaccurate clock", e);*
>       *Callsites:*
>  * com.cloud.utils.time.*InaccurateClock*.InaccurateClock(),
>  * com.cloud.network.resource.*NuageVspResource*.stop()
>  
> *11. s_logger.error("listVmDetails:Exception:" + e.getMessage());*
>       *Callsites:*
>  * _com.cloud.vm.dao.UserVmDaoImpl.*listVmDetails()*,_
>  * com.cloud.vm.dao.UserVmDaoImpl.*listPodIdsHavingVmsforAccount()*
>  
> *12. s_logger.error("Unable to dedicate host due to " + e.getMessage(), e);*
>       *Callsites:*
>  * 
> org.apache.cloudstack.dedicated.DedicatedResourceManagerImpl.*dedicateHost()*,
>  * 
> org.apache.cloudstack.dedicated.DedicatedResourceManagerImpl.*dedicateCluster()*
>  
>  
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-10357) Log messages that do not match with their method function

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16444636#comment-16444636
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10357:
-

blueorangutan commented on issue #2580: CLOUDSTACK-10357 Improve log messages 
that do not match with their method function
URL: https://github.com/apache/cloudstack/pull/2580#issuecomment-382846830
 
 
   @lzh3636 a Jenkins job has been kicked to build packages. I'll keep you 
posted as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Log messages that do not match with their method function
> -
>
> Key: CLOUDSTACK-10357
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10357
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Zhenhao Li
>Priority: Minor
>  Labels: easyfix
>
> There are some possible copy and paste errors in the log messages (The 
> logging statement was copied from an old place to a new place, but the 
> message wasn't changed to adapt to the function of new place) which may cause 
> confusion when operators are reading the log messages. 
>  
> Here is a list of the related logging statements:
> *1. s_logger.debug("Failed to attach volume: " + vol.getPath() + ", due to ", 
> e);*
>       *Callsites:*
>  * _com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.*attachVolume()*,_
>  * com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.*dettachVolume()* 
>  
> *2. s_logger.debug("Failed to retrive the default label for management 
> traffic:" + "zone: " ...*
>       *Callsites:*
>  * com.cloud.network.NetworkModelImpl.*getDefaultManagementTrafficLabel()*,
>  * com.cloud.network.NetworkModelImpl.*getDefaultGuestTrafficLabel()*
>  
> *3. s_logger.error("Can not find the groupid " + groupId + " for scaling 
> up");*
>       *Callsites:*
>  * _com.cloud.network.as.AutoScaleManagerImpl.*doScaleDown()*,_
>  * com.cloud.network.as.AutoScaleManagerImpl.*doScaleUp()*
>  
> *4. s_logger.warn("No DNS entry found during configuration of 
> NfsSecondaryStorage");*
>       *Callsites:*
>  * _com.cloud.agent.resource.consoleproxy.*ConsoleProxyResource*.configure(),_
>  * 
> org.apache.cloudstack.storage.resource.*NfsSecondaryStorageResource*.configure()
>  
> *5. s_logger.trace("vCenter API trace - searchDatastore() done");*
>       *Callsites:*
>  * 
> com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO.*searchDatastoreSubFolders()*,
>  * com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO.*searchDatastore()*
>  
> *6. s_logger.trace("vCenter API trace - detachIso() done(failed)");*
>       *Callsites:*
>  * com.cloud.hypervisor.vmware.mo.VirtualMachineMO.*detachIso()*,
>  * com.cloud.hypervisor.vmware.mo.VirtualMachineMO.*attachIso()*
>  
> *7. s_logger.warn(String.format("unable to add baremetal RCT[%s]" ...*
>       *Callsites:*
>  * org.apache.cloudstack.api.*AddBaremetalRctCmd*.execute(),
>  * org.apache.cloudstack.api.*DeleteBaremetalRctCmd*.execute(),
>  
> *8. s_logger.debug("POST request to " + agentUri.toString() + " with contents 
> " + logMessage);*
>       *Callsites:*
>  * 
> com.cloud.network.resource.NetScalerControlCenterResource.*postHttpRequest()*,
>  * 
> com.cloud.network.resource.NetScalerControlCenterResource.*getHttpRequest()*,
>  
> *9. LOG.error("Failed to remove group due to:", e);*
>       *Callsites:*
>  * _org.apache.cloudstack.cloudian.client.CloudianClient.*removeGroup()*,_
>  * org.apache.cloudstack.cloudian.client.CloudianClient.*updateGroup()*
>  
> *10. s_logger.warn("Unable to initialize inaccurate clock", e);*
>       *Callsites:*
>  * com.cloud.utils.time.*InaccurateClock*.InaccurateClock(),
>  * com.cloud.network.resource.*NuageVspResource*.stop()
>  
> *11. s_logger.error("listVmDetails:Exception:" + e.getMessage());*
>       *Callsites:*
>  * _com.cloud.vm.dao.UserVmDaoImpl.*listVmDetails()*,_
>  * com.cloud.vm.dao.UserVmDaoImpl.*listPodIdsHavingVmsforAccount()*
>  
> *12. s_logger.error("Unable to dedicate host due to " + e.getMessage(), e);*
>       *Callsites:*
>  * 
> org.apache.cloudstack.dedicated.DedicatedResourceManagerImpl.*dedicateHost()*,
>  * 
> org.apache.cloudstack.dedicated.DedicatedResourceManagerImpl.*dedicateCluster()*
>  
>  
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-10357) Log messages that do not match with their method function

2018-04-19 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16444635#comment-16444635
 ] 

ASF subversion and git services commented on CLOUDSTACK-10357:
--

Commit fed3492b57625f415df556b5e2e44efee2257f50 in cloudstack's branch 
refs/heads/master from lzh3636
[ https://gitbox.apache.org/repos/asf?p=cloudstack.git;h=fed3492 ]

CLOUDSTACK-10357: Improve log messages in methods (#2580)

Fix several logs that mismatch method.
Add stacktraces for throw new statements.

> Log messages that do not match with their method function
> -
>
> Key: CLOUDSTACK-10357
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10357
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Zhenhao Li
>Priority: Minor
>  Labels: easyfix
>
> There are some possible copy and paste errors in the log messages (The 
> logging statement was copied from an old place to a new place, but the 
> message wasn't changed to adapt to the function of new place) which may cause 
> confusion when operators are reading the log messages. 
>  
> Here is a list of the related logging statements:
> *1. s_logger.debug("Failed to attach volume: " + vol.getPath() + ", due to ", 
> e);*
>       *Callsites:*
>  * _com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.*attachVolume()*,_
>  * com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.*dettachVolume()* 
>  
> *2. s_logger.debug("Failed to retrive the default label for management 
> traffic:" + "zone: " ...*
>       *Callsites:*
>  * com.cloud.network.NetworkModelImpl.*getDefaultManagementTrafficLabel()*,
>  * com.cloud.network.NetworkModelImpl.*getDefaultGuestTrafficLabel()*
>  
> *3. s_logger.error("Can not find the groupid " + groupId + " for scaling 
> up");*
>       *Callsites:*
>  * _com.cloud.network.as.AutoScaleManagerImpl.*doScaleDown()*,_
>  * com.cloud.network.as.AutoScaleManagerImpl.*doScaleUp()*
>  
> *4. s_logger.warn("No DNS entry found during configuration of 
> NfsSecondaryStorage");*
>       *Callsites:*
>  * _com.cloud.agent.resource.consoleproxy.*ConsoleProxyResource*.configure(),_
>  * 
> org.apache.cloudstack.storage.resource.*NfsSecondaryStorageResource*.configure()
>  
> *5. s_logger.trace("vCenter API trace - searchDatastore() done");*
>       *Callsites:*
>  * 
> com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO.*searchDatastoreSubFolders()*,
>  * com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO.*searchDatastore()*
>  
> *6. s_logger.trace("vCenter API trace - detachIso() done(failed)");*
>       *Callsites:*
>  * com.cloud.hypervisor.vmware.mo.VirtualMachineMO.*detachIso()*,
>  * com.cloud.hypervisor.vmware.mo.VirtualMachineMO.*attachIso()*
>  
> *7. s_logger.warn(String.format("unable to add baremetal RCT[%s]" ...*
>       *Callsites:*
>  * org.apache.cloudstack.api.*AddBaremetalRctCmd*.execute(),
>  * org.apache.cloudstack.api.*DeleteBaremetalRctCmd*.execute(),
>  
> *8. s_logger.debug("POST request to " + agentUri.toString() + " with contents 
> " + logMessage);*
>       *Callsites:*
>  * 
> com.cloud.network.resource.NetScalerControlCenterResource.*postHttpRequest()*,
>  * 
> com.cloud.network.resource.NetScalerControlCenterResource.*getHttpRequest()*,
>  
> *9. LOG.error("Failed to remove group due to:", e);*
>       *Callsites:*
>  * _org.apache.cloudstack.cloudian.client.CloudianClient.*removeGroup()*,_
>  * org.apache.cloudstack.cloudian.client.CloudianClient.*updateGroup()*
>  
> *10. s_logger.warn("Unable to initialize inaccurate clock", e);*
>       *Callsites:*
>  * com.cloud.utils.time.*InaccurateClock*.InaccurateClock(),
>  * com.cloud.network.resource.*NuageVspResource*.stop()
>  
> *11. s_logger.error("listVmDetails:Exception:" + e.getMessage());*
>       *Callsites:*
>  * _com.cloud.vm.dao.UserVmDaoImpl.*listVmDetails()*,_
>  * com.cloud.vm.dao.UserVmDaoImpl.*listPodIdsHavingVmsforAccount()*
>  
> *12. s_logger.error("Unable to dedicate host due to " + e.getMessage(), e);*
>       *Callsites:*
>  * 
> org.apache.cloudstack.dedicated.DedicatedResourceManagerImpl.*dedicateHost()*,
>  * 
> org.apache.cloudstack.dedicated.DedicatedResourceManagerImpl.*dedicateCluster()*
>  
>  
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-10357) Log messages that do not match with their method function

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16444634#comment-16444634
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10357:
-

rhtyd closed pull request #2580: CLOUDSTACK-10357 Improve log messages that do 
not match with their method function
URL: https://github.com/apache/cloudstack/pull/2580
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/agent/src/main/java/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java
 
b/agent/src/main/java/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java
index b3b17e7d970..fb5e32771a3 100644
--- 
a/agent/src/main/java/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java
+++ 
b/agent/src/main/java/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java
@@ -246,7 +246,7 @@ public boolean configure(String name, Map 
params) throws Configu
 }
 String internalDns1 = (String) params.get("internaldns1");
 if (internalDns1 == null) {
-s_logger.warn("No DNS entry found during configuration of 
NfsSecondaryStorage");
+s_logger.warn("No DNS entry found during configuration of 
ConsoleProxy");
 } else {
 addRouteToInternalIpOrCidr(_localgw, _eth1ip, _eth1mask, 
internalDns1);
 }
diff --git a/engine/schema/src/main/java/com/cloud/vm/dao/UserVmDaoImpl.java 
b/engine/schema/src/main/java/com/cloud/vm/dao/UserVmDaoImpl.java
index d13234d1016..10a133c5a14 100644
--- a/engine/schema/src/main/java/com/cloud/vm/dao/UserVmDaoImpl.java
+++ b/engine/schema/src/main/java/com/cloud/vm/dao/UserVmDaoImpl.java
@@ -410,7 +410,7 @@ public void saveDetails(UserVmVO vm) {
 }
 catch (Exception e)
 {
-s_logger.error("listVmDetails:Exception:" + e.getMessage());
+s_logger.error("listPodIdsHavingVmsforAccount:Exception:" + 
e.getMessage());
 }
 }
 
diff --git 
a/plugins/dedicated-resources/src/main/java/org/apache/cloudstack/dedicated/DedicatedResourceManagerImpl.java
 
b/plugins/dedicated-resources/src/main/java/org/apache/cloudstack/dedicated/DedicatedResourceManagerImpl.java
index 7cf193d49be..cd6d8cf590d 100644
--- 
a/plugins/dedicated-resources/src/main/java/org/apache/cloudstack/dedicated/DedicatedResourceManagerImpl.java
+++ 
b/plugins/dedicated-resources/src/main/java/org/apache/cloudstack/dedicated/DedicatedResourceManagerImpl.java
@@ -497,8 +497,8 @@ public boolean configure(final String name, final 
Map params) th
 }
 dedicatedResource = 
_dedicatedDao.persist(dedicatedResource);
 } catch (Exception e) {
-s_logger.error("Unable to dedicate host due to " + 
e.getMessage(), e);
-throw new CloudRuntimeException("Failed to dedicate 
cluster. Please contact Cloud Support.");
+s_logger.error("Unable to dedicate cluster due to " + 
e.getMessage(), e);
+throw new CloudRuntimeException("Failed to dedicate 
cluster. Please contact Cloud Support.", e);
 }
 
 List result = new 
ArrayList();
@@ -595,7 +595,7 @@ public boolean configure(final String name, final 
Map params) th
 dedicatedResource = 
_dedicatedDao.persist(dedicatedResource);
 } catch (Exception e) {
 s_logger.error("Unable to dedicate host due to " + 
e.getMessage(), e);
-throw new CloudRuntimeException("Failed to dedicate host. 
Please contact Cloud Support.");
+throw new CloudRuntimeException("Failed to dedicate host. 
Please contact Cloud Support.", e);
 }
 
 List result = new 
ArrayList();
diff --git 
a/plugins/hypervisors/baremetal/src/main/java/org/apache/cloudstack/api/DeleteBaremetalRctCmd.java
 
b/plugins/hypervisors/baremetal/src/main/java/org/apache/cloudstack/api/DeleteBaremetalRctCmd.java
index f1c84231e76..8157c751e0f 100644
--- 
a/plugins/hypervisors/baremetal/src/main/java/org/apache/cloudstack/api/DeleteBaremetalRctCmd.java
+++ 
b/plugins/hypervisors/baremetal/src/main/java/org/apache/cloudstack/api/DeleteBaremetalRctCmd.java
@@ -64,8 +64,8 @@ public void execute() throws ResourceUnavailableException, 
InsufficientCapacityE
 SuccessResponse response = new SuccessResponse(getCommandName());
 setResponseObject(response);
 } catch (Exception e) {
-s_logger.warn(String.format("unable to add baremetal RCT[%s]", 
getId()), 

[jira] [Commented] (CLOUDSTACK-10357) Log messages that do not match with their method function

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16444630#comment-16444630
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10357:
-

rhtyd commented on a change in pull request #2580: CLOUDSTACK-10357 Improve log 
messages that do not match with their method function
URL: https://github.com/apache/cloudstack/pull/2580#discussion_r182851822
 
 

 ##
 File path: 
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
 ##
 @@ -1309,10 +1309,10 @@ public Answer dettachVolume(final DettachCommand cmd) {
 
 return new DettachAnswer(disk);
 } catch (final LibvirtException e) {
-s_logger.debug("Failed to attach volume: " + vol.getPath() + ", 
due to ", e);
+s_logger.debug("Failed to dettach volume: " + vol.getPath() + ", 
due to ", e);
 
 Review comment:
   The correct spelling is `detach`.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Log messages that do not match with their method function
> -
>
> Key: CLOUDSTACK-10357
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10357
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Zhenhao Li
>Priority: Minor
>  Labels: easyfix
>
> There are some possible copy and paste errors in the log messages (The 
> logging statement was copied from an old place to a new place, but the 
> message wasn't changed to adapt to the function of new place) which may cause 
> confusion when operators are reading the log messages. 
>  
> Here is a list of the related logging statements:
> *1. s_logger.debug("Failed to attach volume: " + vol.getPath() + ", due to ", 
> e);*
>       *Callsites:*
>  * _com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.*attachVolume()*,_
>  * com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.*dettachVolume()* 
>  
> *2. s_logger.debug("Failed to retrive the default label for management 
> traffic:" + "zone: " ...*
>       *Callsites:*
>  * com.cloud.network.NetworkModelImpl.*getDefaultManagementTrafficLabel()*,
>  * com.cloud.network.NetworkModelImpl.*getDefaultGuestTrafficLabel()*
>  
> *3. s_logger.error("Can not find the groupid " + groupId + " for scaling 
> up");*
>       *Callsites:*
>  * _com.cloud.network.as.AutoScaleManagerImpl.*doScaleDown()*,_
>  * com.cloud.network.as.AutoScaleManagerImpl.*doScaleUp()*
>  
> *4. s_logger.warn("No DNS entry found during configuration of 
> NfsSecondaryStorage");*
>       *Callsites:*
>  * _com.cloud.agent.resource.consoleproxy.*ConsoleProxyResource*.configure(),_
>  * 
> org.apache.cloudstack.storage.resource.*NfsSecondaryStorageResource*.configure()
>  
> *5. s_logger.trace("vCenter API trace - searchDatastore() done");*
>       *Callsites:*
>  * 
> com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO.*searchDatastoreSubFolders()*,
>  * com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO.*searchDatastore()*
>  
> *6. s_logger.trace("vCenter API trace - detachIso() done(failed)");*
>       *Callsites:*
>  * com.cloud.hypervisor.vmware.mo.VirtualMachineMO.*detachIso()*,
>  * com.cloud.hypervisor.vmware.mo.VirtualMachineMO.*attachIso()*
>  
> *7. s_logger.warn(String.format("unable to add baremetal RCT[%s]" ...*
>       *Callsites:*
>  * org.apache.cloudstack.api.*AddBaremetalRctCmd*.execute(),
>  * org.apache.cloudstack.api.*DeleteBaremetalRctCmd*.execute(),
>  
> *8. s_logger.debug("POST request to " + agentUri.toString() + " with contents 
> " + logMessage);*
>       *Callsites:*
>  * 
> com.cloud.network.resource.NetScalerControlCenterResource.*postHttpRequest()*,
>  * 
> com.cloud.network.resource.NetScalerControlCenterResource.*getHttpRequest()*,
>  
> *9. LOG.error("Failed to remove group due to:", e);*
>       *Callsites:*
>  * _org.apache.cloudstack.cloudian.client.CloudianClient.*removeGroup()*,_
>  * org.apache.cloudstack.cloudian.client.CloudianClient.*updateGroup()*
>  
> *10. s_logger.warn("Unable to initialize inaccurate clock", e);*
>       *Callsites:*
>  * com.cloud.utils.time.*InaccurateClock*.InaccurateClock(),
>  * com.cloud.network.resource.*NuageVspResource*.stop()
>  
> *11. s_logger.error("listVmDetails:Exception:" + e.getMessage());*
>       *Callsites:*
>  * _com.cloud.vm.dao.UserVmDaoImpl.*listVmDetails()*,_
>  * com.cloud.vm.dao.UserVmDaoImpl.*listPodIdsHavingVmsforAccount()*
>  
> *12. s_logger.error("Unable to dedicate host due to " + 

[jira] [Commented] (CLOUDSTACK-10357) Log messages that do not match with their method function

2018-04-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16443105#comment-16443105
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10357:
-

blueorangutan commented on issue #2580: CLOUDSTACK-10357 Improve log messages 
that do not match with their method function
URL: https://github.com/apache/cloudstack/pull/2580#issuecomment-382510349
 
 
   Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1944


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Log messages that do not match with their method function
> -
>
> Key: CLOUDSTACK-10357
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10357
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Zhenhao Li
>Priority: Minor
>  Labels: easyfix
>
> There are some possible copy and paste errors in the log messages (The 
> logging statement was copied from an old place to a new place, but the 
> message wasn't changed to adapt to the function of new place) which may cause 
> confusion when operators are reading the log messages. 
>  
> Here is a list of the related logging statements:
> *1. s_logger.debug("Failed to attach volume: " + vol.getPath() + ", due to ", 
> e);*
>       *Callsites:*
>  * _com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.*attachVolume()*,_
>  * com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.*dettachVolume()* 
>  
> *2. s_logger.debug("Failed to retrive the default label for management 
> traffic:" + "zone: " ...*
>       *Callsites:*
>  * com.cloud.network.NetworkModelImpl.*getDefaultManagementTrafficLabel()*,
>  * com.cloud.network.NetworkModelImpl.*getDefaultGuestTrafficLabel()*
>  
> *3. s_logger.error("Can not find the groupid " + groupId + " for scaling 
> up");*
>       *Callsites:*
>  * _com.cloud.network.as.AutoScaleManagerImpl.*doScaleDown()*,_
>  * com.cloud.network.as.AutoScaleManagerImpl.*doScaleUp()*
>  
> *4. s_logger.warn("No DNS entry found during configuration of 
> NfsSecondaryStorage");*
>       *Callsites:*
>  * _com.cloud.agent.resource.consoleproxy.*ConsoleProxyResource*.configure(),_
>  * 
> org.apache.cloudstack.storage.resource.*NfsSecondaryStorageResource*.configure()
>  
> *5. s_logger.trace("vCenter API trace - searchDatastore() done");*
>       *Callsites:*
>  * 
> com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO.*searchDatastoreSubFolders()*,
>  * com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO.*searchDatastore()*
>  
> *6. s_logger.trace("vCenter API trace - detachIso() done(failed)");*
>       *Callsites:*
>  * com.cloud.hypervisor.vmware.mo.VirtualMachineMO.*detachIso()*,
>  * com.cloud.hypervisor.vmware.mo.VirtualMachineMO.*attachIso()*
>  
> *7. s_logger.warn(String.format("unable to add baremetal RCT[%s]" ...*
>       *Callsites:*
>  * org.apache.cloudstack.api.*AddBaremetalRctCmd*.execute(),
>  * org.apache.cloudstack.api.*DeleteBaremetalRctCmd*.execute(),
>  
> *8. s_logger.debug("POST request to " + agentUri.toString() + " with contents 
> " + logMessage);*
>       *Callsites:*
>  * 
> com.cloud.network.resource.NetScalerControlCenterResource.*postHttpRequest()*,
>  * 
> com.cloud.network.resource.NetScalerControlCenterResource.*getHttpRequest()*,
>  
> *9. LOG.error("Failed to remove group due to:", e);*
>       *Callsites:*
>  * _org.apache.cloudstack.cloudian.client.CloudianClient.*removeGroup()*,_
>  * org.apache.cloudstack.cloudian.client.CloudianClient.*updateGroup()*
>  
> *10. s_logger.warn("Unable to initialize inaccurate clock", e);*
>       *Callsites:*
>  * com.cloud.utils.time.*InaccurateClock*.InaccurateClock(),
>  * com.cloud.network.resource.*NuageVspResource*.stop()
>  
> *11. s_logger.error("listVmDetails:Exception:" + e.getMessage());*
>       *Callsites:*
>  * _com.cloud.vm.dao.UserVmDaoImpl.*listVmDetails()*,_
>  * com.cloud.vm.dao.UserVmDaoImpl.*listPodIdsHavingVmsforAccount()*
>  
> *12. s_logger.error("Unable to dedicate host due to " + e.getMessage(), e);*
>       *Callsites:*
>  * 
> org.apache.cloudstack.dedicated.DedicatedResourceManagerImpl.*dedicateHost()*,
>  * 
> org.apache.cloudstack.dedicated.DedicatedResourceManagerImpl.*dedicateCluster()*
>  
>  
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-10357) Log messages that do not match with their method function

2018-04-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16443090#comment-16443090
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10357:
-

lzh3636 commented on a change in pull request #2580: CLOUDSTACK-10357 Improve 
log messages that do not match with their method function
URL: https://github.com/apache/cloudstack/pull/2580#discussion_r182547786
 
 

 ##
 File path: 
plugins/hypervisors/baremetal/src/main/java/org/apache/cloudstack/api/DeleteBaremetalRctCmd.java
 ##
 @@ -64,7 +64,7 @@ public void execute() throws ResourceUnavailableException, 
InsufficientCapacityE
 SuccessResponse response = new SuccessResponse(getCommandName());
 setResponseObject(response);
 } catch (Exception e) {
-s_logger.warn(String.format("unable to add baremetal RCT[%s]", 
getId()), e);
+s_logger.warn(String.format("unable to delete baremetal RCT[%s]", 
getId()), e);
 throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, 
e.getMessage());
 
 Review comment:
   Sure, I'll do one more commit


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Log messages that do not match with their method function
> -
>
> Key: CLOUDSTACK-10357
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10357
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Zhenhao Li
>Priority: Minor
>  Labels: easyfix
>
> There are some possible copy and paste errors in the log messages (The 
> logging statement was copied from an old place to a new place, but the 
> message wasn't changed to adapt to the function of new place) which may cause 
> confusion when operators are reading the log messages. 
>  
> Here is a list of the related logging statements:
> *1. s_logger.debug("Failed to attach volume: " + vol.getPath() + ", due to ", 
> e);*
>       *Callsites:*
>  * _com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.*attachVolume()*,_
>  * com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.*dettachVolume()* 
>  
> *2. s_logger.debug("Failed to retrive the default label for management 
> traffic:" + "zone: " ...*
>       *Callsites:*
>  * com.cloud.network.NetworkModelImpl.*getDefaultManagementTrafficLabel()*,
>  * com.cloud.network.NetworkModelImpl.*getDefaultGuestTrafficLabel()*
>  
> *3. s_logger.error("Can not find the groupid " + groupId + " for scaling 
> up");*
>       *Callsites:*
>  * _com.cloud.network.as.AutoScaleManagerImpl.*doScaleDown()*,_
>  * com.cloud.network.as.AutoScaleManagerImpl.*doScaleUp()*
>  
> *4. s_logger.warn("No DNS entry found during configuration of 
> NfsSecondaryStorage");*
>       *Callsites:*
>  * _com.cloud.agent.resource.consoleproxy.*ConsoleProxyResource*.configure(),_
>  * 
> org.apache.cloudstack.storage.resource.*NfsSecondaryStorageResource*.configure()
>  
> *5. s_logger.trace("vCenter API trace - searchDatastore() done");*
>       *Callsites:*
>  * 
> com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO.*searchDatastoreSubFolders()*,
>  * com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO.*searchDatastore()*
>  
> *6. s_logger.trace("vCenter API trace - detachIso() done(failed)");*
>       *Callsites:*
>  * com.cloud.hypervisor.vmware.mo.VirtualMachineMO.*detachIso()*,
>  * com.cloud.hypervisor.vmware.mo.VirtualMachineMO.*attachIso()*
>  
> *7. s_logger.warn(String.format("unable to add baremetal RCT[%s]" ...*
>       *Callsites:*
>  * org.apache.cloudstack.api.*AddBaremetalRctCmd*.execute(),
>  * org.apache.cloudstack.api.*DeleteBaremetalRctCmd*.execute(),
>  
> *8. s_logger.debug("POST request to " + agentUri.toString() + " with contents 
> " + logMessage);*
>       *Callsites:*
>  * 
> com.cloud.network.resource.NetScalerControlCenterResource.*postHttpRequest()*,
>  * 
> com.cloud.network.resource.NetScalerControlCenterResource.*getHttpRequest()*,
>  
> *9. LOG.error("Failed to remove group due to:", e);*
>       *Callsites:*
>  * _org.apache.cloudstack.cloudian.client.CloudianClient.*removeGroup()*,_
>  * org.apache.cloudstack.cloudian.client.CloudianClient.*updateGroup()*
>  
> *10. s_logger.warn("Unable to initialize inaccurate clock", e);*
>       *Callsites:*
>  * com.cloud.utils.time.*InaccurateClock*.InaccurateClock(),
>  * com.cloud.network.resource.*NuageVspResource*.stop()
>  
> *11. s_logger.error("listVmDetails:Exception:" + e.getMessage());*
>       *Callsites:*
>  * 

[jira] [Commented] (CLOUDSTACK-10357) Log messages that do not match with their method function

2018-04-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16443081#comment-16443081
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10357:
-

rafaelweingartner commented on a change in pull request #2580: CLOUDSTACK-10357 
Improve log messages that do not match with their method function
URL: https://github.com/apache/cloudstack/pull/2580#discussion_r182544640
 
 

 ##
 File path: 
plugins/dedicated-resources/src/main/java/org/apache/cloudstack/dedicated/DedicatedResourceManagerImpl.java
 ##
 @@ -497,7 +497,7 @@ public boolean configure(final String name, final 
Map params) th
 }
 dedicatedResource = 
_dedicatedDao.persist(dedicatedResource);
 } catch (Exception e) {
-s_logger.error("Unable to dedicate host due to " + 
e.getMessage(), e);
+s_logger.error("Unable to dedicate cluster due to " + 
e.getMessage(), e);
 throw new CloudRuntimeException("Failed to dedicate 
cluster. Please contact Cloud Support.");
 
 Review comment:
   What about passing the `e` to the `CloudRuntimeException`?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Log messages that do not match with their method function
> -
>
> Key: CLOUDSTACK-10357
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10357
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Zhenhao Li
>Priority: Minor
>  Labels: easyfix
>
> There are some possible copy and paste errors in the log messages (The 
> logging statement was copied from an old place to a new place, but the 
> message wasn't changed to adapt to the function of new place) which may cause 
> confusion when operators are reading the log messages. 
>  
> Here is a list of the related logging statements:
> *1. s_logger.debug("Failed to attach volume: " + vol.getPath() + ", due to ", 
> e);*
>       *Callsites:*
>  * _com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.*attachVolume()*,_
>  * com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.*dettachVolume()* 
>  
> *2. s_logger.debug("Failed to retrive the default label for management 
> traffic:" + "zone: " ...*
>       *Callsites:*
>  * com.cloud.network.NetworkModelImpl.*getDefaultManagementTrafficLabel()*,
>  * com.cloud.network.NetworkModelImpl.*getDefaultGuestTrafficLabel()*
>  
> *3. s_logger.error("Can not find the groupid " + groupId + " for scaling 
> up");*
>       *Callsites:*
>  * _com.cloud.network.as.AutoScaleManagerImpl.*doScaleDown()*,_
>  * com.cloud.network.as.AutoScaleManagerImpl.*doScaleUp()*
>  
> *4. s_logger.warn("No DNS entry found during configuration of 
> NfsSecondaryStorage");*
>       *Callsites:*
>  * _com.cloud.agent.resource.consoleproxy.*ConsoleProxyResource*.configure(),_
>  * 
> org.apache.cloudstack.storage.resource.*NfsSecondaryStorageResource*.configure()
>  
> *5. s_logger.trace("vCenter API trace - searchDatastore() done");*
>       *Callsites:*
>  * 
> com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO.*searchDatastoreSubFolders()*,
>  * com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO.*searchDatastore()*
>  
> *6. s_logger.trace("vCenter API trace - detachIso() done(failed)");*
>       *Callsites:*
>  * com.cloud.hypervisor.vmware.mo.VirtualMachineMO.*detachIso()*,
>  * com.cloud.hypervisor.vmware.mo.VirtualMachineMO.*attachIso()*
>  
> *7. s_logger.warn(String.format("unable to add baremetal RCT[%s]" ...*
>       *Callsites:*
>  * org.apache.cloudstack.api.*AddBaremetalRctCmd*.execute(),
>  * org.apache.cloudstack.api.*DeleteBaremetalRctCmd*.execute(),
>  
> *8. s_logger.debug("POST request to " + agentUri.toString() + " with contents 
> " + logMessage);*
>       *Callsites:*
>  * 
> com.cloud.network.resource.NetScalerControlCenterResource.*postHttpRequest()*,
>  * 
> com.cloud.network.resource.NetScalerControlCenterResource.*getHttpRequest()*,
>  
> *9. LOG.error("Failed to remove group due to:", e);*
>       *Callsites:*
>  * _org.apache.cloudstack.cloudian.client.CloudianClient.*removeGroup()*,_
>  * org.apache.cloudstack.cloudian.client.CloudianClient.*updateGroup()*
>  
> *10. s_logger.warn("Unable to initialize inaccurate clock", e);*
>       *Callsites:*
>  * com.cloud.utils.time.*InaccurateClock*.InaccurateClock(),
>  * com.cloud.network.resource.*NuageVspResource*.stop()
>  
> *11. 

[jira] [Commented] (CLOUDSTACK-10357) Log messages that do not match with their method function

2018-04-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16443080#comment-16443080
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10357:
-

rafaelweingartner commented on a change in pull request #2580: CLOUDSTACK-10357 
Improve log messages that do not match with their method function
URL: https://github.com/apache/cloudstack/pull/2580#discussion_r182544717
 
 

 ##
 File path: 
plugins/hypervisors/baremetal/src/main/java/org/apache/cloudstack/api/DeleteBaremetalRctCmd.java
 ##
 @@ -64,7 +64,7 @@ public void execute() throws ResourceUnavailableException, 
InsufficientCapacityE
 SuccessResponse response = new SuccessResponse(getCommandName());
 setResponseObject(response);
 } catch (Exception e) {
-s_logger.warn(String.format("unable to add baremetal RCT[%s]", 
getId()), e);
+s_logger.warn(String.format("unable to delete baremetal RCT[%s]", 
getId()), e);
 throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, 
e.getMessage());
 
 Review comment:
   The same thing here regarding the passing of exception to the new one that 
is thrown.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Log messages that do not match with their method function
> -
>
> Key: CLOUDSTACK-10357
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10357
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Zhenhao Li
>Priority: Minor
>  Labels: easyfix
>
> There are some possible copy and paste errors in the log messages (The 
> logging statement was copied from an old place to a new place, but the 
> message wasn't changed to adapt to the function of new place) which may cause 
> confusion when operators are reading the log messages. 
>  
> Here is a list of the related logging statements:
> *1. s_logger.debug("Failed to attach volume: " + vol.getPath() + ", due to ", 
> e);*
>       *Callsites:*
>  * _com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.*attachVolume()*,_
>  * com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.*dettachVolume()* 
>  
> *2. s_logger.debug("Failed to retrive the default label for management 
> traffic:" + "zone: " ...*
>       *Callsites:*
>  * com.cloud.network.NetworkModelImpl.*getDefaultManagementTrafficLabel()*,
>  * com.cloud.network.NetworkModelImpl.*getDefaultGuestTrafficLabel()*
>  
> *3. s_logger.error("Can not find the groupid " + groupId + " for scaling 
> up");*
>       *Callsites:*
>  * _com.cloud.network.as.AutoScaleManagerImpl.*doScaleDown()*,_
>  * com.cloud.network.as.AutoScaleManagerImpl.*doScaleUp()*
>  
> *4. s_logger.warn("No DNS entry found during configuration of 
> NfsSecondaryStorage");*
>       *Callsites:*
>  * _com.cloud.agent.resource.consoleproxy.*ConsoleProxyResource*.configure(),_
>  * 
> org.apache.cloudstack.storage.resource.*NfsSecondaryStorageResource*.configure()
>  
> *5. s_logger.trace("vCenter API trace - searchDatastore() done");*
>       *Callsites:*
>  * 
> com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO.*searchDatastoreSubFolders()*,
>  * com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO.*searchDatastore()*
>  
> *6. s_logger.trace("vCenter API trace - detachIso() done(failed)");*
>       *Callsites:*
>  * com.cloud.hypervisor.vmware.mo.VirtualMachineMO.*detachIso()*,
>  * com.cloud.hypervisor.vmware.mo.VirtualMachineMO.*attachIso()*
>  
> *7. s_logger.warn(String.format("unable to add baremetal RCT[%s]" ...*
>       *Callsites:*
>  * org.apache.cloudstack.api.*AddBaremetalRctCmd*.execute(),
>  * org.apache.cloudstack.api.*DeleteBaremetalRctCmd*.execute(),
>  
> *8. s_logger.debug("POST request to " + agentUri.toString() + " with contents 
> " + logMessage);*
>       *Callsites:*
>  * 
> com.cloud.network.resource.NetScalerControlCenterResource.*postHttpRequest()*,
>  * 
> com.cloud.network.resource.NetScalerControlCenterResource.*getHttpRequest()*,
>  
> *9. LOG.error("Failed to remove group due to:", e);*
>       *Callsites:*
>  * _org.apache.cloudstack.cloudian.client.CloudianClient.*removeGroup()*,_
>  * org.apache.cloudstack.cloudian.client.CloudianClient.*updateGroup()*
>  
> *10. s_logger.warn("Unable to initialize inaccurate clock", e);*
>       *Callsites:*
>  * com.cloud.utils.time.*InaccurateClock*.InaccurateClock(),
>  * com.cloud.network.resource.*NuageVspResource*.stop()
>  
> *11. s_logger.error("listVmDetails:Exception:" + 

[jira] [Commented] (CLOUDSTACK-10357) Log messages that do not match with their method function

2018-04-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16443075#comment-16443075
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10357:
-

blueorangutan commented on issue #2580: CLOUDSTACK-10357 Improve log messages 
that do not match with their method function
URL: https://github.com/apache/cloudstack/pull/2580#issuecomment-382503229
 
 
   @lzh3636 a Jenkins job has been kicked to build packages. I'll keep you 
posted as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Log messages that do not match with their method function
> -
>
> Key: CLOUDSTACK-10357
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10357
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Zhenhao Li
>Priority: Minor
>  Labels: easyfix
>
> There are some possible copy and paste errors in the log messages (The 
> logging statement was copied from an old place to a new place, but the 
> message wasn't changed to adapt to the function of new place) which may cause 
> confusion when operators are reading the log messages. 
>  
> Here is a list of the related logging statements:
> *1. s_logger.debug("Failed to attach volume: " + vol.getPath() + ", due to ", 
> e);*
>       *Callsites:*
>  * _com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.*attachVolume()*,_
>  * com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.*dettachVolume()* 
>  
> *2. s_logger.debug("Failed to retrive the default label for management 
> traffic:" + "zone: " ...*
>       *Callsites:*
>  * com.cloud.network.NetworkModelImpl.*getDefaultManagementTrafficLabel()*,
>  * com.cloud.network.NetworkModelImpl.*getDefaultGuestTrafficLabel()*
>  
> *3. s_logger.error("Can not find the groupid " + groupId + " for scaling 
> up");*
>       *Callsites:*
>  * _com.cloud.network.as.AutoScaleManagerImpl.*doScaleDown()*,_
>  * com.cloud.network.as.AutoScaleManagerImpl.*doScaleUp()*
>  
> *4. s_logger.warn("No DNS entry found during configuration of 
> NfsSecondaryStorage");*
>       *Callsites:*
>  * _com.cloud.agent.resource.consoleproxy.*ConsoleProxyResource*.configure(),_
>  * 
> org.apache.cloudstack.storage.resource.*NfsSecondaryStorageResource*.configure()
>  
> *5. s_logger.trace("vCenter API trace - searchDatastore() done");*
>       *Callsites:*
>  * 
> com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO.*searchDatastoreSubFolders()*,
>  * com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO.*searchDatastore()*
>  
> *6. s_logger.trace("vCenter API trace - detachIso() done(failed)");*
>       *Callsites:*
>  * com.cloud.hypervisor.vmware.mo.VirtualMachineMO.*detachIso()*,
>  * com.cloud.hypervisor.vmware.mo.VirtualMachineMO.*attachIso()*
>  
> *7. s_logger.warn(String.format("unable to add baremetal RCT[%s]" ...*
>       *Callsites:*
>  * org.apache.cloudstack.api.*AddBaremetalRctCmd*.execute(),
>  * org.apache.cloudstack.api.*DeleteBaremetalRctCmd*.execute(),
>  
> *8. s_logger.debug("POST request to " + agentUri.toString() + " with contents 
> " + logMessage);*
>       *Callsites:*
>  * 
> com.cloud.network.resource.NetScalerControlCenterResource.*postHttpRequest()*,
>  * 
> com.cloud.network.resource.NetScalerControlCenterResource.*getHttpRequest()*,
>  
> *9. LOG.error("Failed to remove group due to:", e);*
>       *Callsites:*
>  * _org.apache.cloudstack.cloudian.client.CloudianClient.*removeGroup()*,_
>  * org.apache.cloudstack.cloudian.client.CloudianClient.*updateGroup()*
>  
> *10. s_logger.warn("Unable to initialize inaccurate clock", e);*
>       *Callsites:*
>  * com.cloud.utils.time.*InaccurateClock*.InaccurateClock(),
>  * com.cloud.network.resource.*NuageVspResource*.stop()
>  
> *11. s_logger.error("listVmDetails:Exception:" + e.getMessage());*
>       *Callsites:*
>  * _com.cloud.vm.dao.UserVmDaoImpl.*listVmDetails()*,_
>  * com.cloud.vm.dao.UserVmDaoImpl.*listPodIdsHavingVmsforAccount()*
>  
> *12. s_logger.error("Unable to dedicate host due to " + e.getMessage(), e);*
>       *Callsites:*
>  * 
> org.apache.cloudstack.dedicated.DedicatedResourceManagerImpl.*dedicateHost()*,
>  * 
> org.apache.cloudstack.dedicated.DedicatedResourceManagerImpl.*dedicateCluster()*
>  
>  
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CLOUDSTACK-10357) Log messages that do not match with their method function

2018-04-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16443073#comment-16443073
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10357:
-

lzh3636 opened a new pull request #2580: CLOUDSTACK-10357 Improve log messages 
that do not match with their method function
URL: https://github.com/apache/cloudstack/pull/2580
 
 
   ## Description
   
   There are some possible copy and paste errors in the log messages (The 
logging statement was copied from an old place to a new place, but the message 
wasn't changed to adapt to the function of new place).
   
   Here's a list of this kind of problems I found, which contains the original 
place that the logging statement possibly be copied from, and the new place 
that the log be copied to (the log message is not suitable for the new place 
and should be changed):
   https://issues.apache.org/jira/browse/CLOUDSTACK-10357
   
   
   
   ## Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [x] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   
   ## Checklist:
   
   
   - [x] I have read the 
[CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md)
 document.
   - [x] My code follows the code style of this project.
   - [ ] My change requires a change to the documentation.
   - [ ] I have updated the documentation accordingly.
   Testing
   - [ ] I have added tests to cover my changes.
   - [ ] All relevant new and existing integration tests have passed.
   - [ ] A full integration testsuite with all test that can run on my 
environment has passed.
   
   
   @blueorangutan package
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Log messages that do not match with their method function
> -
>
> Key: CLOUDSTACK-10357
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10357
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Zhenhao Li
>Priority: Minor
>  Labels: easyfix
>
> There are some possible copy and paste errors in the log messages (The 
> logging statement was copied from an old place to a new place, but the 
> message wasn't changed to adapt to the function of new place) which may cause 
> confusion when operators are reading the log messages. 
>  
> Here is a list of the related logging statements:
> *1. s_logger.debug("Failed to attach volume: " + vol.getPath() + ", due to ", 
> e);*
>       *Callsites:*
>  * _com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.*attachVolume()*,_
>  * com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.*dettachVolume()* 
>  
> *2. s_logger.debug("Failed to retrive the default label for management 
> traffic:" + "zone: " ...*
>       *Callsites:*
>  * com.cloud.network.NetworkModelImpl.*getDefaultManagementTrafficLabel()*,
>  * com.cloud.network.NetworkModelImpl.*getDefaultGuestTrafficLabel()*
>  
> *3. s_logger.error("Can not find the groupid " + groupId + " for scaling 
> up");*
>       *Callsites:*
>  * _com.cloud.network.as.AutoScaleManagerImpl.*doScaleDown()*,_
>  * com.cloud.network.as.AutoScaleManagerImpl.*doScaleUp()*
>  
> *4. s_logger.warn("No DNS entry found during configuration of 
> NfsSecondaryStorage");*
>       *Callsites:*
>  * _com.cloud.agent.resource.consoleproxy.*ConsoleProxyResource*.configure(),_
>  * 
> org.apache.cloudstack.storage.resource.*NfsSecondaryStorageResource*.configure()
>  
> *5. s_logger.trace("vCenter API trace - searchDatastore() done");*
>       *Callsites:*
>  * 
> com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO.*searchDatastoreSubFolders()*,
>  * com.cloud.hypervisor.vmware.mo.HostDatastoreBrowserMO.*searchDatastore()*
>  
> *6. s_logger.trace("vCenter API trace - detachIso() done(failed)");*
>       *Callsites:*
>  * com.cloud.hypervisor.vmware.mo.VirtualMachineMO.*detachIso()*,
>  * com.cloud.hypervisor.vmware.mo.VirtualMachineMO.*attachIso()*
>  
> *7. s_logger.warn(String.format("unable to add baremetal RCT[%s]" ...*
>       *Callsites:*
>  * org.apache.cloudstack.api.*AddBaremetalRctCmd*.execute(),
>  * org.apache.cloudstack.api.*DeleteBaremetalRctCmd*.execute(),
>  
> *8. s_logger.debug("POST request to " + agentUri.toString() + " with