Closed tomjn closed 2 months ago
I removed a number of unused unrelated containers, restarted the docker engine, and ran docker network prune
, with no improvement.
It looks like there's a network where config = Array(network["IPAM"]["Config"])
is nil
though I couldn't identify its name from the debug output
it's the host
network, I dumped the network
object and saw this:
{"Name"=>"host", "Id"=>"6efa1ee2bb60fd235c4207460328b62568b0c9351b4ebab96597d75e028aadae", "Created"=>"2024-01-04T15:19:23.646989666Z", "Scope"=>"local", "Driver"=>"host", "EnableIPv6"=>false, "IPAM"=>{"Driver"=>"default", "Options"=>nil, "Config"=>nil}, "Internal"=>false, "Attachable"=>false, "Ingress"=>false, "ConfigFrom"=>{"Network"=>""}, "ConfigOnly"=>false, "Containers"=>{}, "Options"=>{}, "Labels"=>{}}
Changing the condition to this allowed the command to continue:
if (config && config.size > 0 &&
It looks like this was found here https://github.com/hashicorp/vagrant/issues/13339 and a similar fix was applied. I've kept my PR open as I believe the code it adds is more comprehensive and in line with the rest of the file, but glad to see 2.4.2 will resolve the issue
It was fixed with https://github.com/hashicorp/vagrant/issues/13339 but there was no stable release for the 3 mounts now. This really frustrates me cuz I'm forced to freeze the docker dependency and deal with internal user support that relies on this fix.
When provisioning VVV using Docker as a provider it fails nearly immediately with the following error:
Debug output
https://gist.github.com/tomjn/92ed3f0dcbfb47c6c2bd6d24af2b6620
CLI output and command:
``` ❯ vagrant up --provision --provider="docker" __ __ __ __ \ V\ V\ V / v3.13 Ruby:3.1.4, Path:"/Users/tomjn/vvv-local" \_/\_/\_/ git::develop(c4250187) Platform: darwin shell:/bin/zsh shared_db_folder_disabled Vagrant: v2.4.1, parallels: v19.3.0 Docs: https://varyingvagrantvagrants.org/ Contribute: https://github.com/varying-vagrant-vagrants/vvv Dashboard: http://vvv.test Bringing machine 'default' up with 'docker' provider... ==> default: Creating and configuring docker networks... /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/docker/driver.rb:352:in `block in network_defined?': undefined method `size' for nil:NilClass (NoMethodError) if (config.size > 0 && ^^^^^ from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/docker/driver.rb:350:in `each' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/docker/driver.rb:350:in `network_defined?' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/docker/action/prepare_networks.rb:140:in `process_private_network' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/docker/action/prepare_networks.rb:343:in `block (3 levels) in call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/docker/action/prepare_networks.rb:333:in `each' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/docker/action/prepare_networks.rb:333:in `each_with_index' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/docker/action/prepare_networks.rb:333:in `block (2 levels) in call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/environment.rb:649:in `lock' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/docker/action/prepare_networks.rb:331:in `block in call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/docker/action/prepare_networks.rb:330:in `synchronize' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/docker/action/prepare_networks.rb:330:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/docker/action/prepare_nfs_settings.rb:18:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/builtin/synced_folders.rb:90:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/builtin/delayed.rb:22:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/builtin/synced_folder_cleanup.rb:31:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/synced_folders/nfs/action_cleanup.rb:28:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/docker/action/prepare_nfs_valid_ids.rb:17:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/docker/action/host_machine_sync_folders.rb:26:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/docker/action/host_machine_build_dir.rb:22:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:117:in `block in finalize_action' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/docker/action/init_state.rb:18:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:117:in `block in finalize_action' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/builder.rb:183:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/runner.rb:104:in `block in run' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/util/busy.rb:22:in `busy' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/runner.rb:104:in `run' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/builtin/call.rb:56:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:117:in `block in finalize_action' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/builtin/provision.rb:83:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:117:in `block in finalize_action' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/builder.rb:183:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/runner.rb:104:in `block in run' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/util/busy.rb:22:in `busy' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/runner.rb:104:in `run' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/builtin/call.rb:56:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:117:in `block in finalize_action' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/builder.rb:183:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/runner.rb:104:in `block in run' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/util/busy.rb:22:in `busy' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/runner.rb:104:in `run' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/builtin/call.rb:56:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:117:in `block in finalize_action' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/docker/action/destroy_build_image.rb:46:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/builtin/handle_box.rb:28:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:117:in `block in finalize_action' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/builder.rb:183:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/runner.rb:104:in `block in run' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/util/busy.rb:22:in `busy' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/runner.rb:104:in `run' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/builtin/call.rb:56:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/docker/action/host_machine.rb:21:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/builtin/config_validate.rb:28:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:117:in `block in finalize_action' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/builtin/handle_box.rb:28:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:117:in `block in finalize_action' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/builder.rb:183:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/runner.rb:104:in `block in run' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/util/busy.rb:22:in `busy' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/runner.rb:104:in `run' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/builtin/call.rb:56:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/builtin/delayed.rb:22:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/warden.rb:38:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/builder.rb:183:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/runner.rb:104:in `block in run' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/util/busy.rb:22:in `busy' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/action/runner.rb:104:in `run' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/machine.rb:247:in `action_raw' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/machine.rb:216:in `block in action' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/environment.rb:649:in `lock' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/machine.rb:202:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/machine.rb:202:in `action' from /opt/vagrant/embedded/gems/gems/vagrant-2.4.1/lib/vagrant/batch_action.rb:89:in `block (2 levels) in run' ```Expected behavior
I expected a container and provisioners to run
Actual behavior
A fatal error in the ruby vagrant plugin before the machine could be setup, and no new containers in Docker
Reproduction information
Vagrant version
Host operating system
MacOS 14.1.1 Arm64
Guest operating system
Ubuntu 20 Arm64
Steps to reproduce
Vagrantfile
WIP