client_parameters in ServiceClients class is not honoured

Bug #1680915 reported by Andrea Frittoli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Medium
Andrea Frittoli

Bug Description

client_parameters has been designed as a way to pass parameters for the client to the ServiceClients class.

After the initial implementation, the client registry has been added, which is a singleton which stores all service clients specs and parameters, coming from both tempest and plugins.

The client registry allows for automatic registration of all clients and their parameters. If configuration is available, parameters will be push into the registry automatically.

When the registry part has been implemented, the client_parameters logic has been broken. Parameters are loaded and prepared correctly, but ultimately they are not used for registration, they are basically ignored.

This is not a problem for Tempest in the gate since the valid parameters come from config via the registry. However the interface in http://git.openstack.org/cgit/openstack/tempest/tree/tempest/lib/services/clients.py#n262 is not valid anymore since client_parameters is not honoured anymore.

There are a few of options:
- drop client_parameters for good - it was introduced as a workaround until the registry was available anyways. This would imply a backward incompatible change to the interface. Document that the way to pass parameters to clients is via the registry only.
- mark client_parameters as deprecated - this would imply that we let the bug around until the deprecation period is over. If people tries to use the deprecated interface it won't work.
- implement the logic to fix the bug (i.e. if client_parameters is supplied, use that to register the client, and ignore parameters from the registry). This means more logic, more test cases, for something not really used, but fixing the bug and not changing the interface.

Changed in tempest:
assignee: nobody → Andrea Frittoli (andrea-frittoli)
status: New → Confirmed
importance: Undecided → Medium
Changed in tempest:
status: Confirmed → In Progress
Revision history for this message
Ken'ichi Ohmichi (oomichi) wrote :
Revision history for this message
Andrea Frittoli (andrea-frittoli) wrote :

Since the object_storage (swift) client is not in lib yet, it is still handled via client_parameters. So definitely client_parameters cannot be removed yet.
The proposed solution is then:
- start deprecation on client_paramters
- meanwhile remove the last dependencies to it
- once the deprecation period is over remove it for good

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

Reviewed: https://review.openstack.org/454886
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=3b6d599c9bc2317889607b815ce8e9a94b951922
Submitter: Jenkins
Branch: master

commit 3b6d599c9bc2317889607b815ce8e9a94b951922
Author: Andrea Frittoli <email address hidden>
Date: Sun Apr 9 18:57:16 2017 +0200

    Deprecate client_parameters from ServiceClients

    client_parameters was been designed as a way to pass parameters
    for service clients to the ServiceClients class.

    After the initial implementation, the client registry was added,
    which allows for automatic registration of all clients and their
    parameters. If configuration is available, parameters will be
    pushed into the registry automatically.

    When the registry part was implemented, the client_parameters logic
    has been broken. Parameters are loaded and prepared correctly, but
    ultimately they are not used for registration, they are basically ignored.

    So this commit simply deprecates client_parameters, so that once it's not
    used in tempest/clients.py anymore and the deprecation periodic is over
    it can be removed.

    closes-bug: #1680915
    Change-Id: Ib37bde098d15ce440297728f0d0e1087b8693b6c

Changed in tempest:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tempest 16.0.0

This issue was fixed in the openstack/tempest 16.0.0 release.

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.