From cd2d0341a79395f539412c6cb1e50903156b7f00 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 29 Aug 2016 15:16:28 -0400 Subject: [PATCH] Fix k8s builder to use the declared volume size Fixes #1773 --- buildman/manager/executor.py | 2 ++ buildman/qemu-coreos/start.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/buildman/manager/executor.py b/buildman/manager/executor.py index a3e3c24c3..b1a191c89 100644 --- a/buildman/manager/executor.py +++ b/buildman/manager/executor.py @@ -324,6 +324,7 @@ class KubernetesExecutor(BuilderExecutor): def _job_resource(self, build_uuid, user_data, coreos_channel='stable'): vm_memory_limit = self.executor_config.get('VM_MEMORY_LIMIT', '8G') + vm_volume_size = self.executor_config.get('VOLUME_SIZE', '32G') # Max values for this container container_limits = { @@ -375,6 +376,7 @@ class KubernetesExecutor(BuilderExecutor): 'env': [ {'name': 'USERDATA', 'value': user_data}, {'name': 'VM_MEMORY', 'value': vm_memory_limit}, + {'name': 'VM_VOLUME_SIZE', 'value': vm_volume_size}, ], 'limits' : container_limits, 'requests' : container_requests, diff --git a/buildman/qemu-coreos/start.sh b/buildman/qemu-coreos/start.sh index b49c4f6e5..e95ea5009 100644 --- a/buildman/qemu-coreos/start.sh +++ b/buildman/qemu-coreos/start.sh @@ -7,6 +7,8 @@ set -o nounset mkdir -p /userdata/openstack/latest echo "$USERDATA" > /userdata/openstack/latest/user_data +qemu-img resize ./coreos_production_qemu_image.img "${VM_VOLUME_SIZE}" + qemu-system-x86_64 \ -enable-kvm \ -cpu host \