Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vstart: make -k with optional mon_num. #8251

Merged
merged 1 commit into from Mar 24, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/vstart.sh
Expand Up @@ -275,6 +275,13 @@ esac
shift
done

if [ "$overwrite_conf" -eq 0 ]; then
CEPH_NUM_MON=`awk -F= '/CEPH_NUM_MON/{print $2}' $conf_fn`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we default these if the awk fails?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh, sorry, i overlooked this. will fix it tomorrow.

CEPH_NUM_OSD=`awk -F= '/CEPH_NUM_OSD/{print $2}' $conf_fn`
CEPH_NUM_MDS=`awk -F= '/CEPH_NUM_MDS/{print $2}' $conf_fn`
CEPH_NUM_RGW=`awk -F= '/CEPH_NUM_RGW/{print $2}' $conf_fn`
fi

if [ "$start_all" -eq 1 ]; then
start_mon=1
start_mds=1
Expand Down Expand Up @@ -436,6 +443,10 @@ if [ "$start_mon" -eq 1 ]; then
if [ $overwrite_conf -eq 1 ]; then
cat <<EOF > $conf_fn
; generated by vstart.sh on `date`
; CEPH_NUM_MON=$CEPH_NUM_MON
; CEPH_NUM_OSD=$CEPH_NUM_OSD
; CEPH_NUM_MDS=$CEPH_NUM_MDS
; CEPH_NUM_RGW=$CEPH_NUM_RGW
[global]
fsid = $(uuidgen)
osd pg bits = 3
Expand Down