Filter Datastore Without Any Active Versions

Bug #1290617 reported by Auston McReynolds
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Low
Auston McReynolds

Bug Description

Hide Datastores In List With No Active Versions

in a datastore-list operation, for non-admin, filters out
datastores that either have no versions or have no active
versions for non-admin users. admins continue to see all
datastores, active or inactive, in a datastore-list
operation.

using devstack as an example:

$ source ~/devstack/accrc/demo/demo
$ trove datastore-list
+--------------------------------------+-------+
| id | name |
+--------------------------------------+-------+
| 818b2ea3-9d17-4644-a912-3da435682635 | redis |
| bd113175-db2f-4828-9aeb-2e971f3c29ce | mysql |
+--------------------------------------+-------+

$ source ~/devstack/accrc/admin/admin
$ trove datastore-list
+--------------------------------------+------------------+
| id | name |
+--------------------------------------+------------------+
| 10000000-0000-0000-0000-000000000001 | Legacy MySQL |
| 363d3cf1-9b7c-4278-94ce-f86c577d2ff9 | Test_Datastore_1 |
| 818b2ea3-9d17-4644-a912-3da435682635 | redis |
| bd113175-db2f-4828-9aeb-2e971f3c29ce | mysql |
+--------------------------------------+------------------+

despite inactive datastores being filtered from datastore-list, a datastore-show on an inactive datastore will still work for both admin and non-admin.

hiding inactive datastores is useful for a multitude of reasons:

* an operator is in the midst of setting up a new datastore, and therefore the user shouldn't see it until it has an active version
* an operator used to offer a particular datastore, but for whatever reason has removed support for it.
* when datastore support lands in horizon, selecting a datastore from a dropdown will trigger the population of the datastore-version dropdown. if a user selects a datastore, and the datastore-version dropdown gets populated with nothing, that's a bad user experience.

Changed in trove:
assignee: nobody → Auston McReynolds (amcrn)
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/79513

Changed in trove:
status: New → In Progress
Revision history for this message
Auston McReynolds (amcrn) wrote :

Split from https://review.openstack.org/#/c/69408/ (but added a few new tests).

description: updated
description: updated
Changed in trove:
milestone: none → icehouse-rc1
importance: Undecided → Low
Revision history for this message
Sushil Kumar (sushil-kumar2) wrote :

Seems to be a valid point, we should restrict the visibility of empty datastores to the non-admin.

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

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

commit 63d62f084e3e54d7831c728ca40de4ce94004315
Author: amcrn <email address hidden>
Date: Fri Mar 14 13:22:02 2014 -0700

    Hide Datastores In List With No Active Versions

    in a datastore-list operation, for non-admin, filters out
    datastores that either have no versions or have no active
    versions for non-admin users. admins continue to see all
    datastores, active or inactive, in a datastore-list
    operation.

    Change-Id: Iccaf9ae59469fd0f4cb346ee258d3132eed83660
    Co-Authored-By: Andrey Shestakov <email address hidden>
    Closes-Bug: #1290617

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-rc1 → 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.