From 6f38d7036c5e7905d4ecd949f812fcf651b02bef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Nasiadka?= <mnasiadka@gmail.com>
Date: Tue, 30 Mar 2021 15:27:06 +0200
Subject: [PATCH] CI: Use 5G loop device for ceph

Often cephadm jobs fail with:
Mar 30 13:01:21 primary bash[75459]: debug 2021-03-30T13:01:21.844+0000 7fa30431f700 -1 error: monitor data filesystem reached concerning levels of available storage space (available: 4% 1.8 GiB)

Let's check if 5G OSD helps and also print df -h output for reference

Change-Id: I6960fd0f378aea5a14a73d9228edf86fb86cac6c
---
 tests/run.yml        | 4 ++++
 tests/setup_disks.sh | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/run.yml b/tests/run.yml
index 2e51fa97d..c9501230f 100644
--- a/tests/run.yml
+++ b/tests/run.yml
@@ -309,6 +309,10 @@
         - import_role:
             name: cephadm
 
+        - name: Show free space
+          command:
+            cmd: df -h
+
         - name: Ensure required kolla config directories exist
           file:
             state: directory
diff --git a/tests/setup_disks.sh b/tests/setup_disks.sh
index 670f642e8..3238b8ee1 100644
--- a/tests/setup_disks.sh
+++ b/tests/setup_disks.sh
@@ -24,7 +24,7 @@ elif [ $1 = 'swift' ]; then
     mkfs.xfs -L d0 $free_partition
 elif [ $1 = 'ceph-lvm' ]; then
     free_device=$(losetup -f)
-    fallocate -l 10G /var/lib/ceph-osd1.img
+    fallocate -l 5G /var/lib/ceph-osd1.img
     losetup $free_device /var/lib/ceph-osd1.img
     pvcreate $free_device
     vgcreate cephvg $free_device
-- 
GitLab