def start(self):
cmd = [mstart_path + 'mstart.sh', self.cluster_id]
+ env = None
if self.needs_reset:
- cmd += ['-n', '--mds_num', '0']
- bash(cmd)
+ env = os.environ.copy()
+ env['CEPH_NUM_MDS'] = '0'
+ cmd += ['-n']
+ bash(cmd, env=env)
self.needs_reset = False
def stop(self):
osdmap_fn="/tmp/ceph_osdmap.$$"
monmap_fn="/tmp/ceph_monmap.$$"
-usage="usage: $0 [option]... \nex: $0 -n -d --mon_num 3 --osd_num 3 --mds_num 1 --rgw_num 1\n"
+usage="usage: $0 [option]... \nex: MON=3 OSD=1 MDS=1 MDS=1 RGW=1 $0 -n -d\n"
usage=$usage"options:\n"
usage=$usage"\t-d, --debug\n"
usage=$usage"\t-s, --standby_mds: Generate standby-replay MDS for each active\n"
usage=$usage"\t--hitset <pool> <hit_set_type>: enable hitset tracking\n"
usage=$usage"\t-e : create an erasure pool\n";
usage=$usage"\t-o config\t\t add extra config parameters to all sections\n"
-usage=$usage"\t--mon_num specify ceph monitor count\n"
-usage=$usage"\t--osd_num specify ceph osd count\n"
-usage=$usage"\t--mds_num specify ceph mds count\n"
-usage=$usage"\t--rgw_num specify ceph rgw count\n"
-usage=$usage"\t--mgr_num specify ceph mgr count\n"
usage=$usage"\t--rgw_port specify ceph rgw http listen port\n"
usage=$usage"\t--rgw_frontend specify the rgw frontend configuration\n"
usage=$usage"\t--rgw_compression specify the rgw compression plugin\n"
--smallmds )
smallmds=1
;;
- --mon_num )
- echo "mon_num:$2"
- CEPH_NUM_MON="$2"
- shift
- ;;
- --osd_num )
- CEPH_NUM_OSD=$2
- shift
- ;;
- --mds_num )
- CEPH_NUM_MDS=$2
- shift
- ;;
- --rgw_num )
- CEPH_NUM_RGW=$2
- shift
- ;;
- --mgr_num )
- CEPH_NUM_MGR=$2
- shift
- ;;
--rgw_port )
CEPH_RGW_PORT=$2
shift