summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2025-01-09 14:59:25 +0100
committerGitHub <noreply@github.com>2025-01-09 14:59:25 +0100
commit8c39261017670319d4f9cba09a4377878c626e6e (patch)
treedc11ad0a018454da4351ab488625c526bb37466a /src
parentMerge pull request #60891 from xxhdx1985126/wip-seastore-fadvise-backfill (diff)
parentvstart.sh: add support for launching the ceph-exporter daemon (diff)
downloadceph-8c39261017670319d4f9cba09a4377878c626e6e.tar.xz
ceph-8c39261017670319d4f9cba09a4377878c626e6e.zip
Merge pull request #60623 from piyushagarwal1411/ceph-exporter
vstart: add ceph-exporter support Reviewed-by: Juan Miguel Olmo <jolmomar@redhat.com> Reviewed-by: Ernesto Puerta <epuertat@redhat.com> Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com> Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/vstart.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/vstart.sh b/src/vstart.sh
index b445e250a00..a992f33c856 100755
--- a/src/vstart.sh
+++ b/src/vstart.sh
@@ -159,6 +159,7 @@ smallmds=0
short=0
crimson=0
ec=0
+cephexporter=0
cephadm=0
parallel=true
restart=1
@@ -233,6 +234,7 @@ options:
-G disable Kerberos/GSSApi authentication
--hitset <pool> <hit_set_type>: enable hitset tracking
-e : create an erasure pool
+ --cephexporter: start the ceph-exporter daemon
-o config add extra config parameters to all sections
--rgw_port specify ceph rgw http listen port
--rgw_frontend specify the rgw frontend configuration
@@ -372,6 +374,9 @@ case $1 in
-e)
ec=1
;;
+ --cephexporter)
+ cephexporter=1
+ ;;
--new | -n)
new=1
;;
@@ -1140,6 +1145,17 @@ EOF
fi
}
+start_cephexporter() {
+ debug echo "Starting Ceph exporter daemon..."
+
+ # Define socket directory for the exporter
+ # Start the exporter daemon
+ prunb ceph-exporter \
+ -c "$conf_fn" \
+ --sock-dir "$CEPH_ASOK_DIR" \
+ --addrs "$IP"
+}
+
start_osd() {
if [ $inc_osd_num -gt 0 ]; then
old_maxosd=$($CEPH_BIN/ceph osd getmaxosd | sed -e 's/max_osd = //' -e 's/ in epoch.*//')
@@ -1738,6 +1754,10 @@ if [ $CEPH_NUM_MDS -gt 0 ]; then
ceph_adm fs authorize \* "client.fs" / rwp >> "$keyring_fn"
fi
+if [ "$cephexporter" -eq 1 ]; then
+ start_cephexporter
+fi
+
# Don't set max_mds until all the daemons are started, otherwise
# the intended standbys might end up in active roles.
if [ "$CEPH_MAX_MDS" -gt 1 ]; then