[ 
https://issues.apache.org/jira/browse/CASSANDRA-17773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17683339#comment-17683339
 ] 

Claude Warren commented on CASSANDRA-17773:
-------------------------------------------

I think we must be talking past each other.

In the pull request the nodetool file shows the differences.  
([https://github.com/apache/cassandra/pull/1950/files#diff-f7131d9a4f739662e81931739eff926bd82a3a856e9e8ed790ee1aca4458d98dL25-R26)]

As you can see the new file is sourced as you suggest, though without the 
$CASSANDRA_HOME.  This replaces a fair amount of boiler plate.  

The process is:
 # setup any required environment vars:  
 ** $CASSANDRA_INCLUDE – (optional)
 ** $CASSANDRA_CONF
 ** $CLASSPATH
 ** $CASSANDRA_ENV_PRESERVE – (optional) a list of environment vars that should 
not be modified by cassandra-env.sh
 # source cassandra-conf.sh
 # set up any additional environment vars e.g. JMX_PORT and HEAP_SIZE in 
nodetool, or CASSANDRA_ENV_SHOW to debug other environment variables.
 # call validate_env passing any variables to be dumped during debug (e.g. 
JMX_PORT in nodetool). – validate_env defined in cassandra-conf.sh
 # call whatever program is executed by the script.

 

validate_env function will validate that:
 * CASSANDRA_INCLUDE was set or located by default mechanism
 * CASSANDRA_HOME is set
 * CASSANDRA_LOG_DIR is set
 * if CASSANDRA_ENV_DEBUG is set  the script will
 ** display the above variables
 ** display PWD,
 ** display he location of cassandra-conf.sh
 ** notify if numactl was not found
 ** dump the arguments to the validate_env function
 ** display the name and value of every variable listed in CASSANDRA_ENV_SHOW
 * if any required variable is not set validate_env will abort the script.

 

 

> Incorrect cassandra.logdir on Debian systems
> --------------------------------------------
>
>                 Key: CASSANDRA-17773
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17773
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Packaging
>            Reporter: Eric Evans
>            Assignee: Claude Warren
>            Priority: Normal
>              Labels: lhf
>             Fix For: 3.0.x, 3.11.x, 4.0.x, 4.1.x, 4.x
>
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> The Debian packaging patches bin/cassandra to use /var/log/cassandra for 
> logs, it does so conditionally however, only if CASSANDRA_LOG_DIR is unset. 
> This occurs _after_ cassandra-env.sh is sourced though, which also sets 
> CASSANDRA_LOG_DIR if unset (to $CASSANDRA_HOME/logs).  The result is that 
> -Dcassandra.lodir is set to /usr/share/cassandra/logs on Debian systems.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to