Bug 2100697
Summary: | With image-volume cache enabled backend, volume creation for a smaller volume than image-volume cache has the same size of image-volume cache | ||
---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Keigo Noha <knoha> |
Component: | openstack-cinder | Assignee: | Rajat Dhasmana <rdhasman> |
Status: | CLOSED MIGRATED | QA Contact: | Evelina Shames <eshames> |
Severity: | medium | Docs Contact: | RHOS Documentation Team <rhos-docs> |
Priority: | medium | ||
Version: | 13.0 (Queens) | CC: | abishop, gcharot, rdhasman, udesale, zaitcev |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2024-01-05 11:17:52 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Keigo Noha
2022-06-24 02:57:50 UTC
The cinder squad discussed this at length, and there's no clear/simple resolution that doesn't include its own side effects, and the side effects could in turn be considered another bug. For example, if initial volume cache entries are created with using the image size, then that means many volumes created from the cache will need to be extended, and that can be an expensive operation that effectively reduces the value of caching feature. A full solution, without adverse side effects, will require a fair amount of design work, and might potentially require additional configuration options that will affect backporting the change. For that reason, we're targeting the work for a future release, and will assess backporting the changes at a later date. Hi Alan, Thank you for your comment! I understand creating a image volume cache with the image size may cause another issue, resizing the volume every time when the user requested larger image than the image size. On the other hand, the current implementation causes unexpected storage capacity shortage. Cinder recorded the volume which is requested smaller size than image size as requested. It will cause the inconsistency issue between cinder DB and storage usage. As temporary solution, can we fix the current behavior as below? If the request volume size is smaller than the image cache's volume size, cinder doesn't use the clone volume with the image cache then create a volume with the original image. Also, we should add log.INFO to notify this behavior to operators. How do you think about it? Best Regards, Keigo Noha The cinder squad did discuss the possibility of bypassing the cache when the new requested volume size is smaller than the one in the cache. That would satisfy some use cases, but potentially cause problems with other use cases. You're trading one set of problems for another. In this case, you're asking cinder to use the cache for some volume requests, but not use the cache for other requests, and there will be different behavior that depends on the size of the volume that happened to seed the cache. Have you considered uploading the same image (so there are two image IDs), and using one of them for the smaller volumes? That way there would be two cache entries, and users would get an appropriately sized volume by specifying one or the other image? A less satisfactory workaround would be to eject the large volume from the cache, and seed the cache with a smaller volume. But bear in mind this will lead to performance issues, where all large volumes created from the small cache entry will need to be extended. Hi Alan, Thank you for your comment!! Today, we had a meeting with the customer. The main problem of this issue is the inconsistency between cinder and storage backend. To align the data in cinder to storage backend, the only way to fix it is modifying cinder DB. Is it allowed to update cinder DB for aligning cinder DB to storage backend? Best Regards, Keigo Noha If there's a DB consistency issue somewhere then that needs to be investigated. That was not apparent to me when I first read the BZ comments. As a side note, this highlights why it's very important for BZ descriptions to focus on just explaining the problem, and not delve into proposed solutions. I fear we got distracted by discussing possible solutions, before we had a full understanding of the problem. With this in mind, please restate the problem, and provide the usual data that Engineering requires to analyze a BZ (log files, what is the storage backend, etc.) There's no need to add a needinfo, as the entire squad sees the BZ comments. Hi Alan, Thank you for your comment. It looks that my previous makes you confused. I'm sorry for that. What I meant the inconsistency between cinder and storage backend in my previous comment is the following. As I wrote in the description. the volume creation which is smaller than image cache volume results in the same size of the image volume cache. That means, where the volume creation request is done with 1 GiB volume and the image cache volume is 20GiB. Cinder shows the volume size as 1GiB. But the storage backend shows that the corresponding volume consumes 20GiB. That is the inconsistency between cinder and storage backend which I wrote in my previous comment. As you wrote, we can't fix the issue in the case description. The customer needs to think fixing the inconsistency between cinder and the storage backend by themselves. This inconsistency affects to volume quota. So, the customer wants to fix this gap between cinder and storage backend. Technically, shrinking the volume on storage backend will corrupt the filesystem in the volume. So, there is the only choice that they need to align the size data in cinder DB to the usage in storage backend. If my comment is not clear to you or something need to add, please let me know. Hi Alan, We discussed with the customer about how to improve cinder for avoiding the issue. We understand the current behavior but we think that the current implementation has a room to improve. In the discussion, we had a rough idea to avoid this issue. - Introduce a new tag for setting the minimum volume size, e.g. min_vol_size. If the tag is set in image, cinder reads it and creates the volume cache image along with the size specified with the tag. Also, the tag can be used for size checker whether the requested size fulfills the minimum volume size in the environment. Without the tag, doing the same of the current implementation. I think this change doesn't have the current usage and has a benefit to users who want to enforce their users to use volumes which has larger than the specified volume size. How do you think about this idea? Best Regards, Keigo Noha Any design changes like that would require a full review by the entire cinder community. This likely entails writing a spec, and the need to add a microversion. You and the customer are certainly welcome to pursue this further, but it's not something that would be backportable. The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days |