Creating snapshot on NFS backend fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Undecided
|
Alex Deiter |
Bug Description
Creating a snapshot on the NFS backend fails if the snapshot name is not specified.
Following are the steps to reproduce the issue:
1. Configure a NFS backend for Cinder:
/etc/cinder/
[DEFAULT]
default_volume_type = nfs
enabled_backends = nfs
[nfs]
volume_driver = cinder.
volume_backend_name = nfs
nfs_snapshot_
nas_host = 10.3.35.41
nas_share_path = /volumes/pool1/nas
2. Create a volume:
$ cinder create --volume-type nfs 1
3. Check the volume file:
$ qemu-img info /opt/stack/
image: /opt/stack/
file format: raw
virtual size: 1.0G (1073741824 bytes)
disk size: 512
3. Try to create a snapshot for the volume:
$ cinder snapshot-create c37c17d9-
Expected result:
Snapshot has been successfully created
Actual result:
Snapshot gets has an error state
Cinder volume service log file:
Jul 03 18:15:57 openstack-
7de56069-
8af85aeb55e {{_create_snapshot /opt/stack/
...
Jul 03 18:15:58 openstack-
-4442-8d72-
Jul 03 18:15:58 openstack-
069-3901-
...
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
ERROR oslo_messaging.
Workaround:
Specify a name when creating the snapshot:
$ cinder snapshot-create --name test c37c17d9-
Solution:
Parent RemoteFSSnapDri
proposed patch:
$ git diff
diff --git a/cinder/
index 658c25615.
--- a/cinder/
+++ b/cinder/
@@ -1623,7 +1623,8 @@ class RemoteFSSnapDri
status = snapshot.
- if snapshot.
+ if (snapshot.
+ snapshot.
# This is an internal volume snapshot. In order to support
# image caching, we'll allow creating/deleting such snapshots
# while having volumes in 'downloading' state.
Please let me post it on review
Thank you!
Changed in cinder: | |
assignee: | nobody → Alex Deiter (deiter) |
summary: |
- Creating qcow2 snapshot on NFS backend fails + Creating snapshot on NFS backend fails |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
tags: | added: drivers nfs |
Fix proposed to branch: master /review. opendev. org/739277
Review: https:/