Skip to content

Commit 7c1590f

Browse files
K0zkakaruturi
authored andcommitted
kvm: Check the return value of the cloudstack-setup-agent command
Bug-Url: https://issues.apache.org/jira/browse/CLOUDSTACK-8016 Signed-off-by: Laszlo Hornyak <[email protected]> Signed-off-by: Rajani Karuturi <[email protected]> This closes #93
1 parent 619f014 commit 7c1590f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

server/src/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,12 @@ public boolean processTimeout(long agentId, long seq) {
205205
parameters += " --guestNic=" + kvmGuestNic;
206206
parameters += " --hypervisor=" + cluster.getHypervisorType().toString().toLowerCase();
207207

208-
SSHCmdHelper.sshExecuteCmd(sshConnection, "cloudstack-setup-agent " + parameters, 3);
208+
if (!SSHCmdHelper.sshExecuteCmd(sshConnection,
209+
"cloudstack-setup-agent " + parameters, 3)) {
210+
s_logger.info("cloudstack agent setup command failed: "
211+
+ "cloudstack-setup-agent " + parameters);
212+
return null;
213+
}
209214

210215
KvmDummyResourceBase kvmResource = new KvmDummyResourceBase();
211216
Map<String, Object> params = new HashMap<String, Object>();

0 commit comments

Comments
 (0)