Project

General

Profile

Bug #11425

vagrant-libvirt build fails on Debian unstable

Added by hybridwipe about 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Build system
Target version:
Start date:
05/17/2016
Due date:
% Done:

100%

Feature Branch:
Type of work:
Contributors documentation
Blueprint:
Starter:
Affected tool:

Description

Using:
austin@debian-laptop:~/src/tails$ git describe
2.3-638-g98a1859

austin@debian-laptop:~/src/tails$ rake build
rake aborted!
VagrantCommandError: 'vagrant ["status"]' command failed: 1
/home/austin/src/tails/Rakefile:61:in `capture_vagrant'
/home/austin/src/tails/Rakefile:84:in `vm_state'
/home/austin/src/tails/Rakefile:117:in `enough_free_memory_for_ram_build?'
/home/austin/src/tails/Rakefile:144:in `block in <top (required)>'
Tasks: TOP => build => parse_build_options
(See full trace by running task with --trace)
austin@debian-laptop:~/src/tails$ rake --trace build 2>&1 | tee log.txt
  • Invoke build (first_time)
  • Invoke parse_build_options (first_time)
  • Execute parse_build_options
    rake aborted!
    VagrantCommandError: 'vagrant ["status"]' command failed: 1
    /home/austin/src/tails/Rakefile:61:in `capture_vagrant'
    /home/austin/src/tails/Rakefile:84:in `vm_state'
    /home/austin/src/tails/Rakefile:117:in `enough_free_memory_for_ram_build?'
    /home/austin/src/tails/Rakefile:144:in `block in <top (required)>'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:240:in `block in execute'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:235:in `each'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:235:in `execute'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:179:in `block in invoke_with_call_chain'
    /usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:172:in `invoke_with_call_chain'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:201:in `block in invoke_prerequisites'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:199:in `each'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:199:in `invoke_prerequisites'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:178:in `block in invoke_with_call_chain'
    /usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:172:in `invoke_with_call_chain'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:165:in `invoke'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:150:in `invoke_task'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:106:in `block (2 levels) in top_level'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:106:in `each'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:106:in `block in top_level'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:115:in `run_with_threads'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:100:in `top_level'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:78:in `block in run'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:176:in `standard_exception_handling'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:75:in `run'
    /usr/bin/rake:27:in `<main>'
    Tasks: TOP => build => parse_build_options

austin@debian-laptop:~/src/tails$ cat /etc/issue
Debian GNU/Linux stretch/sid \n \l

Using the instructions from wiki/src/contribute/build.mdwn

History

#1 Updated by intrigeri about 3 years ago

  • Assignee changed from anonym to hybridwipe
  • QA Check changed from Dev Needed to Info Needed

VagrantCommandError: 'vagrant ["status"]' command failed: 1
/home/austin/src/tails/Rakefile:61:in `capture_vagrant'

Can you please retry after applying the following patch, so that we get more info about what fails?

--- a/Rakefile
+++ b/Rakefile
@@ -59,7 +59,9 @@ def capture_vagrant(*args)
Open3.capture3('vagrant', *args, :chdir => './vagrant')
if proc_status.exitstatus != 0
raise(VagrantCommandError, "'vagrant #{args}' command failed: " +
-                               "#{proc_status.exitstatus}")
+                               "#{proc_status.exitstatus}\n" +
+                               "#{stdout}\n" +
+                               "#{stderr}\n")
end
return stdout, stderr
end

Thanks in advance!

#2 Updated by hybridwipe about 3 years ago

austin@debian-laptop:~/src/tails$ rake --trace build
  • Invoke build (first_time)
  • Invoke parse_build_options (first_time)
  • Execute parse_build_options
    rake aborted!
    VagrantCommandError: 'vagrant ["status"]' command failed: 1

The provider 'libvirt' could not be found, but was requested to
back the machine 'default'. Please use a provider that exists.

/home/austin/src/tails/Rakefile:61:in `capture_vagrant'
/home/austin/src/tails/Rakefile:86:in `vm_state'
/home/austin/src/tails/Rakefile:119:in `enough_free_memory_for_ram_build?'
/home/austin/src/tails/Rakefile:146:in `block in <top (required)>'
/usr/lib/ruby/vendor_ruby/rake/task.rb:240:in `block in execute'
/usr/lib/ruby/vendor_ruby/rake/task.rb:235:in `each'
/usr/lib/ruby/vendor_ruby/rake/task.rb:235:in `execute'
/usr/lib/ruby/vendor_ruby/rake/task.rb:179:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/usr/lib/ruby/vendor_ruby/rake/task.rb:172:in `invoke_with_call_chain'
/usr/lib/ruby/vendor_ruby/rake/task.rb:201:in `block in invoke_prerequisites'
/usr/lib/ruby/vendor_ruby/rake/task.rb:199:in `each'
/usr/lib/ruby/vendor_ruby/rake/task.rb:199:in `invoke_prerequisites'
/usr/lib/ruby/vendor_ruby/rake/task.rb:178:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/usr/lib/ruby/vendor_ruby/rake/task.rb:172:in `invoke_with_call_chain'
/usr/lib/ruby/vendor_ruby/rake/task.rb:165:in `invoke'
/usr/lib/ruby/vendor_ruby/rake/application.rb:150:in `invoke_task'
/usr/lib/ruby/vendor_ruby/rake/application.rb:106:in `block (2 levels) in top_level'
/usr/lib/ruby/vendor_ruby/rake/application.rb:106:in `each'
/usr/lib/ruby/vendor_ruby/rake/application.rb:106:in `block in top_level'
/usr/lib/ruby/vendor_ruby/rake/application.rb:115:in `run_with_threads'
/usr/lib/ruby/vendor_ruby/rake/application.rb:100:in `top_level'
/usr/lib/ruby/vendor_ruby/rake/application.rb:78:in `block in run'
/usr/lib/ruby/vendor_ruby/rake/application.rb:176:in `standard_exception_handling'
/usr/lib/ruby/vendor_ruby/rake/application.rb:75:in `run'
/usr/bin/rake:27:in `<main>'
Tasks: TOP => build => parse_build_options

#3 Updated by hybridwipe about 3 years ago

  • Assignee changed from hybridwipe to intrigeri

#4 Updated by intrigeri about 3 years ago

  • Assignee changed from intrigeri to hybridwipe

What does dpkg -s vagrant-libvirt libvirt-daemon-system say?

#5 Updated by hybridwipe about 3 years ago

  • Assignee changed from hybridwipe to intrigeri

@austin@debian-laptop:~$ dpkg -s vagrant-libvirt libvirt-daemon-system
Package: vagrant-libvirt
Status: install ok installed
Priority: optional
Section: ruby
Installed-Size: 242
Maintainer: Debian Ruby Extras Maintainers <>
Architecture: all
Version: 0.0.33-1
Depends: ruby | ruby-interpreter, ruby-fog-libvirt (>= 0.0.3), ruby-nokogiri (>= 1.6.0)
Description: Vagrant plugin that adds an Libvirt provider to Vagrant
vagrant-libvirt allows Vagrant to control and provision machines via
Libvirt toolkit.
.
It has many relevant features: * Control local Libvirt hypervisors. * Upload box image (qcow2 format) to Libvirt storage pool. * Create volume as COW diff image for domains. * Create private networks. * Create and boot Libvirt domains. * SSH into domains. * Setup hostname and network interfaces. * Provision domains with any built-in Vagrant provisioner. * Synced folder support via rsync, nfs or 9p. * Snapshots via sahara. * Package caching via vagrant-cachier. * Use boxes from other Vagrant providers via vagrant-mutate.
Homepage: https://github.com/pradels/vagrant-libvirt
Ruby-Versions: all

Package: libvirt-daemon-system
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 587
Maintainer: Debian Libvirt Maintainers <>
Architecture: amd64
Source: libvirt
Version: 1.3.4-1
Replaces: libvirt-bin (<< 1.2.7-4~)
Depends: libapparmor1 (>= 2.6~devel), libaudit1 (>= 1:2.2.1), libblkid1 (>= 2.17.2), libc6 (>= 2.14), libcap-ng0, libdbus-1-3 (>= 1.9.14), libdevmapper1.02.1 (>= 2:1.02.97), libnl-3-200 (>= 3.2.7), libnl-route-3-200 (>= 3.2.7), libnuma1, librados2 (>= 0.72.2), librbd1 (>= 0.72.2), libselinux1 (>= 1.32), libsystemd0, libvirt0 (>= 1.3.4~rc1), libxml2 (>= 2.7.4), libyajl2 (>= 2.0.4), adduser, gettext-base, libvirt-clients (= 1.3.4-1), libvirt-daemon (= 1.3.4-1), logrotate, policykit-1
Pre-Depends: init-system-helpers (>= 1.18~)
Recommends: bridge-utils, dmidecode, dnsmasq-base (>= 2.46-1), ebtables, iproute2, iptables (>= 1.4.10), parted, pm-utils
Suggests: radvd, auditd, systemtap, systemd, apparmor, nfs-common
Breaks: avahi-daemon (<< 0.6.31-3~), systemd-sysv (<< 224-1~)
Conflicts: libvirt-bin (<< 1.2.6-1~)
Conffiles:
/etc/apparmor.d/abstractions/libvirt-lxc 0b79525d046f5b4029cc9d190c430a6d
/etc/apparmor.d/abstractions/libvirt-qemu b569cd0c2820663b6cd924e67ea55653
/etc/apparmor.d/libvirt/TEMPLATE.lxc 8ebff2c274d37ff4f81d610f18f1c34f
/etc/apparmor.d/libvirt/TEMPLATE.qemu b0dfa704c6297fd9a4e68f0137c6be88
/etc/apparmor.d/usr.lib.libvirt.virt-aa-helper 638690b85f4e9fd7f51d2783fa7dfc5c
/etc/apparmor.d/usr.sbin.libvirtd f5df9d7db5ac54b36f276558b7470c08
/etc/default/libvirt-guests bf17f0f4a542c46e7bc9a79116315dd9
/etc/default/libvirtd 619ef67a86531f89f4cf45efde87cb82
/etc/default/virtlogd f33a6d6f8f6b5ea9a6991f4b89adab6f
/etc/init.d/libvirt-guests d7f7d982d3e7468fc70f2340a4cbc881
/etc/init.d/libvirtd b4af0507b5ece833e340b5b2c08e3a8f
/etc/init.d/virtlogd 8b6942d513cc5b6ec130556952577850
/etc/libvirt/libvirtd.conf 30f4613b774197fbe0ae2648a8ada751
/etc/libvirt/libxl-lockd.conf 1f8c81f893744cb62272e77d039af02e
/etc/libvirt/libxl.conf 4a2e47749cb83f7127748b76100ce166
/etc/libvirt/lxc.conf 9315f384df067b6ac9112f183d8996b0
/etc/libvirt/nwfilter/allow-arp.xml 484f9687010dddab663e17bca727b9f5
/etc/libvirt/nwfilter/allow-dhcp-server.xml 94e9d3d686f3fea8d847eed26c5779e9
/etc/libvirt/nwfilter/allow-dhcp.xml 1bca6be50de745ed2ba8013d6bb8abe6
/etc/libvirt/nwfilter/allow-incoming-ipv4.xml 6a7cb819450f8112ba8556a249e39b8d
/etc/libvirt/nwfilter/allow-ipv4.xml 6e9c9c8759805419c2303692475990e0
/etc/libvirt/nwfilter/clean-traffic.xml 96eefcd19459910482860b232e986a95
/etc/libvirt/nwfilter/no-arp-ip-spoofing.xml 5919340a06e7095f1fe1ba34cfd79241
/etc/libvirt/nwfilter/no-arp-mac-spoofing.xml ab67320bb8e372393175bdb8f194b05c
/etc/libvirt/nwfilter/no-arp-spoofing.xml 654ca00aa12e253225dce0b103dd3f08
/etc/libvirt/nwfilter/no-ip-multicast.xml cce4184e3edc4933e8bbd79930445aa0
/etc/libvirt/nwfilter/no-ip-spoofing.xml 89ab218461254763524c7d81f2a0a971
/etc/libvirt/nwfilter/no-mac-broadcast.xml 208b87240cfe6c08c64cca59dbc32703
/etc/libvirt/nwfilter/no-mac-spoofing.xml 56dd18af9061ed2a5c7f2d90e4596c34
/etc/libvirt/nwfilter/no-other-l2-traffic.xml 40036127d35fdd3e4561fbdfccde501f
/etc/libvirt/nwfilter/no-other-rarp-traffic.xml 5725e2466b4117941592a26b9ad92863
/etc/libvirt/nwfilter/qemu-announce-self-rarp.xml 60102e3d3e9fd580f1cd71354d85140a
/etc/libvirt/nwfilter/qemu-announce-self.xml 23ee6fd207d0c242b29b10b81ee77fbf
/etc/libvirt/qemu-lockd.conf 1f8c81f893744cb62272e77d039af02e
/etc/libvirt/qemu-sanlock.conf f7228bf16102e8e6a8b6f61178e0a607
/etc/libvirt/qemu.conf 6d3ecf5804b500f1a0fbb1daa1d66b22
/etc/libvirt/qemu/networks/default.xml 890072c1a0b5ac004faa112c930cf175
/etc/libvirt/virtlockd.conf 91b6e88f8555bdadda55d7422b67a06b
/etc/libvirt/virtlogd.conf 5abb257727f7ceddbb6fcc2e506bd7b4
/etc/logrotate.d/libvirtd 07c99d1b26b30055fb4d1fc26652dc94
/etc/logrotate.d/libvirtd.libxl 4bea784e6b52eb7360eb4ea0c5292478
/etc/logrotate.d/libvirtd.lxc 2a1745a98b9a7da33a8b7159ffd90f7c
/etc/logrotate.d/libvirtd.qemu e862be8be1b0076daf7581e3122834d6
/etc/logrotate.d/libvirtd.uml a19a359be12c8dd27f25c12b79f3007b
/etc/sasl2/libvirt.conf 342c6033c80c78d4573fb5ac522f08fe
Description: Libvirt daemon configuration files
Libvirt is a C toolkit to interact with the virtualization capabilities
of recent versions of Linux (and other OSes). The library aims at providing
a long term stable C API for different virtualization mechanisms. It currently
supports QEMU, KVM, XEN, OpenVZ, LXC, and VirtualBox.
.
This package contains the configuration files to run the libvirt daemon as a
system service.
Homepage: http://libvirt.org
@

#6 Updated by intrigeri about 3 years ago

  • Assignee changed from intrigeri to anonym

Thanks. So I've no clue why Vagrant cannot see the libvirt provider. anonym?

#7 Updated by intrigeri about 3 years ago

  • Subject changed from libvirt build fails on debian/unstable to vagrant-libvirt build fails on Debian unstable

#8 Updated by spriver about 3 years ago

Debian Stable (Jessie) produces the same error:

root@apu:~/tails# rake build --trace
  • Invoke build (first_time)
  • Invoke parse_build_options (first_time)
  • Execute parse_build_options
    rake aborted!
    VagrantCommandError: 'vagrant ["status"]' command failed: 1
    /root/tails/Rakefile:61:in `capture_vagrant'
    /root/tails/Rakefile:84:in `vm_state'
    /root/tails/Rakefile:117:in `enough_free_memory_for_ram_build?'
    /root/tails/Rakefile:144:in `block in <top (required)>'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:240:in `call'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:240:in `block in execute'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:235:in `each'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:235:in `execute'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:179:in `block in invoke_with_call_chain'
    /usr/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:172:in `invoke_with_call_chain'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:201:in `block in invoke_prerequisites'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:199:in `each'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:199:in `invoke_prerequisites'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:178:in `block in invoke_with_call_chain'
    /usr/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:172:in `invoke_with_call_chain'
    /usr/lib/ruby/vendor_ruby/rake/task.rb:165:in `invoke'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:150:in `invoke_task'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:106:in `block (2 levels) in top_level'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:106:in `each'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:106:in `block in top_level'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:115:in `run_with_threads'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:100:in `top_level'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:78:in `block in run'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:176:in `standard_exception_handling'
    /usr/lib/ruby/vendor_ruby/rake/application.rb:75:in `run'
    /usr/bin/rake:27:in `<main>'
    Tasks: TOP => build => parse_build_options

After applying the patch:

root@apu:~/tails# rake build --trace
  • Invoke build (first_time)
  • Invoke parse_build_options (first_time)
  • Execute parse_build_options
    rake aborted!
    VagrantCommandError: 'vagrant ["status"]' command failed: 1

Vagrant experienced a version conflict with some installed plugins!
This usually happens if you recently upgraded Vagrant. As part of the
upgrade process, some existing plugins are no longer compatible with
this version of Vagrant. The recommended way to fix this is to remove
your existing plugins and reinstall them one-by-one. To remove all
plugins:

rm -r ~/.vagrant.d/plugins.json ~/.vagrant.d/gems

Note if you have an alternate VAGRANT_HOME environmental variable
set, the folders above will be in that directory rather than your
user's home directory.

The error message is shown below:

Could not find gem 'ruby-libvirt (< 0.7.0, >= 0.5.0) ruby', which is required by gem 'vagrant-libvirt (>= 0) ruby', in any of the sources.

/root/tails/Rakefile:61:in `capture_vagrant'
/root/tails/Rakefile:86:in `vm_state'
/root/tails/Rakefile:119:in `enough_free_memory_for_ram_build?'
/root/tails/Rakefile:146:in `block in <top (required)>'
/usr/lib/ruby/vendor_ruby/rake/task.rb:240:in `call'
/usr/lib/ruby/vendor_ruby/rake/task.rb:240:in `block in execute'
/usr/lib/ruby/vendor_ruby/rake/task.rb:235:in `each'
/usr/lib/ruby/vendor_ruby/rake/task.rb:235:in `execute'
/usr/lib/ruby/vendor_ruby/rake/task.rb:179:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/usr/lib/ruby/vendor_ruby/rake/task.rb:172:in `invoke_with_call_chain'
/usr/lib/ruby/vendor_ruby/rake/task.rb:201:in `block in invoke_prerequisites'
/usr/lib/ruby/vendor_ruby/rake/task.rb:199:in `each'
/usr/lib/ruby/vendor_ruby/rake/task.rb:199:in `invoke_prerequisites'
/usr/lib/ruby/vendor_ruby/rake/task.rb:178:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/usr/lib/ruby/vendor_ruby/rake/task.rb:172:in `invoke_with_call_chain'
/usr/lib/ruby/vendor_ruby/rake/task.rb:165:in `invoke'
/usr/lib/ruby/vendor_ruby/rake/application.rb:150:in `invoke_task'
/usr/lib/ruby/vendor_ruby/rake/application.rb:106:in `block (2 levels) in top_level'
/usr/lib/ruby/vendor_ruby/rake/application.rb:106:in `each'
/usr/lib/ruby/vendor_ruby/rake/application.rb:106:in `block in top_level'
/usr/lib/ruby/vendor_ruby/rake/application.rb:115:in `run_with_threads'
/usr/lib/ruby/vendor_ruby/rake/application.rb:100:in `top_level'
/usr/lib/ruby/vendor_ruby/rake/application.rb:78:in `block in run'
/usr/lib/ruby/vendor_ruby/rake/application.rb:176:in `standard_exception_handling'
/usr/lib/ruby/vendor_ruby/rake/application.rb:75:in `run'
/usr/bin/rake:27:in `<main>'
Tasks: TOP => build => parse_build_options

#9 Updated by anonym about 3 years ago

  • QA Check changed from Info Needed to Dev Needed
  • Type of work changed from Code to Contributors documentation

It turns out the problem was with left-overs from the Virtualbox-based Vagrant build setup:

  • Remove any old pinnings for vagrant and ruby-net-ssh
  • I don't know why this was needed: rm -r ~/.vagrant.d

I just need to add some notes about this to the build docs, to not deter previous contributors.

#10 Updated by anonym about 3 years ago

  • Status changed from New to Fix committed
  • Assignee deleted (anonym)
  • % Done changed from 0 to 100
  • QA Check changed from Dev Needed to Pass

I pushed 35f7133 straight to devel => optimistically closing this ticket.

#11 Updated by anonym about 3 years ago

  • Status changed from Fix committed to Resolved

Also available in: Atom PDF