rancher / elemental-toolkit

:snowflake: The toolkit to build, ship and maintain cloud-init driven Linux derivatives based on container images
https://rancher.github.io/elemental-toolkit/docs/
Apache License 2.0
282 stars 49 forks source link

Before upgrading run a free disk space sanity check #2103

Open davidcassany opened 1 month ago

davidcassany commented 1 month ago

We should check there is certain amount of free space before running an upgrade action. This is helpful to prevent weird unexpected and hard to handle issues due to running out of disk space. Specially sensitive if someone is upgrading and using big derived images without sizing the partitions accordingly.

Bonus if the check is based on the actual size of the current system (N times current OS size) rather than based on an arbitrary number. Or even consider if this check could be provided by the OCI image size metadata of the OS to upgrade.