Bug 1843088 - Creating image-volume cache on NFS backend fails
Summary: Creating image-volume cache on NFS backend fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-cinder
Version: 13.0 (Queens)
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: z13
: 13.0 (Queens)
Assignee: Rajat Dhasmana
QA Contact: Tzach Shefi
Chuck Copello
URL:
Whiteboard:
Depends On:
Blocks: 1741730
TreeView+ depends on / blocked
 
Reported: 2020-06-02 17:35 UTC by Rajat Dhasmana
Modified: 2020-10-28 18:22 UTC (History)
7 users (show)

Fixed In Version: openstack-cinder-12.0.10-19.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-28 18:22:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1875570 0 None None None 2020-06-02 17:35:21 UTC
Launchpad 1886222 0 None None None 2020-07-08 10:39:29 UTC
OpenStack gerrit 726471 0 None MERGED Creating image-volume cache on NFS backend fails 2021-01-26 15:27:05 UTC
OpenStack gerrit 739277 0 None MERGED Creating snapshot on NFS backend fails 2021-01-26 15:26:23 UTC
Red Hat Product Errata RHSA-2020:4391 0 None None None 2020-10-28 18:22:46 UTC

Description Rajat Dhasmana 2020-06-02 17:35:22 UTC
Description of problem:

Creating image-volume cache fails with NFS backend. Following are the steps to reproduce the issue.

1. Configure a host to enable image-volume cache using https://docs.openstack.org/cinder/latest/admin/blockstorage-image-volume-cache.html
2. Create a volume on a tenant

remotefs driver tries to create a temporary snapshot before creating a volume on internal tenant. This operation throws error. (See attached Cinder volume logs) This error is observed on Stein release.

Actual result:
- temporary snapshot gets stuck in `creating` state

Expected result:
- Image volume should have been created on internal tenant

Solution:
snapshot.id at https://github.com/openstack/cinder/blob/stable/stein/cinder/volume/drivers/remotefs.py#L1442
 doesn't have `tmp-snap` in it as id is not passed as a option while creating snapshot object.
This should be change to `snapshot.display_name` at same location


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Paul Grist 2020-06-03 17:55:31 UTC
Adding the dependency between this and https://bugzilla.redhat.com/1741730

Comment 14 Tzach Shefi 2020-09-22 15:57:19 UTC
Verified on:
openstack-cinder-12.0.10-19.el7ost.noarch
python2-glance-store-0.23.1-0.20190916165252.cc7ecc1.el7ost.noarch

On a system with OSP13, Glance uses Cinder as it's backend, this was setup for a previous bz.  
Cinder uses Netapp NFS as it's backend. 
Image_volume_cache is enabled on Cinder.conf 


Simultaneously created 10 volumes from same image:
#for i in {1..10}; do cinder create 1 --image cirros ; done

Resulting 10 volumes all in available state as expected:
(overcloud) [stack@undercloud-0 ~]$ cinder list
+--------------------------------------+-----------+--------------------------------------------+------+-------------+----------+-------------+
| ID                                   | Status    | Name                                       | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------------------------------------+------+-------------+----------+-------------+
| 11a62820-6745-4876-ab32-71363e42e353 | available | -                                          | 1    | tripleo     | true     |             |
| 2a46f3c7-fa9f-4b72-9dee-4bd4dea7a631 | available | -                                          | 1    | tripleo     | true     |             |
| 3c5b8cfb-75d5-4c09-98b6-5ecfed4c1972 | available | -                                          | 1    | tripleo     | true     |             |
| 4e68f832-bce2-43e9-a547-8d29242e1512 | available | -                                          | 1    | tripleo     | true     |             |
| 5eff40e0-5eda-407b-b084-63604d6c521d | available | -                                          | 1    | tripleo     | true     |             |
| 6c58d022-0ee6-4f64-9bcd-d744612c6d78 | available | -                                          | 1    | tripleo     | true     |             |
| 7eb389b6-ff05-4c83-a6f3-c3f7cebc5274 | available | -                                          | 1    | tripleo     | true     |             |
| aebf32e4-0855-494e-9ae9-fd9aa054d6ff | available | -                                          | 1    | tripleo     | true     |             |
| c7714e66-5a91-45da-a531-d4097f13081b | available | -                                          | 1    | tripleo     | true     |             |
| ccd6fd5c-4738-4363-9364-a680531abadf | available | -                                          | 1    | tripleo     | true     |             |
| edfb3cdb-c608-4b0f-a6ac-0a964772b16f | available | image-1e30b583-a24d-45ea-a9b8-a6f7699f605a | 1    | tripleo     | false    |             |
+--------------------------------------+-----------+--------------------------------------------+------+-------------+----------+-------------+

Delete all volumes

I had now changed Glance to file store instead of Cinder as it's backend. 
And retested again, create 10 cinder volumes from a new uploaded image

for i in {1..10}; do cinder create 1 --image cirros3 ; done

This too worked as expected:
(overcloud) [stack@undercloud-0 ~]$ cinder list
+--------------------------------------+-----------+--------------------------------------------+------+-------------+----------+-------------+
| ID                                   | Status    | Name                                       | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------------------------------------+------+-------------+----------+-------------+
| 03461a57-ccc6-40fa-baa6-29e28657bccb | creating  | -                                          | 1    | tripleo     | false    |             |
| 03bc59b0-5068-4962-b171-634cde62ab8b | available | -                                          | 1    | tripleo     | true     |             |
| 28075c5e-93eb-4de3-bab0-9c79ed1a3c38 | available | -                                          | 1    | tripleo     | true     |             |
| 2ee49c4a-0628-48fd-a887-1cdf37981cab | available | -                                          | 1    | tripleo     | true     |             |
| 34a879e8-f6b2-428b-b297-8913cb5a01bf | available | -                                          | 1    | tripleo     | true     |             |
| 3c809887-8471-48c5-b52d-8f9910f882bd | available | image-f67d6e7a-5a57-4e52-8b8c-d4e38f0201c7 | 1    | tripleo     | false    |             |
| 402bfa22-431f-41ce-8fe2-f49344c60cf8 | available | -                                          | 1    | tripleo     | true     |             |
| 588c96a5-d9e0-48e4-9a2c-41e83f50d5d7 | available | -                                          | 1    | tripleo     | true     |             |
| 9ee70095-4baa-4196-9ef8-2b486e744dfa | available | -                                          | 1    | tripleo     | true     |             |
| c3c0a465-56a5-40b8-b4e2-47ecb648373f | available | -                                          | 1    | tripleo     | true     |             |
| cd89017e-ca89-437b-b9e1-13e10b113403 | available | -                                          | 1    | tripleo     | true     |             |
| cf0eff46-a75a-431a-97dc-b5e71eb4c6a0 | creating  | -                                          | 1    | tripleo     | false    |             |
| edfb3cdb-c608-4b0f-a6ac-0a964772b16f | available | image-1e30b583-a24d-45ea-a9b8-a6f7699f605a | 1    | tripleo     | false    |             |
| ef3acf7e-4144-4d09-9229-943c7f64a6a4 | creating  | -                                          | 1    | tripleo     | false    |             |
+--------------------------------------+-----------+--------------------------------------------+------+-------------+----------+-------------+

Confirming that image cache on NFS backend now works.

Comment 21 errata-xmlrpc 2020-10-28 18:22:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: openstack-cinder security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:4391


Note You need to log in before you can comment on or make changes to this bug.