You are not logged in.
I'm auto-building a bunch of virtual machines (Qemu) running Archlinux.
To speed up pacstrap, I set up a folder that serves as shared pacman cache. I share this folder via Qemu's 9p-virtio, so all VMs access the same folder on the host.
When I install lots of VMs in parallel, pacstrap produces errors like
error: could not rename /var/cache/pacman/pkg/bash-4.4.012-2-x86_64.pkg.tar.xz.part to /var/cache/pacman/pkg/bash-4.4.012-2-x86_64.pkg.tar.xz (No such file or directory)
I guess this is a race condition: When finishing the download, the file gets renamed. If another process is doing the same, one process must fail.
So it looks like you shouldn't have several pacman processes access the same pacman cache folder at the same time. However, the Archwiki says:
In order to share packages between multiple computers, simply share /var/cache/pacman/ using any network-based mount protocol.
Is the Archwiki wrong? Am I wrong assuming that this is a race condition?
Offline
That is a race.
The archwiki assumes that you are upgrading the computers manually in sequence and not automated in parallel.
If you are creating the same VM multiple times, you probably should create the first one to fill the cache and then you can do the other in parallel afterwards.
You might also be interested in pacserve: https://bbs.archlinux.org/viewtopic.php?id=117094
Last edited by progandy (2017-10-10 16:56:09)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Or just create a fresh base image every time you kick-off the auto-build script and then copy/snapshot/use as a backing image for all of the VM's (depending on your workflow).
Offline