Merge ~slyon/curtin:slyon/lp1895192-zkey into curtin:master

Proposed by Lukas Märdian
Status: Merged
Approved by: Michael Hudson-Doyle
Approved revision: 7f401b7279e81a35a065e1a166c599f01477c4f3
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~slyon/curtin:slyon/lp1895192-zkey
Merge into: curtin:master
Diff against target: 13 lines (+2/-1)
1 file modified
curtin/block/__init__.py (+2/-1)
Reviewer Review Type Date Requested Status
Michael Hudson-Doyle Approve
Server Team CI bot continuous-integration Approve
Review via email: mp+406598@code.launchpad.net

Commit message

block: handle /dev/mapper/* in dev_path()

Fixes LP: #1895192

Description of the change

block: handle /dev/mapper/* in dev_path()

Fixes LP: #1895192

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 :

I really want to add a "BlockDevice" object to curtin I think, so we can pass that around instead of passing strings that might be knames, paths to block devices in /dev/, paths to symlinks in /dev/, paths in /sys ... but this change makes sense.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/curtin/block/__init__.py b/curtin/block/__init__.py
2index 2580a0d..a33ccf2 100644
3--- a/curtin/block/__init__.py
4+++ b/curtin/block/__init__.py
5@@ -62,7 +62,8 @@ def dev_path(devname):
6 convert device name to path in /dev
7 """
8 if devname.startswith('/dev/'):
9- return devname
10+ # it could be something like /dev/mapper/mpatha-part2
11+ return os.path.realpath(devname)
12 else:
13 return '/dev/' + devname
14

Subscribers

People subscribed via source and target branches