Github user jburwell commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/801#discussion_r39906971
--- Diff:
plugins/network-elements/nuage-vsp/src/com/cloud/network/resource/NuageVspResource.java
---
@@ -262,15 +260,19 @@ public String getName() {
public PingCommand getCurrentStatus(long id) {
if ((_relativePath == null) || (_relativePath.isEmpty()) ||
(_cmsUserInfo == null) || (_cmsUserInfo.length == 0)) {
s_logger.error("Failed to ping to Nuage VSD");
+ _shouldAudit = true;
return null;
}
try {
login();
} catch (Exception e) {
s_logger.error("Failed to ping to Nuage VSD on " + _name + "
as user " + _cmsUserInfo[1] + " Exception " + e.getMessage());
--- End diff --
Pass the exception instance into the ``error`` call to provide the stack
trace in the log for debugging.
Also, what if cmsUserInfo is null or has a length less than 1? Checks need
to be added for these conditions to avoid an NPE or ``ArrayIndexOutOfBounds``
being thrown from this ``catch`` block.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---