Bug 1069857

Summary: cassandra start script should not search for default cassandra include script
Product: [JBoss] JBoss Operations Network Reporter: John Sanda <jsanda>
Component: Installer, Storage NodeAssignee: Michael Burman <miburman>
Status: CLOSED CURRENTRELEASE QA Contact: Filip Brychta <fbrychta>
Severity: high Docs Contact:
Priority: unspecified    
Version: JON 3.2CC: fbrychta, hrupp, miburman, mkoci, myarboro
Target Milestone: DR01   
Target Release: JON 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1069855 Environment:
Last Closed: 2014-12-11 14:04:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1069855    
Bug Blocks:    

Description John Sanda 2014-02-25 19:21:03 UTC
+++ This bug was initially created as a clone of Bug #1069855 +++

Description of problem:
The cassandra shell script used by the Storage Node searches for and executes any cassandra.in.sh scripts in the following locations:

  * /usr/share/cassandra/cassandra.in.sh
  * /usr/local/share/cassandra/cassandra.in.sh
  * /opt/cassandra/cassandra.in.sh
  * $HOME/.cassandra.in.sh
  * <storage-node-basedir>/bin/cassandra.in.sh

The problem with all but the last one is that they can conflict with other Cassandra installations on the machine. A community user hit this problem. He installed a rpm distro from DataStax, and it caused the Storage Node to use the settings from that other installation.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Follow steps described at http://www.datastax.com/documentation/cassandra/1.2/cassandra/install/installRHEL_t.html to install an RPM distro of Cassandra 1.2.x
2. Use the default settings for the RPM-based install 
3. Install RHQ as a non-admin user
4. Start the Storage Node as a non-admin user

Actual results:
You should see log messages (from the Storage Node) like,

log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /var/log/cassandra/system.log (Permission denied)

or

INFO 15:06:56,211 Classpath: /etc/cassandra/conf

or 

INFO 15:06:56,915 Data files directories: [/var/lib/cassandra/data]

Expected results:
The Storage Node settings should be used.

Additional info:

Comment 1 Michael Burman 2014-07-14 10:06:21 UTC
Fixed in master

commit fbc3f37bc8d3d4cc65e40a5e6e36c5971e588461
Author: burmanm <miburman>
Date:   Mon Jul 14 13:05:24 2014 +0300

    [BZ 1069855] Force CASSANDRA_INCLUDE environment variable to prevent rhqctl from starting wrong Cassandra instance

Comment 2 Michael Burman 2014-07-14 10:41:35 UTC
For Windows, force CASSANDRA_HOME, fixed in master:

commit 89a2c43668a9d3b9ace75cb23ef96eaa86f7a0f0
Author: burmanm <miburman>
Date:   Mon Jul 14 13:39:51 2014 +0300

    [BZ 1069855] Force CASSANDRA_HOME in Windows environments to prevent starting wrong Cassandra instance from rhqctl

Comment 3 Simeon Pinder 2014-07-31 15:51:56 UTC
Moving to ON_QA as available to test with brew build of DR01: https://brewweb.devel.redhat.com//buildinfo?buildID=373993

Comment 4 Filip Brychta 2014-08-28 09:07:05 UTC
Verified on
Version :	
3.3.0.ER01.1
Build Number :	
9941660:f3aa7e7