Cannot attach volume after volume snapshot create/delete when using lvm>=2.02.99
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Medium
|
Dirk Mueller | ||
Icehouse |
Fix Released
|
Undecided
|
Unassigned | ||
tempest |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
lvm backend, with tgtadm ISCSI helper.
1. nova boot test2 --image cirros-
2. cinder create 1 # wait for 'available'
3. cinder snapshot-create <vol_id> # wait for create
4. cinder snapshot-delete <snap_id> # wait for delete
5. nova volume-attach test2 <vol_id> /dev/vdc
6. cinder list # says it is in 'attaching' status for long time (>10s)
7. cinder list # the volume in 'available' status
The cinder snapshot-delete <vol_id> causes the volume looses it (a)ctive lvm flag.
LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert
volume-
This command has effect also to the original volume, even if it used on the snapshot:
$ lvchange -y -an stack-volumes/
summary: |
- Cannot attache volume after volume snapshot create/delete + Cannot attach volume after volume snapshot create/delete |
tags: | added: icehouse-backport-potential |
Changed in cinder: | |
milestone: | none → juno-2 |
status: | Fix Committed → Fix Released |
tags: |
added: in-stable-icehouse removed: icehouse-backport-potential |
Changed in tempest: | |
status: | New → Confirmed |
tags: | added: test-needed |
Changed in cinder: | |
milestone: | juno-2 → 2014.2 |
I looked into this, seeing the same behavior.
The problem is that brick's vg.delete() calls lvchange -y -an on the snapshot LV which has the side effect of also deactivating the volume's LV. This is not what we want to have happen here.