]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #31732 from aclamk/wip-vstart-osds-parallel
authorKefu Chai <kchai@redhat.com>
Thu, 5 Dec 2019 07:54:23 +0000 (15:54 +0800)
committerGitHub <noreply@github.com>
Thu, 5 Dec 2019 07:54:23 +0000 (15:54 +0800)
vstart: Now all OSDs are starting in parallel. Use --no-parallel to revert to sequential.

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
1  2 
src/vstart.sh

diff --cc src/vstart.sh
index a132d0c879720f4ad28cadf70565bce442d943aa,18d333651a251d4ebf59c44865bdb660e5a35e14..aa1f4405f1279d17ee33bf07719efe09b34fd546
@@@ -880,14 -882,24 +886,27 @@@ EO
          if [ "$ceph_osd" == "crimson-osd" ]; then
              # designate a single CPU node $osd for osd.$osd
              extra_seastar_args="--smp 1 --cpuset $osd"
 +            if [ "$debug" -ne 0 ]; then
 +              extra_seastar_args+=" --debug"
 +            fi
          fi
+         local osd_pid
          run 'osd' $osd $SUDO $CEPH_BIN/$ceph_osd \
              $extra_seastar_args $extra_osd_args \
-             -i $osd $ARGS $COSD_ARGS
+             -i $osd $ARGS $COSD_ARGS &
+         osd_pid=$!
+         if $parallel; then
+             osds_wait=$osd_pid
+         else
+             wait $osd_pid
+         fi
      done
+     if $parallel; then
+         for p in $osds_wait; do
+             wait $p
+         done
+         debug echo OSDs started
+     fi
      if [ $inc_osd_num -gt 0 ]; then
          # update num osd
          new_maxosd=$($CEPH_BIN/ceph osd getmaxosd | sed -e 's/max_osd = //' -e 's/ in epoch.*//')