Glance cache cleaner wrongly deletes cache for non invalid images
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
High
|
Feilong Wang |
Bug Description
The cache cleaner is currently cleaning invalid images like so:
def clean(self, stall_time=None):
"""
Delete any image files in the invalid directory and any
files in the incomplete directory that are older than a
"""
if stall_time is None:
now = time.time()
older_than = now - stall_time
def delete_
"""
Removes any incomplete cache entries older than a
supplied modified time.
:param older_than: Files written to on or before this timestemp
"""
for path in self.get_
Although the "older_than" time is passed its not used anywhere, as a result if you run this through a cron, valid images in process for download/getting cached will be deleted from /incomplete since the cleaner does not check for time at all.
Glance api log will complain when this happens in the middle of the fetch:
Fetch finished, moving '/var/lib/
ERROR glance.image_cache [...] Exception encountered while tee'ing image 'b9b38c90-
Changed in glance: | |
assignee: | nobody → Fei Long Wang (flwang) |
Changed in glance: | |
status: | New → In Progress |
Changed in glance: | |
importance: | Undecided → Medium |
importance: | Medium → High |
milestone: | none → havana-rc1 |
Changed in glance: | |
status: | Fix Committed → Fix Released |
Changed in glance: | |
milestone: | havana-rc1 → 2013.2 |
Fix proposed to branch: master /review. openstack. org/47866
Review: https:/