Keychain not initialized, therefore broken provisioning
Created by: agowa338
The current archlinux box is unusable for automated provisioning, as the keychain is not initialized and it is not possible to manually initialize it before vagrant errors out.
I'm using the libvirt provider and this is my Vagrant file:
Vagrant.configure('2') do |config|
config.vm.box_check_update = false
config.vm.box = "archlinux/archlinux"
config.vm.synced_folder './', '/vagrant', type: 'rsync'
# config.vm.synced_folder './', '/vagrant', type: 'nfs'
config.vm.define "myvm" do |myvm|
myvm.vm.provider :libvirt do |v|
v.memory = 256
v.cpus = 1
v.nested = true
end
myvm.vm.provision "shell" do |s|
s.path = "run.sh"
s.privileged = false
end
end
end
The errors:
using nfs:
==> nat64: Installing NFS client...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
pacman --noconfirm -Syy &&
pacman --noconfirm -S nfs-utils ntp
Stdout from the command:
:: Synchronizing package databases...
downloading core.db...
downloading extra.db...
downloading community.db...
resolving dependencies...
looking for conflicting packages...
Packages (7) ding-libs-0.6.1-2 gssproxy-0.8.2-1 libevent-2.1.10-1 nfsidmap-2.4.1-1 rpcbind-1.2.5-2 nfs-utils-2.4.1-1 ntp-4.2.8.p13-2
Total Download Size: 2.59 MiB
Total Installed Size: 8.22 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
downloading rpcbind-1.2.5-2-x86_64.pkg.tar.xz...
downloading nfsidmap-2.4.1-1-x86_64.pkg.tar.xz...
downloading ding-libs-0.6.1-2-x86_64.pkg.tar.xz...
downloading gssproxy-0.8.2-1-x86_64.pkg.tar.xz...
downloading libevent-2.1.10-1-x86_64.pkg.tar.xz...
downloading nfs-utils-2.4.1-1-x86_64.pkg.tar.xz...
downloading ntp-4.2.8.p13-2-x86_64.pkg.tar.xz...
checking keyring...
downloading required keys...
:: Import PGP key 4096R/2E36D8620221482FC45CB7F2A91764759326B440, "Lukas Fleischer <lfleischer@lfos.de>", created: 2011-10-12? [Y/n]
Errors occurred, no packages were upgraded.
Stderr from the command:
error: key "Lukas Fleischer <lfleischer@lfos.de>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
and using rsync:
==> nat64: Installing rsync to the VM...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
pacman -Sy --noconfirm
pacman -S --noconfirm rsync
exit $?
Stdout from the command:
:: Synchronizing package databases...
downloading core.db...
downloading extra.db...
downloading community.db...
resolving dependencies...
looking for conflicting packages...
Packages (1) rsync-3.1.3-1
Total Download Size: 0.29 MiB
Total Installed Size: 0.55 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
downloading rsync-3.1.3-1-x86_64.pkg.tar.xz...
checking keyring...
downloading required keys...
:: Import PGP key 2048R/02FD1C7A934E614545849F19A6234074498E9CEE, "Christian Hesse (Arch Linux Package Signing) <arch@eworm.de>", created: 2011-08-12? [Y/n]
Errors occurred, no packages were upgraded.
Stderr from the command:
error: key "Christian Hesse (Arch Linux Package Signing) <arch@eworm.de>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
Edit:
Steps to reproduce: vagrant up
this example https://github.com/agowa338/issues-arch-boxes-41
And I've also added an asciinema recording it can be played using asciinema play file.cast
(or viewed using a text editor)