cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [5/5] git commit: updated refs/heads/4.9 to b75e695
Date Wed, 02 Nov 2016 17:41:43 GMT
Merge pull request #1728 from shapeblue/4.9_9551

CLOUDSTACK-9551: Move java tmp dir to cloudstack-agent's path to avoidMove java tmp dir to
cloudstack-agent's path to avoid noexec on /tmp

* pr/1728:
  CLOUDSTACK-9551: Move java tmp dir to cloudstack-agent's path to avoid noexec on /tmp

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b75e6958
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b75e6958
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b75e6958

Branch: refs/heads/4.9
Commit: b75e6958150f76a0c8f9cbfa24301da2d7cd2c6a
Parents: 1995134 bd85e5b
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
Authored: Wed Nov 2 23:04:04 2016 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Wed Nov 2 23:10:39 2016 +0530

----------------------------------------------------------------------
 packaging/centos63/cloud-agent.rc          | 6 +++++-
 packaging/centos7/cloud-agent.rc           | 6 +++++-
 packaging/debian/cloudstack-agent.init     | 6 +++++-
 packaging/systemd/cloudstack-agent.default | 1 +
 packaging/systemd/cloudstack-agent.service | 3 ++-
 5 files changed, 18 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b75e6958/packaging/centos7/cloud-agent.rc
----------------------------------------------------------------------
diff --cc packaging/centos7/cloud-agent.rc
index 6cc6abc,6cc6abc..aad9582
--- a/packaging/centos7/cloud-agent.rc
+++ b/packaging/centos7/cloud-agent.rc
@@@ -26,6 -26,6 +26,7 @@@
  
  # set environment variables
  
++TMP=/usr/share/cloudstack-agent/tmp
  SHORTNAME=$(basename $0 | sed -e 's/^[SK][0-9][0-9]//')
  PIDFILE=/var/run/"$SHORTNAME".pid
  LOCKFILE=/var/lock/subsys/"$SHORTNAME"
@@@ -41,6 -41,6 +42,9 @@@ if [ -z "$JSVC" ]; the
      exit 1;
  fi
  
++# create java tmp dir if not found
++mkdir -m 0755 -p "$TMP"
++
  unset OPTIONS
  [ -r /etc/sysconfig/"$SHORTNAME" ] && source /etc/sysconfig/"$SHORTNAME"
  
@@@ -64,7 -64,7 +68,7 @@@ export CLASSPATH="/usr/share/java/commo
  start() {
      echo -n $"Starting $PROGNAME: "
      if hostname --fqdn >/dev/null 2>&1 ; then
--        $JSVC -Xms256m -Xmx2048m -cp "$CLASSPATH" -pidfile "$PIDFILE" \
++        $JSVC -Djava.io.tmpdir="$TMP" -Xms256m -Xmx2048m -cp "$CLASSPATH" -pidfile "$PIDFILE"
\
              -errfile $LOGDIR/cloudstack-agent.err -outfile $LOGDIR/cloudstack-agent.out
$CLASS
          RETVAL=$?
          echo

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b75e6958/packaging/systemd/cloudstack-agent.default
----------------------------------------------------------------------
diff --cc packaging/systemd/cloudstack-agent.default
index 659d715,659d715..41fa85b
--- a/packaging/systemd/cloudstack-agent.default
+++ b/packaging/systemd/cloudstack-agent.default
@@@ -19,3 -19,3 +19,4 @@@ JAVA=/usr/bin/jav
  JAVA_HEAP_INITIAL=256m
  JAVA_HEAP_MAX=2048m
  JAVA_CLASS=com.cloud.agent.AgentShell
++JAVA_TMPDIR=/usr/share/cloudstack-agent/tmp

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b75e6958/packaging/systemd/cloudstack-agent.service
----------------------------------------------------------------------
diff --cc packaging/systemd/cloudstack-agent.service
index dd1560c,dd1560c..92ff965
--- a/packaging/systemd/cloudstack-agent.service
+++ b/packaging/systemd/cloudstack-agent.service
@@@ -27,7 -27,7 +27,8 @@@ EnvironmentFile=-/etc/default/cloudstac
  ExecStart=/bin/sh -ec '\
      export ACP=`ls /usr/share/cloudstack-agent/lib/*.jar /usr/share/cloudstack-agent/plugins/*.jar
2>/dev/null|tr "\\n" ":"`; \
      export CLASSPATH="$ACP:/etc/cloudstack/agent:/usr/share/cloudstack-common/scripts";
\
--    ${JAVA} -Xms${JAVA_HEAP_INITIAL} -Xmx${JAVA_HEAP_MAX} -cp "$CLASSPATH" $JAVA_CLASS'
++    mkdir -m 0755 -p ${JAVA_TMPDIR} \
++    ${JAVA} -Djava.io.tmpdir="${JAVA_TMPDIR}" -Xms${JAVA_HEAP_INITIAL} -Xmx${JAVA_HEAP_MAX}
-cp "$CLASSPATH" $JAVA_CLASS'
  Restart=always
  RestartSec=10s
  


Mime
View raw message