|
|
4cd9fd |
From aa4ce218fe9b4ee3571d872ff1575a499596181c Mon Sep 17 00:00:00 2001
|
|
|
4cd9fd |
From: Vojtech Trefny <vtrefny@redhat.com>
|
|
|
4cd9fd |
Date: Fri, 29 May 2020 12:14:30 +0200
|
|
|
4cd9fd |
Subject: [PATCH 1/2] Do not limit swap to 128 GiB
|
|
|
4cd9fd |
|
|
|
4cd9fd |
The limit was part of change to limit suggested swap size in
|
|
|
4cd9fd |
kickstart which doesn't use the SwapSpace._max_size so there is no
|
|
|
4cd9fd |
reason to limit this for manual installations.
|
|
|
4cd9fd |
16 TiB seems to be max usable swap size based on mkswap code.
|
|
|
4cd9fd |
|
|
|
4cd9fd |
Resolves: rhbz#1656485
|
|
|
4cd9fd |
---
|
|
|
4cd9fd |
blivet/formats/swap.py | 3 +--
|
|
|
4cd9fd |
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
|
4cd9fd |
|
|
|
4cd9fd |
diff --git a/blivet/formats/swap.py b/blivet/formats/swap.py
|
|
|
4cd9fd |
index 4b8a7edf..3cc59138 100644
|
|
|
4cd9fd |
--- a/blivet/formats/swap.py
|
|
|
4cd9fd |
+++ b/blivet/formats/swap.py
|
|
|
4cd9fd |
@@ -52,8 +52,7 @@ class SwapSpace(DeviceFormat):
|
|
|
4cd9fd |
_linux_native = True # for clearpart
|
|
|
4cd9fd |
_plugin = availability.BLOCKDEV_SWAP_PLUGIN
|
|
|
4cd9fd |
|
|
|
4cd9fd |
- # see rhbz#744129 for details
|
|
|
4cd9fd |
- _max_size = Size("128 GiB")
|
|
|
4cd9fd |
+ _max_size = Size("16 TiB")
|
|
|
4cd9fd |
|
|
|
4cd9fd |
config_actions_map = {"label": "write_label"}
|
|
|
4cd9fd |
|
|
|
4cd9fd |
--
|
|
|
4cd9fd |
2.26.2
|
|
|
4cd9fd |
|
|
|
4cd9fd |
|
|
|
4cd9fd |
From 93aa6ad87116f1c86616d73dbe561251c4a0c286 Mon Sep 17 00:00:00 2001
|
|
|
4cd9fd |
From: Vojtech Trefny <vtrefny@redhat.com>
|
|
|
4cd9fd |
Date: Thu, 11 Jun 2020 14:27:44 +0200
|
|
|
4cd9fd |
Subject: [PATCH 2/2] Add test for SwapSpace max size
|
|
|
4cd9fd |
|
|
|
4cd9fd |
---
|
|
|
4cd9fd |
tests/formats_test/swap_test.py | 24 ++++++++++++++++++++++++
|
|
|
4cd9fd |
1 file changed, 24 insertions(+)
|
|
|
4cd9fd |
create mode 100644 tests/formats_test/swap_test.py
|
|
|
4cd9fd |
|
|
|
4cd9fd |
diff --git a/tests/formats_test/swap_test.py b/tests/formats_test/swap_test.py
|
|
|
4cd9fd |
new file mode 100644
|
|
|
4cd9fd |
index 00000000..56356144
|
|
|
4cd9fd |
--- /dev/null
|
|
|
4cd9fd |
+++ b/tests/formats_test/swap_test.py
|
|
|
4cd9fd |
@@ -0,0 +1,24 @@
|
|
|
4cd9fd |
+import test_compat # pylint: disable=unused-import
|
|
|
4cd9fd |
+
|
|
|
4cd9fd |
+import six
|
|
|
4cd9fd |
+import unittest
|
|
|
4cd9fd |
+
|
|
|
4cd9fd |
+from blivet.devices.storage import StorageDevice
|
|
|
4cd9fd |
+from blivet.errors import DeviceError
|
|
|
4cd9fd |
+from blivet.formats import get_format
|
|
|
4cd9fd |
+
|
|
|
4cd9fd |
+from blivet.size import Size
|
|
|
4cd9fd |
+
|
|
|
4cd9fd |
+
|
|
|
4cd9fd |
+class SwapNodevTestCase(unittest.TestCase):
|
|
|
4cd9fd |
+
|
|
|
4cd9fd |
+ def test_swap_max_size(self):
|
|
|
4cd9fd |
+ StorageDevice("dev", size=Size("129 GiB"),
|
|
|
4cd9fd |
+ fmt=get_format("swap"))
|
|
|
4cd9fd |
+
|
|
|
4cd9fd |
+ StorageDevice("dev", size=Size("15 TiB"),
|
|
|
4cd9fd |
+ fmt=get_format("swap"))
|
|
|
4cd9fd |
+
|
|
|
4cd9fd |
+ with six.assertRaisesRegex(self, DeviceError, "device is too large for new format"):
|
|
|
4cd9fd |
+ StorageDevice("dev", size=Size("17 TiB"),
|
|
|
4cd9fd |
+ fmt=get_format("swap"))
|
|
|
4cd9fd |
--
|
|
|
4cd9fd |
2.26.2
|
|
|
4cd9fd |
|