fog / fog-libvirt

libvirt provider for fog
MIT License
16 stars 42 forks source link

vagrant up fails with fog-libvirt 0.0.4, works with 0.0.3 #16

Closed alberts closed 8 years ago

alberts commented 8 years ago

Running Fedora 23 (fully updated) with vagrant-libvirt 0.0.32 and fog-libvirt 0.0.4. My vagrant ups are failing with:

==> foo: Creating shared folders metadata...
==> foo: Starting domain.
==> foo: Waiting for domain to get an IP address...
==> foo: Removing domain...
/home/albert/.vagrant.d/gems/gems/fog-core-1.36.0/lib/fog/core/service.rb:244:in `validate_options': Missing required arguments: libvirt_uri (ArgumentError)
    from /home/albert/.vagrant.d/gems/gems/fog-core-1.36.0/lib/fog/core/service.rb:268:in `handle_settings'
    from /home/albert/.vagrant.d/gems/gems/fog-core-1.36.0/lib/fog/core/service.rb:98:in `new'
    from /home/albert/.vagrant.d/gems/gems/fog-core-1.36.0/lib/fog/core/services_mixin.rb:16:in `new'
    from /home/albert/.vagrant.d/gems/gems/fog-core-1.36.0/lib/fog/compute.rb:65:in `new'
    from /home/albert/.vagrant.d/gems/gems/fog-core-1.36.0/lib/fog/core/services_mixin.rb:4:in `[]'
    from /home/albert/.vagrant.d/gems/gems/fog-libvirt-0.0.4/lib/fog/libvirt/models/compute/server.rb:269:in `addresses'
    from /home/albert/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/wait_till_up.rb:39:in `block (3 levels) in call'
    from /home/albert/.vagrant.d/gems/gems/fog-core-1.36.0/lib/fog/core/model.rb:72:in `instance_eval'
    from /home/albert/.vagrant.d/gems/gems/fog-core-1.36.0/lib/fog/core/model.rb:72:in `block in wait_for'
    from /home/albert/.vagrant.d/gems/gems/fog-core-1.36.0/lib/fog/core/wait_for.rb:7:in `block in wait_for'
    from /home/albert/.vagrant.d/gems/gems/fog-core-1.36.0/lib/fog/core/wait_for.rb:6:in `loop'
    from /home/albert/.vagrant.d/gems/gems/fog-core-1.36.0/lib/fog/core/wait_for.rb:6:in `wait_for'
    from /home/albert/.vagrant.d/gems/gems/fog-core-1.36.0/lib/fog/core/model.rb:69:in `wait_for'
    from /home/albert/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/wait_till_up.rb:38:in `block (2 levels) in call'
    from /usr/share/vagrant/lib/vagrant/util/retryable.rb:17:in `retryable'
    from /home/albert/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/wait_till_up.rb:33:in `block in call'
    from /home/albert/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/util/timer.rb:9:in `time'
    from /home/albert/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/wait_till_up.rb:31:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/albert/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/start_domain.rb:188:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/albert/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/set_boot_order.rb:60:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/albert/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/create_network_interfaces.rb:138:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/albert/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/create_networks.rb:79:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/albert/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/share_folders.rb:20:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/albert/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/prepare_nfs_settings.rb:18:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/lib/vagrant/action/builtin/synced_folders.rb:87:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/lib/vagrant/action/builtin/synced_folder_cleanup.rb:28:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/plugins/synced_folders/nfs/action_cleanup.rb:25:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/albert/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/prepare_nfs_valid_ids.rb:12:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/albert/.vagrant.d/gems/gems/vagrant-hostmanager-1.8.1/lib/vagrant-hostmanager/action/update_all.rb:27:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/lib/vagrant/action/builtin/provision.rb:80:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/albert/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/create_domain.rb:201:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/albert/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/create_domain_volume.rb:51:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/albert/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/handle_box_image.rb:109:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/albert/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/handle_storage_pool.rb:50:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/albert/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/set_name_of_domain.rb:35:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/lib/vagrant/action/builder.rb:116:in `call'
    from /usr/share/vagrant/lib/vagrant/action/runner.rb:66:in `block in run'
    from /usr/share/vagrant/lib/vagrant/util/busy.rb:19:in `busy'
    from /usr/share/vagrant/lib/vagrant/action/runner.rb:66:in `run'
    from /usr/share/vagrant/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/lib/vagrant/action/builder.rb:116:in `call'
    from /usr/share/vagrant/lib/vagrant/action/runner.rb:66:in `block in run'
    from /usr/share/vagrant/lib/vagrant/util/busy.rb:19:in `busy'
    from /usr/share/vagrant/lib/vagrant/action/runner.rb:66:in `run'
    from /usr/share/vagrant/lib/vagrant/machine.rb:224:in `action_raw'
    from /usr/share/vagrant/lib/vagrant/machine.rb:199:in `block in action'
    from /usr/share/vagrant/lib/vagrant/environment.rb:561:in `lock'
    from /usr/share/vagrant/lib/vagrant/machine.rb:185:in `call'
    from /usr/share/vagrant/lib/vagrant/machine.rb:185:in `action'
    from /usr/share/vagrant/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'

I happened to have another vagrant setup with fog-libvirt 0.0.3 and that works fine.

ghost commented 8 years ago

Albert thanks for opening this issue, i think we are first to hit this issue, could you please guide me how to degrade to fog-libvirt 0.0.3 ? will be obliged

dustymabe commented 8 years ago

I can confirm I also have the issue for 0.0.4 and moving to 0.0.3 fixes the problem.

strzibny commented 8 years ago

This seems to be the change causing the error: https://github.com/fog/fog-libvirt/commit/21d1b71cc2533fa5892a1a0bba9147ab2e2dca72.

It says it requires ruby-libvirt 0.6.0 but does not bump the requirement. Can you try with ruby-libvirt 0.6.0?

@dcbw comments?

ghost commented 8 years ago

problem solved, it was with newer version of fog-libvirt 0.0.4.......reverting it back to 0.0.3 solved my problem.

dancn commented 8 years ago

To downgrade the plugin I did (on debian/jessie):

/usr/bin/ruby2.1 /usr/lib/ruby/vendor_ruby/vagrant/pre-rubygems.rb plugin install --plugin-version 0.0.3 fog-libvirt

It seems that "vagrant plugin install plugin plugin-name" does not support the specification of plugin version, at least in vagrant 1.6.5.

wohlben commented 8 years ago

can confirm on opsensuse Leap, vagrant plugin install --plugin-version 0.0.3 fog-libvirt fixed it for me as well

strzibny commented 8 years ago

@dancn @wohlben can you perhaps help to debug the issue and tell me if the pointed commit is to blame or not? Downgrading is not fixing. If this is serious problem I can yank the release for others.

dancn commented 8 years ago

@strzibny sure, but I do not know how to bisect vagrant plugins using the source. I tried with

cd repo.d/side-projects/
git clone https://github.com/fog/fog-libvirt.git
cd fog-libvirt
git format-patch -n2
vagrant plugin install fog-libvirt
cd .vagrant.d/gems/gems/fog-libvirt-0.0.4/
git apply --reverse ~/repo.d/side-projects/fog-libvirt/0001-catch-libvirt-exceptions-when-listing-domains-and-vo.patch

but the error seems the the same.

Please provide some instruction. Thanks.

plribeiro3000 commented 8 years ago

Do we know where is the issue? Fixing it would be better then yank. it is always a mess when we play with yank.

sford commented 8 years ago

Hey guys,

I have confirmed that commit 21d1b71c appears to be causing these problems.

I checked out the latest fog-libvirt code. I did a git revert 21d1b71cc2533fa5892a1a0bba9147ab2e2dca72, bumped the version, made a release, and installed it into vagrant's gem directory, gem install fog-libvirt-0.0.5.gem -i ~/.vagrant.d/gems. After that, I no longer get the libvirt_uri error.

Unfortunately, I don't know why this problem occurs with 21d1b71c. I worry that it might be executing some libvirt stuff before the library is fully configured.

sford commented 8 years ago

Also, to answer @strzibny 's question, I am testing with ruby-libvirt 0.6.0:

$ GEM_PATH=~/.vagrant.d/gems gem list | grep ruby-libvirt
ruby-libvirt (0.6.0)
dcbw commented 8 years ago

You need at least vagrant-libvirt 0.6.0 plus http://libvirt.org/git/?p=ruby-libvirt.git;a=commit;h=c2d4192ebf28b8030b753b715a72f0cdf725d313 . Do you have that commit in your vagrant-libvirt?

sford commented 8 years ago

@dcbw , is this problem occurring because we are using ruby-libvirt 0.6.0 that doesn't contain the commit that you are referring to?

dcbw commented 8 years ago

@sford yes, that is my current theory. ruby-libvirt 0.6.0 is not quite new enough. I will try to request a new upstream release.

dcbw commented 8 years ago

If you're hitting this, do you have a ~/.fog file and if so what's in it?

sford commented 8 years ago

Nope, I don't have a ~/.fog file. The majority of people are probably hitting this when fog is used by another library. In this case, vagrant-libvirt, where fog is being configure programmatically (rather than requiring the user to create a ~/.fog file).

dcbw commented 8 years ago

I can reproduce now, the ~/.fog I was using while developing the original patch was likely covering up the issue for me.

coolbrg commented 8 years ago

Hi Folks,

I am also hitting this issue. What is the proposed solution for this?

dcbw commented 8 years ago

A quick workaround is to add a ~/.fog file with something like:

default: libvirt_uri: "qemu:///system?no_verify=1"

coolbrg commented 8 years ago

@dcbw : Adding ~/.fog is not working for me.

However, this vagrant plugin install --plugin-version 0.0.3 fog-libvirt does work.

dcbw commented 8 years ago

@budhrg can you make the change in https://github.com/fog/fog-libvirt/pull/17 and see if that fixes it for you?

bcambl commented 8 years ago

@dcbw applying #17 does get me further:

[bcambl@localhost compute]$ tail -n +268 server.rb | head -n 4
          if !nic.nil?
            # Fog::Compute[:libvirt].networks.all.each do |net|
            service.networks.all.each do |net|
              if net.name == nic.network
[bcambl@localhost compute]$ 
==> foo: Starting domain.
==> foo: Waiting for domain to get an IP address...
==> foo: Removing domain...
/home/bcambl/.vagrant.d/gems/gems/fog-libvirt-0.0.4/lib/fog/libvirt/requests/compute/dhcp_leases.rb:8:in `dhcp_leases': NULL pointer given (ArgumentError)
    from /home/bcambl/.vagrant.d/gems/gems/fog-libvirt-0.0.4/lib/fog/libvirt/requests/compute/dhcp_leases.rb:8:in `dhcp_leases'
    from /home/bcambl/.vagrant.d/gems/gems/fog-libvirt-0.0.4/lib/fog/libvirt/models/compute/network.rb:20:in `dhcp_leases'
    from /home/bcambl/.vagrant.d/gems/gems/fog-libvirt-0.0.4/lib/fog/libvirt/models/compute/server.rb:272:in `block in addresses'
    from /home/bcambl/.vagrant.d/gems/gems/fog-core-1.36.0/lib/fog/core/collection.rb:19:in `each'
    from /home/bcambl/.vagrant.d/gems/gems/fog-core-1.36.0/lib/fog/core/collection.rb:19:in `each'
    from /home/bcambl/.vagrant.d/gems/gems/fog-libvirt-0.0.4/lib/fog/libvirt/models/compute/server.rb:270:in `addresses'
    from /home/bcambl/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/wait_till_up.rb:39:in `block (3 levels) in call'
    from /home/bcambl/.vagrant.d/gems/gems/fog-core-1.36.0/lib/fog/core/model.rb:72:in `instance_eval'
    from /home/bcambl/.vagrant.d/gems/gems/fog-core-1.36.0/lib/fog/core/model.rb:72:in `block in wait_for'
    from /home/bcambl/.vagrant.d/gems/gems/fog-core-1.36.0/lib/fog/core/wait_for.rb:7:in `block in wait_for'
    from /home/bcambl/.vagrant.d/gems/gems/fog-core-1.36.0/lib/fog/core/wait_for.rb:6:in `loop'
    from /home/bcambl/.vagrant.d/gems/gems/fog-core-1.36.0/lib/fog/core/wait_for.rb:6:in `wait_for'
    from /home/bcambl/.vagrant.d/gems/gems/fog-core-1.36.0/lib/fog/core/model.rb:69:in `wait_for'
    from /home/bcambl/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/wait_till_up.rb:38:in `block (2 levels) in call'
    from /usr/share/vagrant/lib/vagrant/util/retryable.rb:17:in `retryable'
    from /home/bcambl/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/wait_till_up.rb:33:in `block in call'
    from /home/bcambl/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/util/timer.rb:9:in `time'
    from /home/bcambl/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/wait_till_up.rb:31:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/bcambl/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/start_domain.rb:188:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/bcambl/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/set_boot_order.rb:60:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/bcambl/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/create_network_interfaces.rb:138:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/bcambl/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/create_networks.rb:79:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/bcambl/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/share_folders.rb:20:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/bcambl/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/prepare_nfs_settings.rb:18:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/lib/vagrant/action/builtin/synced_folders.rb:87:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/lib/vagrant/action/builtin/synced_folder_cleanup.rb:28:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/plugins/synced_folders/nfs/action_cleanup.rb:25:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/bcambl/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/prepare_nfs_valid_ids.rb:12:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/lib/vagrant/action/builtin/provision.rb:80:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/bcambl/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/create_domain.rb:201:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/bcambl/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/create_domain_volume.rb:51:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/bcambl/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/handle_box_image.rb:109:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/bcambl/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/handle_storage_pool.rb:50:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /home/bcambl/.vagrant.d/gems/gems/vagrant-libvirt-0.0.32/lib/vagrant-libvirt/action/set_name_of_domain.rb:35:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/lib/vagrant/action/builder.rb:116:in `call'
    from /usr/share/vagrant/lib/vagrant/action/runner.rb:66:in `block in run'
    from /usr/share/vagrant/lib/vagrant/util/busy.rb:19:in `busy'
    from /usr/share/vagrant/lib/vagrant/action/runner.rb:66:in `run'
    from /usr/share/vagrant/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /usr/share/vagrant/lib/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/lib/vagrant/action/builder.rb:116:in `call'
    from /usr/share/vagrant/lib/vagrant/action/runner.rb:66:in `block in run'
    from /usr/share/vagrant/lib/vagrant/util/busy.rb:19:in `busy'
    from /usr/share/vagrant/lib/vagrant/action/runner.rb:66:in `run'
    from /usr/share/vagrant/lib/vagrant/machine.rb:224:in `action_raw'
    from /usr/share/vagrant/lib/vagrant/machine.rb:199:in `block in action'
    from /usr/share/vagrant/lib/vagrant/environment.rb:561:in `lock'
    from /usr/share/vagrant/lib/vagrant/machine.rb:185:in `call'
    from /usr/share/vagrant/lib/vagrant/machine.rb:185:in `action'
    from /usr/share/vagrant/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'

I have also applied the the following ruby-libvirt patch with the same error above. http://libvirt.org/git/?p=ruby-libvirt.git;a=commit;h=c2d4192ebf28b8030b753b715a72f0cdf725d313

sford commented 8 years ago

@dcbw any traction with a new ruby-libvirt release or #17?

Some projects (https://github.com/pradels/vagrant-libvirt/pull/569) are pinning fog-libvirt to an older version which makes it harder for them to take advantage of other fog-libvirt improvements (#15).

dcbw commented 8 years ago

@bcambl that error means that the ruby-libvirt patch was not successfully applied, or the rebuilt ruby-libvirt isn't acutally being used. I know, I had the same problem and there was a stale ruby-libvirt in ~/.gems but the patched one was in /usr/share/gems. I had to remove the ~/.gems one to get things working.

dcbw commented 8 years ago

@sford no response in a couple weeks from upstream ruby-libvirt, I'll ping them again.

bcambl commented 8 years ago

@dcbw you are correct, I had something stale.

All is well with fog-libvirt 0.0.4 + #17 and the latest ruby-libvirt:

vagrant plugin install --plugin-version 0.0.4 fog-libvirt
# Apply https://github.com/fog/fog-libvirt/pull/17
gem uninstall ruby-libvirt
sudo rm -rf /usr/share/gems/gems/ruby-libvirt-0.6.0
rm -rf ~/.gem/ruby/gems/ruby-libvirt-0.6.0
rm -rf ~/.vagrant.d/gems/gems/ruby-libvirt-0.6.0
rm -rf ~/.vagrant.d/gems/extensions/x86_64-linux/ruby-libvirt-0.6.0
git clone git://libvirt.org/ruby-libvirt.git
cd ruby-libvirt
./autobuild.sh
cd pkg
gem install ruby-libvirt-0.6.0.gem
cp -r ~/.gem/ruby/gems/ruby-libvirt-0.6.0 ~/.vagrant.d/gems/gems/
cp -r ~/.gem/ruby/extensions/x86_64-linux/ruby-libvirt-0.6.0 ~/.vagrant.d/gems/extensions/x86_64-linux/