Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vagrant plugins cannot be installed anymore for vagrant 2.4.2 #13527

Closed
dib42 opened this issue Nov 2, 2024 · 22 comments · Fixed by #13532
Closed

Vagrant plugins cannot be installed anymore for vagrant 2.4.2 #13527

dib42 opened this issue Nov 2, 2024 · 22 comments · Fixed by #13532

Comments

@dib42
Copy link

dib42 commented Nov 2, 2024

In the Debug output and Steps to reproduce vagrant-env plugin is used, but that happened to other plugins I am using (vagrant-disksize and vagrant-vbguest) as well as picking some random plugins from here.

It seems that adding the dependency of logger (this PR) breaks the installation of (probably) all plugins under Windows.

When opening a cmd in C:\Program Files\Vagrant\embedded\mingw64\bin and run gem search -be logger

C:\Program Files\Vagrant\embedded\mingw64\bin>gem search -be logger

*** LOCAL GEMS ***

logger (1.6.0)

*** REMOTE GEMS ***

logger (1.6.1)

Debug output

https://gist.github.com/dib42/7113c057c40dac93760afe4b813cb763

Expected behavior

Vagrant should install the plugin

Actual behavior

Vagrant does not install the plugin because of a ruby dependency problem

Reproduction information

Vagrant version

Vagrant 2.4.2

Host operating system

Windows 10 22H2

Guest operating system

Ubuntu 22.04

Steps to reproduce

  1. Open powershell
  2. Run vagrant plugin install vagrant-env --verbose --debug-timestamp

Vagrantfile

Just for the bug report requirements, as this is not relevant for the bug

# Copy-paste your Vagrantfile here. Remove any sensitive information such as passwords, authentication tokens, or email addresses.
Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/jammy64"
end
@PaulNeumann
Copy link

Same issue on Windows 11 23H2.

@brlin-tw
Copy link
Contributor

brlin-tw commented Nov 2, 2024

@hswong3i Would you mind having a look into this one?

@brlin-tw
Copy link
Contributor

brlin-tw commented Nov 2, 2024

This problem also affects Linux hosts(and probably all supported platforms of Vagrant as it's a gem dependency issue).

@djzara
Copy link

djzara commented Nov 3, 2024

Same issue on macOS 15.1 as of this morning, so that's to your suggestion @brlin-tw

@Sn0wCrack
Copy link

The VAGRANT_DISABLE_STRICT_DEPENDENCY_ENFORCEMENT=1 environment variable seems to work around this in the meantime if people are having this issue.

@jeremyanugrah
Copy link

Same Issue on Windows 11 Version 10.0.22631 Build 22631

@kingispeak
Copy link

Same issue on macOS 15.1.

@hswong3i
Copy link
Contributor

hswong3i commented Nov 4, 2024

@hswong3i Would you mind having a look into this one?

My manual vagrant RPM/DEB packaging with OBS working correctly: https://build.opensuse.org/package/show/home:alvistack/hashicorp-vagrant-2.4.2

I guess one of the different is: I had vendor all dependency locally before packaging, see alvistack@1cec484:

    git clean -xdf
    git submodule sync --recursive
    git submodule update --recursive --init
    git submodule foreach --recursive git clean -xdf
    gem build vagrant.gemspec -o ../vagrant-2.4.2.gem
    bundle config set --local path ./bundle
    bundle install --verbose --standalone
    bundle config set --local cache_all true
    bundle config set --local cache_all_platforms true
    bundle cache
    mv ../vagrant-2.4.2.gem ./vendor/cache/
    rm -rf .bundle bundle vendor/bundle Gemfile.lock
    tar zcvf ../vagrant_2.4.2.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp vagrant.spec ../vagrant_2.4.2-1.spec
    cp vagrant.rpmlintrc /osc/home\:alvistack/hashicorp-vagrant-2.4.2/
    cp ../vagrant*2.4.2*.{gz,xz,spec,dsc} /osc/home\:alvistack/hashicorp-vagrant-2.4.2/
    rm -rf ../vagrant*2.4.2*.*

BTW, refer to your report, I guess setting it as ~> 1.6.0 should be suitable:

C:\Program Files\Vagrant\embedded\mingw64\bin>gem search -be logger

*** LOCAL GEMS ***

logger (1.6.0)

*** REMOTE GEMS ***

logger (1.6.1)

@nekotov
Copy link

nekotov commented Nov 4, 2024

Same issue on macOS 15.0

@cjlapao
Copy link

cjlapao commented Nov 4, 2024

We at Parallels are also having a lot of people reporting the same using our plugin

@rvalue
Copy link

rvalue commented Nov 4, 2024

Same issue with macOS Sequoia 15.1

@brlin-tw
Copy link
Contributor

brlin-tw commented Nov 4, 2024

Hello all, I have submitted a merge request(#13532) that should fix this issue, if you are capable of doing a source installation please help verify the patch(or directly review the code change), thank you!

@lprimak
Copy link

lprimak commented Nov 5, 2024

How would I know if the fix has been released? 2.4.3? Something else?
Thanks!

@iqbalabd
Copy link

iqbalabd commented Nov 5, 2024

I'm seeing the same issue on Ubuntu 22.04. As vagrant was working well in the previous version, I decided to downgrade and keep it at that version for now:

$ apt list -a vagrant (check versions)
$ sudo apt install vagrant=2.4.1-1
$ vagrant plugin install vagrant-libvirt (re-install my plugin)
$ sudo apt-mark hold vagrant (hold the working vagrant version for now so it doesn't automatically gets upgraded)

@lprimak
Copy link

lprimak commented Nov 5, 2024

Do we have an ETA for 2.4.3 release? Please release ASAP.
Thank you!

@marcosvile
Copy link

marcosvile commented Nov 5, 2024

Solved it for me:

$ VAGRANT_DISABLE_STRICT_DEPENDENCY_ENFORCEMENT=1 vagrant plugin install vagrant-vbguest

@dib42 dib42 changed the title Vagrant plugins cannot be installed anymore for vagrant 2.4.2 under Windows Vagrant plugins cannot be installed anymore for vagrant 2.4.2 Nov 5, 2024
@AlekseyKorzun
Copy link

AlekseyKorzun commented Nov 6, 2024

Here is an example of automatic provisioning that leverages @marcosvile solution:

required_plugins = %w(vagrant-berkshelf vagrant-vbguest)
required_plugins.each do |plugin|
  if plugin == "vagrant-berkshelf"
    ENV["VAGRANT_DISABLE_STRICT_DEPENDENCY_ENFORCEMENT"] = "1"
  end

  exec "vagrant plugin install #{plugin}; vagrant #{ARGV.join(' ')}" unless Vagrant.has_plugin?(plugin) || ARGV[0] == 'plugin'
  if plugin == "vagrant-berkshelf"
    ENV["VAGRANT_DISABLE_STRICT_DEPENDENCY_ENFORCEMENT"] = "0"
  end
end

👍

@sonnxx
Copy link

sonnxx commented Nov 7, 2024

Same issue on macOS Sequoia 15.0.1

Vagrant failed to properly resolve required dependencies. These errors can commonly be caused by misconfigured plugin installations or transient network issues. The reported error is:

conflicting dependencies logger (= 1.6.0) and logger (= 1.6.1)
  Activated logger-1.6.1
  which does not match conflicting dependency (= 1.6.0)

  Conflicting dependency chains:
    logger (= 1.6.1), 1.6.1 activated

  versus:
    logger (= 1.6.0)

  Gems matching logger (= 1.6.0):
    logger-1.6.0

@Hulidex
Copy link

Hulidex commented Nov 7, 2024

Same issue ubuntu 24.04:

Installing the 'vagrant-disksize' plugin. This can take a few minutes...
Vagrant failed to properly resolve required dependencies. These
errors can commonly be caused by misconfigured plugin installations
or transient network issues. The reported error is:

conflicting dependencies logger (= 1.6.0) and logger (= 1.6.1)
  Activated logger-1.6.1
  which does not match conflicting dependency (= 1.6.0)

  Conflicting dependency chains:
    logger (= 1.6.1), 1.6.1 activated

  versus:
    logger (= 1.6.0)

  Gems matching logger (= 1.6.0):
    logger-1.6.0

@darkn3rd
Copy link

This version should not have been released without proper testing. It should be rolled back and removed from distribution. Release another one as RC or Beta or something.

@chrisroberts
Copy link
Member

Vagrant v2.4.3 has been published which includes the fix for this issue.

@robkorv
Copy link

robkorv commented Nov 13, 2024

If you hold the package with apt-mark you can mark it as manual again with: sudo apt-mark manual vagrant
It was still held back on my system though.

The following packages have been kept back:                                                                                                                                             
  vagrant
N: Some packages may have been kept back due to phasing.

This is because of https://wiki.ubuntu.com/PhasedUpdates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet