VMware driver: unused cached images never clear from datastore's cache folder (usually named vmware_base)

Bug #1212790 reported by dan wendlandt
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Gary Kotton

Bug Description

customer reports that that even when they no longer have a VM in their vCenter inventory using a particular image, they are unable to delete the vmdk corrsponding to that image in the vmware_base directory.

Note, the true problem here is that if one cycles through a lot of different images in your deployment, these images are not cleared from the datastore "cache" in any automatic fashion. This issue was encountered when someone tried to perform this task manually using vCenter client. They got the error: “cannot delete file <filename>”

Tags: vmware
Revision history for this message
Shawn Hartsock (hartsock) wrote :

I've seen this behavior.

The manual work-around is to use one of the vSphere tools (CLI, vSphere Client, NGC) to manually delete the extra images in the cache. This is not a good long-term solution and causes problems with linked_clone based images should an administrator delete the wrong file from cache.

* be careful in the fix not to remove the wrong item from cache
* be mindful of linked_clone based instances which will be partially linked to the file in cache (these instances will crash if a cache file is deleted).

Changed in nova:
status: New → Confirmed
importance: Undecided → Low
importance: Low → Medium
Revision history for this message
dan wendlandt (danwent) wrote :

Hi Shawn,

The original comment says:

This issue was encountered when someone tried to perform this task manually using vCenter client. They got the error: “cannot delete file <filename>”

So I believe the customer already tried your workaround and says it does not work. The bug is not looking to automatically delete the images, it just mentions that as the explanation for why the user is trying to delete those images.

Revision history for this message
Shawn Hartsock (hartsock) wrote :

Thanks for the clarification.

I've changed the bug title to reflect the precise issue. When all the instances using an image in the cache (happens to be named vmware_base by default) we'll have to figure out why when the count of images using the cache hits zero a delete file isn't being triggered.

summary: - VMware driver: can't delete images stored in vmware_base
+ VMware driver: unused cached images never clear from vmware_base
Changed in nova:
importance: Medium → High
summary: - VMware driver: unused cached images never clear from vmware_base
+ VMware driver: unused cached images never clear from datastore's cache
+ folder (usually named vmware_base)
Revision history for this message
Shawn Hartsock (hartsock) wrote :

I have managed to reproduce this bug. You can remove the VMDK files by enabling and using SSH to that particular host, then you can use 'rm -rf' to remove the files from the file system manually. I'm still looking into this.

Revision history for this message
dan wendlandt (danwent) wrote :

Thanks Shawn. Is it any ESX host with that datastore that you can log into, or a specific one?

Revision history for this message
Shawn Hartsock (hartsock) wrote :

This appears to be related to the "use_linked_clone" configuration and some code that creates a hidden file. I'm still not certain where or when the "hidden" linked clone file shows up. It does not seem to matter which datastore is used.

Revision history for this message
Gary Kotton (garyk) wrote :
Changed in nova:
assignee: nobody → Gary Kotton (garyk)
Gary Kotton (garyk)
Changed in nova:
status: Confirmed → In Progress
Changed in nova:
milestone: none → icehouse-1
Changed in nova:
milestone: icehouse-1 → icehouse-2
Revision history for this message
Gary Kotton (garyk) wrote :
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-2 → icehouse-3
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-3 → icehouse-rc1
Revision history for this message
Matt Riedemann (mriedem) wrote :

Removing from rc1 since this is tied to blueprint vmware-image-cache-management which didn't get a feature freeze exception for icehouse.

Changed in nova:
milestone: icehouse-rc1 → none
Revision history for this message
Gary Kotton (garyk) wrote :

Matt, the vmware-image-cache-mamagement was approved an implemented.

Changed in nova:
status: In Progress → Fix Committed
milestone: none → icehouse-rc1
Revision history for this message
Gary Kotton (garyk) wrote :

This was approved towards the end of icehouse - https://review.openstack.org/#/c/56416/

Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-rc1 → 2014.1
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.