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

« back to all changes in this revision

Viewing changes to qa/mon/bootstrap/initial_members.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
[mon]
 
6
admin socket = 
 
7
log file = $cwd/\$name.log
 
8
debug mon = 20
 
9
debug ms = 1
 
10
mon initial members = a,b,d
 
11
EOF
 
12
 
 
13
rm -f mm
 
14
monmaptool --create mm \
 
15
    --add a 127.0.0.1:6789 \
 
16
    --add b 127.0.0.1:6790 \
 
17
    --add c 127.0.0.1:6791
 
18
 
 
19
rm -f keyring
 
20
ceph-authtool --create-keyring keyring --gen-key -n client.admin
 
21
ceph-authtool keyring --gen-key -n mon.
 
22
 
 
23
ceph-mon -c conf -i a --mkfs --monmap mm --mon-data $cwd/mon.a -k keyring
 
24
ceph-mon -c conf -i b --mkfs --monmap mm --mon-data $cwd/mon.b -k keyring
 
25
ceph-mon -c conf -i c --mkfs --monmap mm --mon-data $cwd/mon.c -k keyring
 
26
 
 
27
ceph-mon -c conf -i a --mon-data $cwd/mon.a
 
28
ceph-mon -c conf -i c --mon-data $cwd/mon.b
 
29
ceph-mon -c conf -i b --mon-data $cwd/mon.c
 
30
 
 
31
ceph -c conf -k keyring --monmap mm health
 
32
 
 
33
ceph -c conf -k keyring --monmap mm health
 
34
if ceph -c conf -k keyring --monmap mm mon stat | grep a= | grep b= | grep c= ; then
 
35
    break
 
36
fi
 
37
 
 
38
killall ceph-mon
 
39
echo OK