aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/ganeti-os-disk-size.patch
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches/ganeti-os-disk-size.patch')
-rw-r--r--gnu/packages/patches/ganeti-os-disk-size.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/gnu/packages/patches/ganeti-os-disk-size.patch b/gnu/packages/patches/ganeti-os-disk-size.patch
new file mode 100644
index 0000000000..16b1d7615c
--- /dev/null
+++ b/gnu/packages/patches/ganeti-os-disk-size.patch
@@ -0,0 +1,17 @@
+This exposes information about disk sizes to OS install scripts. instance-guix
+uses this if available to determine the size of the VM image.
+
+Submitted upstream:
+https://github.com/ganeti/ganeti/pull/1503
+
+diff --git a/lib/backend.py b/lib/backend.py
+--- a/lib/backend.py
++++ b/lib/backend.py
+@@ -4305,6 +4305,7 @@ def OSEnvironment(instance, inst_os, debug=0):
+ uri = _CalculateDeviceURI(instance, disk, real_disk)
+ result["DISK_%d_ACCESS" % idx] = disk.mode
+ result["DISK_%d_UUID" % idx] = disk.uuid
++ result["DISK_%d_SIZE" % idx] = str(disk.size)
+ if real_disk.dev_path:
+ result["DISK_%d_PATH" % idx] = real_disk.dev_path
+ if uri: