summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2015-10-19 16:49:35 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2015-10-19 16:49:35 +0200
commitc530c9c322d9475fbbeccce834ba06083d7ae36a (patch)
tree1cde4f9c48ad8ef342190e6566974ddae2b4cc05 /tests
parent9c5337ca3eb2bc48599c54ce4699def00a912e3e (diff)
parent6d3a9bf03ac538f282a4951e0409a293aa3b45a1 (diff)
downloadnextcloud-server-c530c9c322d9475fbbeccce834ba06083d7ae36a.tar.gz
nextcloud-server-c530c9c322d9475fbbeccce834ba06083d7ae36a.zip
Merge pull request #19864 from owncloud/fix-objectstore-btrfs-host
skip btrfs hack for objectstore docker container on btrfs host
Diffstat (limited to 'tests')
-rwxr-xr-xtests/objectstore/entrypoint.sh23
1 files changed, 13 insertions, 10 deletions
diff --git a/tests/objectstore/entrypoint.sh b/tests/objectstore/entrypoint.sh
index b490d760a2f..6dd6ef23fb6 100755
--- a/tests/objectstore/entrypoint.sh
+++ b/tests/objectstore/entrypoint.sh
@@ -136,15 +136,18 @@ ceph osd pool set rbd size 1
if [ ! -e /var/lib/ceph/osd/${CLUSTER}-0/keyring ]; then
# bootstrap OSD
mkdir -p /var/lib/ceph/osd/${CLUSTER}-0
- # HACK create btrfs loopback device
- echo "creating osd storage image"
- dd if=/dev/zero of=/tmp/osddata bs=1M count=${OSD_SIZE}
- mkfs.btrfs /tmp/osddata
- echo "mounting via loopback"
- mount -o loop /tmp/osddata /var/lib/ceph/osd/${CLUSTER}-0
- echo "now mounted:"
- mount
- # end HACK
+ # skip btrfs HACK if btrfs is already in place
+ if [ "$(stat -f /var/lib/ceph/osd/${CLUSTER}-0 2>/dev/null | grep btrfs | wc -l)" == "0" ]; then
+ # HACK create btrfs loopback device
+ echo "creating osd storage image"
+ dd if=/dev/zero of=/tmp/osddata bs=1M count=${OSD_SIZE}
+ mkfs.btrfs /tmp/osddata
+ echo "mounting via loopback"
+ mount -o loop /tmp/osddata /var/lib/ceph/osd/${CLUSTER}-0
+ echo "now mounted:"
+ mount
+ # end HACK
+ fi
echo "creating osd"
ceph osd create
echo "creating osd filesystem"
@@ -268,4 +271,4 @@ fi
#########
echo "watching ceph"
-exec ceph -w \ No newline at end of file
+exec ceph -w