Github user bhaisaab commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1409#discussion_r52551673
--- Diff: packaging/systemd/cloudstack-usage.service ---
@@ -27,10 +27,11 @@ Environment=JAVA_HOME=/usr/lib/jvm/jre
Environment=JAVA_HEAP_INITIAL=256m
Environment=JAVA_HEAP_MAX=2048m
Environment=JAVA_CLASS=com.cloud.usage.UsageServer
+Environment=JAVA_PID=$$
ExecStart=/bin/sh -ec '\
export UCP=`ls /usr/share/cloudstack-usage/cloud-usage-*.jar
/usr/share/cloudstack-usage/lib/*.jar | tr "\\n" ":"`; \
export
CLASSPATH="$UCP:/etc/cloudstack/usage:/usr/share/java/mysql-connector-java.jar";
\
- ${JAVA_HOME}/bin/java -Xms${JAVA_HEAP_INITIAL} -Xmx${JAVA_HEAP_MAX}
-cp "$CLASSPATH" $JAVA_CLASS'
+ ${JAVA_HOME}/bin/java -Dpid=${JAVA_PID} -Xms${JAVA_HEAP_INITIAL}
-Xmx${JAVA_HEAP_MAX} -cp "$CLASSPATH" $JAVA_CLASS'
--- End diff --
LGTM (did not test by creating packages and installing it though)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---