Merge lp:~wesley-wiedenmeier/curtin/1597522 into lp:~curtin-dev/curtin/trunk

Proposed by Wesley Wiedenmeier
Status: Merged
Merged at revision: 407
Proposed branch: lp:~wesley-wiedenmeier/curtin/1597522
Merge into: lp:~curtin-dev/curtin/trunk
Diff against target: 82 lines (+25/-6)
3 files modified
curtin/block/mkfs.py (+9/-5)
examples/tests/uefi_basic.yaml (+15/-0)
tests/vmtests/test_uefi_basic.py (+1/-1)
To merge this branch: bzr merge lp:~wesley-wiedenmeier/curtin/1597522
Reviewer Review Type Date Requested Status
Ryan Harper (community) Approve
Server Team CI bot continuous-integration Approve
Review via email: mp+298719@code.launchpad.net

Description of the change

Only append '-s 1' flag to mkfs commands when creating vfat volume on advanced format disk.
Also, support specifying sector size to mkfs.xfs and properly format argument.

Fixes (LP: 1597522)

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)
402. By Wesley Wiedenmeier

Add partition 3 on main disk to disks_to_check in test_uefi_basic

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'curtin/block/mkfs.py'
2--- curtin/block/mkfs.py 2016-04-14 19:24:47 +0000
3+++ curtin/block/mkfs.py 2016-06-29 23:19:31 +0000
4@@ -91,6 +91,7 @@
5 "btrfs": "--sectorsize",
6 "ext": "-b",
7 "fat": "-S",
8+ "xfs": "-s",
9 "ntfs": "--sector-size",
10 "reiserfs": "--block-size"}
11 }
12@@ -165,12 +166,15 @@
13 # use device logical block size to ensure properly formated filesystems
14 (logical_bsize, physical_bsize) = block.get_blockdev_sector_size(path)
15 if logical_bsize > 512:
16+ lbs_str = ('size={}'.format(logical_bsize) if fs_family == "xfs"
17+ else str(logical_bsize))
18 cmd.extend(get_flag_mapping("sectorsize", fs_family,
19- param=str(logical_bsize),
20- strict=strict))
21- # mkfs.vfat doesn't calculate this right for non-512b sector size
22- # lp:1569576 , d-i uses the same setting.
23- cmd.extend(["-s", "1"])
24+ param=lbs_str, strict=strict))
25+
26+ if fs_family == 'fat':
27+ # mkfs.vfat doesn't calculate this right for non-512b sector size
28+ # lp:1569576 , d-i uses the same setting.
29+ cmd.extend(["-s", "1"])
30
31 if force:
32 cmd.extend(get_flag_mapping("force", fs_family, strict=strict))
33
34=== modified file 'examples/tests/uefi_basic.yaml'
35--- examples/tests/uefi_basic.yaml 2016-04-07 21:03:58 +0000
36+++ examples/tests/uefi_basic.yaml 2016-06-29 23:19:31 +0000
37@@ -22,6 +22,12 @@
38 size: 3G
39 type: partition
40 wipe: superblock
41+ - id: id_disk0_part3
42+ number: 3
43+ size: 1G
44+ type: partition
45+ wipe: superblock
46+ device: id_disk0
47 - fstype: fat32
48 id: id_efi_format
49 label: efi
50@@ -32,10 +38,19 @@
51 label: root
52 type: format
53 volume: id_disk0_part2
54+ - id: id_home_format
55+ label: home
56+ type: format
57+ fstype: xfs
58+ volume: id_disk0_part3
59 - device: id_root_format
60 id: id_root_mount
61 path: /
62 type: mount
63+ - device: id_home_format
64+ type: mount
65+ path: /home
66+ id: id_home_mount
67 - device: id_efi_format
68 id: id_efi_mount
69 path: /boot/efi
70
71=== modified file 'tests/vmtests/test_uefi_basic.py'
72--- tests/vmtests/test_uefi_basic.py 2016-06-13 20:49:15 +0000
73+++ tests/vmtests/test_uefi_basic.py 2016-06-29 23:19:31 +0000
74@@ -12,7 +12,7 @@
75 conf_file = "examples/tests/uefi_basic.yaml"
76 extra_disks = []
77 uefi = True
78- disk_to_check = [('main_disk', 1), ('main_disk', 2)]
79+ disk_to_check = [('main_disk', 1), ('main_disk', 2), ('main_disk', 3)]
80 collect_scripts = [textwrap.dedent("""
81 cd OUTPUT_COLLECT_D
82 blkid -o export /dev/vda > blkid_output_vda

Subscribers

People subscribed via source and target branches