← Back to team overview

curtin-dev team mailing list archive

[Merge] ~mwhudson/curtin:add-offsets-to-examples into curtin:master

 

Michael Hudson-Doyle has proposed merging ~mwhudson/curtin:add-offsets-to-examples into curtin:master.

Commit message:
examples: add offsets to preserved partitions

Specifying the offset on a preserved partition is required with a v2
config when the partition does not immediately follow (up to alignment)
the preceding one.



Requested reviews:
  curtin developers (curtin-dev)

For more details, see:
https://code.launchpad.net/~mwhudson/curtin/+git/curtin/+merge/415997
-- 
Your team curtin developers is requested to review the proposed merge of ~mwhudson/curtin:add-offsets-to-examples into curtin:master.
diff --git a/examples/tests/multipath-reuse.yaml b/examples/tests/multipath-reuse.yaml
index 24e193e..801111e 100644
--- a/examples/tests/multipath-reuse.yaml
+++ b/examples/tests/multipath-reuse.yaml
@@ -36,12 +36,14 @@ storage:
         device: sda
         flag: boot
         preserve: true
+        offset: 1G
       - id: sda2
         type: partition
         number: 2
         size: 1GB
         device: sda
         preserve: true
+        offset: 4G
       - id: sda1_root
         type: format
         fstype: ext4
diff --git a/examples/tests/partition-existing-raid.yaml b/examples/tests/partition-existing-raid.yaml
index 6292fef..423ab85 100644
--- a/examples/tests/partition-existing-raid.yaml
+++ b/examples/tests/partition-existing-raid.yaml
@@ -63,6 +63,7 @@ storage:
     flag: boot
     number: 1
     size: 8G
+    offset: 1G
     preserve: true
   - type: partition
     id: id_disk2_part1
@@ -70,6 +71,7 @@ storage:
     flag: boot
     number: 1
     size: 8G
+    offset: 1G
     preserve: true
   - type: raid
     id: raid-md1
diff --git a/examples/tests/preserve-bcache.yaml b/examples/tests/preserve-bcache.yaml
index 17ad52c..13f8d54 100644
--- a/examples/tests/preserve-bcache.yaml
+++ b/examples/tests/preserve-bcache.yaml
@@ -47,6 +47,7 @@ storage:
     size: 1024M
     preserve: true
     wipe: superblock
+    offset: 1M
   - id: id_rotary0_part2
     type: partition
     name: rotary0-part2
@@ -54,6 +55,7 @@ storage:
     number: 2
     size: 8G
     preserve: true
+    offset: 1026M
   - id: id_bcache0
     type: bcache
     name: bcache0
diff --git a/examples/tests/preserve-lvm.yaml b/examples/tests/preserve-lvm.yaml
index a939759..58bfa1f 100644
--- a/examples/tests/preserve-lvm.yaml
+++ b/examples/tests/preserve-lvm.yaml
@@ -47,6 +47,7 @@ storage:
         device: main_disk
         flag: bios_grub
         preserve: true
+        offset: 1MB
       - id: main_disk_p2
         type: partition
         number: 2
@@ -54,6 +55,7 @@ storage:
         device: main_disk
         flag: boot
         preserve: true
+        offset: 3MB
       - id: root_vg
         type: lvm_volgroup
         name: root_vg
diff --git a/examples/tests/preserve-partition-wipe-vg-simple.yaml b/examples/tests/preserve-partition-wipe-vg-simple.yaml
index e1f0b9e..9876b42 100644
--- a/examples/tests/preserve-partition-wipe-vg-simple.yaml
+++ b/examples/tests/preserve-partition-wipe-vg-simple.yaml
@@ -39,6 +39,7 @@ storage:
     number: 1
     type: partition
     id: disk-sda-part-1
+    offset: 2M
   - device: disk-sda
     size: 3G
     flag: linux
@@ -47,6 +48,7 @@ storage:
     wipe: zero
     type: partition
     id: disk-sda-part-2
+    offset: 4G
   - fstype: ext4
     volume: disk-sda-part-2
     preserve: false
diff --git a/examples/tests/preserve-partition-wipe-vg.yaml b/examples/tests/preserve-partition-wipe-vg.yaml
index 27a4235..5e35a54 100644
--- a/examples/tests/preserve-partition-wipe-vg.yaml
+++ b/examples/tests/preserve-partition-wipe-vg.yaml
@@ -51,6 +51,7 @@ storage:
     wipe: zero
     type: partition
     id: disk-sda-part-1
+    offset: 2M
   - device: disk-sda
     size: 3G
     flag: linux
@@ -58,6 +59,7 @@ storage:
     wipe: zero
     type: partition
     id: disk-sda-part-2
+    offset: 1G
   - device: disk-sdb
     flag: linux
     size: 3G
@@ -65,12 +67,14 @@ storage:
     wipe: zero
     type: partition
     id: disk-sdb-part-1
+    offset: 1G
   - device: disk-sdb
     flag: linux
     size: 3G
     preserve: true
     type: partition
     id: disk-sdb-part-2
+    offset: 4G
   - fstype: ext4
     volume: disk-sda-part-2
     preserve: false
diff --git a/examples/tests/preserve-raid.yaml b/examples/tests/preserve-raid.yaml
index 5c94032..af997a2 100644
--- a/examples/tests/preserve-raid.yaml
+++ b/examples/tests/preserve-raid.yaml
@@ -37,11 +37,13 @@ storage:
     serial: disk-b
     ptable: gpt
     preserve: true
+    offset: 1G
   - type: disk
     id: id_disk2
     serial: disk-c
     ptable: gpt
     preserve: true
+    offset: 1G
   - type: partition
     id: id_disk0_part1
     device: id_disk0
@@ -65,6 +67,7 @@ storage:
     number: 1
     size: 8G
     preserve: true
+    offset: 1G
   - type: partition
     id: id_disk2_part1
     device: id_disk2
@@ -72,6 +75,7 @@ storage:
     number: 1
     size: 8G
     preserve: true
+    offset: 1G
   - type: raid
     id: raid-md1
     name: md1
diff --git a/examples/tests/preserve.yaml b/examples/tests/preserve.yaml
index 9da2a0e..2cf692e 100644
--- a/examples/tests/preserve.yaml
+++ b/examples/tests/preserve.yaml
@@ -32,18 +32,21 @@ storage:
     number: 1
     size: 512M
     preserve: true
+    offset: 2M
   - type: partition
     id: id_disk0_part2
     device: id_disk0
     number: 2
     size: 4G
     preserve: true
+    offset: 1G
   - type: partition
     id: id_disk0_part3
     device: id_disk0
     number: 3
     size: 3G
     preserve: true
+    offset: 6G
   - type: format
     id: id_efi_format
     volume: id_disk0_part1
diff --git a/examples/tests/reuse-lvm-member-partition.yaml b/examples/tests/reuse-lvm-member-partition.yaml
index fd8f602..cad1474 100644
--- a/examples/tests/reuse-lvm-member-partition.yaml
+++ b/examples/tests/reuse-lvm-member-partition.yaml
@@ -69,12 +69,14 @@ storage:
     flag: boot
     number: 1
     size: 1G
+    offset: 1G
   - type: partition
     id: id_disk0_part2
     preserve: true
     device: id_disk0
     number: 2
     size: 7G
+    offset: 2G
   - type: format
     id: id_efi_format
     volume: id_disk0_part1
diff --git a/examples/tests/reuse-msdos-partitions.yaml b/examples/tests/reuse-msdos-partitions.yaml
index d444517..f3c6974 100644
--- a/examples/tests/reuse-msdos-partitions.yaml
+++ b/examples/tests/reuse-msdos-partitions.yaml
@@ -43,6 +43,7 @@ storage:
         flag: boot
         preserve: true
         wipe: superblock
+        offset: 1M
       - id: sda2
         type: partition
         number: 2
@@ -50,6 +51,7 @@ storage:
         flag: extended
         device: sda
         preserve: true
+        offset: 3074M
       - id: sda5
         type: partition
         number: 5
@@ -58,6 +60,7 @@ storage:
         device: sda
         preserve: true
         wipe: superblock
+        offset: 3075M
       - id: sda6
         type: partition
         number: 6
@@ -66,6 +69,7 @@ storage:
         device: sda
         preserve: true
         wipe: superblock
+        offset: 5123M
       - id: sda1_root
         type: format
         fstype: ext4
diff --git a/examples/tests/reuse-raid-member-wipe-partition.yaml b/examples/tests/reuse-raid-member-wipe-partition.yaml
index d20b79c..136f96e 100644
--- a/examples/tests/reuse-raid-member-wipe-partition.yaml
+++ b/examples/tests/reuse-raid-member-wipe-partition.yaml
@@ -49,6 +49,7 @@ storage:
     flag: boot
     number: 1
     size: 1G
+    offset: 1G
   - type: partition
     id: id_disk0_part2
     preserve: true
@@ -56,6 +57,7 @@ storage:
     number: 2
     size: 7G
     wipe: superblock
+    offset: 2G
   - type: format
     id: id_efi_format
     volume: id_disk0_part1
diff --git a/examples/tests/uefi_reuse_esp.yaml b/examples/tests/uefi_reuse_esp.yaml
index 7095f91..0232019 100644
--- a/examples/tests/uefi_reuse_esp.yaml
+++ b/examples/tests/uefi_reuse_esp.yaml
@@ -70,6 +70,7 @@ storage:
     size: 4G
     type: partition
     preserve: true
+    offset: 513M
   - fstype: fat32
     id: id_efi_format
     label: efi

Follow ups