Create CG from CG snapshot: source snapshots passed to driver are not sorted

Bug #1430628 reported by Xing Yang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Xing Yang

Bug Description

This problem was discovered while testing create CG from CG snapshot. In create_consistencygroup_from_src() in manager.py, it calls the driver method create_consistencygroup_from_src() and passes in parameters including source snapshots and target volumes. The problem is that the snapshots list is not sorted to be in the same order as their corresponding volumes. So they may be in the wrong order. It should be sorted before being passed to the driver.

self.driver.create_consistencygroup_from_src(context, group_ref, volumes, cgsnapshot, snapshots)

Tags: cg
Xing Yang (xing-yang)
Changed in cinder:
assignee: nobody → Xing Yang (xing-yang)
importance: Undecided → High
status: New → In Progress
milestone: none → kilo-3
tags: added: cg
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/163288

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

Reviewed: https://review.openstack.org/163288
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=56c47cc5f51bc94d1df382cd6f4255acd7048808
Submitter: Jenkins
Branch: master

commit 56c47cc5f51bc94d1df382cd6f4255acd7048808
Author: Xing Yang <email address hidden>
Date: Wed Mar 11 00:42:16 2015 -0400

    Sort snapshots in create CG from CG snapshot

    This problem was discovered while testing create CG from CG snapshot.
    In create_consistencygroup_from_src() in manager.py, it calls the driver
    method create_consistencygroup_from_src() and passes in parameters
    including source snapshots and target volumes. The problem is that the
    snapshots list is not sorted to be in the same order as their corresponding
    volumes. So they may be in the wrong order.

    In this patch, the source snapshots were sorted before being passed to
    the driver.

    Change-Id: I988ce2836f2d553391deeee6e68738356877109b
    Closes-Bug: #1430628

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-3 → 2015.1.0
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.