File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44#
55
66# fail hard and fast even on pipelines
7- set -o pipefail
7+ set -eo pipefail
88
99# set debug based on envvar
1010[[ $DEBUG ]] && set -x
@@ -30,38 +30,6 @@ until confd -onetime -node $ETCD -config-file /app/confd.toml >/dev/null 2>/dev/
3030 sleep $(( $ETCD_TTL / 2 )) # sleep for half the TTL
3131done
3232
33- # set the number of placement groups for the default pools - they come up with defaults that are too low
34- if ! etcdctl --no-sync -C $ETCD get /deis/store/defaultPoolsConfigured > /dev/null 2>&1 ; then
35- echo " store-gateway: setting pg_num values for default pools..."
36- function set_until_success {
37- ceph osd pool set $1 pg_num $2 2> /dev/null
38- PG_SET=$?
39- until [[ $PG_SET -eq 0 ]]; do
40- sleep 5
41- ceph osd pool set $1 pg_num $2 2> /dev/null
42- PG_SET=$?
43- done
44-
45- ceph osd pool set $1 pgp_num $2 2> /dev/null
46- PGP_SET=$?
47- until [[ $PGP_SET -eq 0 ]]; do
48- sleep 5
49- ceph osd pool set $1 pgp_num $2 2> /dev/null
50- PGP_SET=$?
51- done
52- }
53-
54- PG_NUM=` etcdctl --no-sync -C $ETCD get /deis/store/pgNum`
55-
56- set_until_success data ${PG_NUM}
57- set_until_success rbd ${PG_NUM}
58- set_until_success metadata ${PG_NUM}
59-
60- etcdctl --no-sync -C $ETCD set /deis/store/defaultPoolsConfigured youBetcha > /dev/null
61- fi
62-
63- set -e
64-
6533# we generate a key for the gateway. we can do this because we have the client key templated out
6634if ! etcdctl --no-sync -C $ETCD get /deis/store/gatewayKeyring > /dev/null 2>&1 ; then
6735 ceph-authtool --create-keyring /etc/ceph/ceph.client.radosgw.keyring
You can’t perform that action at this time.
0 commit comments