GlusterFS: volume clone operation can deadlock

Bug #1272092 reported by Eric Harney on 2014-01-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
High
Eric Harney
Havana
High
Eric Harney

Bug Description

The fix for bug 1267983 introduced a problem where volume create_cloned_volume calls create_snapshot, which requests the same lock that create_cloned_volume uses for synchronization.

Split the snapshot methods into locked/unlocked parts so that a caller already holding the lock can call the code as intended.

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

Changed in cinder:
status: New → In Progress

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

commit e9722f09dfd4b58e40afbf285ab9a7738a641dca
Author: Eric Harney <email address hidden>
Date: Thu Jan 23 11:57:17 2014 -0500

    GlusterFS: Fix deadlock in volume clone

    The create_cloned_volume path could deadlock due to
    create_cloned_volume and create/delete_snapshot using the same
    lock for synchronization.

    Refactor the calls to create/delete snapshot to call the inner
    method which does not use a lock.

    Introduced by "06999f6 GlusterFS: Synchronize additional op..."

    Related-Bug: 1267983
    Closes-Bug: 1272092

    Change-Id: I84ca34b201c10644faa047f1c9274c14bcdd0359

Changed in cinder:
status: In Progress → Fix Committed
Eric Harney (eharney) on 2014-01-27
Changed in cinder:
importance: Undecided → High
milestone: none → icehouse-3
Thierry Carrez (ttx) on 2014-03-05
Changed in cinder:
status: Fix Committed → Fix Released

Reviewed: https://review.openstack.org/69387
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=69e687d38a662a1352e259be93765de0d20d19dc
Submitter: Jenkins
Branch: stable/havana

commit 69e687d38a662a1352e259be93765de0d20d19dc
Author: Eric Harney <email address hidden>
Date: Mon Dec 16 17:44:02 2013 -0500

    GlusterFS: Fix deadlock in volume clone

    The create_cloned_volume path could deadlock due to
    create_cloned_volume and create/delete_snapshot using the same
    lock for synchronization.

    Refactor the calls to create/delete snapshot to call the inner
    method which does not use a lock.

    Introduced by "06999f6 GlusterFS: Synchronize additional op..."

    Related-Bug: 1267983
    Closes-Bug: 1272092

    (cherry picked from commit e9722f09dfd4b58e40afbf285ab9a7738a641dca)

    Note: Effectively includes most changes from "8772714 Pylint fixes ..."
    to resolve conflicts.
    (cherry picked from commit 8772714b4fcb2d05ae7f0bfe5cfd0fa660ab9100)

    Conflicts:
            cinder/volume/drivers/glusterfs.py

    Change-Id: I84ca34b201c10644faa047f1c9274c14bcdd0359

Thierry Carrez (ttx) on 2014-04-17
Changed in cinder:
milestone: icehouse-3 → 2014.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers