Repository: cloudstack Updated Branches: refs/heads/master 619f01425 -> 7c1590ffd
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 Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7c1590ff Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7c1590ff Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7c1590ff Branch: refs/heads/master Commit: 7c1590ffd67b74f52fe374b0fb91f8c1ef731c39 Parents: 619f014 Author: Laszlo Hornyak <[email protected]> Authored: Sat Jan 17 22:09:16 2015 +0100 Committer: Rajani Karuturi <[email protected]> Committed: Wed Mar 4 12:42:14 2015 +0530 ---------------------------------------------------------------------- .../hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7c1590ff/server/src/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java b/server/src/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java index d475f4d..350b9a7 100644 --- a/server/src/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java +++ b/server/src/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java @@ -205,7 +205,12 @@ public abstract class LibvirtServerDiscoverer extends DiscovererBase implements parameters += " --guestNic=" + kvmGuestNic; parameters += " --hypervisor=" + cluster.getHypervisorType().toString().toLowerCase(); - SSHCmdHelper.sshExecuteCmd(sshConnection, "cloudstack-setup-agent " + parameters, 3); + if (!SSHCmdHelper.sshExecuteCmd(sshConnection, + "cloudstack-setup-agent " + parameters, 3)) { + s_logger.info("cloudstack agent setup command failed: " + + "cloudstack-setup-agent " + parameters); + return null; + } KvmDummyResourceBase kvmResource = new KvmDummyResourceBase(); Map<String, Object> params = new HashMap<String, Object>();
