Comment 2 for bug 1994521

Revision history for this message
Raghavendra Tilay (raghavendrat) wrote :

Customer created volume and snapshots as below:

v1
|
`-- s1
    |
    `-- v2
        |
        `-- s2

User sends command to delete snapshot s1.
The 3par cinder code tries to convert volume v2 to base volume.
In the process, it renames from osv-<id> to omv-<id>.

Although v2 has a child s2, client.copyVolume() is able to convert v2 to new base volume omv-<id>.
And s2 remains child of old volume osv-<id>.
So, the 3parclient returns [1] as warning and does not throw as exception during copy of v2.

[1] Conflict (HTTP 409) 32 - volume has a child

Later during delete of v2 osv-<id> volume, it is observed that v2 has a child s2.
At this point, the above [1] is thrown as exception by client.deleteVolume().

Updated the code to catch exception [1] and delete snapshot s2 of old volume v2 osv-<id>.