Merge ~raharper/curtin:fix/clear-holders-detect-mpath-partition into curtin:master

Proposed by Ryan Harper
Status: Merged
Approved by: Dan Watkins
Approved revision: 4aa5e3fd2cd4372759988c200663716b8f937bae
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~raharper/curtin:fix/clear-holders-detect-mpath-partition
Merge into: curtin:master
Diff against target: 17 lines (+2/-2)
1 file modified
curtin/block/clear_holders.py (+2/-2)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Paride Legovini Approve
Michael Hudson-Doyle Approve
Review via email: mp+392636@code.launchpad.net

Commit message

clear-holders: fix identification of multipath partitions

identify_partition calls multipath.is_mpath_partition using at sysfs
path to the device but is_mpath_partition expects a /dev/XXX path.
This prevented clear-holders from identifying multipath partitions which
need to be handled differently than regular partitions (or disks).

LP: #1900900

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Makes sense.

review: Approve
Revision history for this message
Paride Legovini (paride) wrote :

LGTM, thanks!

review: Approve
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 :

Landing fails because of outdated ubuntu-distro-info (it's release day).

I put this back to "Needs review" to stop the autolander from trying to land.

Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

This can be landed now, I assume?

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/curtin/block/clear_holders.py b/curtin/block/clear_holders.py
2index 9553db6..c182d91 100644
3--- a/curtin/block/clear_holders.py
4+++ b/curtin/block/clear_holders.py
5@@ -396,11 +396,11 @@ def identify_partition(device):
6 """
7 determine if specified device is a partition
8 """
9- blockdev = block.sys_block_path(device)
10- path = os.path.join(blockdev, 'partition')
11+ path = os.path.join(device, 'partition')
12 if os.path.exists(path):
13 return True
14
15+ blockdev = block.sysfs_to_devpath(device)
16 if multipath.is_mpath_partition(blockdev):
17 return True
18

Subscribers

People subscribed via source and target branches