inconsistent usage of mount_point in guestagent

Bug #1248212 reported by Illia Khudoshyn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Low
Ed Cranford

Bug Description

The 'mount_point' parameter in guestagent holds path where volume should be mounted to.
trove.guestagent.datastore.mysql.manager.Manager#prepare method receives 'mount_point' as a parameter.
But in come occasions its value is taken from CONF rather than from the parameter, see
https://github.com/openstack/trove/blob/master/trove/guestagent/datastore/mysql/manager.py#L99,
https://github.com/openstack/trove/blob/master/trove/guestagent/datastore/mysql/manager.py#L105
vs
https://github.com/openstack/trove/blob/master/trove/guestagent/datastore/mysql/manager.py#L107.

Moreover, in some occasions the CONF is the only source where the value of the 'mount_point' parameter can be obtained, see
https://github.com/openstack/trove/blob/master/trove/guestagent/backup/backupagent.py#L64.

Changed in trove:
assignee: nobody → Illia Khudoshyn (ikhudoshyn)
description: updated
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/56881

Changed in trove:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in trove:
milestone: none → icehouse-1
Changed in trove:
importance: Undecided → Low
Thierry Carrez (ttx)
Changed in trove:
milestone: icehouse-1 → icehouse-2
Revision history for this message
Sushil Kumar (sushil-kumar2) wrote :

Had few points to share
1. agree to the fact that the usage should be consistent throughout the code.
2. however, i tried to read through the code, found that mount_point paramter is everywhere derived from conf.mount_point itself.
3. going forward my thought is to change the conf.mount_point to mount_point in guestagent code which is received as a parameter in prepare method. or the other way is remove the mount_point parameter from prepare method and use conf.mount_point everywhere.

Changed in trove:
assignee: Illia Khudoshyn (ikhudoshyn) → Denis M. (dmakogon)
Changed in trove:
milestone: icehouse-2 → icehouse-3
Revision history for this message
Denis M. (dmakogon) wrote :

Method build_volume_info sets mount_point attribute as "CONF.mount_point", that appears in taskmanager.conf and probably, guestagent.conf (because prepare call assumes that CONF.mount_point should exist)

https://github.com/openstack/trove/blob/master/trove/taskmanager/models.py#L491

Revision history for this message
Denis M. (dmakogon) wrote :
Revision history for this message
Denis M. (dmakogon) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

It has always giving me the torrid time to relate these conf.mount_point values in different files.
Good to make it consistent.

Changed in trove:
assignee: Denis M. (dmakogon) → Ed Cranford (ed--cranford)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

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

commit ea51b7e625b6be4415a665cd36dab44742b0362e
Author: Denis Makogon <email address hidden>
Date: Thu Feb 27 12:25:11 2014 +0200

    Fix inconsistent usage of mount_point

    Reasons:
    - multiple datastores;
    - inconsistent usage of mount_point at
    taskmanager and guestagent;

    Changes:
    - oslo groups;
    - mount point per datastore;
    - guest API not changed.

    Change-Id: I8044789c6ab2ed837ff0e1b16183dfeafbf955bb
    Closes-Bug: #1248212

Changed in trove:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in trove:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in trove:
milestone: icehouse-3 → 2014.1
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.