[DRE-maint] Bug#1057808: vagrant: 'vagrant box prune' raises 'undefined method `provider' for nil:NilClass (NoMethodError)'

Philippe SWARTVAGHER phil.swart at gmx.fr
Fri Dec 8 18:29:45 GMT 2023


Package: vagrant
Version: 2.3.4+dfsg-1
Severity: normal

Dear Maintainer,

When I run the command `vagrant box prune`, I get the following output
(and error):
The following boxes will be kept...
generic/debian10 (virtualbox, 4.3.2)
generic/debian11 (virtualbox, 3.6.12)
generic/debian12 (virtualbox, 4.3.8)

Checking for older boxes...
Box 'generic/debian12' (v4.3.6) with provider 'virtualbox' appears
to still be in use by at least one Vagrant environment. Removing
the box could corrupt the environment. We recommend destroying
these environments first:

test (ID: 303e585f8f23406dbf2de67ab5d7d1e8)

Are you sure you want to remove this box? [y/N]
/usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.11.2/lib/vagrant-libvirt/action/remove_libvirt_image.rb:15:in
`call': undefined method `provider' for nil:NilClass (NoMethodError)

return @app.call(env) unless env[:box_removed].provider == :libvirt
^^^^^^^^^
from
/usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in
`call'
from
/usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/builtin/box_remove.rb:123:in
`call'
from
/usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/warden.rb:48:in
`call'
from
/usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/builder.rb:180:in
`call'
from
/usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/runner.rb:101:in
`block in run'
from
/usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/util/busy.rb:19:in
`busy'
from
/usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/action/runner.rb:101:in
`run'
from
/usr/share/rubygems-integration/all/gems/vagrant-2.3.4/plugins/commands/box/command/prune.rb:114:in
`block in delete_oldest_boxes'
from
/usr/share/rubygems-integration/all/gems/vagrant-2.3.4/plugins/commands/box/command/prune.rb:102:in
`each'
from
/usr/share/rubygems-integration/all/gems/vagrant-2.3.4/plugins/commands/box/command/prune.rb:102:in
`delete_oldest_boxes'
from
/usr/share/rubygems-integration/all/gems/vagrant-2.3.4/plugins/commands/box/command/prune.rb:48:in
`execute'
from
/usr/share/rubygems-integration/all/gems/vagrant-2.3.4/plugins/commands/box/command/root.rb:66:in
`execute'
from
/usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/cli.rb:67:in
`execute'
from
/usr/share/rubygems-integration/all/gems/vagrant-2.3.4/lib/vagrant/environment.rb:301:in
`cli'
from
/usr/share/rubygems-integration/all/gems/vagrant-2.3.4/bin/vagrant:243:in
`<top (required)>'
from /usr/bin/vagrant:25:in `load'
from /usr/bin/vagrant:25:in `<main>'

At the question `Are you sure you want to remove this box? [y/N]`, I hit
Enter to select the 'N' answer.

I'm using VirtualBox and not libvirt, but I have some libvirt-related
packages:
ii libsys-virt-perl 9.8.0-1
ii libvirt-l10n 9.10.0-1
ii libvirt0:amd64 9.10.0-1
ii ruby-fog-libvirt 0.11.0-1
ii ruby-libvirt 0.7.1-2
ii vagrant-libvirt 0.11.2-1

Nevertheless, it seems `vagrant box prune` did correctly its job...

Thanks!

Philippe.


-- System Information:
Debian Release: trixie/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.5.0-5-amd64 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE
not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages vagrant depends on:
ii curl 8.5.0-1
ii libarchive-tools 3.7.2-1
ii libruby3.1 [ruby-rexml] 3.1.2-7
ii openssh-client 1:9.5p1-2
ii rsync 3.2.7-1
ii ruby 1:3.1
ii ruby-bcrypt-pbkdf 1.1.0-2+b3
ii ruby-childprocess 4.1.0-2
ii ruby-ed25519 1.3.0+ds-1+b4
ii ruby-erubi 1.12.0-1
ii ruby-googleapis-common-protos-types 1.4.0-1
ii ruby-grpc 1.51.1-3+b3
ii ruby-i18n 1.14.1-1
pn ruby-ipaddr <none>
ii ruby-listen 3.8.0-1
ii ruby-log4r 1.1.10-4.1
ii ruby-mime-types 3.5.1-1
ii ruby-net-scp 4.0.0-1
ii ruby-net-sftp 1:4.0.0-1
ii ruby-net-ssh 1:7.2.0-1
ii ruby-vagrant-cloud 3.0.5-1
ii ruby-zip 2.3.2-1

Versions of packages vagrant recommends:
ii vagrant-libvirt 0.11.2-1

Versions of packages vagrant suggests:
ii virtualbox 7.0.12-dfsg-1

-- no debconf information



More information about the Pkg-ruby-extras-maintainers mailing list