-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Vagrant caching #3880
Fix Vagrant caching #3880
Conversation
da48dfa
to
99fad81
Compare
As of today, vagrant stopped working, my best guess is due to bad caching. Here's an excerpt from logs: ... vagrant plugin install vagrant-libvirt Installing the 'vagrant-libvirt' plugin. This can take a few minutes... Building native extensions. This could take a while... Installed the plugin 'vagrant-libvirt (0.12.1)'! ... uname -s ; cat Vagrantfile.$DISTRO Linux ... Downloaded 481Mb in 4.096201s. Cache hit for vagrant-8be35383dc00f23d080ff00b2a724c938d650254861f26b67624c28e3fe5e6ae! ... Vagrant failed to initialize at a very early stage: The plugins failed to initialize correctly. This may be due to manual modifications made within the Vagrant home directory. ... Error message given during initialization: Unable to resolve dependency: user requested 'vagrant-libvirt (= 0.12.0)' ... The problem is, vagrant cache overwrites newer plugin with an older one. Let's only cache the downloaded image. Also, change the cache fingerprint script (remove "Linux"). Signed-off-by: Kir Kolyshkin <[email protected]>
99fad81
to
650efb2
Compare
Without caching With caching, it takes 3 minutes. It still makes sense to cache the image (but not the rest). |
OK, it makes sense to only cache |
Times differ a lot. Last measurement -- 3 minutes w/o caching, 2:30 with cache. In any case, it makes sense to save some traffic. |
988b058
to
a7de200
Compare
... so we can run all four jobs in parallel. While at it, fix the comment in the file. Signed-off-by: Kir Kolyshkin <[email protected]>
a7de200
to
bb4dbbc
Compare
@thaJeztah PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
backported to 1.1 in #3878 |
As of today, vagrant stopped working, my best guess is due to bad caching. Here's an excerpt from logs (https://cirrus-ci.com/task/6211443486359552?logs=vagrant#L59):
Note the vargrant-libvirt version difference (0.12.1 installed, 0.12.0 shown in
vagrant up
error). I think the installed version gets overwritten by an older one from the cache.To fix, let's only cache
~/.vagrant.d/boxes
(to save traffic downloading fedora image).