Trove GuestAgent Stop Also Stops Some Datastores
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack DBaaS (Trove) |
Fix Released
|
High
|
Auston McReynolds |
Bug Description
executing "sudo service trove-guest stop" in a cassandra guest vm not
only shuts down the guest agent, it shuts down cassandra. after some
investigation, it became clear that the cassandra process created by
the guest agent belongs to the same process group as trove-guest.
relevant code points-of-interest:
* http://
* http://
* http://
a couple of options:
* change 'sudo /usr/sbin/
this runs the command in the background, preventing the shutdown of
trove-guest from manipulating it.
* change 'sudo /usr/sbin/
it's unclear why this approach was not used to begin with, but that
aside, this works like the "-b" switch above due to the use of
start-stop-daemon
(see https:/
it's worth noting that the final command resulting from the init
script differs from running /usr/sbin/cassandra directly in that it:
* adds "-Dcassandra-
* adds to path: "/usr/share/
* adds "-XX:HeapDumpPa
* adds "-XX:ErrorFile=
suffice it to say, it looks like using 'sudo service cassandra start'
is the correct approach/fix.
thus far cassandra has been the focal point of this write-up, but
let's step back and consider holistically how datastores should be
started.
proposed guidelines:
* if an init script exists, it should be used
(e.g. 'sudo service <datastore> start')
* if an init script exists, but it doesn't properly daemonize (to
avoid being stopped when trove-guest is stopped), the '-b' switch
should be added.
(e.g. 'sudo -b service <datastore> start')
* if an init script does not exist, or it does not withstand a
a trove-guest stop, with or without the '-b' switch, running the
bin directly is acceptable.
taking an example, mysql 5.6 suggests to start the mysql daemon with
mysqld_safe (https:/
however, mysqld_safe does not utilize start-stop-daemon or an
equivalent strategy, meaning mysql will be shutdown if trove-guest is
stopped. using the guidelines above, the approach would be:
'sudo -b service mysql.server start'.
a slight variation of this approach would be to always use the '-b'
switch for a datastore start,
i.e. modify:
* http://
* http://
* http://
one thing that remains unclear however, is: should mysqld_safe be
used in favor of mysqld for mysql 5.5 for ubuntu/fedora? the verbiage
in the mysql literature is somewhat wishy-washy:
* http://
* http://
Changed in trove: | |
milestone: | none → juno-1 |
importance: | Undecided → Medium |
importance: | Medium → High |
Changed in trove: | |
status: | Fix Committed → Fix Released |
Changed in trove: | |
milestone: | juno-1 → 2014.2 |
Fix proposed to branch: master /review. openstack. org/81914
Review: https:/