can not get group specs in create_group_snapshot

Bug #1632265 reported by jiamin
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Xing Yang

Bug Description

I set consistent_group_snapshot_enable in the group specs in order to tell driver to create group snapshot using CG, but I can not get consistent_group_snapshot_enable in create_group_snapshot, because group_type_id in group_snapshot is None, so I can not call group_types.get_group_type_specs which needs the group type id to get it.

GroupSnapshot(created_at=2016-10-11T06:38:41Z,deleted=False,deleted_at=None,description=None,
group=Group(58076739-b701-4aba-8222-b19eef651e81),group_id=58076739-b701-4aba-8222-b19eef651e81,
group_type_id=None,id=d3b51bc8-3b89-4f03-8687-3914fa0cdb19,name=None,project_id='791e69bc7b454c99a9efb937181d0c7d',
snapshots=<?>,status='creating',updated_at=None,user_id='e7828cb2af63430892aaeff3b025cf4c')

I don't know whether is this the expected behavior, if yes, is there any one can tell me the correct way, thanks in advance.

Tags: groups
Revision history for this message
Xing Yang (xing-yang) wrote :

This is a bug. I'll fix it. For now, you can get group from group_id and find group_type from the group. Thanks for reporting this.

tags: added: groups
Revision history for this message
Xing Yang (xing-yang) wrote :

By the way, which driver are you working on?

Changed in cinder:
assignee: nobody → Xing Yang (xing-yang)
status: New → In Progress
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Revision history for this message
jiamin (shljia) wrote :

Thanks Xing for your quick response and your patch, it works.

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

Reviewed: https://review.openstack.org/385733
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=7aab55331344df2cc1645e9ee2949107ac47e156
Submitter: Jenkins
Branch: master

commit 7aab55331344df2cc1645e9ee2949107ac47e156
Author: xing-yang <email address hidden>
Date: Thu Jul 28 10:38:38 2016 -0400

    Add group_type_id in create_group_snapshot

    group_type_id should be set when a group_snapshot is created,
    however it was missed in the code. This patch adds the missing
    group_type_id in create_group_snapshot.

    Change-Id: I5fdb3324e19f53a1116a04fcb34f6776c42a798d
    Closes-Bug: #1632265

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

This issue was fixed in the openstack/cinder 10.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.