You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by wuzhiqing <wu...@gmail.com> on 2013/02/07 02:30:16 UTC
RE:RE: cloudstack add ovm host occur error
Hi,Tariq Iqbal:
thanks for you reply. It looks like some wrong of the ovm version in cloudstack installation guide. I checked the ovm version from oracle website,it just have 2.2 and 3.1
the following is ovs-agent and configureOVm script
ovs-agent:
#!/bin/sh
# chkconfig: 2345 99 01
# description: Starts and stops ovs agent
#
#^#
# ovs-agent.init
#
# /etc/init.d/ovs-agent
#
# Copyright (C) 2006, 2007 Oracle. All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 021110-1307, USA.
#$#
version=2.3
agtctl=/opt/ovs-agent-"$version"/agtctl
if [ ! -f "$agtctl" ]; then
echo "cannot find agent control utility '$agtctl'."
echo "has ovs agent been installed to the correct location?"
exit 1
fi
agt_dir=$(dirname "$agtctl")
agtcfg="$agt_dir"/utils/config_agent.py
archive="$agt_dir"/utils/archive_agent.sh
case "$1" in
start)
"$agtctl" start
;;
stop)
shift
"$agtctl" stop $@
;;
restart)
shift
"$agtctl" stop $@
sleep 3
"$agtctl" start
;;
configure)
"$agtcfg"
;;
archive)
echo "archive need to restart agent. do you want to proceed?(y/n)"
read answer
answer=$(echo $answer | tr A-Z a-z)
if [ "$answer" = "y" ]; then
"$agtctl" stop --force
"$archive"
"$agtctl" start
else
echo "operation canceled."
fi
;;
status)
"$agtctl" status
;;
*)
echo "Usage: $0 {start|stop|restart|status|configure|archive}"
exit 1
esac
exit $?
configureOVM:
#!/bin/sh
# Copyright 2012 Citrix Systems, Inc. Licensed under the
# Apache License, Version 2.0 (the "License"); you may not use this
# file except in compliance with the License. Citrix Systems, Inc.
# reserves all rights not expressly granted by the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Automatically generated by addcopyright.py at 04/02/2012
errExit() {
echo $@
exit 1
}
stopHeartbeat() {
pidFile="/var/run/ovs-agent/heartbeat.pid"
if [ -f $pidFile ]; then
pid=`cat $pidFile`
ps -p $pid &>/dev/null
if [ $? -eq 0 ]; then
kill $pid &>/dev/null
fi
fi
}
openPortOnIptables() {
port="$1"
protocol="$2"
chkconfig --list iptables | grep "on"
if [ $? -eq 0 ]; then
iptables-save | grep "A INPUT -p $protocol -m $protocol --dport $port -j ACCEPT" >/dev/null
if [ $? -ne 0 ]; then
iptables -I INPUT 1 -p $protocol --dport $port -j ACCEPT
if [ $? -ne 0 ]; then
exit_with_error "iptables -I INPUT 1 -p $protocol --dport $port -j ACCEPT failed"
fi
echo "iptables:Open $protocol port $port for DHCP"
fi
fi
}
applyPatch() {
patchFile="$1"
level="$2"
[ ! -f $patchFile ] && errExit "Can not find $patchFile"
if [ $? -ne 0 ]; then
pushd /opt/ovs-agent-latest &>/dev/null
test=`patch -p$level --dry-run -N < $patchFile`
if [ $? -ne 0 ]; then
tmp=`mktemp`
echo $test > $tmp
grep "Reversed (or previously applied) patch detected" $tmp &>/dev/null
if [ $? -eq 0 ]; then
# The file has been patched
rm $tmp -f
popd &>/dev/null
return
else
rm $tmp -f
popd &>/dev/null
errExit "Can not apply $patchFile beacuse $test"
fi
fi
patch -p$level < $patchFile
[ $? -ne 0 ] && errExit "Patch to $target failed"
popd &>/dev/null
fi
}
postSetup() {
openPortOnIptables 7777 tcp # for OCFS2, maybe tcp only
openPortOnIptables 7777 udp
openPortOnIptables 3260 tcp # for ISCSI, maybe tcp only
openPortOnIptables 3260 udp
applyPatch "/opt/ovs-agent-latest/OvmPatch.patch" 2
applyPatch "/opt/ovs-agent-latest/OvmDontTouchOCFS2ClusterWhenAgentStart.patch" 1
applyPatch "/opt/ovs-agent-latest/Fixget_storage_reposExceptionDueToWrongReturnValueCheck.patch" 1
stopHeartbeat
/etc/init.d/ovs-agent restart --disable-nowayout
[ $? -ne 0 ] && errExit "Restart ovs agent failed"
exit 0
}
preSetup() {
agentConfig="/etc/ovs-agent/agent.ini"
agentInitScript="/etc/init.d/ovs-agent"
[ ! -f $agentConfig ] && errExit "Can not find $agentConfig"
[ ! -f $agentInitScript ] && errExit "Can not find $agentInitScript"
version=`grep "version=" $agentInitScript | cut -d "=" -f 2`
[ x"$version" != x"2.3" ] && errExit "The OVS agent version is $version, we only support 2.3 now"
# disable SSL
sed -i 's/ssl=enable/ssl=disable/g' $agentConfig
[ $? -ne 0 ] && errExit "configure ovs agent to non ssl failed"
if [ ! -L /opt/ovs-agent-latest ]; then
eval $agentInitScript status | grep 'down' && $agentInitScript start
[ $? -ne 0 ] && errExit "Start ovs agent failed"
[ ! -L /opt/ovs-agent-latest ] && errExit "No link at /opt/ovs-agent-latest"
fi
exit 0
}
[ $# -ne 1 ] && errExit "Usage: configureOvm.sh command"
case "$1" in
preSetup)
preSetup
;;
postSetup)
postSetup
;;
*)
errExit "Valid commands: preSetup postSetup"
esac
------------------ 原始邮件 ------------------
发件人: "Tariq Iqbal"<ta...@shapeblue.com>;
发送时间: 2013年2月7日(星期四) 凌晨0:36
收件人: "cloudstack-users@incubator.apache.org"<cl...@incubator.apache.org>;
主题: RE: cloudstack add ovm host occur error
I have also seen different versions of the CS 3.0.2 install guide - one quoting support for OVM 2.2 and another quoting support for OVM 2.3
Regards,
Tariq Iqbal
S: +44 20 3603 0540 | M: +447909911600
tariq.iqbal@shapeblue.com
-----Original Message-----
From: Chip Childers [mailto:chip.childers@sungard.com]
Sent: 06 February 2013 15:38
To: cloudstack-users@incubator.apache.org
Subject: Re: cloudstack add ovm host occur error
On Wed, Feb 06, 2013 at 03:12:58PM +0800, wuzhiqing wrote:
> Hi:
> Everyone,I have created a zone with vmware hypervisor and created a ovm cluster,when I want to add the ovm server host,the result is many many errors.Step that follows cloudstack installation guide.
> cloudstack version : 3.0.2
> ovm version: 2.2
>
Please take a look at this thread:
http://markmail.org/message/thydqdp4q55ap3ku
OVM has been broken in CloudStack from before it's donation to Apache, and we haven't had anyone get started on correcting it yet.
-chip
ShapeBlue provides a range of strategic and technical consulting and implementation services to help IT Service Providers and Enterprises to build a true IaaS compute cloud. ShapeBlue’s expertise, combined with CloudStack technology, allows IT Service Providers and Enterprises to deliver true, utility based, IaaS to the customer or end-user.
________________________________
This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales.
RE: RE:RE: cloudstack add ovm host occur error
Posted by Tariq Iqbal <ta...@shapeblue.com>.
Hi,
As per Chip's reply, OVM has been broken in CloudStack from before it's donation to Apache and is unlikely to be fixed in the forthcoming release.
Are you looking to use OVM in production or are you just exploring?
Regards,
Tariq Iqbal
S: +44 20 3603 0540 | M: +447909911600
tariq.iqbal@shapeblue.com
-----Original Message-----
From: 81390493@qq.com [mailto:81390493@qq.com] On Behalf Of wuzhiqing
Sent: 07 February 2013 01:30
To: cloudstack-users
Subject: RE:RE: cloudstack add ovm host occur error
Hi,Tariq Iqbal:
thanks for you reply. It looks like some wrong of the ovm version in cloudstack installation guide. I checked the ovm version from oracle website,it just have 2.2 and 3.1
the following is ovs-agent and configureOVm script
ovs-agent:
#!/bin/sh
# chkconfig: 2345 99 01
# description: Starts and stops ovs agent # #^# # ovs-agent.init # # /etc/init.d/ovs-agent # # Copyright (C) 2006, 2007 Oracle. All rights reserved.
#
# This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2.
# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details.
# You should have received a copy of the GNU General Public # License along with this program; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 021110-1307, USA.
#$#
version=2.3
agtctl=/opt/ovs-agent-"$version"/agtctl
if [ ! -f "$agtctl" ]; then
echo "cannot find agent control utility '$agtctl'."
echo "has ovs agent been installed to the correct location?"
exit 1
fi
agt_dir=$(dirname "$agtctl")
agtcfg="$agt_dir"/utils/config_agent.py
archive="$agt_dir"/utils/archive_agent.sh
case "$1" in
start)
"$agtctl" start
;;
stop)
shift
"$agtctl" stop $@
;;
restart)
shift
"$agtctl" stop $@
sleep 3
"$agtctl" start
;;
configure)
"$agtcfg"
;;
archive)
echo "archive need to restart agent. do you want to proceed?(y/n)"
read answer
answer=$(echo $answer | tr A-Z a-z)
if [ "$answer" = "y" ]; then
"$agtctl" stop --force
"$archive"
"$agtctl" start
else
echo "operation canceled."
fi
;;
status)
"$agtctl" status
;;
*)
echo "Usage: $0 {start|stop|restart|status|configure|archive}"
exit 1
esac
exit $?
configureOVM:
#!/bin/sh
# Copyright 2012 Citrix Systems, Inc. Licensed under the # Apache License, Version 2.0 (the "License"); you may not use this # file except in compliance with the License. Citrix Systems, Inc.
# reserves all rights not expressly granted by the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # limitations under the License.
#
# Automatically generated by addcopyright.py at 04/02/2012
errExit() {
echo $@
exit 1
}
stopHeartbeat() {
pidFile="/var/run/ovs-agent/heartbeat.pid"
if [ -f $pidFile ]; then
pid=`cat $pidFile`
ps -p $pid &>/dev/null
if [ $? -eq 0 ]; then
kill $pid &>/dev/null
fi
fi
}
openPortOnIptables() {
port="$1"
protocol="$2"
chkconfig --list iptables | grep "on"
if [ $? -eq 0 ]; then
iptables-save | grep "A INPUT -p $protocol -m $protocol --dport $port -j ACCEPT" >/dev/null
if [ $? -ne 0 ]; then
iptables -I INPUT 1 -p $protocol --dport $port -j ACCEPT
if [ $? -ne 0 ]; then
exit_with_error "iptables -I INPUT 1 -p $protocol --dport $port -j ACCEPT failed"
fi
echo "iptables:Open $protocol port $port for DHCP"
fi
fi
}
applyPatch() {
patchFile="$1"
level="$2"
[ ! -f $patchFile ] && errExit "Can not find $patchFile"
if [ $? -ne 0 ]; then
pushd /opt/ovs-agent-latest &>/dev/null
test=`patch -p$level --dry-run -N < $patchFile`
if [ $? -ne 0 ]; then
tmp=`mktemp`
echo $test > $tmp
grep "Reversed (or previously applied) patch detected" $tmp &>/dev/null
if [ $? -eq 0 ]; then
# The file has been patched
rm $tmp -f
popd &>/dev/null
return
else
rm $tmp -f
popd &>/dev/null
errExit "Can not apply $patchFile beacuse $test"
fi
fi
patch -p$level < $patchFile
[ $? -ne 0 ] && errExit "Patch to $target failed"
popd &>/dev/null
fi
}
postSetup() {
openPortOnIptables 7777 tcp # for OCFS2, maybe tcp only
openPortOnIptables 7777 udp
openPortOnIptables 3260 tcp # for ISCSI, maybe tcp only
openPortOnIptables 3260 udp
applyPatch "/opt/ovs-agent-latest/OvmPatch.patch" 2
applyPatch "/opt/ovs-agent-latest/OvmDontTouchOCFS2ClusterWhenAgentStart.patch" 1
applyPatch "/opt/ovs-agent-latest/Fixget_storage_reposExceptionDueToWrongReturnValueCheck.patch" 1
stopHeartbeat
/etc/init.d/ovs-agent restart --disable-nowayout
[ $? -ne 0 ] && errExit "Restart ovs agent failed"
exit 0
}
preSetup() {
agentConfig="/etc/ovs-agent/agent.ini"
agentInitScript="/etc/init.d/ovs-agent"
[ ! -f $agentConfig ] && errExit "Can not find $agentConfig"
[ ! -f $agentInitScript ] && errExit "Can not find $agentInitScript"
version=`grep "version=" $agentInitScript | cut -d "=" -f 2`
[ x"$version" != x"2.3" ] && errExit "The OVS agent version is $version, we only support 2.3 now"
# disable SSL
sed -i 's/ssl=enable/ssl=disable/g' $agentConfig
[ $? -ne 0 ] && errExit "configure ovs agent to non ssl failed"
if [ ! -L /opt/ovs-agent-latest ]; then
eval $agentInitScript status | grep 'down' && $agentInitScript start
[ $? -ne 0 ] && errExit "Start ovs agent failed"
[ ! -L /opt/ovs-agent-latest ] && errExit "No link at /opt/ovs-agent-latest"
fi
exit 0
}
[ $# -ne 1 ] && errExit "Usage: configureOvm.sh command"
case "$1" in
preSetup)
preSetup
;;
postSetup)
postSetup
;;
*)
errExit "Valid commands: preSetup postSetup"
esac
------------------ 原始邮件 ------------------
发件人: "Tariq Iqbal"<ta...@shapeblue.com>;
发送时间: 2013年2月7日(星期四) 凌晨0:36
收件人: "cloudstack-users@incubator.apache.org"<cl...@incubator.apache.org>;
主题: RE: cloudstack add ovm host occur error
I have also seen different versions of the CS 3.0.2 install guide - one quoting support for OVM 2.2 and another quoting support for OVM 2.3
Regards,
Tariq Iqbal
S: +44 20 3603 0540 | M: +447909911600
tariq.iqbal@shapeblue.com
-----Original Message-----
From: Chip Childers [mailto:chip.childers@sungard.com]
Sent: 06 February 2013 15:38
To: cloudstack-users@incubator.apache.org
Subject: Re: cloudstack add ovm host occur error
On Wed, Feb 06, 2013 at 03:12:58PM +0800, wuzhiqing wrote:
> Hi:
> Everyone,I have created a zone with vmware hypervisor and created a ovm cluster,when I want to add the ovm server host,the result is many many errors.Step that follows cloudstack installation guide.
> cloudstack version : 3.0.2
> ovm version: 2.2
>
Please take a look at this thread:
http://markmail.org/message/thydqdp4q55ap3ku
OVM has been broken in CloudStack from before it's donation to Apache, and we haven't had anyone get started on correcting it yet.
-chip
ShapeBlue provides a range of strategic and technical consulting and implementation services to help IT Service Providers and Enterprises to build a true IaaS compute cloud. ShapeBlue’s expertise, combined with CloudStack technology, allows IT Service Providers and Enterprises to deliver true, utility based, IaaS to the customer or end-user.
________________________________
This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales.
ShapeBlue provides a range of strategic and technical consulting and implementation services to help IT Service Providers and Enterprises to build a true IaaS compute cloud. ShapeBlue’s expertise, combined with CloudStack technology, allows IT Service Providers and Enterprises to deliver true, utility based, IaaS to the customer or end-user.
________________________________
This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales.