Merge ~mwhudson/curtin:lp-1868177 into curtin:master
- Git
- lp:~mwhudson/curtin
- lp-1868177
- Merge into master
Status: | Merged |
---|---|
Approved by: | Michael Hudson-Doyle |
Approved revision: | c3800f7bccc9e892224c0dfcfd750adaba7e5eb9 |
Merge reported by: | Server Team CI bot |
Merged at revision: | not available |
Proposed branch: | ~mwhudson/curtin:lp-1868177 |
Merge into: | curtin:master |
Diff against target: |
216 lines (+25/-24) 5 files modified
curtin/block/__init__.py (+6/-7) curtin/block/clear_holders.py (+2/-3) examples/tests/uefi_basic.yaml (+4/-0) tests/unittests/test_block.py (+2/-2) tests/unittests/test_clear_holders.py (+11/-12) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Server Team CI bot | continuous-integration | Approve | |
curtin developers | Pending | ||
Review via email: mp+399893@code.launchpad.net |
Commit message
remove 'strict' arguments to block.wipe_volume and block.quick_zero
It was only passed by clear_holders.
is all best effort anyway.
in particular, this should fix failures seen in subiquity error reports
when wiping very small (<1M) partitions.
LP: #1868177
Description of the change
i haven't tested this beyond running the unittests yet. I guess I should add some more of those too.
Ryan Harper (raharper) wrote : | # |
- bb8b718... by Michael Hudson-Doyle
-
remove strict argument to block.wipe_volume
It was only passed by clear_holders.
_wipe_superbloc k and clear_holders
is all best effort anyway.in particular, this should fix failures seen in subiquity error reports
when wiping very small (<1M) partitions.LP: #1868177
Michael Hudson-Doyle (mwhudson) wrote : | # |
Yes, that seems completely fair. Take another look?
- 62bf639... by Michael Hudson-Doyle
-
remove strict argument from quick_zero too
- c3800f7... by Michael Hudson-Doyle
-
add a tiny partition to a randomly selected vmtest
Michael Hudson-Doyle (mwhudson) wrote : | # |
Confirmed that the vmtest change makes a vmtest fail without the fix that passes with it
Server Team CI bot (server-team-bot) wrote : | # |
FAILED: Continuous integration, rev:4733cc7d240
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Server Team CI bot (server-team-bot) wrote : | # |
FAILED: Continuous integration, rev:c3800f7bccc
https:/
Executed test runs:
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Michael Hudson-Doyle (mwhudson) wrote : | # |
arm64 failure is that odd pylint race
Ryan Harper (raharper) wrote : | # |
I think this is fine. I _was_ thinking to only remove the strict=True default in _wipe_superblock in clear-holders. However no where else is code calling with strict=true; if *something* external were using wipe_superblock and strict=true, so this is the minimal change I think:
(here's me wanting github style markdown in comments)
```
(crispyboi) curtin % git diff
diff --git a/curtin/
index c182d91a..ba026574 100644
--- a/curtin/
+++ b/curtin/
@@ -332,7 +332,7 @@ def wipe_superblock
-def _wipe_superbloc
+def _wipe_superbloc
""" No checks, just call wipe_volume """
retries = [1, 3, 5, 7]
@@ -341,8 +341,7 @@ def _wipe_superbloc
try:
- block.wipe_
- exclusive=
+ block.wipe_
return
```
So, I'll approve and leave it up to you if you want to do the minimal or the full removal that you have.
Michael Hudson-Doyle (mwhudson) wrote : | # |
Are there any users of curtin-as-a-library beyond maas and subiquity? I'm not aware of any and if this change shakes any out of the tree I'd be interested to talk to them :)
Server Team CI bot (server-team-bot) : | # |
Preview Diff
1 | diff --git a/curtin/block/__init__.py b/curtin/block/__init__.py | |||
2 | index 1b33002..2580a0d 100644 | |||
3 | --- a/curtin/block/__init__.py | |||
4 | +++ b/curtin/block/__init__.py | |||
5 | @@ -1203,7 +1203,7 @@ def wipe_file(path, reader=None, buflen=4 * 1024 * 1024, exclusive=True): | |||
6 | 1203 | fp.write(pbuf) | 1203 | fp.write(pbuf) |
7 | 1204 | 1204 | ||
8 | 1205 | 1205 | ||
10 | 1206 | def quick_zero(path, partitions=True, exclusive=True, strict=False): | 1206 | def quick_zero(path, partitions=True, exclusive=True): |
11 | 1207 | """ | 1207 | """ |
12 | 1208 | zero 1M at front, 1M at end, and 1M at front | 1208 | zero 1M at front, 1M at end, and 1M at front |
13 | 1209 | if this is a block device and partitions is true, then | 1209 | if this is a block device and partitions is true, then |
14 | @@ -1227,11 +1227,11 @@ def quick_zero(path, partitions=True, exclusive=True, strict=False): | |||
15 | 1227 | for (pt, kname, ptnum) in pt_names: | 1227 | for (pt, kname, ptnum) in pt_names: |
16 | 1228 | LOG.debug('Wiping path: dev:%s kname:%s partnum:%s', | 1228 | LOG.debug('Wiping path: dev:%s kname:%s partnum:%s', |
17 | 1229 | pt, kname, ptnum) | 1229 | pt, kname, ptnum) |
19 | 1230 | quick_zero(pt, partitions=False, strict=strict) | 1230 | quick_zero(pt, partitions=False) |
20 | 1231 | 1231 | ||
21 | 1232 | LOG.debug("wiping 1M on %s at offsets %s", path, offsets) | 1232 | LOG.debug("wiping 1M on %s at offsets %s", path, offsets) |
22 | 1233 | return zero_file_at_offsets(path, offsets, buflen=buflen, count=count, | 1233 | return zero_file_at_offsets(path, offsets, buflen=buflen, count=count, |
24 | 1234 | exclusive=exclusive, strict=strict) | 1234 | exclusive=exclusive) |
25 | 1235 | 1235 | ||
26 | 1236 | 1236 | ||
27 | 1237 | def zero_file_at_offsets(path, offsets, buflen=1024, count=1024, strict=False, | 1237 | def zero_file_at_offsets(path, offsets, buflen=1024, count=1024, strict=False, |
28 | @@ -1286,7 +1286,7 @@ def zero_file_at_offsets(path, offsets, buflen=1024, count=1024, strict=False, | |||
29 | 1286 | fp.write(buf) | 1286 | fp.write(buf) |
30 | 1287 | 1287 | ||
31 | 1288 | 1288 | ||
33 | 1289 | def wipe_volume(path, mode="superblock", exclusive=True, strict=False): | 1289 | def wipe_volume(path, mode="superblock", exclusive=True): |
34 | 1290 | """wipe a volume/block device | 1290 | """wipe a volume/block device |
35 | 1291 | 1291 | ||
36 | 1292 | :param path: a path to a block device | 1292 | :param path: a path to a block device |
37 | @@ -1299,7 +1299,6 @@ def wipe_volume(path, mode="superblock", exclusive=True, strict=False): | |||
38 | 1299 | volume and beginning and end of any partitions that are | 1299 | volume and beginning and end of any partitions that are |
39 | 1300 | known to be on this device. | 1300 | known to be on this device. |
40 | 1301 | :param exclusive: boolean to control how path is opened | 1301 | :param exclusive: boolean to control how path is opened |
41 | 1302 | :param strict: boolean to control when to raise errors on write failures | ||
42 | 1303 | """ | 1302 | """ |
43 | 1304 | if mode == "pvremove": | 1303 | if mode == "pvremove": |
44 | 1305 | # We need to use --force --force in case it's already in a volgroup and | 1304 | # We need to use --force --force in case it's already in a volgroup and |
45 | @@ -1317,9 +1316,9 @@ def wipe_volume(path, mode="superblock", exclusive=True, strict=False): | |||
46 | 1317 | with open("/dev/urandom", "rb") as reader: | 1316 | with open("/dev/urandom", "rb") as reader: |
47 | 1318 | wipe_file(path, reader=reader.read, exclusive=exclusive) | 1317 | wipe_file(path, reader=reader.read, exclusive=exclusive) |
48 | 1319 | elif mode == "superblock": | 1318 | elif mode == "superblock": |
50 | 1320 | quick_zero(path, partitions=False, exclusive=exclusive, strict=strict) | 1319 | quick_zero(path, partitions=False, exclusive=exclusive) |
51 | 1321 | elif mode == "superblock-recursive": | 1320 | elif mode == "superblock-recursive": |
53 | 1322 | quick_zero(path, partitions=True, exclusive=exclusive, strict=strict) | 1321 | quick_zero(path, partitions=True, exclusive=exclusive) |
54 | 1323 | else: | 1322 | else: |
55 | 1324 | raise ValueError("wipe mode %s not supported" % mode) | 1323 | raise ValueError("wipe mode %s not supported" % mode) |
56 | 1325 | 1324 | ||
57 | diff --git a/curtin/block/clear_holders.py b/curtin/block/clear_holders.py | |||
58 | index c182d91..ba02657 100644 | |||
59 | --- a/curtin/block/clear_holders.py | |||
60 | +++ b/curtin/block/clear_holders.py | |||
61 | @@ -332,7 +332,7 @@ def wipe_superblock(device): | |||
62 | 332 | time.sleep(wait) | 332 | time.sleep(wait) |
63 | 333 | 333 | ||
64 | 334 | 334 | ||
66 | 335 | def _wipe_superblock(blockdev, exclusive=True, strict=True): | 335 | def _wipe_superblock(blockdev, exclusive=True): |
67 | 336 | """ No checks, just call wipe_volume """ | 336 | """ No checks, just call wipe_volume """ |
68 | 337 | 337 | ||
69 | 338 | retries = [1, 3, 5, 7] | 338 | retries = [1, 3, 5, 7] |
70 | @@ -341,8 +341,7 @@ def _wipe_superblock(blockdev, exclusive=True, strict=True): | |||
71 | 341 | LOG.debug('wiping %s attempt %s/%s', | 341 | LOG.debug('wiping %s attempt %s/%s', |
72 | 342 | blockdev, attempt + 1, len(retries)) | 342 | blockdev, attempt + 1, len(retries)) |
73 | 343 | try: | 343 | try: |
76 | 344 | block.wipe_volume(blockdev, mode='superblock', | 344 | block.wipe_volume(blockdev, mode='superblock', exclusive=exclusive) |
75 | 345 | exclusive=exclusive, strict=strict) | ||
77 | 346 | LOG.debug('successfully wiped device %s on attempt %s/%s', | 345 | LOG.debug('successfully wiped device %s on attempt %s/%s', |
78 | 347 | blockdev, attempt + 1, len(retries)) | 346 | blockdev, attempt + 1, len(retries)) |
79 | 348 | return | 347 | return |
80 | diff --git a/examples/tests/uefi_basic.yaml b/examples/tests/uefi_basic.yaml | |||
81 | index 1f49fa9..91a72ae 100644 | |||
82 | --- a/examples/tests/uefi_basic.yaml | |||
83 | +++ b/examples/tests/uefi_basic.yaml | |||
84 | @@ -1,6 +1,10 @@ | |||
85 | 1 | showtrace: true | 1 | showtrace: true |
86 | 2 | 2 | ||
87 | 3 | early_commands: | 3 | early_commands: |
88 | 4 | # Create a small (512KiB) partition to test the fix for LP: #1868177. | ||
89 | 5 | tinypartition: [ | ||
90 | 6 | "parted", /dev/disk/by-id/virtio-disk-a, "--script", "mklabel", "gpt", | ||
91 | 7 | "mkpart", "primary", "4096s", "4096s", "5120s"] | ||
92 | 4 | # Recreate and test LP:1722322 | 8 | # Recreate and test LP:1722322 |
93 | 5 | # Make one disk dirty with an MBR and a storage configuration | 9 | # Make one disk dirty with an MBR and a storage configuration |
94 | 6 | # GPT and don't supply wipe: superblock. This will exercise | 10 | # GPT and don't supply wipe: superblock. This will exercise |
95 | diff --git a/tests/unittests/test_block.py b/tests/unittests/test_block.py | |||
96 | index d96a4a8..519628a 100644 | |||
97 | --- a/tests/unittests/test_block.py | |||
98 | +++ b/tests/unittests/test_block.py | |||
99 | @@ -409,11 +409,11 @@ class TestWipeVolume(CiTestCase): | |||
100 | 409 | def test_wipe_superblock(self, mock_quick_zero): | 409 | def test_wipe_superblock(self, mock_quick_zero): |
101 | 410 | block.wipe_volume(self.dev, mode='superblock') | 410 | block.wipe_volume(self.dev, mode='superblock') |
102 | 411 | mock_quick_zero.assert_called_with(self.dev, exclusive=True, | 411 | mock_quick_zero.assert_called_with(self.dev, exclusive=True, |
104 | 412 | partitions=False, strict=False) | 412 | partitions=False) |
105 | 413 | block.wipe_volume(self.dev, exclusive=True, | 413 | block.wipe_volume(self.dev, exclusive=True, |
106 | 414 | mode='superblock-recursive') | 414 | mode='superblock-recursive') |
107 | 415 | mock_quick_zero.assert_called_with(self.dev, exclusive=True, | 415 | mock_quick_zero.assert_called_with(self.dev, exclusive=True, |
109 | 416 | partitions=True, strict=False) | 416 | partitions=True) |
110 | 417 | 417 | ||
111 | 418 | @mock.patch('curtin.block.wipe_file') | 418 | @mock.patch('curtin.block.wipe_file') |
112 | 419 | def test_wipe_zero(self, mock_wipe_file): | 419 | def test_wipe_zero(self, mock_wipe_file): |
113 | diff --git a/tests/unittests/test_clear_holders.py b/tests/unittests/test_clear_holders.py | |||
114 | index d1c2590..48697b5 100644 | |||
115 | --- a/tests/unittests/test_clear_holders.py | |||
116 | +++ b/tests/unittests/test_clear_holders.py | |||
117 | @@ -142,8 +142,7 @@ class TestClearHolders(CiTestCase): | |||
118 | 142 | # 1. wipe the bcache device contents | 142 | # 1. wipe the bcache device contents |
119 | 143 | m_block.wipe_volume.assert_called_with(self.test_blockdev, | 143 | m_block.wipe_volume.assert_called_with(self.test_blockdev, |
120 | 144 | mode='superblock', | 144 | mode='superblock', |
123 | 145 | exclusive=False, | 145 | exclusive=False) |
122 | 146 | strict=True) | ||
124 | 147 | # 2. extract the backing device | 146 | # 2. extract the backing device |
125 | 148 | m_bcache.get_backing_device.assert_called_with(self.test_blockdev) | 147 | m_bcache.get_backing_device.assert_called_with(self.test_blockdev) |
126 | 149 | m_bcache.sysfs_path.assert_has_calls([ | 148 | m_bcache.sysfs_path.assert_has_calls([ |
127 | @@ -243,7 +242,7 @@ class TestClearHolders(CiTestCase): | |||
128 | 243 | clear_holders.shutdown_mdadm(self.test_syspath) | 242 | clear_holders.shutdown_mdadm(self.test_syspath) |
129 | 244 | 243 | ||
130 | 245 | mock_wipe.assert_called_with(self.test_blockdev, exclusive=False, | 244 | mock_wipe.assert_called_with(self.test_blockdev, exclusive=False, |
132 | 246 | mode='superblock', strict=True) | 245 | mode='superblock') |
133 | 247 | mock_mdadm.set_sync_action.assert_has_calls([ | 246 | mock_mdadm.set_sync_action.assert_has_calls([ |
134 | 248 | mock.call(self.test_blockdev, action="idle"), | 247 | mock.call(self.test_blockdev, action="idle"), |
135 | 249 | mock.call(self.test_blockdev, action="frozen")]) | 248 | mock.call(self.test_blockdev, action="frozen")]) |
136 | @@ -281,7 +280,7 @@ class TestClearHolders(CiTestCase): | |||
137 | 281 | clear_holders.shutdown_mdadm(self.test_syspath) | 280 | clear_holders.shutdown_mdadm(self.test_syspath) |
138 | 282 | 281 | ||
139 | 283 | mock_wipe.assert_called_with(self.test_blockdev, exclusive=False, | 282 | mock_wipe.assert_called_with(self.test_blockdev, exclusive=False, |
141 | 284 | mode='superblock', strict=True) | 283 | mode='superblock') |
142 | 285 | mock_mdadm.set_sync_action.assert_has_calls([ | 284 | mock_mdadm.set_sync_action.assert_has_calls([ |
143 | 286 | mock.call(self.test_blockdev, action="idle"), | 285 | mock.call(self.test_blockdev, action="idle"), |
144 | 287 | mock.call(self.test_blockdev, action="frozen")]) | 286 | mock.call(self.test_blockdev, action="frozen")]) |
145 | @@ -363,7 +362,7 @@ class TestClearHolders(CiTestCase): | |||
146 | 363 | clear_holders.wipe_superblock(self.test_syspath) | 362 | clear_holders.wipe_superblock(self.test_syspath) |
147 | 364 | mock_block.sysfs_to_devpath.assert_called_with(self.test_syspath) | 363 | mock_block.sysfs_to_devpath.assert_called_with(self.test_syspath) |
148 | 365 | mock_block.wipe_volume.assert_called_with( | 364 | mock_block.wipe_volume.assert_called_with( |
150 | 366 | self.test_blockdev, exclusive=True, mode='superblock', strict=True) | 365 | self.test_blockdev, exclusive=True, mode='superblock') |
151 | 367 | 366 | ||
152 | 368 | @mock.patch('curtin.block.clear_holders.multipath') | 367 | @mock.patch('curtin.block.clear_holders.multipath') |
153 | 369 | @mock.patch('curtin.block.clear_holders.is_swap_device') | 368 | @mock.patch('curtin.block.clear_holders.is_swap_device') |
154 | @@ -391,7 +390,7 @@ class TestClearHolders(CiTestCase): | |||
155 | 391 | mock_block.sysfs_to_devpath.assert_called_with(self.test_syspath) | 390 | mock_block.sysfs_to_devpath.assert_called_with(self.test_syspath) |
156 | 392 | mock_zfs.zpool_export.assert_called_with('fake_pool') | 391 | mock_zfs.zpool_export.assert_called_with('fake_pool') |
157 | 393 | mock_block.wipe_volume.assert_called_with( | 392 | mock_block.wipe_volume.assert_called_with( |
159 | 394 | self.test_blockdev, exclusive=True, mode='superblock', strict=True) | 393 | self.test_blockdev, exclusive=True, mode='superblock') |
160 | 395 | 394 | ||
161 | 396 | @mock.patch('curtin.block.clear_holders.multipath') | 395 | @mock.patch('curtin.block.clear_holders.multipath') |
162 | 397 | @mock.patch('curtin.block.clear_holders.is_swap_device') | 396 | @mock.patch('curtin.block.clear_holders.is_swap_device') |
163 | @@ -420,7 +419,7 @@ class TestClearHolders(CiTestCase): | |||
164 | 420 | self.assertEqual(0, mock_zfs.device_to_poolname.call_count) | 419 | self.assertEqual(0, mock_zfs.device_to_poolname.call_count) |
165 | 421 | self.assertEqual(0, mock_zfs.zpool_list.call_count) | 420 | self.assertEqual(0, mock_zfs.zpool_list.call_count) |
166 | 422 | mock_block.wipe_volume.assert_called_with( | 421 | mock_block.wipe_volume.assert_called_with( |
168 | 423 | self.test_blockdev, exclusive=True, mode='superblock', strict=True) | 422 | self.test_blockdev, exclusive=True, mode='superblock') |
169 | 424 | 423 | ||
170 | 425 | @mock.patch('curtin.block.clear_holders.udev') | 424 | @mock.patch('curtin.block.clear_holders.udev') |
171 | 426 | @mock.patch('curtin.block.clear_holders.multipath') | 425 | @mock.patch('curtin.block.clear_holders.multipath') |
172 | @@ -454,7 +453,7 @@ class TestClearHolders(CiTestCase): | |||
173 | 454 | clear_holders.wipe_superblock(self.test_syspath) | 453 | clear_holders.wipe_superblock(self.test_syspath) |
174 | 455 | mock_block.sysfs_to_devpath.assert_called_with(self.test_syspath) | 454 | mock_block.sysfs_to_devpath.assert_called_with(self.test_syspath) |
175 | 456 | mock_block.wipe_volume.assert_called_with( | 455 | mock_block.wipe_volume.assert_called_with( |
177 | 457 | self.test_blockdev, exclusive=True, mode='superblock', strict=True) | 456 | self.test_blockdev, exclusive=True, mode='superblock') |
178 | 458 | 457 | ||
179 | 459 | @mock.patch('curtin.block.clear_holders.multipath') | 458 | @mock.patch('curtin.block.clear_holders.multipath') |
180 | 460 | @mock.patch('curtin.block.clear_holders.is_swap_device') | 459 | @mock.patch('curtin.block.clear_holders.is_swap_device') |
181 | @@ -482,7 +481,7 @@ class TestClearHolders(CiTestCase): | |||
182 | 482 | clear_holders.wipe_superblock(self.test_syspath) | 481 | clear_holders.wipe_superblock(self.test_syspath) |
183 | 483 | mock_block.sysfs_to_devpath.assert_called_with(self.test_syspath) | 482 | mock_block.sysfs_to_devpath.assert_called_with(self.test_syspath) |
184 | 484 | mock_block.wipe_volume.assert_called_with( | 483 | mock_block.wipe_volume.assert_called_with( |
186 | 485 | self.test_blockdev, exclusive=True, mode='superblock', strict=True) | 484 | self.test_blockdev, exclusive=True, mode='superblock') |
187 | 486 | mock_block.get_sysfs_partitions.assert_has_calls( | 485 | mock_block.get_sysfs_partitions.assert_has_calls( |
188 | 487 | [mock.call(self.test_syspath)] * 3) | 486 | [mock.call(self.test_syspath)] * 3) |
189 | 488 | mock_block.rescan_block_devices.assert_has_calls( | 487 | mock_block.rescan_block_devices.assert_has_calls( |
190 | @@ -515,7 +514,7 @@ class TestClearHolders(CiTestCase): | |||
191 | 515 | clear_holders.wipe_superblock(self.test_syspath) | 514 | clear_holders.wipe_superblock(self.test_syspath) |
192 | 516 | mock_block.sysfs_to_devpath.assert_called_with(self.test_syspath) | 515 | mock_block.sysfs_to_devpath.assert_called_with(self.test_syspath) |
193 | 517 | mock_block.wipe_volume.assert_called_with( | 516 | mock_block.wipe_volume.assert_called_with( |
195 | 518 | self.test_blockdev, exclusive=True, mode='superblock', strict=True) | 517 | self.test_blockdev, exclusive=True, mode='superblock') |
196 | 519 | mock_block.get_sysfs_partitions.assert_has_calls( | 518 | mock_block.get_sysfs_partitions.assert_has_calls( |
197 | 520 | [mock.call(self.test_syspath)] * 3) | 519 | [mock.call(self.test_syspath)] * 3) |
198 | 521 | mock_block.rescan_block_devices.assert_has_calls( | 520 | mock_block.rescan_block_devices.assert_has_calls( |
199 | @@ -577,7 +576,7 @@ class TestClearHolders(CiTestCase): | |||
200 | 577 | clear_holders.wipe_superblock(self.test_syspath) | 576 | clear_holders.wipe_superblock(self.test_syspath) |
201 | 578 | mock_block.sysfs_to_devpath.assert_called_with(self.test_syspath) | 577 | mock_block.sysfs_to_devpath.assert_called_with(self.test_syspath) |
202 | 579 | mock_block.wipe_volume.assert_called_with( | 578 | mock_block.wipe_volume.assert_called_with( |
204 | 580 | self.test_blockdev, exclusive=True, mode='superblock', strict=True) | 579 | self.test_blockdev, exclusive=True, mode='superblock') |
205 | 581 | 580 | ||
206 | 582 | @mock.patch('curtin.block.clear_holders.zfs') | 581 | @mock.patch('curtin.block.clear_holders.zfs') |
207 | 583 | @mock.patch('curtin.block.clear_holders.get_holders') | 582 | @mock.patch('curtin.block.clear_holders.get_holders') |
208 | @@ -614,7 +613,7 @@ class TestClearHolders(CiTestCase): | |||
209 | 614 | mock_block.sysfs_to_devpath.assert_called_with(self.test_syspath) | 613 | mock_block.sysfs_to_devpath.assert_called_with(self.test_syspath) |
210 | 615 | mock_mpath.remove_partition.assert_called_with('mpatha-part1') | 614 | mock_mpath.remove_partition.assert_called_with('mpatha-part1') |
211 | 616 | mock_block.wipe_volume.assert_called_with( | 615 | mock_block.wipe_volume.assert_called_with( |
213 | 617 | self.test_blockdev, exclusive=True, mode='superblock', strict=True) | 616 | self.test_blockdev, exclusive=True, mode='superblock') |
214 | 618 | 617 | ||
215 | 619 | @mock.patch('curtin.block.clear_holders.LOG') | 618 | @mock.patch('curtin.block.clear_holders.LOG') |
216 | 620 | @mock.patch('curtin.block.clear_holders.block') | 619 | @mock.patch('curtin.block.clear_holders.block') |
Definitely should add a less than 1MB partition in one of the vmtests py:_wipe_ superblock( ) instead.
Comment below, I suggest that we drop the strict=true in clear_holders.