The scan wrote each disk into a file named after the identifier it
reported, wwn, path or neither, and read back the groups of one such
file only. Two disks that reported different identifiers therefore
never competed on their driver group: a disk without a WWN was dropped
as soon as another disk reported one, and when the last disk scanned
reported a WWN the readback opened the WWN files alone. A direct
attached boot disk that reports no WWN thus lost to a RAID volume that
reports one, which is the case the driver groups exist to decide.
Write every disk into the file of its driver group and keep the
identifier as the sort key inside that group, ranked so that a WWN
sorts ahead of a path and a path ahead of no identifier. The driver
group now decides first for every disk, the identifier still decides
between disks of one group, and no disk is dropped from the scan.
The device filter accepted sd, hd, vd and nvme names, so the xvd names
that a Xen guest presents never entered the scan. On such a guest the
whole detection ran on an empty list and the script fell through to the
xvda fallback, which takes the first Xen disk without looking at any of
them.
Accept the xvd names in the filter. A Xen disk now goes through the
same classification, kernel search and driver sort as any other disk,
so a guest with more than one disk gets a chosen disk rather than the
first one. The fallback stays for the case where the scan still finds
nothing.
The nvme branch of the filter is anchored at the same time, so a name
only matches when it starts with nvme.
The RHEL 10 support added a second copy of the script. The copy carries
the Xen fallback and a failure log that the common script does not, and
the common script carries the Intel RSTe/VROC fallback that the copy
does not. A RHEL 10 node whose OS disk is a VROC volume therefore fell
back to /dev/sda, and every later fix to disk selection had to be
written twice to reach both.
Fold the Xen fallback and the failure log into the common script and
delete the copy. The RHEL 10 installer includes the common script, as
the other installers already do. The failure log runs only when the
including script defines msgutil_r, because the subiquity path does
not.
The driver sort put the ahci and ata_piix controllers in the same
choice group as the PMC MaxRAID and megaraid_sas RAID controllers. On a
server with both, the sort could select a RAID data volume as the OS
install disk.
Move the RAID controllers to the second choice group. The direct
attached controllers hold the likely boot volume, and a server with
only RAID volumes still selects them from the second group. The SAS
host adapters move to the third group and every other driver to a new
fourth group, so the relative order of the remaining drivers does not
change. The RHEL 10 installer includes its own copy of the script, so
both carry the change.
Recovered from the lenovobuild branch.
On a node whose OS disk is an Intel RSTe/VROC software RAID (/dev/md/Volume0_0
or /dev/md/Volume0), disk auto-detection finds nothing and getinstdisk falls
back to the hard-coded /dev/sda. Prefer the VROC volume over that default.
Only fires when no install disk was otherwise selected and the VROC device
actually exists, so it cannot mis-select over a real disk and has no effect on
non-VROC systems. The original commit hooked into a lenovobuild-specific M.2
detection block absent from master; adapted to master's fallback point.
Not lab-validated (no VROC hardware available).
Recovered from the unmerged lenovobuild branch (c6c70e5).
This configures automated installation using the subiquity installer, as
documented at
https://ubuntu.com/server/docs/install/autoinstall-quickstart and other
locations on the Internet.
Installation uses the NFS export of /install, and configures the
installer to use the nocloud-net datasource, creating a per-node
directory containing the processed template file as the user-data file,
and an empty meta-data file.
Kernel and initrd files are pulled from the casper/ directory under the
package dir.
Unnecessary elements of the kernel command line have been removed in the
subiquity installer path.
Support has been added for selecting a subiquity specific default
template, as well as an updated pre-install script and some minor POSIX
shell compliance fixes for the getinstdisk script.
nvme devices were not autosensed as install candidates.
Also, devices smaller than 128 MB are filtered out, as they are likely
to be some media or similar.