Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B190C200BB3 for ; Wed, 2 Nov 2016 18:41:41 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B0369160AF0; Wed, 2 Nov 2016 17:41:41 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 00B04160B0C for ; Wed, 2 Nov 2016 18:41:40 +0100 (CET) Received: (qmail 78576 invoked by uid 500); 2 Nov 2016 17:41:40 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 78441 invoked by uid 99); 2 Nov 2016 17:41:40 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2016 17:41:40 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9CDC2EAB4A; Wed, 2 Nov 2016 17:41:39 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bhaisaab@apache.org To: commits@cloudstack.apache.org Date: Wed, 02 Nov 2016 17:41:43 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [5/5] git commit: updated refs/heads/4.9 to b75e695 archived-at: Wed, 02 Nov 2016 17:41:41 -0000 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 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 Authored: Wed Nov 2 23:04:04 2016 +0530 Committer: Rohit Yadav 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