mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-1124 [EC2 Query API] Improve the logging. Having empty response objects is harmless to functionality
This is observed in the awsapi.log for all Describe* EC2 commands when the response object returned by CS has no elements. But with EC2DescribeImages command it is always observed. This is because every time DescribeImage is fired, we call CS listTemplates command multiple times, each time setting a different value for the templateFilter parameter (e.g. featured, executable, community etc.). And for some of these CS calls made we obtain am empty response and hence the message in the logs.
This commit is contained in:
parent
5d09b9fd3a
commit
1e8648c92d
|
|
@ -151,7 +151,8 @@ public class CloudStackClient {
|
|||
return (new Gson()).fromJson(json.eval(responseName + "." + responseObjName), collectionType);
|
||||
} catch(Exception e) {
|
||||
// this happens because responseObjName won't exist if there are no objects in the list.
|
||||
logger.debug("Unable to find responseObjName:[" + responseObjName + "]. Returning null! Exception: " + e.getMessage());
|
||||
logger.debug("CloudSatck API response doesn't contain responseObjName:" + responseObjName +
|
||||
" because response is empty");
|
||||
return null;
|
||||
}
|
||||
return (new Gson()).fromJson(json.eval(responseName), collectionType);
|
||||
|
|
|
|||
Loading…
Reference in New Issue