ConsistencyGroupException doesn't exist in tempest

Bug #1858417 reported by Rajat Dhasmana
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cinder-tempest-plugin
Fix Released
Undecided
Luigi Toscano
tempest
Fix Released
Undecided
Rajat Dhasmana

Bug Description

cinder-tempest-plugin raises ConsistencyGroupException when a CG is created and is in error state[1] which doesn't exist in tempest.

This causes the following failure when running the CG tests :

[root@controller-0 test]# stestr run cinder_tempest_plugin.api.volume.admin.test_consistencygroups.ConsistencyGroupsV2Test.test_consistencygroup_cgsnapshot_create_delete
{0} cinder_tempest_plugin.api.volume.admin.test_consistencygroups.ConsistencyGroupsV2Test.test_consistencygroup_cgsnapshot_create_delete [4.498850s] ... FAILED

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    b'Traceback (most recent call last):'
    b' File "/usr/lib/python3.6/site-packages/cinder_tempest_plugin/api/volume/admin/test_consistencygroups.py", line 136, in test_consistencygroup_cgsnapshot_create_delete'
    b" cg['id'], 'available')"
    b' File "/usr/lib/python3.6/site-packages/cinder_tempest_plugin/services/consistencygroups_client.py", line 140, in wait_for_consistencygroup_status'
    b' raise exceptions.ConsistencyGroupException(cg_id=cg_id)'
    b"AttributeError: module 'tempest.exceptions' has no attribute 'ConsistencyGroupException'"
    b''

[1] https://github.com/openstack/cinder-tempest-plugin/blob/master/cinder_tempest_plugin/services/consistencygroups_client.py#L140

Changed in tempest:
assignee: nobody → Rajat Dhasmana (whoami-rajat)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master
Review: https://review.opendev.org/701208

Changed in tempest:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.opendev.org/701208
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=fbea823a342c0060693a6880be3d8aad670b3ea8
Submitter: Zuul
Branch: master

commit fbea823a342c0060693a6880be3d8aad670b3ea8
Author: Rajat Dhasmana <email address hidden>
Date: Mon Jan 6 10:44:33 2020 +0000

    Add ConsistencyGroup Exceptions in tempest

    The exceptions ConsistencyGroupException and
    ConsistencyGroupSnapshotException are required by
    cinder-tempest-plugin[1][2] when the
    CG or CG Snapshot fails to create and is in error state.
    These exceptions never existed as part of the original topic[3]
    but failures are seen while running tests as reported in the bug.

    [1] https://github.com/openstack/cinder-tempest-plugin/blob/master/cinder_tempest_plugin/services/consistencygroups_client.py#L140
    [2] https://github.com/openstack/cinder-tempest-plugin/blob/master/cinder_tempest_plugin/services/consistencygroups_client.py#L172
    [3] https://review.opendev.org/#/q/topic:cg-tests+(status:open+OR+status:merged)

    Change-Id: I62e0ba556b884c94f6e8796a2e6f6d8083277fa4
    Closes-Bug: #1858417

Changed in tempest:
status: In Progress → Fix Released
Revision history for this message
Luigi Toscano (ltoscano) wrote :

I think the correct behavior is to define the exceptions inside the plugin. I believe having tempest provide custom exceptions which are relevant only for the plugin introduces a cross-dependency.

I think it makes sense to add those exceptions to the plugin, as other plugins did.

Luigi Toscano (ltoscano)
Changed in cinder-tempest-plugin:
assignee: nobody → Luigi Toscano (ltoscano)
Revision history for this message
Luigi Toscano (ltoscano) wrote :

This was fixed in cinder-tempest-plugin through https://review.opendev.org/c/openstack/cinder-tempest-plugin/+/743935 , available since version 1.1.0.

Changed in cinder-tempest-plugin:
status: New → Fix Released
tags: added: consistency group
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.