[Bug 1941889] Re: [FFE] Enhancing 'autoinstall-user-data' with s390x specific device enablement
Frank Heimes
1941889 at bugs.launchpad.net
Fri Apr 11 17:44:36 UTC 2025
** Changed in: ubuntu-z-systems
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to subiquity in Ubuntu.
https://bugs.launchpad.net/bugs/1941889
Title:
[FFE] Enhancing 'autoinstall-user-data' with s390x specific device
enablement
Status in subiquity:
Fix Committed
Status in Ubuntu on IBM z Systems:
Fix Released
Status in subiquity package in Ubuntu:
Fix Released
Status in subiquity source package in Plucky:
Fix Released
Bug description:
Request
-------
We want Subiquity to have built-in support for enabling (or disabling) s390-specifc devices, when running an automated install.
We are past FF for plucky, so I would like to request an exception.
Why Needed
----------
On s390x, CCW devices need to be enabled (using chzdev from s390-tools) before they can be used. For manual installations of Ubuntu Server, we already have a TUI screen allowing people to enable or disable specific devices. However, we didn't have support for doing such actions in automated installs. Although it is true that early-commands can be used as an alternative, proper autoinstall support provides a cleaner approach, and makes it possible to use the generated autoinstall-user-data (from a manual installation) as a template for automated installs.
This feature is a request from the partner engineering team.
What changed
------------
* Subiquity can now read from a "zdevs" autoinstall section, allowing users to specify which devices should be enabled or disabled.
* On startup, devices that have been declared as "enabled": true are automatically enabled using a call to chzdev --enable "$device".
* On startup, devices that have been declared as "enabled": false are automatically disabled using a call to chzdev --disable "$device".
Code to be merged
-----------------
https://github.com/canonical/subiquity/pull/2167
Original 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
To manage notifications about this bug go to:
https://bugs.launchpad.net/subiquity/+bug/1941889/+subscriptions
More information about the foundations-bugs
mailing list