docker_tag=docker_tag))
# if containers with ceph, and no ceph device we need to use a
# persistent loop device for Ceph OSDs
- if docker_tag and not ds_opts.get('ceph_device', None):
+ if docker_tag and ds_opts['ceph_device'] == '/dev/loop3':
tmp_losetup = os.path.join(tmp_dir, 'losetup.service')
with open(tmp_losetup, 'w') as fh:
fh.write(LOSETUP_SERVICE)
ceph_params = {
'DockerCephDaemonImage': docker_image,
}
- if not ds['global_params']['ha_enabled']:
- ceph_params['CephPoolDefaultSize'] = 1
+ # max pgs allowed are calculated as num_mons * 200. Therefore we
+ # set number of pgs and pools so that the total will be less:
+ # num_pgs * num_pools * num_osds
+ ceph_params['CephPoolDefaultSize'] = 2
+ ceph_params['CephPoolDefaultPgNum'] = 32
if virtual:
ceph_params['CephAnsibleExtraConfig'] = {
'centos_package_dependencies': [],
'ceph_osd_docker_memory_limit': '1g',
'ceph_mds_docker_memory_limit': '1g',
}
- ceph_params['CephPoolDefaultPgNum'] = 32
- if 'ceph_device' in ds_opts and ds_opts['ceph_device']:
- ceph_device = ds_opts['ceph_device']
- else:
- # TODO(trozet): make this DS default after Fraser
- ceph_device = '/dev/loop3'
-
+ ceph_device = ds_opts['ceph_device']
ceph_params['CephAnsibleDisksConfig'] = {
'devices': [ceph_device],
'journal_size': 512,
'osd_scenario': 'collocated'
}
utils.edit_tht_env(storage_file, 'parameter_defaults', ceph_params)
+ # TODO(trozet): remove following block as we only support containers now
elif 'ceph_device' in ds_opts and ds_opts['ceph_device']:
with open(storage_file, 'a') as fh:
fh.write(' ExtraConfig:\n')
'os_version',
'l2gw',
'sriov',
- 'containers']
+ 'containers',
+ 'ceph_device']
OPT_DEPLOY_SETTINGS = ['performance',
'vsperf',
- 'ceph_device',
'yardstick',
'dovetail',
'odl_vpp_routing_node',
self['deploy_options'][req_set] = 'ovs'
elif req_set == 'ceph':
self['deploy_options'][req_set] = True
+ elif req_set == 'ceph_device':
+ self['deploy_options'][req_set] = '/dev/loop3'
elif req_set == 'odl_version':
self['deploy_options'][req_set] = \
constants.DEFAULT_ODL_VERSION