~wesley-wiedenmeier/curtin/fstab

« back to all changes in this revision

Viewing changes to examples/tests/basic_scsi.yaml

  • Committer: Ryan Harper
  • Date: 2016-06-24 19:45:04 UTC
  • mfrom: (389.5.13 trunk.vmtest-multipath)
  • Revision ID: ryan.harper@canonical.com-20160624194504-vlexvzp38lobcjnj
fix multipath configuration and add multipath tests

Xenial multipath fails without ensuring the multipath/bindings file is written
with whitespace removed; this is triggered on in-target mulitpath versions 
>= 1.5.0. This fixes LP:1551937

Add multipath testing via a test-case option, cls.multipath which will
if set to true, duplicate all disks in a test class.  This has the effect
of looking exactly like multipath setups where we see the same device
with two paths.

To handle devices with wwn or serial numbers with spaces in them curtin.block
was updated to ensure it supports finding devices via there serial or wwn
attribute. Specifically for serial numbers with spaces, we currently will
escape the spaces to underscores; this is supported by observing the names
that show up in /dev/disk/by-id/* for those devices.

For wwn, /dev/disk/by-id/wwn-$wwn ; curtin resolves the symlink target to
obtain a kernel devname for use with sysfs.

For serial with spaces, curtin attempts to remove whitespace like udev to
find the disk under /dev/disk/by-id/ and determine a devname.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
showtrace: true
 
2
storage:
 
3
    version: 1
 
4
    config:
 
5
      - id: sda
 
6
        type: disk
 
7
        ptable: msdos
 
8
        wwn: '0x39cc071e72c64cc4'
 
9
        name: main_disk
 
10
        wipe: superblock
 
11
        grub_device: true
 
12
      - id: sda1
 
13
        type: partition
 
14
        number: 1
 
15
        size: 3GB
 
16
        device: sda
 
17
        flag: boot
 
18
      - id: sda2
 
19
        type: partition
 
20
        number: 2
 
21
        size: 1GB
 
22
        device: sda
 
23
      - id: sda1_root
 
24
        type: format
 
25
        fstype: ext4
 
26
        volume: sda1
 
27
      - id: sda2_home
 
28
        type: format
 
29
        fstype: ext4
 
30
        volume: sda2
 
31
      - id: sda1_mount
 
32
        type: mount
 
33
        path: /
 
34
        device: sda1_root
 
35
      - id: sda2_mount
 
36
        type: mount
 
37
        path: /home
 
38
        device: sda2_home
 
39
      - id: sparedisk_id
 
40
        type: disk
 
41
        wwn: '0x080258d13ea95ae5'
 
42
        name: sparedisk
 
43
        wipe: superblock
 
44
      - id: btrfs_disk_id
 
45
        type: disk
 
46
        wwn: '0x22dc58dc023c7008'
 
47
        name: btrfs_volume
 
48
        wipe: superblock
 
49
      - id: btrfs_disk_fmt_id
 
50
        type: format
 
51
        fstype: btrfs
 
52
        volume: btrfs_disk_id
 
53
      - id: btrfs_disk_mnt_id
 
54
        type: mount
 
55
        path: /btrfs
 
56
        device: btrfs_disk_fmt_id
 
57
      - id: pnum_disk
 
58
        type: disk
 
59
        wwn: '0x550a270c3a5811c5'
 
60
        name: pnum_disk
 
61
        wipe: superblock
 
62
        ptable: gpt
 
63
      - id: pnum_disk_p1
 
64
        type: partition
 
65
        number: 1
 
66
        size: 1GB
 
67
        device: pnum_disk
 
68
      - id: pnum_disk_p2
 
69
        type: partition
 
70
        number: 10
 
71
        size: 1GB
 
72
        device: pnum_disk