log-ignorelist:
- SLOW_OPS
- slow request
- conf:
- osd:
- filestore flush min: 0
tasks:
- check-counter:
counters:
# CEPH_ARGS="--fsid=$(uuidgen) "
# CEPH_ARGS+="--mon-host=127.0.0.1:7018 "
# run_mon $dir a # spawn a mon and bind port 7018
-# run_mon $dir a --debug-filestore=20 # spawn with filestore debugging
#
# If mon_initial_members is not set, the default rbd pool is deleted
# and replaced with a replicated pool with less placement groups to
}
-function run_osd_filestore() {
- local dir=$1
- shift
- local id=$1
- shift
- local osd_data=$dir/$id
-
- local ceph_args="$CEPH_ARGS"
- ceph_args+=" --osd-failsafe-full-ratio=.99"
- ceph_args+=" --osd-journal-size=100"
- ceph_args+=" --osd-scrub-load-threshold=2000"
- ceph_args+=" --osd-data=$osd_data"
- ceph_args+=" --osd-journal=${osd_data}/journal"
- ceph_args+=" --chdir="
- ceph_args+=$EXTRA_OPTS
- ceph_args+=" --run-dir=$dir"
- ceph_args+=" --admin-socket=$(get_asok_path)"
- ceph_args+=" --debug-osd=20"
- ceph_args+=" --debug-ms=1"
- ceph_args+=" --debug-monc=20"
- ceph_args+=" --log-file=$dir/\$name.log"
- ceph_args+=" --pid-file=$dir/\$name.pid"
- ceph_args+=" --osd-max-object-name-len=460"
- ceph_args+=" --osd-max-object-namespace-len=64"
- ceph_args+=" --enable-experimental-unrecoverable-data-corrupting-features=*"
- ceph_args+=" "
- ceph_args+="$@"
- mkdir -p $osd_data
-
- local uuid=`uuidgen`
- echo "add osd$osd $uuid"
- OSD_SECRET=$(ceph-authtool --gen-print-key)
- echo "{\"cephx_secret\": \"$OSD_SECRET\"}" > $osd_data/new.json
- ceph osd new $uuid -i $osd_data/new.json
- rm $osd_data/new.json
- ceph-osd -i $id $ceph_args --mkfs --key $OSD_SECRET --osd-uuid $uuid --osd-objectstore=filestore
-
- local key_fn=$osd_data/keyring
- cat > $key_fn<<EOF
-[osd.$osd]
-key = $OSD_SECRET
-EOF
- echo adding osd$id key to auth repository
- ceph -i "$key_fn" auth add osd.$id osd "allow *" mon "allow profile osd" mgr "allow profile osd"
- echo start osd.$id
- ceph-osd -i $id $ceph_args &
-
- # If noup is set, then can't wait for this osd
- if ceph osd dump --format=json | jq '.flags_set[]' | grep -q '"noup"' ; then
- return 0
- fi
- wait_for_osd up $id || return 1
-
-
-}
function test_run_osd() {
local dir=$1
export CEPH_ARGS
CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
CEPH_ARGS+="--mon-host=$CEPH_MON "
- # avoid running out of fds in rados bench
- CEPH_ARGS+="--filestore_wbthrottle_xfs_ios_hard_limit=900 "
- CEPH_ARGS+="--filestore_wbthrottle_btrfs_ios_hard_limit=900 "
local funcs=${@:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
for func in $funcs ; do
setup $dir || return 1
if [ `uname` = FreeBSD ]; then
# erasure coding overwrites are only tested on Bluestore
- # erasure coding on filestore is unsafe
# http://docs.ceph.com/en/latest/rados/operations/erasure-code/#erasure-coding-with-overwrites
use_ec_overwrite=false
else
- or freeform for custom applications
conf:
osd:
- filestore debug inject read err: true
bluestore debug inject read err: true
tasks:
- repair_test:
debug ms: "0/0"
debug paxos: "0/0"
osd:
- debug filestore: "0/0"
debug journal: "0/0"
debug ms: "0/0"
debug osd: "0/0"
debug osd: "0/0"
debug optracker: "0/0"
debug objclass: "0/0"
- debug filestore: "0/0"
debug journal: "0/0"
debug ms: "0/0"
debug mon: "0/0"
osd scrub max interval: 120
journal throttle high multiple: 2
journal throttle max multiple: 10
- filestore queue throttle high multiple: 2
- filestore queue throttle max multiple: 10
osd max backfills: 9
log-ignorelist:
- but it is still running
osd:
osd scrub min interval: 60
osd scrub max interval: 120
- filestore odsync write: true
osd max backfills: 2
osd snap trim sleep: .5
mon:
osd scrub max interval: 120
journal throttle high multiple: 2
journal throttle max multiple: 10
- filestore queue throttle high multiple: 2
- filestore queue throttle max multiple: 10
osd max backfills: 9
log-ignorelist:
- but it is still running
osd:
osd scrub min interval: 60
osd scrub max interval: 120
- filestore odsync write: true
osd max backfills: 2
osd snap trim sleep: .5
mon:
osd:
osd scrub min interval: 60
osd scrub max interval: 120
- filestore odsync write: true
osd max backfills: 2
osd snap trim sleep: .5
mon:
pid file = /var/run/ceph/$cluster-$name.pid
auth supported = cephx
- filestore xattr use omap = true
-
mon clock drift allowed = 1.000
osd crush chooseleaf type = 0
journal zero on create = true
- filestore ondisk finisher threads = 3
- filestore apply finisher threads = 3
-
bdev debug aio = true
osd debug misdirected ops = true
# 1m isn't quite enough
mon_down_mkfs_grace = 2m
- mon_warn_on_filestore_osds = false
-
[client]
rgw cache enabled = true
rgw enable ops log = true
if estatus != 0:
raise RuntimeError("ceph-deploy: Failed to zap osds")
osd_create_cmd = './ceph-deploy osd create '
- # first check for filestore, default is bluestore with ceph-deploy
- if config.get('filestore') is not None:
- osd_create_cmd += '--filestore '
- elif config.get('bluestore') is not None:
+ if config.get('bluestore') is not None:
osd_create_cmd += '--bluestore '
if config.get('dmcrypt') is not None:
osd_create_cmd += '--dmcrypt '
for remote in osds.remotes.keys():
# all devs should be lvm
osd_create_cmd = './ceph-deploy osd create --debug ' + remote.shortname + ' '
- # default is bluestore so we just need config item for filestore
+ # default is bluestore
roles = ctx.cluster.remotes[remote]
dev_needed = len([role for role in roles
if role.startswith('osd')])
for device in devs:
device_split = device.split('/')
lv_device = device_split[-2] + '/' + device_split[-1]
- if config.get('filestore') is not None:
- osd_create_cmd += '--filestore --data ' + lv_device + ' '
- # filestore with ceph-volume also needs journal disk
- try:
- jdevice = all_devs.pop(jdevs)
- except IndexError:
- raise RuntimeError("No device available for \
- journal configuration")
- jdevice_split = jdevice.split('/')
- j_lv = jdevice_split[-2] + '/' + jdevice_split[-1]
- osd_create_cmd += '--journal ' + j_lv
- else:
- osd_create_cmd += ' --data ' + lv_device
+ osd_create_cmd += ' --data ' + lv_device
estatus_osd = execute_ceph_deploy(osd_create_cmd)
if estatus_osd == 0:
log.info('successfully created osd')
ceph-deploy-branch: my-ceph-deploy-branch
only_mon: true
keep_running: true
- # either choose bluestore or filestore, default is bluestore
bluestore: True
- # or
- filestore: True
# skip install of mgr for old release using below flag
skip-mgr: True ( default is False )
# to use ceph-volume instead of ceph-disk
if self.chance_trim_stale_osdmaps > 0:
actions.append((self.trim_stale_osdmaps, self.chance_trim_stale_osdmaps))
- for key in ['heartbeat_inject_failure', 'filestore_inject_stall']:
+ for key in ['heartbeat_inject_failure']:
for scenario in [
(lambda:
self.inject_pause(key,
The config should be as follows:
Must include the log-ignorelist below
- Must enable filestore_debug_inject_read_err config
example:
- 'attr name mismatch'
- 'Regular scrub request, deep-scrub details will be lost'
- 'candidate size [0-9]+ info size [0-9]+ mismatch'
- conf:
- osd:
- filestore debug inject read err: true
- repair_test:
"""
ceph tell osd.0 bench 104857600 2097152
}
-function test_osd_negative_filestore_merge_threshold()
-{
- $SUDO ceph daemon osd.0 config set filestore_merge_threshold -1
- expect_config_value "osd.0" "filestore_merge_threshold" -1
-}
-
function test_mon_tell()
{
for m in mon.a mon.b; do
MON_TESTS+=" mon_messenger_dump"
OSD_TESTS+=" osd_bench"
-OSD_TESTS+=" osd_negative_filestore_merge_threshold"
OSD_TESTS+=" tiering_agent"
OSD_TESTS+=" admin_heap_profiler"
OSD_TESTS+=" osd_tell_help_command"
}
function expect_alloc_hint_eq() {
- export CEPH_ARGS="--osd-objectstore=filestore"
+ # This is running with filestore. Is it even run with BlueStore?
local expected_extsize="$1"
for (( i = 0 ; i < "${NUM_OSDS}" ; i++ )); do
NUM_PG="12"
NUM_PGP="${NUM_PG}"
-LOW_CAP="$(get_conf_val "osd.0" "filestore_max_alloc_hint_size")"
-HIGH_CAP="$((LOW_CAP * 10))" # 10M, assuming 1M default cap
+LOW_CAP="$((1 * 1024 * 1024))" # 1M
SMALL_HINT="$((LOW_CAP / 4))" # 256K, assuming 1M default cap
BIG_HINT="$((LOW_CAP * 6))" # 6M, assuming 1M default cap
#
POOL="alloc_hint-rep"
-ceph osd pool create "${POOL}" "${NUM_PG}"
+ceph osd pool create "${POOL}" "${NUM_PG}" # 1M
ceph osd pool set "${POOL}" size "${NUM_OSDS}" --yes-i-really-mean-it
ceph osd pool application enable "${POOL}" rados
rados -p "${POOL}" set-alloc-hint "${OBJ}" "${BIG_HINT}" "${BIG_HINT}"
expect_alloc_hint_eq "${LOW_CAP}"
-# Bump the cap to HIGH_CAP
-ceph tell 'osd.*' injectargs "--filestore_max_alloc_hint_size ${HIGH_CAP}"
-
-# Try changing to BIG_HINT (2) - expect BIG_HINT (BIG_HINT < HIGH_CAP)
+# Try changing to BIG_HINT (2) - expect BIG_HINT
rados -p "${POOL}" set-alloc-hint "${OBJ}" "${BIG_HINT}" "${BIG_HINT}"
expect_alloc_hint_eq "${BIG_HINT}"
-ceph tell 'osd.*' injectargs "--filestore_max_alloc_hint_size ${LOW_CAP}"
-
# Populate object with some data
rados -p "${POOL}" put "${OBJ}" /etc/passwd