-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firmware download improvement #1616
Conversation
It seems like the patches need some squashing or reordering or something, to make each work, or at least, the first two, right? If you adapted this from #1360, don't take anything in it too seriously... It'd also be nice to have a second patch set showing an unwinding of the legacy stuff, to show how much net code we're adding for this. This particular change is more phasing-intensive than program-complexity-intensive. |
See https://github.com/ubicloud/ubicloud/commits/ben/firmware_remove_legacy/ |
Extend `safe_write_to_file` to either take the content as string or a block producing the content.
The new implementation downloads the firmware from https://github.com/ubicloud/build-edk2-firmware and stores it in `/opt/fw`. As an example, firmware with version 202402 would be located at `/opt/fw/CLOUDHV-202402.fd`. The firmware's SHA-256 digest is verified during the download.
Start to download new firmware in addition to legacy firmware during host preparation. When the legacy firmware has become obsolete, we will stop to download the legacy firmware.
`download-firmware` can be run independent of preparing an entire host to download the new firmware.
Introduce a `download_firmware` Prog that allows to download new firmware versions from the control plane. It depends on the `host/bin/download-firmware` script. A `download_firmware` method added to `VmHost` allows to download new firmware versions to vm hosts, leveraging the newly added Prog.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
although you can finish hashing out things with @byucesoy, I think it's in pretty good shape. looking forward to closing this long overdue weakness.
With this PR, we add the ability to download firmware from https://github.com/ubicloud/build-edk2-firmware and store it on the host in
/opt/fw
as files named 'CLOUDHV-version
.fd'. New hosts will start to download the firmware (in addition to legacy firmware) duringprep_host
. The PR also adds capabilities to download specified versions to hosts on demand. With this, new firmware versions can be deployed to and enabled for all hosts by performing these steps:download_firmware
on each host to download the new versionrhizome/host/lib/cloud_hypervisor.rb
to the new versionIn order to switch from legacy to new firmware, instead of step 2, we need to rename
FIRMWARE
toFIRMWARE_LEGACY
andNEW_FIRMWARE
toFIRMWARE
, to enable the new firmware for VMs.