From 9ebd65be32357a0554e4e5525037e7f1803077f8 Mon Sep 17 00:00:00 2001 From: Ivan Kolodyazhny Date: Sun, 8 Mar 2015 23:51:55 +0200 Subject: [PATCH] Increase Swift disk size up to 2GB if Glance is enabled Minimum Cinder volume size is 1GB so if Swift backend for Glance is only 1GB we can not upload volume to image. Change-Id: Ifd4cb42bf96367ff3ada0c065fa258fa5ba635d9 --- lib/swift | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/swift b/lib/swift index 8a96615d01..5005ba0e10 100644 --- a/lib/swift +++ b/lib/swift @@ -64,11 +64,19 @@ if is_service_enabled s-proxy && is_service_enabled swift3; then S3_SERVICE_PORT=${S3_SERVICE_PORT:-8080} fi -# DevStack will create a loop-back disk formatted as XFS to store the -# swift data. Set ``SWIFT_LOOPBACK_DISK_SIZE`` to the disk size in -# kilobytes. -# Default is 1 gigabyte. -SWIFT_LOOPBACK_DISK_SIZE_DEFAULT=1G +if is_service_enabled g-api; then + # Minimum Cinder volume size is 1G so if Swift backend for Glance is + # only 1G we can not upload volume to image. + # Increase Swift disk size up to 2G + SWIFT_LOOPBACK_DISK_SIZE_DEFAULT=2G +else + # DevStack will create a loop-back disk formatted as XFS to store the + # swift data. Set ``SWIFT_LOOPBACK_DISK_SIZE`` to the disk size in + # kilobytes. + # Default is 1 gigabyte. + SWIFT_LOOPBACK_DISK_SIZE_DEFAULT=1G +fi + # if tempest enabled the default size is 6 Gigabyte. if is_service_enabled tempest; then SWIFT_LOOPBACK_DISK_SIZE_DEFAULT=${SWIFT_LOOPBACK_DISK_SIZE:-6G}