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

Conversation

majianpeng
Copy link
Member

Default mon_num=3, if we change this and using -k to create a new
cluster. It don't work. So we must record the old mon_num.
The same for osd_num/mds_num/rgw_num.

Signed-off-by: Jianpeng Ma jianpeng.ma@intel.com

@@ -275,6 +275,13 @@ esac
shift
done

if [ "$overwrite_conf" -eq 0 ]; then
CEPH_NUM_MON=`cat $conf_fn|grep CEPH_NUM_MON|awk -F= '{print $2}'`
Copy link
Contributor

Choose a reason for hiding this comment

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

nit, could just put

CEPH_NUM_MON=`awk -F= '/CEPH_NUM_MON/{print $2}' $conf_fn`

@tchaikov
Copy link
Contributor

lgtm apart from a nit.

@majianpeng majianpeng force-pushed the vstart branch 2 times, most recently from 6b94882 to 81fa2ca Compare March 24, 2016 01:21
@tchaikov tchaikov merged commit 518c238 into ceph:master Mar 24, 2016
@tchaikov tchaikov self-assigned this Mar 24, 2016
Default mon_num=3, if we change this and using -k to create a new
cluster. It don't work. So we must record the old mon_num.
The same for osd_num/mds_num/rgw_num.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
@dillaman
Copy link

This PR now causes MON=1 OSD=1 MDS=0 ./vstart.sh -k to fail:

./vstart.sh: line 428: [: 1: unary operator expected

@@ -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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants