gluster_native: 'manila snapshot delete' fails with gluster 3.7.x as backend

Bug #1473044 reported by karthick
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Csaba Henk

Bug Description

Description:

With gluster version 3.7.x, The name of snapshot taken on gluster volume has time stamp appended to it. The glusterfs_native driver looks for snapshots with just the name and this mismatch prevents 'manila snapshot delete'.

$ manila snapshot-delete e3d11667-bc2d-4916-831f-d4ee1a3b1566

Appending timestamp to the name of snapshot was introduced as a fix to this bug
https://bugzilla.redhat.com/show_bug.cgi?id=1189473

Snippet of /var/log/manila/share.log

2015-07-09 11:34:13.239 23840 WARNING manila.context [-] Arguments dropped when creating context: {u'user': u'4b6679e3794e4357ac7a8224a6f60cf0', u'tenant': u'3c43a2a3a16b4426afa541cae48cbb27'}
2015-07-09 11:34:13.336 23840 ERROR oslo_messaging.rpc.dispatcher [req-db1bf931-37f9-4183-b337-97839b6f0f7a ] Exception during message handling: Deleting snapshot e3d11667-bc2d-4916-831f-d4ee1a3b1566 of share 71e0949f-6815-4844-b513-2ee2aa1d0292 failed with 30807: Snapshot (e3d11667-bc2d-4916-831f-d4ee1a3b1566) does not exist
2015-07-09 11:34:13.336 23840 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2015-07-09 11:34:13.336 23840 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2015-07-09 11:34:13.336 23840 TRACE oslo_messaging.rpc.dispatcher executor_callback))
2015-07-09 11:34:13.336 23840 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2015-07-09 11:34:13.336 23840 TRACE oslo_messaging.rpc.dispatcher executor_callback)
2015-07-09 11:34:13.336 23840 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch
2015-07-09 11:34:13.336 23840 TRACE oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2015-07-09 11:34:13.336 23840 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/share/manager.py", line 578, in delete_snapshot
2015-07-09 11:34:13.336 23840 TRACE oslo_messaging.rpc.dispatcher {'status': 'error_deleting'})
2015-07-09 11:34:13.336 23840 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 85, in __exit__
2015-07-09 11:34:13.336 23840 TRACE oslo_messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2015-07-09 11:34:13.336 23840 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/share/manager.py", line 571, in delete_snapshot
2015-07-09 11:34:13.336 23840 TRACE oslo_messaging.rpc.dispatcher share_server=share_server)
2015-07-09 11:34:13.336 23840 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/share/drivers/glusterfs_native.py", line 703, in delete_snapshot
2015-07-09 11:34:13.336 23840 TRACE oslo_messaging.rpc.dispatcher 'errstr': operrstr})
2015-07-09 11:34:13.336 23840 TRACE oslo_messaging.rpc.dispatcher GlusterfsException: Deleting snapshot e3d11667-bc2d-4916-831f-d4ee1a3b1566 of share 71e0949f-6815-4844-b513-2ee2aa1d0292 failed with 30807: Snapshot (e3d11667-bc2d-4916-831f-d4ee1a3b1566) does not exist

List of snapshots as seen from gluster server:

[root@dhcp37-133 glusterfs_packages]# gluster snapshot list

e3d11667-bc2d-4916-831f-d4ee1a3b1566_GMT-2015.07.09-05.52.33
3911868e-9712-4083-adc2-7968ed28881b_GMT-2015.07.09-07.01.38

Revision history for this message
karthick (kramdoss) wrote :
karthick (kramdoss)
summary: - 'manila snapshot delete' fails with gluster 3.7.1 as backend
+ gluster_native: 'manila snapshot delete' fails with gluster 3.7.1 as
+ backend
summary: - gluster_native: 'manila snapshot delete' fails with gluster 3.7.1 as
+ gluster_native: 'manila snapshot delete' fails with gluster 3.7.x as
backend
karthick (kramdoss)
description: updated
Changed in manila:
milestone: none → liberty-2
importance: Undecided → Medium
status: New → Triaged
Csaba Henk (chenk)
tags: added: kilo-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

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

Changed in manila:
assignee: nobody → Csaba Henk (chenk)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/200784
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=39b92fd9ebd978db16b2367c39582aea72d4f71a
Submitter: Jenkins
Branch: master

commit 39b92fd9ebd978db16b2367c39582aea72d4f71a
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: I40873208c7431e42885bee4db06d6229a202bad6
    Closes-Bug: #1473044

Changed in manila:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/204993

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/kilo)

Reviewed: https://review.openstack.org/204993
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=eec51db6f50bac101e6b9663f1b8286b8c087588
Submitter: Jenkins
Branch: stable/kilo

commit eec51db6f50bac101e6b9663f1b8286b8c087588
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: I40873208c7431e42885bee4db06d6229a202bad6
    Closes-Bug: #1473044
    (cherry picked from commit 39b92fd9ebd978db16b2367c39582aea72d4f71a)

tags: added: in-stable-kilo
Thierry Carrez (ttx)
Changed in manila:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in manila:
milestone: liberty-2 → 1.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.