curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #01157
[Merge] ~mwhudson/curtin:fba-dasd into curtin:master
Michael Hudson-Doyle has proposed merging ~mwhudson/curtin:fba-dasd into curtin:master.
Commit message:
storage_config: handle some FBA dasd oddities
The storage_config handling of dasds only accounted for ECKD dasds. FBA dasds need different handling -- in many ways they are more like a regular disk (that can only be formatted with a DOS partition table, but this code doesn't need to handle that), but the kernel creates a magic fake partition for a FBA dasd with no DOS partition table and we want to pretend that doesn't exist.
Requested reviews:
curtin developers (curtin-dev)
For more details, see:
https://code.launchpad.net/~mwhudson/curtin/+git/curtin/+merge/394986
--
Your team curtin developers is requested to review the proposed merge of ~mwhudson/curtin:fba-dasd into curtin:master.
diff --git a/curtin/storage_config.py b/curtin/storage_config.py
index 494b142..a5eb648 100644
--- a/curtin/storage_config.py
+++ b/curtin/storage_config.py
@@ -768,17 +768,19 @@ class BlockdevParser(ProbertParser):
# set wwn, serial, and path
entry.update(uniq_ids)
- # disk entry for dasds needs device_id and check for vtoc ptable
- if devname.startswith('/dev/dasd'):
+ # disk entry for ECKD dasds needs device_id and check for vtoc
+ # ptable
+ dasd_config = self.probe_data.get('dasd', {}).get(devname, {})
+ if dasd_config.get('type', 'ECKD') == 'ECKD':
device_id = (
blockdev_data.get('ID_PATH', '').replace('ccw-', ''))
if device_id:
entry['device_id'] = device_id
# if dasd has been formatted, attrs.size is non-zero
- # formatted dasds have ptable type of 'vtoc'
- dasd_size = blockdev_data.get('attrs', {}).get('size')
- if dasd_size and dasd_size != "0":
+ # formatted ECKD dasds have ptable type of 'vtoc'
+ dasd_size = blockdev_data.get('attrs', {}).get('size', "0")
+ if dasd_size != "0":
entry['ptable'] = 'vtoc'
if 'ID_PART_TABLE_TYPE' in blockdev_data:
@@ -794,6 +796,13 @@ class BlockdevParser(ProbertParser):
entry['number'] = int(attrs['partition'])
parent_devname = self.partition_parent_devname(blockdev_data)
parent_blockdev = self.blockdev_data[parent_devname]
+ if 'ID_PART_TABLE_TYPE' not in parent_blockdev:
+ # Exclude the fake partition that the kernel creates
+ # for an otherwise unformatted FBA dasd.
+ dasds = self.probe_data.get('dasd', {})
+ dasd_config = dasds.get(parent_devname, {})
+ if dasd_config.get('type', 'ECKD') == 'FBA':
+ return None
ptable = parent_blockdev.get('partitiontable')
if ptable:
part = None
Follow ups
-
[Merge] ~mwhudson/curtin:fba-dasd into curtin:master
From: Server Team CI bot, 2020-12-15
-
Re: [Merge] ~mwhudson/curtin:fba-dasd into curtin:master
From: Server Team CI bot, 2020-12-15
-
[Merge] ~mwhudson/curtin:fba-dasd into curtin:master
From: Michael Hudson-Doyle, 2020-12-15
-
Re: [Merge] ~mwhudson/curtin:fba-dasd into curtin:master
From: Server Team CI bot, 2020-12-15
-
[Merge] ~mwhudson/curtin:fba-dasd into curtin:master
From: Michael Hudson-Doyle, 2020-12-15
-
[Merge] ~mwhudson/curtin:fba-dasd into curtin:master
From: Michael Hudson-Doyle, 2020-12-14
-
[Merge] ~mwhudson/curtin:fba-dasd into curtin:master
From: Michael Hudson-Doyle, 2020-12-14
-
[Merge] ~mwhudson/curtin:fba-dasd into curtin:master
From: Server Team CI bot, 2020-12-14
-
Invalid Commit Message
From: Server Team CI bot, 2020-12-14
-
[Merge] ~mwhudson/curtin:fba-dasd into curtin:master
From: Michael Hudson-Doyle, 2020-12-14
-
Re: [Merge] ~mwhudson/curtin:fba-dasd into curtin:master
From: Paride Legovini, 2020-12-10
-
Re: [Merge] ~mwhudson/curtin:fba-dasd into curtin:master
From: Server Team CI bot, 2020-12-08
-
Re: [Merge] ~mwhudson/curtin:fba-dasd into curtin:master
From: Server Team CI bot, 2020-12-07