prepare method preserves data from always from CONF.mount_point

Bug #1261354 reported by Sushil Kumar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Invalid
Undecided
Sushil Kumar

Bug Description

prepare method preserves data always from CONF.mount_point, which is not a valid case.

Referring to the code at
https://github.com/openstack/trove/blob/master/trove/guestagent/datastore/mysql/manager.py#L119-L121

1. The data would always exist on /var/lib/mysql ir-respective of value of CONF.mount_point, because that is the location where mysql puts its data when installed.
2. We should be preserving /var/lib/mysql instead of CONF.mount_point.
3. Currently, CONF.mount_point has the value "/var/lib/mysql" but if some one needs a changes in CONF.mount_point, then prepare would not backup the data directories, in fact that may backup nothing because CONF.mount_point might not be an existing location.
4. Going forward, there are two ways to use this value /var/lib/mysql in the code, either like https://github.com/openstack/trove/blob/master/trove/guestagent/datastore/mysql/service.py#L50 to hard code a variable, and other way would be to use a CONF parameter. I think we should prefer the CONF way, so that this parameter would be modifiable later to other value by changing configuration files instead of change in code.

Changed in trove:
assignee: nobody → Sushil Kumar (sushil-kumar2)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

Fix proposed to branch: master
Review: https://review.openstack.org/62399

Changed in trove:
status: New → In Progress
Revision history for this message
Denis M. (dmakogon) wrote :

This bug-report is dublicate of https://launchpad.net/bugs/1248212

Changed in trove:
status: In Progress → Incomplete
Revision history for this message
Sushil Kumar (sushil-kumar2) wrote :

I would disagree to duplicacy comment as https://launchpad.net/bugs/1248212 is all-together different and addresses a separate issue.

Revision history for this message
Sushil Kumar (sushil-kumar2) wrote :

this bug on resolving would help https://bugs.launchpad.net/trove/+bug/1243874 to be resolved.

Changed in trove:
status: Incomplete → In Progress
Revision history for this message
Denis M. (dmakogon) wrote :

This bug should be closed, fix proposed and merged.

Changed in trove:
status: In Progress → Incomplete
Changed in trove:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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