Skip to content

Convert RPM init script to fall in line with Redhat style#44

Merged
jaredmorrow merged 10 commits intomasterfrom
jhc-redhat
May 6, 2013
Merged

Convert RPM init script to fall in line with Redhat style#44
jaredmorrow merged 10 commits intomasterfrom
jhc-redhat

Conversation

@joecaswell
Copy link

This pull request changes the init script installed by RPM's to fall in line with Redhat and Fedora style guides. Pid files have been added for start/stop/status functions.

Joe Caswell added 2 commits April 17, 2013 15:15
@jaredmorrow
Copy link
Contributor

Looking at this / testing it tonight and tomorrow.

@jaredmorrow
Copy link
Contributor

Looks like the -progname directive is enough for fedora/rhel systems

(sandbox)[buildbot@riak-test-fedora-17 files]$ ps ax | grep beam.smp
17998 pts/2    Ssl+   0:06 /usr/lib64/riak/erts-5.9.1/bin/beam.smp -K true -A 64 -W w -- -root /usr/lib64/riak -progname riak -- -home /var/lib/riak -- -boot /usr/lib64/riak/releases/1.3.1/riak -embedded -config /etc/riak/app.config -pa /usr/lib64/riak/lib/basho-patches -name riak@127.0.0.1 -setcookie riak -smp enable -- console
18402 pts/3    Ssl+   0:00 /usr/lib64/riak-cs/erts-5.9.1/bin/beam.smp -K true -A 64 -W w -- -root /usr/lib64/riak-cs -progname riak-cs -- -home /var/lib/riak-cs -- -boot /usr/lib64/riak-cs/releases/1.3.1/riak-cs -embedded -config /etc/riak-cs/app.config -pa /usr/lib64/riak-cs/lib/basho-patches -name riak-cs@127.0.0.1 -setcookie riak -- console
18827 pts/4    Ssl+   0:00 /usr/lib64/stanchion/erts-5.9.1/bin/beam.smp -K true -A 64 -W w -- -root /usr/lib64/stanchion -progname stanchion -- -home /var/lib/stanchion -- -boot /usr/lib64/stanchion/releases/1.3.1/stanchion -embedded -config /etc/stanchion/app.config -pa /usr/lib64/stanchion/lib/basho-patches -name stanchion@127.0.0.1 -setcookie riak -- console
19020 pts/0    R+     0:00 grep --color=auto beam.smp

@jaredmorrow
Copy link
Contributor

The problem with pid files when we don't usually use them is the weirdness if you mix using the init.d script with the regular riak script:

[buildbot@riak-test-fedora-17 init.d]$ riak start
[buildbot@riak-test-fedora-17 init.d]$ sudo ./riak ping
pong
[buildbot@riak-test-fedora-17 init.d]$ sudo ./riak status
riak is stopped
[buildbot@riak-test-fedora-17 init.d]$ sudo ./riak start
Starting riak: Node is already running!
                                                           [FAILED]
[buildbot@riak-test-fedora-17 init.d]$ echo $?
1

@jaredmorrow
Copy link
Contributor

@joecaswell after I spoke to @Vagabond about the clash of the riak script and the init.d script, we think the best way forward is to move the pidfile creation into the runner script so it gets created no matter how you start / stop riak. So, I will hold off on this PR for now, then make it depend on another PR that creates the pid files. It might take me a bit, b/c I'll have to figure out where each OS keeps pid files!

@jaredmorrow
Copy link
Contributor

Tested start/stop/hardstop/ping compared to runner script commands of same name, everything now acts the same and doesn't step on each other's toes with the .pid files.

jaredmorrow added a commit that referenced this pull request May 6, 2013
Convert RPM init script to fall in line with Redhat style
@jaredmorrow jaredmorrow merged commit 2ad754d into master May 6, 2013
@jaredmorrow jaredmorrow deleted the jhc-redhat branch May 6, 2013 20:20
@joecaswell joecaswell restored the jhc-redhat branch October 14, 2016 05:38
@joecaswell joecaswell deleted the jhc-redhat branch October 14, 2016 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants