Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fixed problem in Cassandra init script #134

Merged
merged 1 commit into from Jan 14, 2013

Conversation

Projects
None yet
4 participants
Contributor

iconara commented Jan 14, 2013

Updated the Cassandra init script so that the cassandra service starts properly and shuts down cleanly.

I believe this should fix travis-ci/travis-ci#840

The current script repeats most of what's in /usr/local/cassandra/bin/cassandra, but not enough, there's a lot of the environment Cassandra needs to start that is missing. This patch changes it so that it simply runs cassandra -p $PIDFILE and daemonizes it with start-stop-daemon (by way of start_daemon). The stop and status tasks had to change too.

The script still contains some hard coded paths and some interpolated, if you pass in another conf_dir or even installation_dir it will no longer work. I can fix that too if you'd like but I though that just fixing the issue at hand was best to start with. There's also some stuff that could be removed now when /usr/local/cassandra/bin/cassandra is doing most of the lifting (the part that finds JAVA_HOME for example).

@iconara iconara Fixed problem in Cassandra init script
Updated the Cassandra init script so that the `cassandra` service starts properly and shuts down cleanly.

The current script repeats most of what's in `/usr/local/cassandra/bin/cassandra`, but not enough, there's a lot of the environment Cassandra needs to start that is missing. This patch changes it so that it simply runs `cassandra -p $PIDFILE` and daemonizes it with `start-stop-daemon` (by way of `start_daemon`). The stop and status tasks had to change too.
dbcc1b0
Owner

joshk commented Jan 14, 2013

Hey @iconara

Wow, thank you, I had one question, do you think it is worth changing to use the official cassandra deb? (http://wiki.apache.org/cassandra/DebianPackaging)

I have had reports that the deb installs a correct init script.

Thanks a bundle,

Josh

Contributor

michaelklishin commented Jan 14, 2013

Debian packages also try to tweak system parameters that fail on OpenVZ (because OpenVZ does not allow them to be modified).

@michaelklishin michaelklishin pushed a commit that referenced this pull request Jan 14, 2013

Michael Klishin Merge pull request #134 from iconara/patch-1
Fixed problem in Cassandra init script
04c2a16

@michaelklishin michaelklishin merged commit 04c2a16 into travis-ci:master Jan 14, 2013

Contributor

michaelklishin commented Jan 14, 2013

@iconara thank you. I hope there will be another PR to this repo ;)

Owner

joshk commented Jan 14, 2013

I had a user test installing the cassandra deb package on BlueBox and he reported it worked perfectly.

But that said, if we have a working recipe then that is great too.

On 14/01/2013, at 10:05 PM, Michael Klishin notifications@github.com wrote:

Debian packages also try to tweak system parameters that fail on OpenVZ (because OpenVZ does not allow them to be modified).


Reply to this email directly or view it on GitHub.

Contributor

iconara commented Jan 14, 2013

@joshk unfortunately haven't tried the deb myself, so I don't know.

@michaelklishin PR coming up.

Contributor

ifesdjeen commented Jan 14, 2013

Thanks for the fix! It seems that I ran into the same problem.

Just wondering, when these changes could become available on Travis itself?

@iconara iconara referenced this pull request in michaelklishin/cassandra-chef-cookbook Jan 14, 2013

Merged

Fixed problem in the init script #4

Contributor

iconara commented Jan 14, 2013

Thanks for merging this. I'll work with @michaelklishin to create an updated Cassandra recipe with the other changes I mentioned.

@iconara iconara deleted the iconara:patch-1 branch Jan 14, 2013

Owner

joshk commented Jan 16, 2013

I have updated the JVM workers with these changes and it produces some odd results.

https://next.travis-ci.org/simong/cassandratravis

It looks like all the log output is going to STDOUT and it is quite verbose.

@iconara are you able to look into this further?

Contributor

iconara commented Jan 16, 2013

That's a bit odd, but I know what's going on. I didn't redirect STDOUT when cassandra is started, but I thought service would take care of that and not output it into the test runner output. I'll fix it.

Owner

joshk commented Jan 16, 2013

Thank you very much, once you have done that I can reprovision the associated templates :)

On 16/01/2013, at 10:40 PM, Theo Hultberg notifications@github.com wrote:

That's a bit odd, but I know what's going on. I didn't redirect STDOUT when cassandra is started, but I thought service would take care of that and not output it into the test runner output. I'll fix it.


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment