]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/rbd: increase image size of encrypted disks 38983/head
authorOr Ozeri <oro@il.ibm.com>
Wed, 20 Jan 2021 10:59:06 +0000 (12:59 +0200)
committerOr Ozeri <oro@il.ibm.com>
Wed, 20 Jan 2021 14:08:17 +0000 (16:08 +0200)
This commit increases the rbd image sizes in used by qemu to support the storage requirements of the luks encryption header.

Signed-off-by: Or Ozeri <oro@il.ibm.com>
qa/tasks/qemu.py

index 5235c229b2f6656e6a58e78fd7a9b976491d20f9..673ccdb144f943e5312362db3484e71ae21ecdac 100644 (file)
@@ -20,6 +20,7 @@ log = logging.getLogger(__name__)
 DEFAULT_NUM_DISKS = 2
 DEFAULT_IMAGE_URL = 'http://download.ceph.com/qa/ubuntu-12.04.qcow2'
 DEFAULT_IMAGE_SIZE = 10240 # in megabytes
+ENCRYPTION_HEADER_SIZE = 16 # in megabytes
 DEFAULT_CPUS = 1
 DEFAULT_MEM = 4096 # in megabytes
 
@@ -81,11 +82,14 @@ def create_images(ctx, config, managers):
                     'image_url' in disk and
                     disk['encryption_format'] == 'none'):
                 continue
+            image_size = disk['image_size']
+            if disk['encryption_format'] != 'none':
+                image_size += ENCRYPTION_HEADER_SIZE
             create_config = {
                 client: {
                     'image_name': disk['image_name'],
                     'image_format': 2,
-                    'image_size': disk['image_size'],
+                    'image_size': image_size,
                     'encryption_format': disk['encryption_format'],
                     }
                 }