Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package vagrant-libvirt for openSUSE:Factory checked in at 2022-12-12 17:39:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/vagrant-libvirt (Old) and /work/SRC/openSUSE:Factory/.vagrant-libvirt.new.1835 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "vagrant-libvirt" Mon Dec 12 17:39:46 2022 rev:26 rq:1042295 version:0.11.2 Changes: -------- --- /work/SRC/openSUSE:Factory/vagrant-libvirt/vagrant-libvirt.changes 2022-12-02 13:14:02.426149869 +0100 +++ /work/SRC/openSUSE:Factory/.vagrant-libvirt.new.1835/vagrant-libvirt.changes 2022-12-12 17:41:57.789881911 +0100 @@ -1,0 +2,9 @@ +Mon Dec 12 09:48:39 UTC 2022 - Dan Äermák <dcer...@suse.com> + +- New upstream release 0.11.2 + +* Handle pmsuspended resume and add state translation message by @electrofelix in https://github.com/vagrant-libvirt/vagrant-libvirt/pull/1686 +* Include resume domain spec missed by @electrofelix in https://github.com/vagrant-libvirt/vagrant-libvirt/pull/1689 +* Ensure iommu XML is only set for virtio nics by @electrofelix in https://github.com/vagrant-libvirt/vagrant-libvirt/pull/1690 + +------------------------------------------------------------------- Old: ---- vagrant-libvirt-0.11.1.gem New: ---- vagrant-libvirt-0.11.2.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ vagrant-libvirt.spec ++++++ --- /var/tmp/diff_new_pack.FJFX4m/_old 2022-12-12 17:41:58.177884093 +0100 +++ /var/tmp/diff_new_pack.FJFX4m/_new 2022-12-12 17:41:58.181884116 +0100 @@ -21,7 +21,7 @@ %global rb_ruby_suffix %rb_default_ruby_suffix Name: vagrant-libvirt -Version: 0.11.1 +Version: 0.11.2 Release: 0 %define mod_name vagrant-libvirt %define mod_full_name %{mod_name}-%{version} ++++++ vagrant-libvirt-0.11.1.gem -> vagrant-libvirt-0.11.2.gem ++++++ Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/vagrant-libvirt/action/create_network_interfaces.rb new/lib/vagrant-libvirt/action/create_network_interfaces.rb --- old/lib/vagrant-libvirt/action/create_network_interfaces.rb 2022-12-02 01:28:24.000000000 +0100 +++ new/lib/vagrant-libvirt/action/create_network_interfaces.rb 2022-12-04 18:38:33.000000000 +0100 @@ -146,7 +146,7 @@ # FIXME: all options for network driver should be hash from Vagrantfile driver_options = {} driver_options[:name] = @driver_name if @driver_name - driver_options[:iommu] = @driver_iommu ? "on" : "off" + driver_options[:iommu] = @driver_iommu ? "on" : "off" if @nic_model_type == 'virtio' driver_options[:queues] = @driver_queues if @driver_queues @udp_tunnel ||= {} @@ -271,10 +271,9 @@ xml.mac(address: mac) if mac xml.target(dev: target_dev_name(device_name, type, iface_number)) - xml.alias(name: "net#{iface_number}") xml.model(type: model_type.to_s) xml.mtu(size: Integer(mtu)) if mtu - xml.driver(**driver_options) + xml.driver(**driver_options) if driver_options xml.address(type: 'pci', bus: pci_bus, slot: pci_slot) if pci_bus and pci_slot end end.to_xml( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/vagrant-libvirt/action/is_suspended.rb new/lib/vagrant-libvirt/action/is_suspended.rb --- old/lib/vagrant-libvirt/action/is_suspended.rb 2022-12-02 01:28:24.000000000 +0100 +++ new/lib/vagrant-libvirt/action/is_suspended.rb 2022-12-04 18:38:33.000000000 +0100 @@ -20,7 +20,7 @@ if libvirt_domain.has_managed_save? env[:result] = env[:machine].state.id == :shutoff else - env[:result] = env[:machine].state.id == :paused + env[:result] = [:paused, :pmsuspended].include?(env[:machine].state.id) if env[:result] env[:ui].warn('One time switching to pause suspend mode, found a paused VM.') config.suspend_mode = 'pause' @@ -32,7 +32,7 @@ env[:result] = [:shutoff, :paused].include?(env[:machine].state.id) config.suspend_mode = 'managedsave' else - env[:result] = env[:machine].state.id == :paused + env[:result] = [:paused, :pmsuspended].include?(env[:machine].state.id) end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/vagrant-libvirt/action/resume_domain.rb new/lib/vagrant-libvirt/action/resume_domain.rb --- old/lib/vagrant-libvirt/action/resume_domain.rb 2022-12-02 01:28:24.000000000 +0100 +++ new/lib/vagrant-libvirt/action/resume_domain.rb 2022-12-04 18:38:33.000000000 +0100 @@ -20,7 +20,9 @@ libvirt_domain = env[:machine].provider.driver.connection.client.lookup_domain_by_uuid(env[:machine].id) config = env[:machine].provider_config - if config.suspend_mode == 'managedsave' + if env[:machine].state.id == :pmsuspended + libvirt_domain.pmwakeup + elsif config.suspend_mode == 'managedsave' domain.start else domain.resume diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/vagrant-libvirt/version new/lib/vagrant-libvirt/version --- old/lib/vagrant-libvirt/version 2022-12-02 01:28:24.000000000 +0100 +++ new/lib/vagrant-libvirt/version 2022-12-04 18:38:33.000000000 +0100 @@ -1 +1 @@ -0.11.1 +0.11.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/locales/en.yml new/locales/en.yml --- old/locales/en.yml 2022-12-02 01:28:24.000000000 +0100 +++ new/locales/en.yml 2022-12-04 18:38:33.000000000 +0100 @@ -205,6 +205,8 @@ states: paused: |- The Libvirt domain is suspended. Run `vagrant resume` to resume it. + pmsuspended: |- + The Libvirt domain is suspended. Run `vagrant resume` to resume it. shutting_down: |- The Libvirt domain is shutting down. Wait for it to complete and then run `vagrant up` to start it or `vagrant destroy` to remove. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2022-12-02 01:28:24.000000000 +0100 +++ new/metadata 2022-12-04 18:38:33.000000000 +0100 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: vagrant-libvirt version: !ruby/object:Gem::Version - version: 0.11.1 + version: 0.11.2 platform: ruby authors: - Lukas Stanek @@ -11,7 +11,7 @@ autorequire: bindir: bin cert_chain: [] -date: 2022-12-02 00:00:00.000000000 Z +date: 2022-12-04 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: fog-libvirt @@ -297,6 +297,7 @@ - spec/unit/action/resolve_disk_settings_spec/multi_volume_box.xml - spec/unit/action/resolve_disk_settings_spec/multi_volume_box_additional_and_custom_no_aliases.xml - spec/unit/action/resolve_disk_settings_spec/multi_volume_box_additional_storage.xml +- spec/unit/action/resume_domain_spec.rb - spec/unit/action/set_boot_order_spec.rb - spec/unit/action/set_boot_order_spec/default.xml - spec/unit/action/set_boot_order_spec/explicit_boot_order.xml @@ -422,6 +423,7 @@ - spec/unit/action/resolve_disk_settings_spec/multi_volume_box_additional_and_custom_no_aliases.xml - spec/unit/action/resolve_disk_settings_spec/multi_volume_box_additional_storage.xml - spec/unit/action/resolve_disk_settings_spec.rb +- spec/unit/action/resume_domain_spec.rb - spec/unit/action/set_boot_order_spec/default.xml - spec/unit/action/set_boot_order_spec/explicit_boot_order.xml - spec/unit/action/set_boot_order_spec.rb diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/unit/action/resume_domain_spec.rb new/spec/unit/action/resume_domain_spec.rb --- old/spec/unit/action/resume_domain_spec.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/unit/action/resume_domain_spec.rb 2022-12-04 18:38:33.000000000 +0100 @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +require_relative '../../spec_helper' + +require 'vagrant-libvirt/action/resume_domain' + + +describe VagrantPlugins::ProviderLibvirt::Action::ResumeDomain do + subject { described_class.new(app, env) } + + include_context 'unit' + include_context 'libvirt' + + let(:driver) { instance_double(::VagrantPlugins::ProviderLibvirt::Driver) } + let(:libvirt_domain) { instance_double(::Libvirt::Domain) } + let(:libvirt_client) { instance_double(::Libvirt::Connect) } + let(:servers) { double('servers') } + let(:state) { instance_double(::Vagrant::MachineState) } + + before do + allow(machine.provider).to receive('driver').and_return(driver) + allow(driver).to receive(:connection).and_return(connection) + end + + describe '#call' do + before do + allow(connection).to receive(:servers).and_return(servers) + allow(servers).to receive(:get).and_return(domain) + allow(connection).to receive(:client).and_return(libvirt_client) + allow(libvirt_client).to receive(:lookup_domain_by_uuid).and_return(libvirt_domain) + + allow(machine).to receive(:state).and_return(state) + + expect(ui).to receive(:info).with(/Resuming domain/) + end + + it 'should resume by default' do + expect(state).to receive(:id).and_return(:paused) + expect(domain).to receive(:resume) + expect(logger).to receive(:info).with('Machine dummy-vagrant_dummy is resumed.') + + expect(subject.call(env)).to be_nil + end + + context 'when in pmsuspend' do + it 'should wakeup the domain' do + expect(state).to receive(:id).and_return(:pmsuspended) + expect(libvirt_domain).to receive(:pmwakeup) + expect(logger).to receive(:info).with('Machine dummy-vagrant_dummy is resumed.') + + expect(subject.call(env)).to be_nil + end + end + + context 'when suspend_mode is managedsave' do + it 'should start the domain' do + machine.provider_config.suspend_mode = 'managedsave' + expect(state).to receive(:id).and_return(:paused) + expect(domain).to receive(:start) + expect(logger).to receive(:info).with('Machine dummy-vagrant_dummy is resumed.') + + expect(subject.call(env)).to be_nil + end + end + end +end