Enhancing 'autoinstall-user-data' with s390x specific device enablement

Bug #1941889 reported by Frank Heimes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
New
Wishlist
Canonical Foundations Team
subiquity
New
Undecided
Unassigned

Bug Description

On s390x systems (IBM Z and LinuxONE) the s390x specific devices (or better ccw-devices) need to be enabled prior to their usage.
(This does _not_ apply to PCIe devices that the platform supports as well.)

Today this aspect of the special ccw-device enablement is not addressed in the 'autoinstall-user-data' file, which is created while doing a manual installation, but could be easily.

At the end of an interactive installation on a s390x system (or actually already right after the 'zDev' activation screen of subiquity) all s390x specific devices are known and can be obtained by:
$ lszdev --online
TYPE ID ON PERS NAMES
zfcp-host 0.0.e000 yes yes
zfcp-host 0.0.e100 yes yes
zfcp-lun 0.0.e000:0x50050763060b16b6:0x4026400300000000 yes yes sda sg0
zfcp-lun 0.0.e000:0x50050763061b16b6:0x4026400300000000 yes yes sdb sg1
zfcp-lun 0.0.e100:0x50050763060b16b6:0x4026400300000000 yes yes sdd sg3
zfcp-lun 0.0.e100:0x50050763061b16b6:0x4026400300000000 yes yes sdc sg2
qeth 0.0.c000:0.0.c001:0.0.c002 yes yes encc000
But this output can also be nicely filtered to just print the relevant device information like this:
$ lszdev --online --column ID --no-headings
0.0.e000
0.0.e100
0.0.e000:0x50050763060b16b6:0x4026400300000000
0.0.e000:0x50050763061b16b6:0x4026400300000000
0.0.e100:0x50050763060b16b6:0x4026400300000000
0.0.e100:0x50050763061b16b6:0x4026400300000000
0.0.c000:0.0.c001:0.0.c002

This is already the base for the device activation.
Enriching this information with the command that triggers the enablement ('chzdev --enable'):
$ for i in $(lszdev --online --column ID --no-headings); do echo chzdev -e $i; done
chzdev -e 0.0.e000
chzdev -e 0.0.e100
chzdev -e 0.0.e000:0x50050763060b16b6:0x4026400300000000
chzdev -e 0.0.e000:0x50050763061b16b6:0x4026400300000000
chzdev -e 0.0.e100:0x50050763060b16b6:0x4026400300000000
chzdev -e 0.0.e100:0x50050763061b16b6:0x4026400300000000
chzdev -e 0.0.c000:0.0.c001:0.0.c002
produces the list of commands that can be _directly_ added to the 'early-commands' section of the 'autoinstall-user-data' file.

Even if some devices get enabled using a different approach (for example using the boot kernels parm file or using the auto-conf option of a DPM machine), this doesn't hurt since it will be noticed and tolerated by the chzdev command:
$ for i in $(lszdev --online --column ID --no-headings); do chzdev -e $i; done
FCP device 0.0.e000 already configured
FCP device 0.0.e100 already configured
zFCP LUN 0.0.e000:0x50050763060b16b6:0x4026400300000000 already configured
zFCP LUN 0.0.e000:0x50050763061b16b6:0x4026400300000000 already configured
zFCP LUN 0.0.e100:0x50050763060b16b6:0x4026400300000000 already configured
zFCP LUN 0.0.e100:0x50050763061b16b6:0x4026400300000000 already configured
QETH device 0.0.c000:0.0.c001:0.0.c002 already configured
$ echo $?
0

Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
importance: Undecided → Wishlist
assignee: nobody → Canonical Foundations Team (canonical-foundations)
Revision history for this message
Frank Heimes (fheimes) wrote :

I think work on that has already started:
https://github.com/canonical/subiquity/pull/800

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

That branch isn't going anywhere currently though :/ Do you agree with xnox that a more sophisticated schema is needed / desired?

Revision history for this message
Frank Heimes (fheimes) wrote :
Frank Heimes (fheimes)
tags: added: zdev
Frank Heimes (fheimes)
tags: added: installation
removed: installer
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.