From 39fa911663c35993c184d76f70997588b50acef5 Mon Sep 17 00:00:00 2001 From: Mark Kogan Date: Wed, 27 Sep 2017 14:39:32 +0300 Subject: [PATCH] rgw: update vstart.sh to support ssl port notation : '--rgw_port 443s' reference: https://github.com/civetweb/civetweb/blob/master/docs/OpenSSL.md Fixes: http://tracker.ceph.com/issues/21151 Signed-off-by: Mark Kogan --- src/vstart.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/vstart.sh b/src/vstart.sh index 83312230c10..5b5fa610614 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -1004,14 +1004,21 @@ do_rgw() RGWDEBUG="--debug-rgw=20" fi + local CEPH_RGW_PORT_NUM="${CEPH_RGW_PORT}" + local CEPH_RGW_HTTPS="${CEPH_RGW_PORT: -1}" + if [[ "${CEPH_RGW_HTTPS}" = "s" ]]; then + CEPH_RGW_PORT_NUM="${CEPH_RGW_PORT::-1}" + else + CEPH_RGW_HTTPS="" + fi RGWSUDO= - [ $CEPH_RGW_PORT -lt 1024 ] && RGWSUDO=sudo + [ $CEPH_RGW_PORT_NUM -lt 1024 ] && RGWSUDO=sudo n=$(($CEPH_NUM_RGW - 1)) i=0 for rgw in j k l m n o p q r s t u v; do - echo start rgw on http://localhost:$((CEPH_RGW_PORT + i)) - run 'rgw' $RGWSUDO $CEPH_BIN/radosgw -c $conf_fn --log-file=${CEPH_OUT_DIR}/rgw.$rgw.log ${RGWDEBUG} --debug-ms=1 -n client.rgw "--rgw_frontends=${rgw_frontend} port=$((CEPH_RGW_PORT + i))" - i=$(($i + 1)) + echo start rgw on http${CEPH_RGW_HTTPS}://localhost:$((CEPH_RGW_PORT_NUM + i)) + run 'rgw' $RGWSUDO $CEPH_BIN/radosgw -c $conf_fn --log-file=${CEPH_OUT_DIR}/rgw.$rgw.log ${RGWDEBUG} --debug-ms=1 -n client.rgw "--rgw_frontends=${rgw_frontend} port=$((CEPH_RGW_PORT_NUM + i))${CEPH_RGW_HTTPS}" + i=$(($i + 1)) [ $i -eq $CEPH_NUM_RGW ] && break done } -- 2.39.5