-
Notifications
You must be signed in to change notification settings - Fork 128
Description
When preparing the host for the metal3-dev-env the virtual machine base images are rather big, which leads to the current process being quite fragile to network or process interruptions. This might lead to errors in the configuration since the integrity checks in iamge_prepull.sh are quite loose.
The first problem raises from checking if the image exists
if [[ ! -f "${IMAGE_NAME}" ]]; then
This only cares if the image exists not about the content at all
What does not help the situation is the check of checksum, since if the checksum does not exist it is generated from the file and file might be corrupt at this point already.
Finally I think the user experience could be elevated by adding a progress bar to this slow downloads so the user is not confused about what is happening with for example this options to wget: --show-progress --progress=bar:force:noscroll
Note: This is quite new option for wget so might break on some older machines so might be best to consider a fallback in case wget does not recognize the options
An improvement suggestion would be to download the checksum directly from artifactory each time and comparing with the one of the actual file
This is normally done by appending the type of checksum you want to the end of the filepath so something like this:
https://artifactory.nordix.org/ui/native/metal3/images/k8s_v1.29.0/UBUNTU_22.04_NODE_IMAGE_K8S_v1.29.0.qcow2.sha256
This did not work even though I can see in the Artifactory UI that the checksum is generated, might be related to repository settings could be investigated further.
Otherwise this could most likely also be achieved with some wget options
Metadata
Metadata
Assignees
Labels
Type
Projects
Status