Can not create volume snapshot when using NfsDriver

Bug #1097266 reported by Ray
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Cinder
Invalid
Undecided
Chuck Short
Folsom
Fix Released
Medium
Eric Harney

Bug Description

Bug Description:
When I am using NfsDriver as my volume driver, I found that I can not create volume snapshot.

Bug Analysis:
I checked the NfsDriver and it doesn't contain the method for create_snapshot and create_volume_from_snapshot, by default, cinder use the parent class's methods.

Solution Analysis:
At least, we should add three function: create_snapshot, create_volume_from_snapshot and delete_snapshot.
create_snapshot can handle snapshot creation, It can call parent's _copy_volume method to copy from a base image to snapshot. But the progress is slow, I'm not sure how to optimize it.
create_volume_from_snapshot can handle create volume from snapshot, the same method as create_snapshot.
delete_snapshot can handle delete volume from snapshot, just remove the target file.

Error Logs:
2013-01-08 09:44:21 2133 TRACE cinder.volume.driver Command: sudo cinder-rootwrap /etc/cinder/rootwrap.conf lvdisplay cinder-volumes/_snapshot-0279ba1c-1caa-4f8c-aead-92d0f10aee8e
2013-01-08 09:44:21 2133 TRACE cinder.volume.driver Exit code: 5
2013-01-08 09:44:21 2133 TRACE cinder.volume.driver Stdout: ''
2013-01-08 09:44:21 2133 TRACE cinder.volume.driver Stderr: ' Volume group "cinder-volumes" not found\n Skipping volume group cinder-volumes\n'
2013-01-08 09:44:21 2133 TRACE cinder.volume.driver

Tags: drivers
Mike Perez (thingee)
tags: added: driver
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
assignee: nobody → Chuck Short (zulcss)
status: New → In Progress
Revision history for this message
Huang Zhiteng (zhiteng-huang) wrote :

the error log doesn't seem related to NFS driver, are you sure this is the error when using NFS driver?

Changed in cinder:
status: In Progress → Incomplete
Revision history for this message
John Griffith (john-griffith) wrote :

Hi Ray, are you by chance running Folsom? If not what version of Grizzly?

The log messages don't align with what we'd expect to see here in the current Grizzly branch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/folsom)

Fix proposed to branch: stable/folsom
Review: https://review.openstack.org/23967

Revision history for this message
Eric Harney (eharney) wrote :

This is broken on Folsom. It works as expected (NotImplementedError) on Grizzly due to LVM driver refactoring.

Proposed change to stable/folsom: https://review.openstack.org/23967

Mike Perez (thingee)
tags: added: drivers
removed: driver
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/folsom)

Reviewed: https://review.openstack.org/23967
Committed: http://github.com/openstack/cinder/commit/cbad3e33b5a76e2ae427b943bb4453934d11ed30
Submitter: Jenkins
Branch: stable/folsom

commit cbad3e33b5a76e2ae427b943bb4453934d11ed30
Author: Eric Harney <email address hidden>
Date: Fri Mar 8 17:38:38 2013 -0500

    Raise NotImplementedError for NFS snapshot operations

    Since NfsDriver inherits snapshot related methods from VolumeDriver,
    it will try to run LVM commands for snapshot calls, when it should
    just report that these are not supported for NFS.

    Fixes LP: #1097266

    Change-Id: Ia438c88d3c8c0a43b512bba9b273e1305f6d0dd0

tags: added: in-stable-folsom
Alan Pevec (apevec)
Changed in cinder:
status: Incomplete → Invalid
Alan Pevec (apevec)
tags: removed: in-stable-folsom
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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