Whether database/user operation support cluster or not

Bug #1741161 reported by Yao Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-troveclient
Triaged
Wishlist
Yao Wang

Bug Description

I realize the cmd about database and user operation find resource by use function ‘_find_instance_or_cluster’.
e.g
def do_database_delete(cs, args):
    """Deletes a database from an instance."""
    instance, _ = _find_instance_or_cluster(cs, args.instance)
    cs.databases.delete(instance, args.database)

But troveclient don't support these operations for cluster now. It just treat cluster resource as instance. So use a cluster_name will return "Resource xxx cannot be found.". I think this is inaccurate.

Shell we support these operations for cluster or just change function '_find_instance_or_cluster'to '_find_instance'?

Revision history for this message
Fan Zhang (fanzhang) wrote :

At first, I think changing into _find_instance makes sense, but what if someone want to delete the databases inside a cluster? Can we add some logics like when users want to delete the database inside a cluster, just raise OperationNotSupported exception? Just some quick thoughts here.

BTW, is the OSC or troveclient currently does not support operations for cluster now?

Revision history for this message
jian.song (jiansong) wrote :

This question needs to be divided into two stages, and I now have only the experience of mongodb and mariadb galera, which are two different forms of clustering.
mariadb galera can perform database and user operations on any node in the cluster, but mongodb can only be performed on mongos nodes.
1. Into _find_instance not a wrong amendment, but the feeling is not perfect, can be used to transition.
2. We can enhance this functionality by parsing the datastore of the cluster when it is determined that the cluster is passing in and then looking for a suitable database schema for each of these operations but this requires having all kinds of clusters supported by trove experience of

Changed in python-troveclient:
status: New → Triaged
importance: Undecided → Wishlist
assignee: nobody → Yao Wang (nihaome521)
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.