glusterfs_native: delete_snapshot(): find out real GlusterFS snap name
So far the delete_snapshot() logic assumed that a GlusterFS snapshot
exists with exactly the same name as the Manila snapshot id.
This was a fragile assumption -- both GlusterFS and Manila can
potentially change how the GlusterFS snapshots are named.
(And currently we have a problem as GlusterFS has actually changed
this -- see referred bug about details.)
Therefore from now on we'll use the weaker assumption that the
Manila snapshot id is a substring of the backing GlusterFS snapshot
name. (That's a robust assumption, unlikely to break in the future.)
The actual GlusterFS snapshot name is found by doing a
`gluster snapshot list` and grepping for the Manila snapshot id in
it.
Reviewed: https:/ /review. openstack. org/200784 /git.openstack. org/cgit/ openstack/ manila/ commit/ ?id=39b92fd9ebd 978db16b2367c39 582aea72d4f71a
Committed: https:/
Submitter: Jenkins
Branch: master
commit 39b92fd9ebd978d b16b2367c39582a ea72d4f71a
Author: Csaba Henk <email address hidden>
Date: Sat Jul 11 03:02:42 2015 +0200
glusterfs_ native: delete_snapshot(): find out real GlusterFS snap name
So far the delete_snapshot() logic assumed that a GlusterFS snapshot
exists with exactly the same name as the Manila snapshot id.
This was a fragile assumption -- both GlusterFS and Manila can
potentially change how the GlusterFS snapshots are named.
(And currently we have a problem as GlusterFS has actually changed
this -- see referred bug about details.)
Therefore from now on we'll use the weaker assumption that the
Manila snapshot id is a substring of the backing GlusterFS snapshot
name. (That's a robust assumption, unlikely to break in the future.)
The actual GlusterFS snapshot name is found by doing a
`gluster snapshot list` and grepping for the Manila snapshot id in
it.
Change-Id: I40873208c7431e 42885bee4db06d6 229a202bad6
Closes-Bug: #1473044