This is an automated email from the ASF dual-hosted git repository.

bhaisaab pushed a commit to branch CLOUDSTACK-10012
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/CLOUDSTACK-10012 by this push:
     new e6da056  packging: fix server starts in centos6/7
e6da056 is described below

commit e6da05619e5308926519c556722991795fa4db36
Author: Rohit Yadav <rohit.ya...@shapeblue.com>
AuthorDate: Tue Aug 8 11:44:32 2017 +0200

    packging: fix server starts in centos6/7
    
    Signed-off-by: Rohit Yadav <rohit.ya...@shapeblue.com>
---
 packaging/centos63/cloud-management.rc          | 4 ++--
 packaging/systemd/cloudstack-management.service | 4 ++--
 python/lib/cloudutils/serviceConfigServer.py    | 3 ++-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/packaging/centos63/cloud-management.rc 
b/packaging/centos63/cloud-management.rc
index 8d640e9..24fbd33 100755
--- a/packaging/centos63/cloud-management.rc
+++ b/packaging/centos63/cloud-management.rc
@@ -74,9 +74,9 @@ JARS=$(ls /usr/share/cloudstack-management/lib/*.jar | tr 
'\n' ':' | sed s'/.$//
 
CLASSPATH="/etc/cloudstack/management:/usr/share/cloudstack-common:/usr/share/cloudstack-management/setup:/usr/share/cloudstack-management:/usr/share/cloudstack-management/cloud-management-server.jar:$JARS"
 
 if [ -r "/etc/cloudstack/management/cloudmanagementserver.keystore" ] ; then
-  JAVA_OPTS="-Djava.awt.headless=true -Dcom.sun.management.jmxremote=false 
-Xmx2g -XX:+HeapDumpOnOutOfMemoryError 
-XX:HeapDumpPath=/var/log/cloudstack/management/ -XX:PermSize=512M 
-XX:MaxPermSize=800m 
-Djavax.net.ssl.trustStore=/etc/cloudstack/management/cloudmanagementserver.keystore
 -Djavax.net.ssl.trustStorePassword=vmops.com "
+  JAVA_OPTS="-Djava.awt.headless=true -Dcom.sun.management.jmxremote=false 
-Xmx2g -XX:+HeapDumpOnOutOfMemoryError 
-XX:HeapDumpPath=/var/log/cloudstack/management/ -XX:PermSize=512M 
-XX:MaxPermSize=800m 
-Djavax.net.ssl.trustStore=/etc/cloudstack/management/cloudmanagementserver.keystore
 -Djavax.net.ssl.trustStorePassword=vmops.com 
-Djetty.requestlog=$LOGDIR/request.log "
 else
-  JAVA_OPTS="-Djava.awt.headless=true -Dcom.sun.management.jmxremote=false 
-Xmx2g -XX:+HeapDumpOnOutOfMemoryError 
-XX:HeapDumpPath=/var/log/cloudstack/management/ -XX:PermSize=512M 
-XX:MaxPermSize=800m"
+  JAVA_OPTS="-Djava.awt.headless=true -Dcom.sun.management.jmxremote=false 
-Xmx2g -XX:+HeapDumpOnOutOfMemoryError 
-XX:HeapDumpPath=/var/log/cloudstack/management/ -XX:PermSize=512M 
-XX:MaxPermSize=800m -Djetty.requestlog=$LOGDIR/request.log "
 fi
 
 start() {
diff --git a/packaging/systemd/cloudstack-management.service 
b/packaging/systemd/cloudstack-management.service
index 722d846..afcea8c 100644
--- a/packaging/systemd/cloudstack-management.service
+++ b/packaging/systemd/cloudstack-management.service
@@ -25,10 +25,10 @@ After=syslog.target network.target
 UMask=0022
 Type=forking
 Environment="NAME=cloudstack-management"
-EnvironmentFile=-/etc/default/cloudstack-management
+EnvironmentFile=/etc/default/cloudstack-management
 ExecStartPre=/bin/bash -c "/bin/systemctl set-environment JAVA_HOME=$( 
readlink -f $( which java ) | sed s:bin/.*$:: )"
 ExecStartPre=/bin/bash -c "/bin/systemctl set-environment JARS=$(ls 
/usr/share/cloudstack-management/lib/*.jar | tr '\n' ':' | sed s'/.$//')"
-ExecStart=/usr/bin/jsvc -user "${CLOUDSTACK_USER}" -cp "$JARS:$CLASSPATH" 
-errfile ${LOGDIR}/${NAME}.err -cwd ${LOGDIR} -pidfile "${CLOUDSTACK_PID}" 
${JAVA_OPTS} "${BOOTSTRAP_CLASS}"
+ExecStart=/usr/bin/jsvc -home "${JAVA_HOME}" -user "${CLOUDSTACK_USER}" -cp 
"${JARS}:${CLASSPATH}" -errfile ${LOGDIR}/${NAME}.err -cwd ${LOGDIR} -pidfile 
"${CLOUDSTACK_PID}" ${JAVA_OPTS} "${BOOTSTRAP_CLASS}"
 ExecStop=/usr/bin/jsvc -cp "$JARS:$CLASSPATH" -pidfile "$CLOUDSTACK_PID" -stop 
"$BOOTSTRAP_CLASS"
 SuccessExitStatus=143
 
diff --git a/python/lib/cloudutils/serviceConfigServer.py 
b/python/lib/cloudutils/serviceConfigServer.py
index 1184aca..60439f9 100644
--- a/python/lib/cloudutils/serviceConfigServer.py
+++ b/python/lib/cloudutils/serviceConfigServer.py
@@ -89,8 +89,9 @@ class cloudManagementConfig(serviceCfgBase):
         bash("chown cloud.cloud /var/run/cloudstack-management.pid")
         #distro like sl 6.1 needs this folder, or tomcat6 failed to start
         checkHostName()
+        bash("mkdir -p /var/lib/cloudstack/")
         bash("chown cloud:cloud -R /var/lib/cloudstack/")
-        bash("chmod +x -R 
/usr/share/cloudstack-management/webapps/client/WEB-INF/classes/scripts/")
+        #bash("chmod +x -R 
/usr/share/cloudstack-management/webapps/client/WEB-INF/classes/scripts/")
         #set max process per account is unlimited
         if os.path.exists("/etc/security/limits.conf"):
             cfo = configFileOps("/etc/security/limits.conf")

-- 
To stop receiving notification emails like this one, please contact
['"commits@cloudstack.apache.org" <commits@cloudstack.apache.org>'].

Reply via email to