Shares created in CG from CG-snapshot do not have share_server_id using DHSS=true driver

Bug #1571594 reported by Valeriy Ponomaryov
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Goutham Pacha Ravi

Bug Description

Steps to reproduce:

1) Create share-type
2) Create share-network
3) Create CG
4) Add (1) and (2) to (3)
5) Create share with CG (3)
6) Create CG snapshot from CG (3)
7) Create CG from CG snapshot (6)

Expected results:
CG (7) from CG snapshot (6) has one share and it has correct values for share-network, share-server and share-type.

Actual result: "share_server_id" is absent for share (7). And such share has "available" status, but nothing can be done with it due to lost attribute.

How to reproduce in CI: disable "suppression of cleanup errors".

Using generic driver, two following tests will fail (+ other side-failures for impossibility to remove chain of resources):

1) manila_tempest_tests.tests.api.admin.test_consistency_group_actions.ConsistencyGroupActionsTest.test_create_cg_from_multi_typed_populated_cgsnapshot_v2_4

2) manila_tempest_tests.tests.api.test_consistency_group_actions.ConsistencyGroupActionsTest.test_create_consistency_group_from_populated_cgsnapshot_v2_4

logs: http://logs.openstack.org/47/306847/2/check/gate-manila-tempest-dsvm-mysql-generic/4695635/logs/testr_results.html.gz

These tests fail only in DHSS=True driver mode and "generic driver" is the only driver that runs in CI with these tests in that mode.

Changed in manila:
milestone: none → newton-1
assignee: nobody → Valeriy Ponomaryov (vponomaryov)
importance: Undecided → Medium
status: New → In Progress
tags: added: cg ci tempest
description: updated
summary: - tempest tests with creation of populated CGs do not use share-network in
+ tempest tests with creation of populated CGs fail on cleanup in
DHSS=True drivers
description: updated
summary: - tempest tests with creation of populated CGs fail on cleanup in
- DHSS=True drivers
+ Shares created in CG from CG-snapshot do not have share_server_id using
+ DHSS=true driver
description: updated
description: updated
description: updated
description: updated
Changed in manila:
assignee: Valeriy Ponomaryov (vponomaryov) → nobody
status: In Progress → New
tags: added: mitaka-backport-potential
Changed in manila:
assignee: nobody → Goutham Pacha Ravi (gouthamr)
Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :
Download full text (14.4 KiB)

Confirmed the bug, it exists in the CG API layer..

stack@openstack2:~$ manila cg-create --name my_cg --share-types my_share_type --share-network my_manila_network
+----------------------+--------------------------------------+
| Property | Value |
+----------------------+--------------------------------------+
| status | creating |
| description | None |
| source_cgsnapshot_id | None |
| created_at | 2016-04-18T17:35:58.161996 |
| share_network_id | 6a6b61d7-6996-45de-8de4-7ef13dc3b873 |
| share_server_id | None |
| host | None |
| project_id | bf2cecec85d3497a9e91ebfb37d33013 |
| share_types | 3961c4dc-14a6-4dcf-bdf2-3a3d44994e0e |
| id | c7975d19-77d2-485e-b81d-1b4140f73830 |
| name | my_cg |
+----------------------+--------------------------------------+

stack@openstack2:~$ manila cg-list
+--------------------------------------+-------+-------------+----------+
| id | name | description | status |
+--------------------------------------+-------+-------------+----------+
| c7975d19-77d2-485e-b81d-1b4140f73830 | my_cg | None | creating |
+--------------------------------------+-------+-------------+----------+

stack@openstack2:~$ manila create NFS 1 --cg c7975d19-77d2-485e-b81d-1b4140f73830 --share-network my_manila_network --share-type my_share_type
+-----------------------------+--------------------------------------+
| Property | Value |
+-----------------------------+--------------------------------------+
| status | creating |
| share_type_name | my_share_type |
| description | None |
| availability_zone | None |
| share_network_id | 6a6b61d7-6996-45de-8de4-7ef13dc3b873 |
| share_server_id | None |
| host | |
| access_rules_status | active |
| snapshot_id | None |
| is_public | False |
| task_state | None |
| snapshot_support | True |
| id | 15b9232f-2f98-41ac-a0fa-1bffb86132da |
| size | 1 |
| name | None |
| share_type | 3961c4dc-14a6-4dcf-bdf2-3a3d44994e0e |
| has_replicas | False |
| replication_type | None |
| created_at ...

Changed in manila:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

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

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

Reviewed: https://review.openstack.org/312963
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=118d440a905dac86b76e7e251f855c9223173427
Submitter: Jenkins
Branch: master

commit 118d440a905dac86b76e7e251f855c9223173427
Author: Goutham Pacha Ravi <email address hidden>
Date: Thu Apr 21 13:17:49 2016 -0400

    Fix share server info in CGs created from CGs

    Currently when a POST request is made to /consistency-groups
    with a source cg-snapshot, the API does not register the share
    network information (share_server_id and share_network_id) in
    the database row newly created for the CG being created.

    This information is essential to any shares that are being created
    along with the consistency group.

    - Disallow providing a share_network_id when using a source cg_snapshot_id
    - Copy share network information from the parent CG
    - Fix the share_server_id that was incorrect in the API response

     APIImpact

     Closes-Bug: #1571594
     Closes-Bug: #1572742

    Change-Id: I1c3581c81e0b845f46eef3cd0acddb55850447a5

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/317528

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/mitaka)

Reviewed: https://review.openstack.org/317528
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=7ee41c0507aa020778f4fc764a79485804de009a
Submitter: Jenkins
Branch: stable/mitaka

commit 7ee41c0507aa020778f4fc764a79485804de009a
Author: Goutham Pacha Ravi <email address hidden>
Date: Thu Apr 21 13:17:49 2016 -0400

    Fix share server info in CGs created from CGs

    Currently when a POST request is made to /consistency-groups
    with a source cg-snapshot, the API does not register the share
    network information (share_server_id and share_network_id) in
    the database row newly created for the CG being created.

    This information is essential to any shares that are being created
    along with the consistency group.

    - Disallow providing a share_network_id when using a source cg_snapshot_id
    - Copy share network information from the parent CG
    - Fix the share_server_id that was incorrect in the API response

     APIImpact

     Closes-Bug: #1571594
     Closes-Bug: #1572742

    Change-Id: I1c3581c81e0b845f46eef3cd0acddb55850447a5
    (cherry picked from commit 118d440a905dac86b76e7e251f855c9223173427)

tags: added: in-stable-mitaka
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/manila 3.0.0.0b1

This issue was fixed in the openstack/manila 3.0.0.0b1 development milestone.

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.