Image cache clean should catch the not exist exception
Bug #1229823 reported by
Feilong Wang
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
Wishlist
|
Sean McGinnis |
Bug Description
For image cache clean, Glance will remove the invalid files and stalled files, but if there is a cron job and at the same time if the admin has removed one of file before the cron job deletes it. There will be a non existed exception. It's rare but possible. As a result, that will not clean the entire cache i think
Changed in glance: | |
assignee: | nobody → Fei Long Wang (flwang) |
status: | New → In Progress |
Changed in glance: | |
importance: | Undecided → Wishlist |
Changed in glance: | |
assignee: | Fei Long Wang (flwang) → nobody |
tags: | added: low-hanging-fruit |
Changed in glance: | |
assignee: | nobody → Cindy Pallares (cindy-pallaresq) |
Changed in glance: | |
assignee: | Cindy Pallares (cindy-pallaresq) → nobody |
Changed in glance: | |
assignee: | nobody → Masaki Matsushita (mmasaki) |
Changed in glance: | |
assignee: | nobody → Mark Korondi (oro) |
Changed in glance: | |
assignee: | Mark Korondi (kmarc) → Sachin (sacpatil) |
To post a comment you must log in.
Currently, it checks cached file existence.
image_cache/ drivers/ sqlite. py: 491
def delete_ cached_ file(path) : exists( path):
LOG.debug( "Deleting image cache file '%s'", path)
os.unlink( path)
LOG.warn( _LW("Cached image file '%s' doesn't exist, unable to"
" delete") % path)
if os.path.
else: