cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [cloudstack] branch CLOUDSTACK-10012 updated: packging: fix centos6/7 pkging
Date Mon, 07 Aug 2017 22:21:23 GMT
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 41821b8  packging: fix centos6/7 pkging
41821b8 is described below

commit 41821b8ff78875be4a53c52e70ea6443ba512ec9
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
AuthorDate: Tue Aug 8 00:21:09 2017 +0200

    packging: fix centos6/7 pkging
    
    Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
---
 packaging/centos63/cloud.spec                   |  2 ++
 packaging/centos7/cloud.spec                    |  2 ++
 packaging/systemd/cloudstack-management.default |  8 ++++----
 packaging/systemd/cloudstack-management.service | 11 ++++-------
 4 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec
index 884e31e..6202c25 100644
--- a/packaging/centos63/cloud.spec
+++ b/packaging/centos63/cloud.spec
@@ -297,6 +297,8 @@ for name in db.properties log4j-cloud.xml server-ssl.xml server-nonssl.xml
commo
   cp client/target/conf/$name ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/$name
 done
 
+ln -s log4j-cloud.xml  ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/log4j-cloud.xml
+
 install python/bindir/cloud-external-ipallocator.py ${RPM_BUILD_ROOT}%{_bindir}/%{name}-external-ipallocator.py
 install -D client/target/pythonlibs/jasypt-1.9.2.jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/lib/jasypt-1.9.2.jar
 
diff --git a/packaging/centos7/cloud.spec b/packaging/centos7/cloud.spec
index 530bafb..9a11aef 100644
--- a/packaging/centos7/cloud.spec
+++ b/packaging/centos7/cloud.spec
@@ -269,6 +269,8 @@ do
   cp client/target/conf/$name ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/$name
 done
 
+ln -s log4j-cloud.xml  ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/log4j-cloud.xml
+
 install python/bindir/cloud-external-ipallocator.py ${RPM_BUILD_ROOT}%{_bindir}/%{name}-external-ipallocator.py
 install -D client/target/pythonlibs/jasypt-1.9.2.jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/lib/jasypt-1.9.2.jar
 
diff --git a/packaging/systemd/cloudstack-management.default b/packaging/systemd/cloudstack-management.default
index a23997e..70fc7c9 100644
--- a/packaging/systemd/cloudstack-management.default
+++ b/packaging/systemd/cloudstack-management.default
@@ -29,9 +29,9 @@ CATALINA_TMPDIR="/usr/share/cloudstack-management/temp"
 
 # Setup Java OPTS
 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=/var/log/cloudstack/management/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=/var/log/cloudstack/management/request.log"
 fi
 
 CLOUDSTACK_USER="cloud"
@@ -44,8 +44,8 @@ SHUTDOWN_VERBOSE="false"
 
 CLOUDSTACK_PID="/var/run/cloudstack-management.pid"
 
-JARS=$(ls /usr/share/cloudstack-management/lib/*.jar | tr '\n' ':' | sed s'/.$//')
+LOGDIR="/var/log/cloudstack/management"
 
-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"
+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"
 
 BOOTSTRAP_CLASS=org.apache.cloudstack.ServerDaemon
diff --git a/packaging/systemd/cloudstack-management.service b/packaging/systemd/cloudstack-management.service
index 091cff3..722d846 100644
--- a/packaging/systemd/cloudstack-management.service
+++ b/packaging/systemd/cloudstack-management.service
@@ -25,15 +25,12 @@ 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/.*$:: )"
-ExecStart=/usr/bin/jsvc -user "${CLOUDSTACK_USER}" -cp "$CLASSPATH" \
-    -outfile SYSLOG -errfile SYSLOG \
-    -pidfile "${CLOUDSTACK_PID}" ${JAVA_OPTS} "${BOOTSTRAP_CLASS}"
-ExecStop=/usr/bin/jsvc -cp "$CLASSPATH" -pidfile "$CLOUDSTACK_PID" -stop "$BOOTSTRAP_CLASS"
+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}"
+ExecStop=/usr/bin/jsvc -cp "$JARS:$CLASSPATH" -pidfile "$CLOUDSTACK_PID" -stop "$BOOTSTRAP_CLASS"
 SuccessExitStatus=143
-User=cloud
-Group=cloud
 
 [Install]
 WantedBy=multi-user.target

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

Mime
View raw message