NetApp driver cannot delete share that has a deleted managed snapshot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Shared File Systems Service (Manila) |
Fix Released
|
Medium
|
Felipe Rodrigues |
Bug Description
Description
===========
The NetApp driver is failing while delete a share that has a deleted managed snapshot. The deleted managed snapshot must be used to create a share from it, before deleting it. And, it must be used to revert.
The problem comes from the fact that the NetApp driver manages snapshot by renaming it. When reverting to that snapshot, the name comes back to previous name (the name when the snapshot was taken), making the manila loses the snapshot location.
Therefore, when the delete snapshot operation is called, the driver thinks that the managed snapshot is already delelted (cannot locate from new name). It will end up returning sucess, without deleting the snapshot.
Steps to reproduce
==================
A chronological list of steps which will help reproduce the issue you hit:
1) create a share using manila called s1
2) Go to ontap and create a snap with name not_managed_snap for that manila volume
3) Manage the snapshot not_managed_snap
4) Create a volume with name s2 from the snapshot not_managed_snap (it must be in the same pool)
5) Revert to not_managed_snap (the snapshot name is changed in the storage)
6) Delete the managed snapshot (it will answer with success, but the snapshot is still on ontap with different name)
7) Delete the first volume s1.. It will fail [1]: cannot delete a share (s1) that has snapshot (not_managed_snap) with relation with other volumes (s2)
- List of manila/openstack client commands: http://
Expected result
===============
Delete share that has a deleted managed snapshot
Actual result
=============
Error deleting the share
Environment
===========
1. OpenStack Wallaby (reproducible in latest version as well)
2. NetApp ONTAP 9.x
Logs & Configs
==============
[1] http://
description: | updated |
description: | updated |
tags: | added: netapp |
Changed in manila: | |
importance: | Undecided → Medium |
assignee: | nobody → Felipe Rodrigues (felipefutty) |
milestone: | none → xena-rc1 |
Changed in manila: | |
milestone: | xena-rc1 → yoga-1 |
Changed in manila: | |
milestone: | yoga-1 → yoga-2 |
tags: | added: bugsquash yoga |
Changed in manila: | |
milestone: | yoga-2 → yoga-3 |
Changed in manila: | |
assignee: | Felipe Rodrigues (felipefutty) → Andre Luiz Beltrami Rocha (andrebeltrami) |
Changed in manila: | |
milestone: | yoga-3 → zed-1 |
Changed in manila: | |
milestone: | zed-1 → zed-2 |
Changed in manila: | |
milestone: | zed-2 → zed-3 |
Changed in manila: | |
assignee: | Andre Luiz Beltrami Rocha (andrebeltrami) → Felipe Rodrigues (felipefutty) |
Changed in manila: | |
milestone: | zed-3 → zed-rc1 |
Changed in manila: | |
milestone: | zed-rc1 → antelope-1 |
Changed in manila: | |
milestone: | antelope-1 → antelope-2 |
Changed in manila: | |
milestone: | antelope-2 → antelope-3 |
Another side effect of the same issue: a snapshot can be deleted on manila without deleting on storage.
1. managing a snapshot
2. reverting the volume to the managed snapshot
3. delete the managed snapshot
The manila will succeed, but the snapshot will be still on storage. The reason is because during revert phase the name changed to the old name (before managing), so the delete thinks that it worked because no snapshot was found.