If the networking didn't come up well, the 'functions' routines would not be able to handle.
Switch to using apiclient which is designed specifically to handle less cooperative
initial network conditions.
If SPCR comes up blank, see if there is one and exactly one serial with carrier detect
Failing that, give DMI a chance to indicate a preference, for now just SuperMicro, since they have the most
inconsistent carrier detect behavior
but almost always consider ttyS1 to be the answer.
This allows the FS to just live, uncompressed, in cache.
This is generally a bad idea, however:
- In a hypothetically super-tuned diskless image, the lack of double-cache can offset the lack of compression
- The image will have supreme read performance
- It will have the most deterministic memory behavior
By default, the squashfs file was being cached as well as the contents after extraction.
This is superfluous pressure on the cache of the OS.
However, it does help keep the image afloat through 'confignet', so
leave it on until onboot completes, then reclaim cache and disable further caching.
Rather than treat both as the same, since untethered has everything up front anyway, go ahead and extract the filesystem.
This makes the mount look more straightforward and makes it so deletion of files from
the image also frees ram.
The changes for getinstalldisk assumed functionality
in ESXi9. Target older
functional level for our purposes.
Also expand the fallback to cover cases where the disk interrogation fails.
The stock Ubuntu approach was inadequate. It would DHCP out every nic and take the fastest result, and no going back.
Now the CDC nic can frequently win that race.
First, rmmod cdc_ether, as a scenario that is completely right out.
But beyond that, let Ubuntu have one shot at multi-nic bringup. Beyond that, maintain a list of all link-up devices.
If the check should fail, then start doing one nic at a time, cycling through them.
Also, the openssl s_client timeout is painfully slow, use subshell and kill to speed up things.
When network configuration is applied, wait until we
can reach the deployment server again before exiting.
This should make us more robust against various potential delays after
changing the nature of network interfaces.
Provide a totally 'clortho' and 'copernicus' free behavior.
This allows some flows to skip the cpio addons to go straight to python.
Some scenarios demand the utilities (initramfs) and others are more awkward with the utilities,
so we enable both.
Add missing pre.d directory to let user know they can use such scripts
Preserve console directievs from kernelargs into installed system
Retry umount during image2disk, if processes have the filesystem busy.
Fix DNS behavior during post phase of installtodisk
Invoke confignet properly during firstboot to set up additional interfaces.
Have sshd run during the install from '/sysroot', for convenience
Fix some cosmetic error output for setupssh