From: J. Eric Ivancich Date: Wed, 11 May 2022 00:07:38 +0000 (-0400) Subject: rgw: allow vstart.sh to start an RGW with Arrow Flight X-Git-Tag: v18.1.0~508^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b4b8b57d2c7bdcd8a3530e60878e6deaf12a9581;p=ceph.git rgw: allow vstart.sh to start an RGW with Arrow Flight Adds "--rgw_arrow_flight" as a command-line option to vstart.sh that will enable arrow_flight on the first RGW created, but not for subsequent RGWs (so as not to create port conflicts). It adds a frontend to ceph.conf and as an option to the command-line that starts the radosgw daemon. Signed-off-by: J. Eric Ivancich --- diff --git a/src/vstart.sh b/src/vstart.sh index e18184ed1e89..6fcb3f919a99 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -224,6 +224,7 @@ options: -o config add extra config parameters to all sections --rgw_port specify ceph rgw http listen port --rgw_frontend specify the rgw frontend configuration + --rgw_arrow_flight start arrow flight frontend --rgw_compression specify the rgw compression plugin --seastore use seastore as crimson osd backend -b, --bluestore use bluestore as the osd objectstore backend (default) @@ -415,6 +416,9 @@ case $1 in rgw_frontend=$2 shift ;; + --rgw_arrow_flight) + rgw_flight_frontend="yes" + ;; --rgw_compression) rgw_compression=$2 shift @@ -626,13 +630,17 @@ do_rgw_conf() { # setup each rgw on a sequential port, starting at $CEPH_RGW_PORT. # individual rgw's ids will be their ports. current_port=$CEPH_RGW_PORT + # allow only first rgw to start arrow_flight server/port + local flight_conf=$rgw_flight_frontend for n in $(seq 1 $CEPH_NUM_RGW); do wconf << EOF [client.rgw.${current_port}] - rgw frontends = $rgw_frontend port=${current_port} + rgw frontends = $rgw_frontend port=${current_port}${flight_conf:+,arrow_flight} admin socket = ${CEPH_OUT_DIR}/radosgw.${current_port}.asok + debug rgw_flight = 20 EOF current_port=$((current_port + 1)) + unset flight_conf done } @@ -1651,6 +1659,11 @@ do_rgw() $CEPH_BIN/radosgw-admin zone placement modify -c $conf_fn --rgw-zone=default --placement-id=default-placement --compression=$rgw_compression > /dev/null fi fi + + if [ -n "$rgw_flight_frontend" ] ;then + debug echo "starting arrow_flight frontend on first rgw" + fi + # Start server if [ "$cephadm" -gt 0 ]; then ceph_adm orch apply rgw rgwTest @@ -1673,6 +1686,8 @@ do_rgw() [ $CEPH_RGW_PORT_NUM -lt 1024 ] && RGWSUDO=sudo current_port=$CEPH_RGW_PORT + # allow only first rgw to start arrow_flight server/port + local flight_conf=$rgw_flight_frontend for n in $(seq 1 $CEPH_NUM_RGW); do rgw_name="client.rgw.${current_port}" @@ -1690,12 +1705,13 @@ do_rgw() --rgw_luarocks_location=${CEPH_OUT_DIR}/luarocks \ ${RGWDEBUG} \ -n ${rgw_name} \ - "--rgw_frontends=${rgw_frontend} port=${current_port}${CEPH_RGW_HTTPS}" + "--rgw_frontends=${rgw_frontend} port=${current_port}${CEPH_RGW_HTTPS}${flight_conf:+,arrow_flight}" i=$(($i + 1)) [ $i -eq $CEPH_NUM_RGW ] && break current_port=$((current_port+1)) + unset flight_conf done } if [ "$CEPH_NUM_RGW" -gt 0 ]; then