summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/ganeti-os-disk-size.patch
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2020-07-03 00:28:57 +0200
committerMarius Bakke <marius@gnu.org>2020-07-16 21:51:43 +0200
commit72a91d74cec01bfcfcef2b62c5b327fab82950b6 (patch)
treed93d3d99a5b2fe2f06765286e72cc89e17195b98 /gnu/packages/patches/ganeti-os-disk-size.patch
parent851cc11cd1c28178110ea7db5d528b342e9bc5be (diff)
gnu: Add ganeti.
* gnu/packages/virtualization.scm (system->qemu-target, ganeti): New variables. * gnu/packages/patches/ganeti-deterministic-manual.patch, gnu/packages/patches/ganeti-disable-version-symlinks.patch, gnu/packages/patches/ganeti-drbd-compat.patch, gnu/packages/patches/ganeti-haskell-pythondir.patch, gnu/packages/patches/ganeti-os-disk-size.patch, gnu/packages/patches/ganeti-preserve-PYTHONPATH.patch, gnu/packages/patches/ganeti-shepherd-master-failover.patch, gnu/packages/patches/ganeti-shepherd-support.patch: New files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly.
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: