From b6cb908e0b7e215def9760f480149fd7f1b881db Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Tue, 15 Oct 2024 11:29:53 -0400 Subject: [PATCH 1/2] rgw: document mstart.sh and related scripts Signed-off-by: Casey Bodley --- src/mrgw.sh | 2 ++ src/mrun | 2 ++ src/mstart.sh | 28 ++++++++++++++++++++++++++++ src/mstop.sh | 2 ++ 4 files changed, 34 insertions(+) diff --git a/src/mrgw.sh b/src/mrgw.sh index 05739bf015ebc..86bef336867de 100755 --- a/src/mrgw.sh +++ b/src/mrgw.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +# Start/restart a radosgw instance on the given mstart.sh cluster. + set -e rgw_frontend=${RGW_FRONTEND:-"beast"} diff --git a/src/mrun b/src/mrun index a85221800218b..df7e3542b93a5 100755 --- a/src/mrun +++ b/src/mrun @@ -1,5 +1,7 @@ #!/usr/bin/env bash +# Run a ceph command against the given mstart.sh cluster. + [ $# -lt 2 ] && echo "usage: $0 [params...]" && exit 1 root=`dirname $0` diff --git a/src/mstart.sh b/src/mstart.sh index 34b57e1761125..0c512ca9eb8c3 100755 --- a/src/mstart.sh +++ b/src/mstart.sh @@ -1,5 +1,33 @@ #!/bin/sh +# Deploy a vstart.sh cluster in a named subdirectory. This makes it possible to +# start multiple clusters in different subdirectories. See mstop.sh for cleanup. +# +# Example: +# +# ~/ceph/build $ MON=1 OSD=1 RGW=1 MDS=0 MGR=0 ../src/mstart.sh c1 -n -d +# ~/ceph/build $ MON=1 OSD=1 RGW=1 MDS=0 MGR=0 ../src/mstart.sh c2 -n -d +# +# ~/ceph/build $ ls run +# c1 c2 +# ~/ceph/build $ ls run/c1 +# asok ceph.conf dev keyring out +# +# ~/ceph/build $ ../src/mrun c1 radosgw-admin user list +# [ +# "56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234", +# "testx$9876543210abcdef0123456789abcdef0123456789abcdef0123456789abcdef", +# "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef", +# "testacct1user", +# "test", +# "testacct2root", +# "testacct1root", +# "testid" +# ] +# +# ~/ceph/build $ ../src/mstop.sh c1 +# ~/ceph/build $ ../src/mstop.sh c2 + usage="usage: $0 [vstart options]..\n" usage_exit() { diff --git a/src/mstop.sh b/src/mstop.sh index 702d1765941e5..eec0ca02e42ae 100755 --- a/src/mstop.sh +++ b/src/mstop.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +# Stop a named cluster started by mstart.sh + set -e script_root=`dirname $0` From c78d1ba668d1ad2364db39ffa07be2f8a3d61a48 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Tue, 15 Oct 2024 11:30:37 -0400 Subject: [PATCH 2/2] rgw: add mstart-related scripts to CODEOWNERS and labeler Signed-off-by: Casey Bodley --- .github/CODEOWNERS | 4 ++++ .github/labeler.yml | 3 +++ 2 files changed, 7 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d8d18693efcf6..3e81444ea3d0b 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -164,6 +164,10 @@ README* @ceph/doc-writers /src/cls/rgw_gc @ceph/rgw /src/cls/user @ceph/rgw /src/cls/version @ceph/rgw +/src/mrgw.sh @ceph/rgw +/src/mrun @ceph/rgw +/src/mstart.sh @ceph/rgw +/src/mstop.sh @ceph/rgw /src/rgw @ceph/rgw /src/s3select @ceph/rgw /src/spawn @ceph/rgw diff --git a/.github/labeler.yml b/.github/labeler.yml index 9f2ed1e479019..cc32be3850126 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -288,6 +288,9 @@ rgw: - src/cls/rgw_gc/** - src/cls/timeindex/** - src/mrgw.sh + - src/mrun + - src/mstart.sh + - src/mstop.sh - src/rgw/** - src/test/cls_rgw/** - src/test/librgw_*