Accepting request 903357 from home:dancermak:branches:Virtualization:vagrant
Add patch to fix occasional shutdown failures with virtualbox OBS-URL: https://build.opensuse.org/request/show/903357 OBS-URL: https://build.opensuse.org/package/show/Virtualization:vagrant/vagrant?expand=0&rev=57
This commit is contained in:
parent
80d205cd7c
commit
0b7226293e
@ -1,7 +1,7 @@
|
||||
From 6c2fcc93f7016ca2d816467327a33eb347cc1498 Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Terceiro <terceiro@debian.org>
|
||||
Date: Sat, 11 Oct 2014 16:54:58 -0300
|
||||
Subject: [PATCH 01/11] bin/vagrant: silence warning about installer
|
||||
Subject: [PATCH 01/12] bin/vagrant: silence warning about installer
|
||||
|
||||
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
|
||||
---
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 14c959018fc2e7d9fe6d5d396971a115efbdc71e Mon Sep 17 00:00:00 2001
|
||||
From: Antonio Terceiro <terceiro@debian.org>
|
||||
Date: Wed, 22 Oct 2014 09:40:14 -0200
|
||||
Subject: [PATCH 02/11] Use a private temporary dir
|
||||
Subject: [PATCH 02/12] Use a private temporary dir
|
||||
|
||||
Without this vagrant will clutter $TMPDIR with dozens of even hundreds
|
||||
of temporary files (~4 per vagrant invocation).
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 5d0d5df6dcb54c5b423cbfa60c7e5eaccce380c9 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Kastl <kastl@b1-systems.de>
|
||||
Date: Wed, 17 May 2017 09:09:57 +0200
|
||||
Subject: [PATCH 03/11] plugins-don-t-abuse-require_relative.patch
|
||||
Subject: [PATCH 03/12] plugins-don-t-abuse-require_relative.patch
|
||||
|
||||
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
|
||||
---
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 47cf5abe6ea46220b2d260e3e0fd07b42efa42ae Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Kastl <kastl@b1-systems.de>
|
||||
Date: Fri, 16 Nov 2018 21:12:43 +0100
|
||||
Subject: [PATCH 04/11] fix vbox package boo#1044087, added by
|
||||
Subject: [PATCH 04/12] fix vbox package boo#1044087, added by
|
||||
robert.munteanu@gmail.com on Sun Aug 13 19:07:06 UTC 2017
|
||||
|
||||
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
|
||||
|
@ -1,7 +1,7 @@
|
||||
From c596dcd5e7bb3ab6bbdcbc9d21b640d828aa0925 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Kastl <kastl@b1-systems.de>
|
||||
Date: Mon, 4 Jun 2018 09:18:23 +0200
|
||||
Subject: [PATCH 05/11] do not depend on wdm
|
||||
Subject: [PATCH 05/12] do not depend on wdm
|
||||
|
||||
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
|
||||
---
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 9e4f4f017e58d7488de879037ee1564087c34008 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Kastl <kastl@b1-systems.de>
|
||||
Date: Fri, 16 Nov 2018 21:14:46 +0100
|
||||
Subject: [PATCH 06/11] do not abuse relative paths in docker plugin to make
|
||||
Subject: [PATCH 06/12] do not abuse relative paths in docker plugin to make
|
||||
docker work, added by tmkn@tmkn.uk on Thu Oct 26 19:42:46 UTC 2017
|
||||
|
||||
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 79214e9936e35d2de125fe8d7c6fbbc424b4c054 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>
|
||||
Date: Fri, 11 Jan 2019 12:32:28 +0100
|
||||
Subject: [PATCH 07/11] Don't abuse relative paths in plugins
|
||||
Subject: [PATCH 07/12] Don't abuse relative paths in plugins
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 39c3d177a8392eaed94be7a694f2f0c5df1e4ca0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>
|
||||
Date: Mon, 1 Apr 2019 17:28:31 +0200
|
||||
Subject: [PATCH 08/11] Skip failing tests
|
||||
Subject: [PATCH 08/12] Skip failing tests
|
||||
|
||||
---
|
||||
test/unit/bin/vagrant_test.rb | 4 ++--
|
||||
|
@ -1,7 +1,7 @@
|
||||
From b9aba06ec4fb6c88f5109d1f79ed8820058c6077 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>
|
||||
Date: Wed, 28 Aug 2019 13:39:58 +0200
|
||||
Subject: [PATCH 09/11] Disable Subprocess unit test
|
||||
Subject: [PATCH 09/12] Disable Subprocess unit test
|
||||
|
||||
This unit test is *very* flaky on OBS' workers and causes random build
|
||||
failures. These are probably caused by worker being under high load and then
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 8fb45fd30524c9286a027c44e12351ddaefecade Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>
|
||||
Date: Tue, 27 Apr 2021 10:27:11 +0200
|
||||
Subject: [PATCH 10/11] Bump listen version to ~> 3.5
|
||||
Subject: [PATCH 10/12] Bump listen version to ~> 3.5
|
||||
|
||||
(cherry picked from commit 016911965d5f995a5d0a168069de7ded7b380ecb)
|
||||
---
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 2e76a77511d8c4f4ee1ea8cd2ee8ee5612316a07 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>
|
||||
Date: Fri, 30 Apr 2021 09:37:20 +0200
|
||||
Subject: [PATCH 11/11] Mock the PowerShell.executable method in more tests
|
||||
Subject: [PATCH 11/12] Mock the PowerShell.executable method in more tests
|
||||
|
||||
On *nix systems we might not have powershell installed and then finding
|
||||
powershell.exe or pwsh.exe fails in some tests. If we instead mock
|
||||
|
@ -0,0 +1,62 @@
|
||||
From 60f35e059f92cb47a65a03066d34c2492160835e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>
|
||||
Date: Thu, 1 Jul 2021 09:31:50 +0200
|
||||
Subject: [PATCH 12/12] Use systemctl poweroff in the background instead of
|
||||
shutdown
|
||||
|
||||
We have started seeing occasional shutdown failures on openSUSE Tumbleweed with
|
||||
Virtualbox inside a qemu virtual machine, where `shutdown -h now` would return
|
||||
nil. While the machine is successfully turned off, the command fails and vagrant
|
||||
reports an error.
|
||||
This commit changes the shutdown command to launch in the background which
|
||||
also triggers a shutdown, but always succeeds.
|
||||
|
||||
(cherry picked from commit 8ce38a639bfb21a8ac2e2c4d53812decf2c9ccaa)
|
||||
---
|
||||
plugins/guests/suse/cap/halt.rb | 2 +-
|
||||
test/unit/plugins/guests/suse/cap/halt_test.rb | 6 +++---
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/plugins/guests/suse/cap/halt.rb b/plugins/guests/suse/cap/halt.rb
|
||||
index 7a1375e39..3c996f092 100644
|
||||
--- a/plugins/guests/suse/cap/halt.rb
|
||||
+++ b/plugins/guests/suse/cap/halt.rb
|
||||
@@ -4,7 +4,7 @@ module VagrantPlugins
|
||||
class Halt
|
||||
def self.halt(machine)
|
||||
begin
|
||||
- machine.communicate.sudo("/sbin/shutdown -h now")
|
||||
+ machine.communicate.sudo("/usr/bin/systemctl poweroff &")
|
||||
rescue IOError, Vagrant::Errors::SSHDisconnected
|
||||
# Do nothing, because it probably means the machine shut down
|
||||
# and SSH connection was lost.
|
||||
diff --git a/test/unit/plugins/guests/suse/cap/halt_test.rb b/test/unit/plugins/guests/suse/cap/halt_test.rb
|
||||
index 7b998aad1..af8f575df 100644
|
||||
--- a/test/unit/plugins/guests/suse/cap/halt_test.rb
|
||||
+++ b/test/unit/plugins/guests/suse/cap/halt_test.rb
|
||||
@@ -22,19 +22,19 @@ describe "VagrantPlugins::GuestSUSE::Cap::Halt" do
|
||||
let(:cap) { caps.get(:halt) }
|
||||
|
||||
it "runs the shutdown command" do
|
||||
- comm.expect_command("/sbin/shutdown -h now")
|
||||
+ comm.expect_command("/usr/bin/systemctl poweroff &")
|
||||
cap.halt(machine)
|
||||
end
|
||||
|
||||
it "does not raise an IOError" do
|
||||
- comm.stub_command("shutdown -h now", raise: IOError)
|
||||
+ comm.stub_command("/usr/bin/systemctl poweroff &", raise: IOError)
|
||||
expect {
|
||||
cap.halt(machine)
|
||||
}.to_not raise_error
|
||||
end
|
||||
|
||||
it "ignores a Vagrant::Errors::SSHDisconnected" do
|
||||
- comm.stub_command("shutdown -h now", raise: Vagrant::Errors::SSHDisconnected)
|
||||
+ comm.stub_command("/usr/bin/systemctl poweroff &", raise: Vagrant::Errors::SSHDisconnected)
|
||||
expect {
|
||||
cap.halt(machine)
|
||||
}.to_not raise_error
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,3 +1,24 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 1 07:50:10 UTC 2021 - Dan Čermák <dcermak@suse.com>
|
||||
|
||||
- Add patch to fix occasional shutdown failures with virtualbox
|
||||
|
||||
Rebase patches:
|
||||
* 0001-bin-vagrant-silence-warning-about-installer.patch
|
||||
* 0002-Use-a-private-temporary-dir.patch
|
||||
* 0003-plugins-don-t-abuse-require_relative.patch.patch
|
||||
* 0004-fix-vbox-package-boo-1044087-added-by-robert.muntean.patch
|
||||
* 0005-do-not-depend-on-wdm.patch
|
||||
* 0006-do-not-abuse-relative-paths-in-docker-plugin-to-make.patch
|
||||
* 0007-Don-t-abuse-relative-paths-in-plugins.patch
|
||||
* 0008-Skip-failing-tests.patch
|
||||
* 0009-Disable-Subprocess-unit-test.patch
|
||||
* 0010-Bump-listen-version-to-3.5.patch
|
||||
* 0011-Mock-the-PowerShell.executable-method-in-more-tests.patch
|
||||
|
||||
Added patches:
|
||||
* 0012-Use-systemctl-poweroff-in-the-background-instead-of-.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 30 06:08:48 UTC 2021 - Dan Čermák <dcermak@suse.com>
|
||||
|
||||
|
@ -58,9 +58,13 @@ Patch7: 0007-Don-t-abuse-relative-paths-in-plugins.patch
|
||||
Patch8: 0008-Skip-failing-tests.patch
|
||||
Patch9: 0009-Disable-Subprocess-unit-test.patch
|
||||
# https://github.com/hashicorp/vagrant/pull/12329
|
||||
# merged -> drop on next upstream release
|
||||
Patch10: 0010-Bump-listen-version-to-3.5.patch
|
||||
# https://github.com/hashicorp/vagrant/pull/12339
|
||||
# merged -> drop on next upstream release
|
||||
Patch11: 0011-Mock-the-PowerShell.executable-method-in-more-tests.patch
|
||||
# https://github.com/hashicorp/vagrant/pull/12439
|
||||
Patch12: 0012-Use-systemctl-poweroff-in-the-background-instead-of-.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user