Skip to content

Commit

Permalink
Use partuuid when mounting disks and identifying the disk device for …
Browse files Browse the repository at this point in the history
…ignition mount disk test

Changed from by-partlabel to by-partuuid by assigning a random uuid. On s390x, the by-partlabel string
is incorrect because GPT partitioning uses little endian by default and s390x is big endian. Refer
to: coreos/ignition-dracut#100.
  • Loading branch information
Prashanth684 committed Feb 26, 2020
1 parent 84721fa commit f2ca251
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions kola/tests/ignition/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ var (
{
"label": "CONTR",
"size": 1048576,
"start": 0
"start": 0,
"guid": "63194b49-e4b7-43f9-9a8b-df0fd8279bb7"
}
]
},
Expand All @@ -50,7 +51,8 @@ var (
{
"label": "LOG",
"size": 1048576,
"start": 0
"start": 0,
"guid": "6385b84e-2c7b-4488-a870-667c565e01a8"
}
]
}
Expand All @@ -59,15 +61,15 @@ var (
{
"name": "CONTR",
"mount": {
"device": "/dev/disk/by-partlabel/CONTR",
"device": "/dev/disk/by-partuuid/63194b49-e4b7-43f9-9a8b-df0fd8279bb7",
"format": "xfs",
"wipeFilesystem": true
}
},
{
"name": "LOG",
"mount": {
"device": "/dev/disk/by-partlabel/LOG",
"device": "/dev/disk/by-partuuid/6385b84e-2c7b-4488-a870-667c565e01a8",
"format": "xfs",
"wipeFilesystem": true
}
Expand Down Expand Up @@ -97,12 +99,12 @@ var (
{
"name": "var-lib-containers.mount",
"enabled": true,
"contents": "[Mount]\nWhat=/dev/disk/by-partlabel/CONTR\nWhere=/var/lib/containers\nType=xfs\nOptions=defaults\n[Install]\nWantedBy=local-fs.target"
"contents": "[Mount]\nWhat=/dev/disk/by-partuuid/63194b49-e4b7-43f9-9a8b-df0fd8279bb7\nWhere=/var/lib/containers\nType=xfs\nOptions=defaults\n[Install]\nWantedBy=local-fs.target"
},
{
"name": "var-log.mount",
"enabled": true,
"contents": "[Mount]\nWhat=/dev/disk/by-partlabel/LOG\nWhere=/var/log\nType=xfs\nOptions=defaults\n[Install]\nWantedBy=local-fs.target"
"contents": "[Mount]\nWhat=/dev/disk/by-partuuid/6385b84e-2c7b-4488-a870-667c565e01a8\nWhere=/var/log\nType=xfs\nOptions=defaults\n[Install]\nWantedBy=local-fs.target"
}
]
}
Expand All @@ -119,7 +121,8 @@ var (
"label": "CONTR",
"sizeMiB": 512,
"startMiB": 0,
"wipePartitionEntry": true
"wipePartitionEntry": true,
"guid": "63194b49-e4b7-43f9-9a8b-df0fd8279bb7"
}
]
},
Expand All @@ -131,22 +134,23 @@ var (
"label": "LOG",
"sizeMiB": 512,
"startMiB": 0,
"wipePartitionEntry": true
"wipePartitionEntry": true,
"guid": "6385b84e-2c7b-4488-a870-667c565e01a8"
}
]
}
],
"filesystems": [
{
"path": "/var/lib/containers",
"device": "/dev/disk/by-partlabel/CONTR",
"device": "/dev/disk/by-partuuid/63194b49-e4b7-43f9-9a8b-df0fd8279bb7",
"format": "xfs",
"label": "CONTR",
"wipeFilesystem": true
},
{
"path": "/var/log",
"device": "/dev/disk/by-partlabel/LOG",
"device": "/dev/disk/by-partuuid/6385b84e-2c7b-4488-a870-667c565e01a8",
"format": "xfs",
"label": "LOG",
"wipeFilesystem": true
Expand All @@ -172,12 +176,12 @@ var (
{
"name": "var-lib-containers.mount",
"enabled": true,
"contents": "[Mount]\nWhat=/dev/disk/by-partlabel/CONTR\nWhere=/var/lib/containers\nType=xfs\nOptions=defaults\n[Install]\nWantedBy=local-fs.target"
"contents": "[Mount]\nWhat=/dev/disk/by-partuuid/63194b49-e4b7-43f9-9a8b-df0fd8279bb7\nWhere=/var/lib/containers\nType=xfs\nOptions=defaults\n[Install]\nWantedBy=local-fs.target"
},
{
"name": "var-log.mount",
"enabled": true,
"contents": "[Mount]\nWhat=/dev/disk/by-partlabel/LOG\nWhere=/var/log\nType=xfs\nOptions=defaults\n[Install]\nWantedBy=local-fs.target"
"contents": "[Mount]\nWhat=/dev/disk/by-partuuid/6385b84e-2c7b-4488-a870-667c565e01a8\nWhere=/var/log\nType=xfs\nOptions=defaults\n[Install]\nWantedBy=local-fs.target"
}]
}
}`)
Expand Down

0 comments on commit f2ca251

Please sign in to comment.