Merge ~raharper/curtin:fix/uefi-mount-check-fails-no-path into curtin:master

Proposed by Ryan Harper
Status: Merged
Approved by: Paride Legovini
Approved revision: 23e25643fa8aae59b4b5315afabfa6119d4e8e8e
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~raharper/curtin:fix/uefi-mount-check-fails-no-path
Merge into: curtin:master
Diff against target: 30 lines (+7/-1)
2 files modified
curtin/commands/ (+1/-1)
tests/unittests/ (+6/-0)
Reviewer Review Type Date Requested Status
Paride Legovini Approve
Server Team CI bot continuous-integration Approve
Review via email:

Commit message

curthooks: uefi_find_grub_device_ids handle type:mount without path

When scanning a curtin storage config for efi mount entries we failed
to handle the case where an entry does not contain the 'path' key.
Curtin storage config type:mount does not require a 'path' element.
Change to using .get('path') when looking for efi mount path.

LP: #1892242

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Paride Legovini (paride) wrote :

Retriggering. We are unlucky with this one:

ERROR: test_blocksize (unittests.test_block_dasd.TestDasdCcwDeviceAttr)
Traceback (most recent call last):
  File "/jenkins/servers/server/workspace/curtin-ci/nodes/metal-ppc64el/curtin-170/tests/unittests/", line 159, in setUp
    self.dasd = dasd.DasdDevice(random_device_id())
  File "/jenkins/servers/server/workspace/curtin-ci/nodes/metal-ppc64el/curtin-170/curtin/block/", line 309, in __init__
    super(DasdDevice, self).__init__(device_id)
  File "/jenkins/servers/server/workspace/curtin-ci/nodes/metal-ppc64el/curtin-170/curtin/block/", line 283, in __init__
  File "/jenkins/servers/server/workspace/curtin-ci/nodes/metal-ppc64el/curtin-170/curtin/block/", line 274, in _valid_device_id
    "device_id invalid: devno not in 0-0x10000: '%s'" % dev)
ValueError: device_id invalid: devno not in 0-0x10000: 'ffff'

Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Paride Legovini (paride) wrote :


review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/curtin/commands/ b/curtin/commands/
2index 458eb9d..51f11d6 100644
3--- a/curtin/commands/
4+++ b/curtin/commands/
5@@ -557,7 +557,7 @@ def uefi_find_grub_device_ids(sconfig):
6 esp_partitions.append(item_id)
7 continue
9- if item['type'] == 'mount' and item['path'] == '/boot/efi':
10+ if item['type'] == 'mount' and item.get('path') == '/boot/efi':
11 if primary_esp:
12 LOG.debug('Ignoring duplicate mounted primary ESP: %s',
13 item_id)
14diff --git a/tests/unittests/ b/tests/unittests/
15index e45362c..a6ae86e 100644
16--- a/tests/unittests/
17+++ b/tests/unittests/
18@@ -1725,6 +1725,12 @@ class TestUefiFindGrubDeviceIds(CiTestCase):
19 'fstype': 'fat32',
20 },
21 {
22+ 'id': 'vdb-part2-swap_mount',
23+ 'type': 'mount',
24+ 'device': 'vdb-part2-swap_format',
25+ 'options': '',
26+ },
27+ {
28 'id': 'vdb-part1_mount',
29 'type': 'mount',
30 'device': 'vdb-part1_format',


People subscribed via source and target branches