Bug ID 1201730
Summary Upgrade to LEAP 15.4 breaks installing official Vagrant package with vagrant-libvirt
Classification openSUSE
Product openSUSE Distribution
Version Leap 15.4
Hardware x86-64
OS Other
Status NEW
Severity Major
Priority P5 - None
Component Virtualization:Other
Assignee virt-bugs@suse.de
Reporter markus.zimmermann@symflower.com
QA Contact qa-bugs@suse.de
Found By ---
Blocker ---

I just installed a new machine with LEAP 15.4. This is actually the first time
I tried it on our development environment stack. One major part of our devenv
is broken with 15.4: Vagrant with libvirt as its backend cannot be installed

**This worked flawless with LEAP 15.3. We cannot upgrade because of this
problem.**

Here is a reproducer that works repeatedly for me on a newly installed 15.4 and
on a machine where i upgraded from 15.3 to 15.4.

We usually install the official version of Vagrant (so we can reproduce bugs
for specific versions) and also install specific plugins: E.g.:

# Remove everything related to Vagrant and building with bundler:
rm -rf .vagrant/ ~/.vagrant.d/ ~/.bundle

# Install Vagrant manually from the official source.
sudo zypper --no-gpg-checks --non-interactive install
https://releases.hashicorp.com/vagrant/2.2.19/vagrant_2.2.19_x86_64.rpm

Create a directory "foobar", cd into it, and create a Vagrantfile
```
# -*- mode: ruby -*-
# vi: set ft=ruby :

VAGRANTFILE_API_VERSION = '2'

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
    config.vagrant.plugins = {
        "vagrant-libvirt" => {
            "version" => "0.9.0"
        }
    }

    config.vm.box = 'generic/ubuntu2004'
    config.vm.box_version = '4.0.4'
    config.vm.box_check_update = false

    config.vm.hostname = 'foobar'

    config.vm.provider :libvirt do |libvirt|
        libvirt.cpus = 2
        libvirt.memory = 2048
    end
end
```

# Create the VM with debugging output. Remember to press Y+ENTER when asked to
install the libvirt plugin.
vagrant --debug up

What you will see is an error that we cannot compile ruby-libvirt (the libvirt
dependency). The output references the log file ruby-libvirt-0.8.0/mkmf.log

Which mainly failed with

```
"gcc -o conftest -I/opt/vagrant/embedded/include/ruby-2.7.0/x86_64-linux
-I/opt/vagrant/embedded/include/ruby-2.7.0/ruby/backward
-I/opt/vagrant/embedded/include/ruby-2.7.0 -I. -I/opt/vagrant/embedded/include
-I/opt/vagrant/embedded/include   -I/opt/vagrant/embedded/include -I./include
-O3 -std=c99 -fPIC conftest.c  -L. -L/opt/vagrant/embedded/lib
-Wl,-rpath,/opt/vagrant/embedded/lib -L/opt/vagrant/embedded/lib
-Wl,-rpath,/opt/vagrant/embedded/lib -L. -L/opt/vagrant/embedded/lib
-L/opt/vagrant/embedded/lib64
-Wl,-rpath=/opt/vagrant/embedded/lib:/opt/vagrant/embedded/lib64
-fstack-protector-strong -rdynamic -Wl,-export-dynamic
-L/opt/vagrant/embedded/lib  -Wl,-rpath,/opt/vagrant/embedded/lib    
-Wl,-rpath,'/../lib' -Wl,-rpath,'/../lib' -lruby -lvirt -lm   -lc"
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
/usr/lib64/libssh.so.4: undefined reference to
`EVP_KDF_CTX_new_id@OPENSSL_1_1_1d'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_ctrl@OPENSSL_1_1_1d'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
/usr/lib64/libssh.so.4: undefined reference to
`EVP_KDF_CTX_free@OPENSSL_1_1_1d'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_derive@OPENSSL_1_1_1d'
```

As you can see. We cannot install vagrant-libvirt with LEAP 15.4. Mainly
because we cannot compile ruby-libvirt.

This worked flawless with LEAP 15.3.

Now i was desperate so i looked a little closer and tried different scenarios.
The only scenario i found that actually worked:

When we add the repositories
https://download.opensuse.org/repositories/devel:/languages:/ruby/15.4
and https://download.opensuse.org/repositories/Virtualization:/vagrant/15.4

We can install the the current version of "vagrant" which is 2.2.19 from the
virtualization-vagrant repository. The package automatically installs "ruby3.1"
(from the ruby repository) and some ruby3.1-* packages (from the
virtualization-vagrant repository) AND also "vagrant-libvirt" in an completely
outdated version. That we need to deinstall, so we can compile it on our own
(please do not install this packages automatically, most users might not even
want that package).

After deinstalling "vagrant-libvirt". We need to install
"ruby3.1-rubygem-ruby-libvirt", "ruby3.1-rubygem-fog-core" and
"ruby3.1-rubygem-fog-libvirt" (from the virtualization-vagrant repository). The
last one greets us with the problem that "ruby:3.1.0:nokogiri" cannot be found
in any repository. We need to install it anyway.

We can try again:

# Remove everything related to Vagrant and building with bundler:
rm -rf .vagrant/ ~/.vagrant.d/ ~/.bundle

# Create the VM with debugging output. Remember to press Y+ENTER when asked to
install the libvirt plugin.
vagrant up

This time, the compilation and installation works, even though we are breaking
a reference.

Conclusion:
- We can compile+install+use the vagrant-libvirt plugin on our own. However, we
are bound to the Vagrant version in the virtualization-vagrant repository.
- Since we are bound to a specific Vagrant version, and we cannot simply
install vagrant-libvirt, we cannot upgrade to 15.4. This is a major blocker for
us.


You are receiving this mail because: