Skip to content

Commit

Permalink
Merge branch 'wip-rbd-mirror-cmake' into wip-mgolub-testing
Browse files Browse the repository at this point in the history
 test: fix rbd-mirror workunit test cases for cmake #10076
  • Loading branch information
Mykola Golub committed Jul 2, 2016
2 parents 96f4829 + 5a37b99 commit 3d7a915
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
29 changes: 22 additions & 7 deletions qa/workunits/rbd/rbd_mirror_helpers.sh
Expand Up @@ -64,9 +64,24 @@ CLUSTER1=cluster1
CLUSTER2=cluster2
POOL=mirror
PARENT_POOL=mirror_parent
SRC_DIR=$(readlink -f $(dirname $0)/../../../src)
TEMPDIR=

CEPH_ROOT=$(readlink -f $(dirname $0)/../../../src)
CEPH_BIN=.
CEPH_SRC=.
if [ -e CMakeCache.txt ]; then
CEPH_SRC=${CEPH_ROOT}
CEPH_ROOT=${PWD}
CEPH_BIN=./bin

# needed for ceph CLI under cmake
export LD_LIBRARY_PATH=${CEPH_ROOT}/lib:${LD_LIBRARY_PATH}
export PYTHONPATH=${PYTHONPATH}:${CEPH_SRC}/pybind
for x in ${CEPH_ROOT}/lib/cython_modules/lib* ; do
export PYTHONPATH="${PYTHONPATH}:${x}"
done
fi

# These vars facilitate running this script in an environment with
# ceph installed from packages, like teuthology. These are not defined
# by default.
Expand Down Expand Up @@ -121,9 +136,9 @@ setup()
fi

if [ -z "${RBD_MIRROR_USE_EXISTING_CLUSTER}" ]; then
cd ${SRC_DIR}
./mstart.sh ${CLUSTER1} -n
./mstart.sh ${CLUSTER2} -n
cd ${CEPH_ROOT}
${CEPH_SRC}/mstart.sh ${CLUSTER1} -n
${CEPH_SRC}/mstart.sh ${CLUSTER2} -n

ln -s $(readlink -f run/${CLUSTER1}/ceph.conf) \
${TEMPDIR}/${CLUSTER1}.conf
Expand Down Expand Up @@ -159,9 +174,9 @@ cleanup()
stop_mirror "${CLUSTER2}"

if [ -z "${RBD_MIRROR_USE_EXISTING_CLUSTER}" ]; then
cd ${SRC_DIR}
./mstop.sh ${CLUSTER1}
./mstop.sh ${CLUSTER2}
cd ${CEPH_ROOT}
${CEPH_SRC}/mstop.sh ${CLUSTER1}
${CEPH_SRC}/mstop.sh ${CLUSTER2}
else
ceph --cluster ${CLUSTER1} osd pool rm ${POOL} ${POOL} --yes-i-really-really-mean-it
ceph --cluster ${CLUSTER2} osd pool rm ${POOL} ${POOL} --yes-i-really-really-mean-it
Expand Down
4 changes: 2 additions & 2 deletions src/vstart.sh
Expand Up @@ -12,8 +12,8 @@ if [ -n "$VSTART_DEST" ]; then
CEPH_LIB=$SRC_PATH/.libs

if [ -e CMakeCache.txt ]; then
CEPH_BIN=$VSTART_DEST/../../bin
CEPH_LIB=$VSTART_DEST/../../lib
CEPH_BIN=${PWD}/bin
CEPH_LIB=${PWD}/lib
fi

CEPH_CONF_PATH=$VSTART_DEST
Expand Down

0 comments on commit 3d7a915

Please sign in to comment.