Merge pull request #2050 from ceph/wip-cephtool

qa/workunits/cephtool/test.sh: sudo ceph daemon
This commit is contained in:
Dan Mick 2014-06-30 16:48:29 -07:00
commit f3c92145ef

View File

@ -58,7 +58,7 @@ function get_config_value_or_die()
target=$1
config_opt=$2
raw="`ceph daemon $target config get $config_opt 2>/dev/null`"
raw="`sudo ceph daemon $target config get $config_opt 2>/dev/null`"
if [[ $? -ne 0 ]]; then
echo "error obtaining config opt '$config_opt' from '$target': $raw"
exit 1
@ -95,13 +95,13 @@ function test_mon_injectargs_SI()
# Keep in mind that all integer based options (i.e., INT,
# LONG, U32, U64) will accept SI unit modifiers.
initial_value=$(get_config_value_or_die "mon.a" "mon_pg_warn_min_objects")
ceph daemon mon.a config set mon_pg_warn_min_objects 10
sudo ceph daemon mon.a config set mon_pg_warn_min_objects 10
expect_config_value "mon.a" "mon_pg_warn_min_objects" 10
ceph daemon mon.a config set mon_pg_warn_min_objects 10K
sudo ceph daemon mon.a config set mon_pg_warn_min_objects 10K
expect_config_value "mon.a" "mon_pg_warn_min_objects" 10240
ceph daemon mon.a config set mon_pg_warn_min_objects 1G
sudo ceph daemon mon.a config set mon_pg_warn_min_objects 1G
expect_config_value "mon.a" "mon_pg_warn_min_objects" 1073741824
ceph daemon mon.a config set mon_pg_warn_min_objects 10F > $TMPFILE || true
sudo ceph daemon mon.a config set mon_pg_warn_min_objects 10F > $TMPFILE || true
check_response "'10F': (22) Invalid argument"
# now test with injectargs
ceph tell mon.a injectargs '--mon_pg_warn_min_objects 10'
@ -111,7 +111,7 @@ function test_mon_injectargs_SI()
ceph tell mon.a injectargs '--mon_pg_warn_min_objects 1G'
expect_config_value "mon.a" "mon_pg_warn_min_objects" 1073741824
expect_false ceph injectargs mon.a '--mon_pg_warn_min_objects 10F'
ceph daemon mon.a config set mon_pg_warn_min_objects $initial_value
sudo ceph daemon mon.a config set mon_pg_warn_min_objects $initial_value
}
function test_tiering()