mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
merge setupxenserver
This commit is contained in:
parent
76ad02d2fa
commit
9e63416da3
@ -492,7 +492,6 @@ public class XenServer56Resource extends CitrixResourceBase {
|
|||||||
protected SetupAnswer execute(SetupCommand cmd) {
|
protected SetupAnswer execute(SetupCommand cmd) {
|
||||||
Connection conn = getConnection();
|
Connection conn = getConnection();
|
||||||
try {
|
try {
|
||||||
callHostPluginPremium(conn, "setupXenServer");
|
|
||||||
cleanupTemplateSR(conn);
|
cleanupTemplateSR(conn);
|
||||||
Host host = Host.getByUuid(conn, _host.uuid);
|
Host host = Host.getByUuid(conn, _host.uuid);
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -1,13 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# avoid disk full
|
|
||||||
mv /etc/cron.daily/logrotate /etc/cron.hourly 2>&1
|
|
||||||
|
|
||||||
# more aio thread
|
|
||||||
echo 1048576 >/proc/sys/fs/aio-max-nr
|
|
||||||
|
|
||||||
# empty heartbeat
|
|
||||||
cat /dev/null > /opt/xensource/bin/heartbeat
|
|
||||||
|
|
||||||
echo "success"
|
|
||||||
|
|
||||||
@ -21,5 +21,13 @@ sed -i 's/127\.0\.0\.1/0\.0\.0\.0/' /opt/xensource/libexec/qemu-dm-wrapper 2>&1
|
|||||||
sed -i /NOZEROCONF/d /etc/sysconfig/network
|
sed -i /NOZEROCONF/d /etc/sysconfig/network
|
||||||
echo "NOZEROCONF=yes" >> /etc/sysconfig/network
|
echo "NOZEROCONF=yes" >> /etc/sysconfig/network
|
||||||
|
|
||||||
|
mv /etc/cron.daily/logrotate /etc/cron.hourly 2>&1
|
||||||
|
|
||||||
|
# more aio thread
|
||||||
|
echo 1048576 >/proc/sys/fs/aio-max-nr
|
||||||
|
|
||||||
|
# empty heartbeat
|
||||||
|
cat /dev/null > /opt/xensource/bin/heartbeat
|
||||||
|
|
||||||
echo "success"
|
echo "success"
|
||||||
|
|
||||||
|
|||||||
@ -85,17 +85,6 @@ def heartbeat(session, args):
|
|||||||
txt='fail'
|
txt='fail'
|
||||||
return txt
|
return txt
|
||||||
|
|
||||||
|
|
||||||
@echo
|
|
||||||
def setupXenServer(session, args):
|
|
||||||
try:
|
|
||||||
cmd = ["/bin/bash", "/opt/xensource/bin/setupXenServer.sh"]
|
|
||||||
txt = util.pread2(cmd)
|
|
||||||
return txt
|
|
||||||
except:
|
|
||||||
raise xs_errors.XenError('setupXenServer.sh execution failed.')
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
XenAPIPlugin.dispatch({"copy_vhd_to_secondarystorage":copy_vhd_to_secondarystorage, "copy_vhd_from_secondarystorage":copy_vhd_from_secondarystorage, "setup_heartbeat_sr":setup_heartbeat_sr, "setup_heartbeat_file":setup_heartbeat_file, "check_heartbeat":check_heartbeat, "heartbeat": heartbeat, "setupXenServer":setupXenServer})
|
XenAPIPlugin.dispatch({"copy_vhd_to_secondarystorage":copy_vhd_to_secondarystorage, "copy_vhd_from_secondarystorage":copy_vhd_from_secondarystorage, "setup_heartbeat_sr":setup_heartbeat_sr, "setup_heartbeat_file":setup_heartbeat_file, "check_heartbeat":check_heartbeat, "heartbeat": heartbeat})
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,6 @@ setup_heartbeat_file.sh=..,0755,/opt/xensource/bin
|
|||||||
check_heartbeat.sh=..,0755,/opt/xensource/bin
|
check_heartbeat.sh=..,0755,/opt/xensource/bin
|
||||||
xenheartbeat.sh=..,0755,/opt/xensource/bin
|
xenheartbeat.sh=..,0755,/opt/xensource/bin
|
||||||
launch_hb.sh=..,0755,/opt/xensource/bin
|
launch_hb.sh=..,0755,/opt/xensource/bin
|
||||||
setupXenServer.sh=..,0755,/opt/xensource/bin
|
|
||||||
vmopspremium=..,0755,/etc/xapi.d/plugins
|
vmopspremium=..,0755,/etc/xapi.d/plugins
|
||||||
InterfaceReconfigure.py=.,0755,/opt/xensource/bin
|
InterfaceReconfigure.py=.,0755,/opt/xensource/bin
|
||||||
fsimage.so=..,0755,/usr/lib/fs/ext2fs-lib
|
fsimage.so=..,0755,/usr/lib/fs/ext2fs-lib
|
||||||
|
|||||||
@ -40,5 +40,4 @@ setup_heartbeat_file.sh=..,0755,/opt/xensource/bin
|
|||||||
check_heartbeat.sh=..,0755,/opt/xensource/bin
|
check_heartbeat.sh=..,0755,/opt/xensource/bin
|
||||||
xenheartbeat.sh=..,0755,/opt/xensource/bin
|
xenheartbeat.sh=..,0755,/opt/xensource/bin
|
||||||
launch_hb.sh=..,0755,/opt/xensource/bin
|
launch_hb.sh=..,0755,/opt/xensource/bin
|
||||||
setupXenServer.sh=..,0755,/opt/xensource/bin
|
|
||||||
vmopspremium=..,0755,/etc/xapi.d/plugins
|
vmopspremium=..,0755,/etc/xapi.d/plugins
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user