This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch 4.19
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.19 by this push:
new f652ad0d98c extra null guard (#10264)
f652ad0d98c is described below
commit f652ad0d98ce3dcda57214938ada63d599799b24
Author: dahn <[email protected]>
AuthorDate: Mon Jan 27 14:14:31 2025 +0100
extra null guard (#10264)
---
.../src/main/java/com/cloud/agent/manager/AgentManagerImpl.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java
b/engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java
index 92d18dcf4e4..d2e86fbc4b9 100644
---
a/engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java
+++
b/engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java
@@ -586,11 +586,11 @@ public class AgentManagerImpl extends ManagerBase
implements AgentManager, Handl
}
} catch (final HypervisorVersionChangedException hvce) {
handleDisconnectWithoutInvestigation(attache,
Event.ShutdownRequested, true, true);
- throw new CloudRuntimeException("Unable to connect " +
attache.getId(), hvce);
+ throw new CloudRuntimeException("Unable to connect " +
(attache == null ? "<unknown agent>" : attache.getId()), hvce);
} catch (final Exception e) {
s_logger.error("Monitor " +
monitor.second().getClass().getSimpleName() + " says there is an error in the
connect process for " + hostId + " due to " + e.getMessage(), e);
handleDisconnectWithoutInvestigation(attache,
Event.AgentDisconnected, true, true);
- throw new CloudRuntimeException("Unable to connect " +
attache.getId(), e);
+ throw new CloudRuntimeException("Unable to connect " +
(attache == null ? "<unknown agent>" : attache.getId()), e);
}
}
}