Bug 968804 - beaker-provision image cache assumes images never change
Summary: beaker-provision image cache assumes images never change
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: lab controller
Version: 0.12
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 0.15
Assignee: Amit Saha
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-30 02:44 UTC by Dan Callaghan
Modified: 2018-02-06 00:41 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-03 02:30:04 UTC
Embargoed:


Attachments (Terms of Use)

Description Dan Callaghan 2013-05-30 02:44:50 UTC
The beaker-provision daemon has an optional image cache (IMAGE_CACHE=True) which keeps the 20 most recently used initrd+kernel images in /var/lib/tftpboot/cached-images. It was originally intended for the case where distros were imported from a slow or distant mirror, and re-fetching images frequently would be a waste of time and bandwidth.

The cache makes the assumption that images in a distro tree will never change, and so it makes no attempt to revalidate them when it reuses a cached image. However there are some cases where a distro tree *can* change in place, for example the Fedora development tree.

The cache was never enabled in our production Beaker instance, and I'm not aware of any other sites that are using it either. So it might be possible to just remove the cache support entirely.

Comment 1 Dan Callaghan 2013-05-30 02:55:40 UTC
Steps to reproduce:
1. Set IMAGE_CACHE=True in /etc/beaker/labcontroller.conf
2. Provision a distro tree on box.example.com
3. Observe that /var/lib/tftpboot/images/box.example.com/{initrd,vmlinuz} are created and also hard-linked under /var/lib/tftpboot/cached-images/
4. Wait for the images to change on the distro mirror
5. Provision the distro tree again
6. Observe that /var/lib/tftpboot/images/box.example.com/{initrd,vmlinuz} are the same files as before and have not been updated

Comment 3 Amit Saha 2013-08-12 04:18:31 UTC
(In reply to Dan Callaghan from comment #0)
> The beaker-provision daemon has an optional image cache (IMAGE_CACHE=True)
> which keeps the 20 most recently used initrd+kernel images in
> /var/lib/tftpboot/cached-images. It was originally intended for the case
> where distros were imported from a slow or distant mirror, and re-fetching
> images frequently would be a waste of time and bandwidth.
> 
> The cache makes the assumption that images in a distro tree will never
> change, and so it makes no attempt to revalidate them when it reuses a
> cached image. However there are some cases where a distro tree *can* change
> in place, for example the Fedora development tree.
> 
> The cache was never enabled in our production Beaker instance, and I'm not
> aware of any other sites that are using it either. So it might be possible
> to just remove the cache support entirely.

The cache support will be removed entirely.

Comment 4 Amit Saha 2013-08-12 05:32:33 UTC
On gerrit: http://gerrit.beaker-project.org/#/c/2158/

Comment 8 Nick Coghlan 2013-10-03 02:30:04 UTC
Beaker 0.15 has been released.


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