]> git.proxmox.com Git - ceph.git/blame - ceph/src/test/osd/osd-reuse-id.sh
bump version to 12.1.1-pve1 while rebasing patches
[ceph.git] / ceph / src / test / osd / osd-reuse-id.sh
CommitLineData
7c673cae
FG
1#! /bin/bash
2#
3# Copyright (C) 2015 Red Hat <contact@redhat.com>
4#
5# Author: Loic Dachary <loic@dachary.org>
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU Library Public License as published by
9# the Free Software Foundation; either version 2, or (at your option)
10# any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Library Public License for more details.
16#
17source $(dirname $0)/../detect-build-env-vars.sh
18source $CEPH_ROOT/qa/workunits/ceph-helpers.sh
19
20function run() {
21 local dir=$1
22 shift
23
24 export CEPH_MON="127.0.0.1:7123" # git grep '\<7123\>' : there must be only one
25 export CEPH_ARGS
26 CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
27 CEPH_ARGS+="--mon-host=$CEPH_MON "
28
29 local funcs=${@:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
30 for func in $funcs ; do
31 $func $dir || return 1
32 done
33}
34
35function TEST_reuse_id() {
36 local dir=$1
37
38 setup $dir || return 1
39 run_mon $dir a --osd_pool_default_size=1 || return 1
40 run_mgr $dir x || return 1
41 run_osd $dir 0 || return 1
42 run_osd $dir 1 || return 1
43 wait_for_clean || return 1
44 destroy_osd $dir 1 || return 1
45 run_osd $dir 1 || return 1
46}
47
48main osd-reuse-id "$@"
49
50# Local Variables:
51# compile-command: "cd ../.. ; make -j4 && test/osd/osd-reuse-id.sh"
52# End:
53