You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Stefan Podkowinski (JIRA)" <ji...@apache.org> on 2015/09/23 11:26:04 UTC
[jira] [Comment Edited] (CASSANDRA-10212) cassandra-env.sh may be
sourced twice by debian init script
[ https://issues.apache.org/jira/browse/CASSANDRA-10212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14904220#comment-14904220 ]
Stefan Podkowinski edited comment on CASSANDRA-10212 at 9/23/15 9:25 AM:
-------------------------------------------------------------------------
Sourcing cassandra-env.sh twice will execute the jvm with duplicate JVM_OPTS arguments. Removing sourcing of cassandra-env.sh in the init script should be safe as the init script will not directly use JVM_OPTS anyway.
Edit: actually arguments are not strictly equals in the following case:
{{-XX:CompileCommandFile=/hotspot_compiler -XX:CompileCommandFile=/etc/cassandra/hotspot_compiler}}
{{cassandra-env.sh}} expects {{CASSANDRA_CONF}} to be set for {{-XX:CompileCommandFile=$CASSANDRA_CONF/hotspot_compiler"}} which is not the case when sourcing from {{/etc/init.d/cassandra}}.
was (Author: spodxx@gmail.com):
Sourcing cassandra-env.sh twice will execute the jvm with duplicate JVM_OPTS arguments. Removing sourcing of cassandra-env.sh in the init script should be safe as the init script will not directly use JVM_OPTS anyway.
> cassandra-env.sh may be sourced twice by debian init script
> -----------------------------------------------------------
>
> Key: CASSANDRA-10212
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10212
> Project: Cassandra
> Issue Type: Bug
> Components: Packaging
> Reporter: Enrico Canzonieri
> Assignee: Michael Shuler
> Priority: Minor
>
> It seems that when cassandra is run as a service using the init script the {{/etc/cassandra/cassandra-env.sh}} file is sourced twice.
> This file is sourced the first time in the [init|https://github.com/apache/cassandra/blob/trunk/debian/init] script. The init script then executes [{{/usr/sbin/cassandra}}|https://github.com/apache/cassandra/blob/trunk/bin/cassandra], the latter eventually does source {{cassandra-env.sh}} as {{$CASSANDRA_CONF/cassandra-env}}.
> CASSANDRA_CONF is finally defined in [{{cassandra.in.sh}}|https://github.com/apache/cassandra/blob/trunk/debian/cassandra.in.sh] as {{/etc/cassandra}}.
> I guess in this case the init script should not source {{cassandra-env}} at all.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)