Skip to content

Commit ae2b673

Browse files
author
Marcus Sorensen
committed
Summary: fix cloud-agent KVM calls to cloudstack-agent for centos6.3
BUG-ID: CLOUDSTACK-1234 Bugfix-for: 4.1, master Reported-by: Rayees Namathponnan Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1360736064 -0700
1 parent 15e466c commit ae2b673

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

scripts/vm/hypervisor/kvm/setup_agent.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919

2020

2121

22-
# Did cloud-agent installed
22+
# Did cloudstack-agent installed
2323
#set -x
2424
install_cloud_agent() {
2525
local dev=$1
2626
local retry=10
27-
which cloud-setup-agent
27+
which cloudstack-setup-agent
2828
if [ $? -gt 0 ]
2929
then
3030
# download the repo
@@ -51,7 +51,7 @@ install_cloud_agent() {
5151
while [ "$retry" -gt "0" ]
5252
do
5353
yum clean all
54-
yum install cloud-agent -y
54+
yum install cloudstack-agent -y
5555
if [ $? -gt 0 ]
5656
then
5757
let retry=retry-1
@@ -64,7 +64,7 @@ install_cloud_agent() {
6464
while [ "$retry" -gt "0" ]
6565
do
6666
yum clean all
67-
yum update cloud-agent -y
67+
yum update cloudstack-agent -y
6868
if [ $? -gt 0 ]
6969
then
7070
let retry=retry-1
@@ -155,7 +155,7 @@ cloud_agent_setup() {
155155
sed -i 's/\(SELINUX\)\(.*\)/\1=permissive/' /etc/selinux/config
156156
setenforce 0
157157
fi
158-
cloud-setup-agent --host=$host --zone=$zone --pod=$pod --cluster=$cluster --guid=$guid -a > /dev/null
158+
cloudstack-setup-agent --host=$host --zone=$zone --pod=$pod --cluster=$cluster --guid=$guid -a > /dev/null
159159
}
160160

161161
cloud_consoleP_setup() {
@@ -224,5 +224,5 @@ then
224224
setenforce 0
225225
fi
226226

227-
cloud-setup-agent --host=$host --zone=$zone --pod=$pod --cluster=$cluster --guid=$guid $paramters -a > /dev/null
227+
cloudstack-setup-agent --host=$host --zone=$zone --pod=$pod --cluster=$cluster --guid=$guid $paramters -a > /dev/null
228228
#cloud_consoleP_setup $host $zone $pod

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public Map<? extends ServerResource, Map<String, String>> find(long dcId,
212212
parameters += " --prvNic=" + kvmPrivateNic;
213213
parameters += " --guestNic=" + kvmGuestNic;
214214

215-
SSHCmdHelper.sshExecuteCmd(sshConnection, "cloud-setup-agent " + parameters, 3);
215+
SSHCmdHelper.sshExecuteCmd(sshConnection, "cloudstack-setup-agent " + parameters, 3);
216216

217217
KvmDummyResourceBase kvmResource = new KvmDummyResourceBase();
218218
Map<String, Object> params = new HashMap<String, Object>();

server/src/com/cloud/resource/ResourceManagerImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2361,7 +2361,7 @@ private boolean doCancelMaintenance(long hostId) {
23612361
ResourceState.Event.AdminCancelMaintenance, _nodeId);
23622362
_agentMgr.pullAgentOutMaintenance(hostId);
23632363

2364-
// for kvm, need to log into kvm host, restart cloud-agent
2364+
// for kvm, need to log into kvm host, restart cloudstack-agent
23652365
if (host.getHypervisorType() == HypervisorType.KVM) {
23662366
_hostDao.loadDetails(host);
23672367
String password = host.getDetail("password");
@@ -2382,7 +2382,7 @@ private boolean doCancelMaintenance(long hostId) {
23822382

23832383
try {
23842384
SSHCmdHelper.sshExecuteCmdOneShot(connection,
2385-
"service cloud-agent restart");
2385+
"service cloudstack-agent restart");
23862386
} catch (sshException e) {
23872387
return false;
23882388
}

0 commit comments

Comments
 (0)