Bug 2100543 - vagrant-libvirt randomly fails parallel operations
Summary: vagrant-libvirt randomly fails parallel operations
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: vagrant-libvirt
Version: 37
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Jarek Prokop
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2132090 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-23 16:16 UTC by Brian J. Murrell
Modified: 2023-06-07 01:52 UTC (History)
10 users (show)

Fixed In Version: vagrant-libvirt-0.7.0-6.fc38 vagrant-libvirt-0.7.0-5.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-06-03 02:43:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Sample Vagrantfile that fails (277 bytes, text/plain)
2022-07-02 02:56 UTC, Shawn K. O'Shea
no flags Details
Patched action.rb (13.48 KB, text/plain)
2022-07-04 13:34 UTC, Brian J. Murrell
no flags Details
Proposed patch (1.63 KB, patch)
2022-07-19 00:59 UTC, Shawn K. O'Shea
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Github vagrant-libvirt/vagrant-libvirt/commit/3bdb1c93e63886a95d472091ff8381f53338f632 0 None None None 2022-06-23 16:16:11 UTC
Github vagrant-libvirt vagrant-libvirt issues 1445 0 None closed Bringing up all boxes in multi-box configuration fails with Ruby 3.1 2022-06-23 16:16:11 UTC

Description Brian J. Murrell 2022-06-23 16:16:11 UTC
Description of problem:
Random vagrant up failures in multi-VM configurations.

Version-Release number of selected component (if applicable):
vagrant-libvirt-0.7.0-2.fc36.noarch

How reproducible:
Pretty much all of the time

Steps to Reproduce:
1. Create a multi-VM Vagrantfile
2. vagrant up

Actual results:
Random failures such as:

constant VagrantPlugins::ProviderLibvirt::Action::HandleBox not defined

                b2.use HandleBox
                       ^^^^^^^^^

Expected results:
Should not error out

Additional info:
https://bugzilla.redhat.com/show_bug.cgi?id=2075223

Comment 1 Shawn K. O'Shea 2022-07-02 02:54:22 UTC
I ran into this today as well. This upstream PR (related to the upstream issue already referenced in this BZ) was accepted as a fix (#1485 - https://github.com/vagrant-libvirt/vagrant-libvirt/pull/1485 ).

I tried pulling this one commit as a patch (wget https://github.com/vagrant-libvirt/vagrant-libvirt/pull/1485.patch) and adding it to the F36 spec file, but the patch doesn't apply cleanly. I'm presuming enough has changed since v0.7.0 and the time that this fix was added to cause the patch failure.

-------------------------------------------
$ rpmbuild -bb vagrant-libvirt.spec 
setting SOURCE_DATE_EPOCH=1642809600
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.yHtK6H
+ umask 022
+ cd /home/shawn/rpmbuild/BUILD
+ cd /home/shawn/rpmbuild/BUILD
+ rm -rf vagrant-libvirt-0.7.0
+ /usr/bin/gzip -dc /home/shawn/rpmbuild/SOURCES/vagrant-spec-03d88fe2467716b072951c2b55d78223130851a6.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ /usr/bin/gem unpack /home/shawn/rpmbuild/SOURCES/vagrant-libvirt-0.7.0.gem
Unpacked gem: '/home/shawn/rpmbuild/BUILD/vagrant-libvirt-0.7.0'
+ /usr/bin/gem spec /home/shawn/rpmbuild/SOURCES/vagrant-libvirt-0.7.0.gem --ruby
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd vagrant-libvirt-0.7.0
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ echo 'Patch #0 (vagrant-libvirt-0.7.0-Allow-the-connection.client.libversion-call.patch):'
Patch #0 (vagrant-libvirt-0.7.0-Allow-the-connection.client.libversion-call.patch):
+ /usr/bin/patch --no-backup-if-mismatch -f -p1 --fuzz=0
patching file spec/unit/action_spec.rb
+ echo 'Patch #1 (vagrant-libvirt-0.7.0-Reduce-patching-for-distro-default-session-use.patch):'
Patch #1 (vagrant-libvirt-0.7.0-Reduce-patching-for-distro-default-session-use.patch):
+ /usr/bin/patch --no-backup-if-mismatch -f -p1 --fuzz=0
patching file spec/unit/action/create_domain_spec.rb
patching file spec/unit/action/create_domain_volume_spec.rb
patching file spec/unit/action/wait_till_up_spec.rb
patching file spec/unit/config_spec.rb
patching file spec/unit/config_spec.rb
+ echo 'Patch #2 (vagrant-libvirt-0.7.0-Use-require-for-HandleBox-SyncedFolders-WaitforCommunicator.patch):'
Patch #2 (vagrant-libvirt-0.7.0-Use-require-for-HandleBox-SyncedFolders-WaitforCommunicator.patch):
+ /usr/bin/patch --no-backup-if-mismatch -f -p1 --fuzz=0
patching file lib/vagrant-libvirt/action.rb
Hunk #1 FAILED at 48.
Hunk #2 FAILED at 93.
Hunk #3 FAILED at 144.
Hunk #4 succeeded at 111 (offset -45 lines).
Hunk #5 FAILED at 355.
4 out of 5 hunks FAILED -- saving rejects to file lib/vagrant-libvirt/action.rb.rej
error: Bad exit status from /var/tmp/rpm-tmp.yHtK6H (%prep)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.yHtK6H (%prep)
-------------------------------------------

Comment 2 Shawn K. O'Shea 2022-07-02 02:56:44 UTC
Created attachment 1894034 [details]
Sample Vagrantfile that fails

Comment 3 Brian J. Murrell 2022-07-04 13:34:18 UTC
Created attachment 1894513 [details]
Patched action.rb

Yeah, the upstream patch does not apply cleanly to the (quite old) version of vagrant-libvirt that is in F36.  Looks like I just monkey-patched my system with the effective changes.  Find attached the only file the patch touches.  You should be able to use that with the stock file to create a patch that will apply.

Comment 4 Shawn K. O'Shea 2022-07-19 00:59:35 UTC
Created attachment 1898027 [details]
Proposed patch

I took a diff of the action.rb attached by Brian J. Murrell (thanks for that!) and compared it to the upstream fix (https://github.com/vagrant-libvirt/vagrant-libvirt/pull/1485/files) and they appear to make the same changes.

This attachment is a "diff -urN" from 0.7.0 release to Brian's action.rb.

Comment 5 Ben Cotton 2023-04-25 17:29:34 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 6 Jarek Prokop 2023-05-22 09:34:13 UTC
*** Bug 2132090 has been marked as a duplicate of this bug. ***

Comment 7 Jarek Prokop 2023-05-23 10:07:46 UTC
This should already be fixed in Rawhide (F39) via rebase to vagrant-libvirt 0.11.2.

Fix for F37 and F38 is going to be delivered via the patch attached to this bug.

PRs for each mentioned release:
F37: https://src.fedoraproject.org/rpms/vagrant-libvirt/pull-request/10

F38: https://src.fedoraproject.org/rpms/vagrant-libvirt/pull-request/11

Comment 8 Fedora Update System 2023-05-24 16:59:07 UTC
FEDORA-2023-5f3d352870 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-5f3d352870

Comment 9 Fedora Update System 2023-05-25 01:57:28 UTC
FEDORA-2023-5f3d352870 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-5f3d352870`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-5f3d352870

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2023-05-29 10:53:18 UTC
FEDORA-2023-f7a98dacbb has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-f7a98dacbb

Comment 11 Fedora Update System 2023-05-30 02:39:18 UTC
FEDORA-2023-f7a98dacbb has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-f7a98dacbb`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-f7a98dacbb

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2023-06-03 02:43:14 UTC
FEDORA-2023-5f3d352870 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2023-06-07 01:52:59 UTC
FEDORA-2023-f7a98dacbb has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.