Bug 968804 - beaker-provision image cache assumes images never change
beaker-provision image cache assumes images never change
Status: CLOSED CURRENTRELEASE
Product: Beaker
Classification: Community
Component: lab controller (Show other bugs)
0.12
Unspecified Unspecified
unspecified Severity unspecified (vote)
: 0.15
: ---
Assigned To: Amit Saha
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-29 22:44 EDT by Dan Callaghan
Modified: 2015-07-26 18:15 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-02 22:30:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dan Callaghan 2013-05-29 22:44:50 EDT
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-29 22:55:40 EDT
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 00:18:31 EDT
(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 01:32:33 EDT
On gerrit: http://gerrit.beaker-project.org/#/c/2158/
Comment 8 Nick Coghlan 2013-10-02 22:30:04 EDT
Beaker 0.15 has been released.

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