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-libvirt : Error while connecting to Libvirt: libvirt has no compute service #159

Closed
MikeHorn-git opened this issue Oct 24, 2024 · 7 comments · Fixed by #168
Closed

Comments

@MikeHorn-git
Copy link

Informations

  • Archlinux host
  • ruby 3.3.5
  • Vagrant 2.4.1
  • vagrant-libvirt (0.12.2, global)

Error

vagrant up
[fog][DEPRECATION] Unable to require fog/libvirt/compute
[fog][DEPRECATION] Falling back to deprecated path fog/compute/libvirt. The preferred file path format has changed from service/provider to provider/service. Please update this service provider to use the preferred format.
[fog][WARNING] Error while loading provider libvirt: cannot load such file -- fog/compute/libvirt
Error while connecting to Libvirt: libvirt has no compute service
@bayram-dev
Copy link

bayram-dev commented Dec 20, 2024

Issueing same problem.
@MikeHorn-git did you find any solution/workaround?

Simillar issue in vagrant-libvirt/vagrant-libvirt#1833

@MikeHorn-git
Copy link
Author

Hello, no @bayram-dev

@ekohl
Copy link
Contributor

ekohl commented Dec 22, 2024

I suspect something triggers a LoadError and that hits some compatibility code in Vagrant. I wonder if it's something with Ruby 3.3.

Any chance nokogiri or ruby-libvirt isn't properly loading?

@Artideusz
Copy link

I did some quick debugging and found out that lib/fog/libvirt/models/compute/util/util.rb depends on the erb gem. Adding erb to the gemspec file resolved the issue for me.

For the workaround in vagrant-libvirt, I've done the following:

  • git clone https://github.com/vagrant-libvirt/vagrant-libvirt.git
  • Added s.add_runtime_dependency 'erb' to the vagrant-libvirt.gemspec file.
  • gem build ./vagrant-libvirt.gemspec
  • vagrant plugin install ./vagrant-libvirt-<version>.gem

@ekohl
Copy link
Contributor

ekohl commented Dec 24, 2024

I did some quick debugging and found out that lib/fog/libvirt/models/compute/util/util.rb depends on the erb gem. Adding erb to the gemspec file resolved the issue for me.

erb should be present by default, but since 476c630 it actually doesn't need ERB anymore but I forgot to drop it as a require. While playing around with it I noticed this in 9ac7029. I've submit it as a separate PR so could you try if #168 fixes it for you?

@MikeHorn-git
Copy link
Author

I did some quick debugging and found out that lib/fog/libvirt/models/compute/util/util.rb depends on the erb gem. Adding erb to the gemspec file resolved the issue for me.

erb should be present by default, but since 476c630 it actually doesn't need ERB anymore but I forgot to drop it as a require. While playing around with it I noticed this in 9ac7029. I've submit it as a separate PR so could you try if #168 fixes it for you?

That work for me. Thanks for your fix.

@ekohl
Copy link
Contributor

ekohl commented Dec 25, 2024

Thanks for testing. I don't have access to my keys until after Christmas but perhaps @nofaralfasi can create a bugfix release

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

Successfully merging a pull request may close this issue.

4 participants