summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2025-02-28 17:54:22 +0100
committerSimon Rettberg2025-02-28 17:54:22 +0100
commita030e2b840ef17e19a4a79891ce810e0c92406b9 (patch)
tree504656d0f4832fbacc1ab5cf199bfca060c9caf0
parent[debug-report-bwlp] Include libvirt logs (diff)
downloadmltk-a030e2b840ef17e19a4a79891ce810e0c92406b9.tar.gz
mltk-a030e2b840ef17e19a4a79891ce810e0c92406b9.tar.xz
mltk-a030e2b840ef17e19a4a79891ce810e0c92406b9.zip
[hardware-stats] Use optimistic space calc to drop grow-rootfs dep
grow-rootfs might take a while. Use the newly introduced --optimistic option to fs_path_space so it will consider the size of the underlying device when reporting the size and available space, instead of what the fileystem itself reports. This is so that when we're still resizing the partition (which can take about 10 seconds on some systems), we will already get a somewhat correct estimate. Since this is just for display in slx-admin, nothing crocial depends on it.
-rw-r--r--core/modules/bwlp-stage4-tweaks/data/etc/systemd/system/grow-rootfs.service1
-rwxr-xr-xcore/modules/hardware-stats/data/opt/openslx/scripts/systemd-gather_hw_info2
2 files changed, 1 insertions, 2 deletions
diff --git a/core/modules/bwlp-stage4-tweaks/data/etc/systemd/system/grow-rootfs.service b/core/modules/bwlp-stage4-tweaks/data/etc/systemd/system/grow-rootfs.service
index 60985596..eb12e7a5 100644
--- a/core/modules/bwlp-stage4-tweaks/data/etc/systemd/system/grow-rootfs.service
+++ b/core/modules/bwlp-stage4-tweaks/data/etc/systemd/system/grow-rootfs.service
@@ -1,7 +1,6 @@
[Unit]
Description=Grow size of rootfs to underlying block device
DefaultDependencies=no
-Before=gather-hw-info.service
[Service]
Type=oneshot
diff --git a/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-gather_hw_info b/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-gather_hw_info
index 545cb4bc..30ae921c 100755
--- a/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-gather_hw_info
+++ b/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-gather_hw_info
@@ -154,7 +154,7 @@ echo "KVM support is $VT"
#
ID44=0
if ! slx-tools fs_path_isvolatile "/tmp/virt" ; then
- ID44_SPACE=($(slx-tools fs_path_space "/tmp/virt"))
+ ID44_SPACE=($(slx-tools fs_path_space --optimistic "/tmp/virt"))
[ -n "${ID44_SPACE[1]}" ] && ID44="$(( ${ID44_SPACE[1]} / 1024 ))"
if [ "$ID44" -eq 0 ]; then