fix bug mounting first partition of a alias'd name.
The expected behavior was that 'ephemeral0' in a mount device entry and ephemeral0 mapped to /dev/xvdb that /dev/xvdb1 or /dev/xvdb would be substituted. Explicitly setting 'ephemeral0.0' would mean only xvdb in this case.
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
0.7.4:
|
0.7.4:
|
||||||
-
|
- fix issue mounting 'ephemeral0' if ephemeral0 was an alias for a
|
||||||
|
partitioned block device with target filesystem on ephemeral0.1.
|
||||||
|
(LP: #1236594)
|
||||||
0.7.3:
|
0.7.3:
|
||||||
- fix omnibus chef installer (LP: #1182265) [Chris Wing]
|
- fix omnibus chef installer (LP: #1182265) [Chris Wing]
|
||||||
- small fix for OVF datasource for iso transport on non-iso9660 filesystem
|
- small fix for OVF datasource for iso transport on non-iso9660 filesystem
|
||||||
|
|||||||
@@ -222,9 +222,6 @@ def devnode_for_dev_part(device, partition):
|
|||||||
if not os.path.exists(device):
|
if not os.path.exists(device):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if not partition:
|
|
||||||
return device
|
|
||||||
|
|
||||||
short_name = os.path.basename(device)
|
short_name = os.path.basename(device)
|
||||||
sys_path = "/sys/block/%s" % short_name
|
sys_path = "/sys/block/%s" % short_name
|
||||||
|
|
||||||
@@ -238,8 +235,7 @@ def devnode_for_dev_part(device, partition):
|
|||||||
partition = str(partition)
|
partition = str(partition)
|
||||||
|
|
||||||
if partition is None:
|
if partition is None:
|
||||||
valid_mappings = [sys_long_path + "1",
|
valid_mappings = [sys_long_path + "1", sys_long_path + "p1"]
|
||||||
sys_long_path + "p1" % partition]
|
|
||||||
elif partition != "0":
|
elif partition != "0":
|
||||||
valid_mappings = [sys_long_path + "%s" % partition,
|
valid_mappings = [sys_long_path + "%s" % partition,
|
||||||
sys_long_path + "p%s" % partition]
|
sys_long_path + "p%s" % partition]
|
||||||
|
|||||||
Reference in New Issue
Block a user