summaryrefslogtreecommitdiffstats
path: root/src/vstart.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/vstart.sh')
-rwxr-xr-xsrc/vstart.sh70
1 files changed, 51 insertions, 19 deletions
diff --git a/src/vstart.sh b/src/vstart.sh
index 41a8310891b..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
;;
@@ -963,7 +968,17 @@ $BLUESTORE_OPTS
; kstore
kstore fsck on mount = true
+EOF
+ if [ "$crimson" -eq 1 ]; then
+ wconf <<EOF
+ crimson osd objectstore = $objectstore
+EOF
+ else
+ wconf <<EOF
osd objectstore = $objectstore
+EOF
+ fi
+ wconf <<EOF
$SEASTORE_OPTS
$COSDSHORT
$(format_conf "${extra_conf}")
@@ -1130,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.*//')
@@ -1676,28 +1702,30 @@ if [ "$ceph_osd" == "crimson-osd" ]; then
if [ "$trace" -ne 0 ]; then
extra_seastar_args=" --trace"
fi
- if [ "$(expr $(nproc) - 1)" -gt "$(($CEPH_NUM_OSD * crimson_smp))" ]; then
- if [ $crimson_alien_num_cores -gt 0 ]; then
- alien_bottom_cpu=$(($CEPH_NUM_OSD * crimson_smp))
- alien_top_cpu=$(( alien_bottom_cpu + crimson_alien_num_cores - 1 ))
- # Ensure top value within range:
- if [ "$(($alien_top_cpu))" -gt "$(expr $(nproc) - 1)" ]; then
- alien_top_cpu=$(expr $(nproc) - 1)
+ if [ "$objectstore" == "bluestore" ]; then
+ if [ "$(expr $(nproc) - 1)" -gt "$(($CEPH_NUM_OSD * crimson_smp))" ]; then
+ if [ $crimson_alien_num_cores -gt 0 ]; then
+ alien_bottom_cpu=$(($CEPH_NUM_OSD * crimson_smp))
+ alien_top_cpu=$(( alien_bottom_cpu + crimson_alien_num_cores - 1 ))
+ # Ensure top value within range:
+ if [ "$(($alien_top_cpu))" -gt "$(expr $(nproc) - 1)" ]; then
+ alien_top_cpu=$(expr $(nproc) - 1)
+ fi
+ echo "crimson_alien_thread_cpu_cores: $alien_bottom_cpu-$alien_top_cpu"
+ # This is a (logical) processor id range, it could be refined to encompass only physical processor ids
+ # (equivalently, ignore hyperthreading sibling processor ids)
+ $CEPH_BIN/ceph -c $conf_fn config set osd crimson_alien_thread_cpu_cores "$alien_bottom_cpu-$alien_top_cpu"
+ else
+ echo "crimson_alien_thread_cpu_cores:" $(($CEPH_NUM_OSD * crimson_smp))-"$(expr $(nproc) - 1)"
+ $CEPH_BIN/ceph -c $conf_fn config set osd crimson_alien_thread_cpu_cores $(($CEPH_NUM_OSD * crimson_smp))-"$(expr $(nproc) - 1)"
+ fi
+ if [ $crimson_alien_num_threads -gt 0 ]; then
+ echo "$CEPH_BIN/ceph -c $conf_fn config set osd crimson_alien_op_num_threads $crimson_alien_num_threads"
+ $CEPH_BIN/ceph -c $conf_fn config set osd crimson_alien_op_num_threads "$crimson_alien_num_threads"
fi
- echo "crimson_alien_thread_cpu_cores: $alien_bottom_cpu-$alien_top_cpu"
- # This is a (logical) processor id range, it could be refined to encompass only physical processor ids
- # (equivalently, ignore hyperthreading sibling processor ids)
- $CEPH_BIN/ceph -c $conf_fn config set osd crimson_alien_thread_cpu_cores "$alien_bottom_cpu-$alien_top_cpu"
else
- echo "crimson_alien_thread_cpu_cores:" $(($CEPH_NUM_OSD * crimson_smp))-"$(expr $(nproc) - 1)"
- $CEPH_BIN/ceph -c $conf_fn config set osd crimson_alien_thread_cpu_cores $(($CEPH_NUM_OSD * crimson_smp))-"$(expr $(nproc) - 1)"
- fi
- if [ $crimson_alien_num_threads -gt 0 ]; then
- echo "$CEPH_BIN/ceph -c $conf_fn config set osd crimson_alien_op_num_threads $crimson_alien_num_threads"
- $CEPH_BIN/ceph -c $conf_fn config set osd crimson_alien_op_num_threads "$crimson_alien_num_threads"
+ echo "No alien thread cpu core isolation"
fi
- else
- echo "No alien thread cpu core isolation"
fi
fi
@@ -1726,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