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

« back to all changes in this revision

Viewing changes to qa/mon/bootstrap/simple_single_expand2.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
EOF
 
11
 
 
12
rm -f mm
 
13
ip=`host \`hostname\` | awk '{print $4}'`
 
14
monmaptool --create mm \
 
15
    --add a $ip:6779
 
16
 
 
17
rm -f keyring
 
18
ceph-authtool --create-keyring keyring --gen-key -n client.admin
 
19
ceph-authtool keyring --gen-key -n mon.
 
20
 
 
21
ceph-mon -c conf -i a --mkfs --monmap mm --mon-data $cwd/mon.a -k keyring
 
22
 
 
23
ceph-mon -c conf -i a --mon-data $cwd/mon.a
 
24
 
 
25
ceph -c conf -k keyring --monmap mm health
 
26
 
 
27
## expand via a local_network
 
28
ceph-mon -c conf -i d --mkfs --monmap mm --mon-data $cwd/mon.d -k keyring
 
29
ceph-mon -c conf -i d --mon-data $cwd/mon.d --public-network 127.0.0.1/32
 
30
 
 
31
while true; do
 
32
    ceph -c conf -k keyring --monmap mm health
 
33
    if ceph -c conf -k keyring --monmap mm mon stat | grep 'quorum 0,1'; then
 
34
        break
 
35
    fi
 
36
    sleep 1
 
37
done
 
38
 
 
39
killall ceph-mon
 
40
echo OK