~ubuntu-branches/ubuntu/quantal/ceph/quantal

« back to all changes in this revision

Viewing changes to qa/mon/bootstrap/single_host_multi.sh

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-07-16 09:56:24 UTC
  • mfrom: (0.3.11)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: package-import@ubuntu.com-20120716095624-azr2w4hbhei1rxmx
Tags: upstream-0.48
ImportĀ upstreamĀ versionĀ 0.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -ex
 
2
 
 
3
cwd=`pwd`
 
4
cat > conf <<EOF
 
5
[global]
 
6
 
 
7
[mon]
 
8
admin socket = 
 
9
log file = $cwd/\$name.log
 
10
debug mon = 20
 
11
debug ms = 1
 
12
mon host = 127.0.0.1:6789 127.0.0.1:6790 127.0.0.1:6791
 
13
EOF
 
14
 
 
15
rm -f mm
 
16
fsid=`uuidgen`
 
17
 
 
18
rm -f keyring
 
19
ceph-authtool --create-keyring keyring --gen-key -n client.admin
 
20
ceph-authtool keyring --gen-key -n mon.
 
21
 
 
22
ceph-mon -c conf -i a --mkfs --fsid $fsid --mon-data $cwd/mon.a -k keyring --public-addr 127.0.0.1:6789
 
23
ceph-mon -c conf -i b --mkfs --fsid $fsid --mon-data $cwd/mon.b -k keyring --public-addr 127.0.0.1:6790
 
24
ceph-mon -c conf -i c --mkfs --fsid $fsid --mon-data $cwd/mon.c -k keyring --public-addr 127.0.0.1:6791
 
25
 
 
26
ceph-mon -c conf -i a --mon-data $cwd/mon.a
 
27
ceph-mon -c conf -i b --mon-data $cwd/mon.b
 
28
ceph-mon -c conf -i c --mon-data $cwd/mon.c
 
29
 
 
30
ceph -c conf -k keyring health -m 127.0.0.1
 
31
while true; do
 
32
    if ceph -c conf -k keyring -m 127.0.0.1 mon stat | grep 'a,b,c'; then
 
33
        break
 
34
    fi
 
35
    sleep 1
 
36
done
 
37
 
 
38
killall ceph-mon
 
39
echo OK
 
 
b'\\ No newline at end of file'