Write MongoDB init scripts in the elements

Bug #1493515 reported by Petr Malik
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Low
Matthew Van Dijk

Bug Description

Write MongoDB init scripts in the elements

The Issue:

MongoDB currently writes some of its init scripts ('mongos')
in the guest-agent (MongoDB does not package the 'mongos' script).

The init scripts hardcode paths to the PID-file and the configuration
file.
This solution is not very portable as different platforms store these
files at various places and make different assumptions about how these
would be initialized. Some platforms (Ubuntu) store the files in
root '/var' and '/etc' directories which is rather than sub-directories
which leads to a less clean file structure.

The above problem is made even worse by variations across different
MongoDB versions.

Proposed Fix:

The (inherently platform-specific) init scripts should be written in the
elements rather than (mostly platform-agnostic) guest-agent.
The elements ca write both 'mongod' and 'mongos' init scripts. Trove
will always pick the correct one to use based on the type of the
provisioned instance.

Changed in trove:
assignee: nobody → Petr Malik (pmalik)
milestone: none → liberty-rc1
status: New → Triaged
Changed in trove:
milestone: liberty-rc1 → mitaka-1
Changed in trove:
assignee: Petr Malik (pmalik) → Matthew Van Dijk (mvandijk)
Revision history for this message
Peter Stachowski (peterstac) wrote :

This puts a dependency on the image having the 'correct' init scripts (i.e. it's out of our control in a production environment, so we'd have to document it properly or the customer's guest images won't work as expected).

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/245292
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=3dd7401c0875f320bdc0d9ef0f67101e9a65740e
Submitter: Jenkins
Branch: master

commit 3dd7401c0875f320bdc0d9ef0f67101e9a65740e
Author: Matt Van Dijk <email address hidden>
Date: Fri Nov 13 13:41:47 2015 -0500

    Move MongoDB mongos upstart script to elements

    The custom upstart script should be a part of the elements, as it is OS
    specific. This requires 2 parts - add the code to the elements (prereq),
    and remove the code from trove (here).

    Change-Id: I6bc400c3d31ce1fe1e961bdeedda7c31308c2daa
    Depends-on: I0ae98f173058cae6b9e0eee440318f0277972503
    Closes-bug: 1493515

Changed in trove:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.