Commit Graph

151 Commits

Author SHA1 Message Date
Kamoltat
a9f9f7b3fd pybind/mgr/pg_autoscale: revert to default profile scale-up
pg_autoscale module will now start out all the pools
with a scale-up profile by default.

Added tests in workunits/mon/pg_autoscaler.sh
to evaluate if the default pool creation is
a scale-up profile

Updated documentation and release notes to
reflect the change in the default behavior
of the pg_autoscale profile.

Fixes: https://tracker.ceph.com/issues/53309

Signed-off-by: Kamoltat <ksirivad@redhat.com>
2021-11-19 18:55:36 +00:00
Sage Weil
ab52d39fba qa/workunits/mon/pool_ops: remove test for min/max_size check
Signed-off-by: Sage Weil <sage@newdream.net>
2021-07-07 13:06:07 -04:00
Sage Weil
14f85370a8 qa: scrub a few remaining mentions of ruleset
Signed-off-by: Sage Weil <sage@newdream.net>
2021-07-07 10:32:11 -04:00
Sebastian Wagner
1f6b4744b5 qa: Upgrade to mypy 0.901
mypy 0.9 now requires stub packages

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
2021-06-09 12:53:21 +02:00
Kefu Chai
f2e0770c27 qa/workunits/mon/test_mon_config_key: use subprocess.run() instead of proc.communicate()
the loop of proc.communicate() on python3.6, where we always are able to
get something out of stdout and/or stderr PIPEs. and the `stdout` and
`stderr` keep growing until out of memory. and teuthology considers
the command crashed after a while.

Fixes: https://tracker.ceph.com/issues/50393
Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-19 16:11:30 +08:00
Kamoltat
daeb6f6ac0 mgr/pg_autoscaler: avoid scale-down until there is pressure
The autoscaler will start out with scaling each
pools to have a full complements of pgs from the start
and will only decrease it when pools need more due to
increased usage.

Introduced a unit test that tests only the
function get_final_pg_target_and_ratio() which
deals with the distrubtion of pgs amongst the
pools

Edited workunit script to reflect the change
of how pgs are calculated and distrubted.

Signed-off-by: Kamoltat <ksirivad@redhat.com>
2021-02-01 13:05:54 +00:00
Jason Dillaman
2fa9442dcc qa/workunits/mon: fixed excessively large pool PG count
Fixes: https://tracker.ceph.com/issues/47405
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-09-14 08:58:52 -04:00
Kefu Chai
4aa537b739 qa/tasks: drop python2 support
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-07-21 19:52:11 +08:00
Kefu Chai
fdcc3a89c7 qa/workunits/mon: flake8 fixes
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-23 23:01:27 +08:00
Deepika Upadhyay
0a7325a2b2 qa/workunits/mon: add check for min_size
verify whether min_size is recalculated when osd
pool size is changed.

fixes: https://tracker.ceph.com/issues/44862
Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2020-04-02 12:47:34 +05:30
Deepika Upadhyay
21508bd9dd mon/OSDMonitor: add flag --yes-i-really-mean-it for setting pool size 1
Adds option `mon_allow_pool_size_one` which will be disabled by default
to ensure pools are not configured without replicas.
If the user still wants to use pool size 1, they will have to change the
value of `mon_allow_pool_size_one` to true and then have to pass flag
`--yes-i-really-mean-it` to cli command:

Example:
`ceph osd pool test set size 1 --yes-i-really-mean-it`

Fixes: https://tracker.ceph.com/issues/44025
Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2020-03-09 23:27:36 +05:30
Sage Weil
4d42b4c5a0 common/TextTable: default to 2 spaces separating columns
This is what other projects and libraries default to, and it is more
legible.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-23 15:46:30 -06:00
Josh Durgin
772d7c1d3c mgr/pg_autoscaler: add warning when target bytes and ratio are both set
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2020-02-10 10:08:36 +08:00
Josh Durgin
d62c121ee3 mgr/pg_autoscaler: remove target ratio warning
Since the ratios are normalized, they cannot exceed 1.0 or overcommit
combined with target_bytes.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2020-02-10 10:08:36 +08:00
Josh Durgin
1ea8ce3480 qa: use ratios >1 in pg_autoscaler test
Also check for pg_num_target being set correctly, rather than pg_num,
so the test doesn't depend on merging/splitting speed.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2020-02-10 10:08:36 +08:00
Josh Durgin
435c56a03b mgr/pg_autoscaler: treat target ratios as weights
Normalize across pools so that it's simpler to use - this way you
don't have to adjust every other pool when you add one.

Handle pools with target_bytes by taking their capacity off the top,
and dividing the rest into the pools with a target_ratio.

If both target bytes and ratio are specified, ignore bytes. This
matches the docs and makes accounting simpler.

Fixes: https://tracker.ceph.com/issues/43947

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2020-02-10 10:08:36 +08:00
Sage Weil
02a745f8c9 mon/ConfigMonitor: do not set NO_MON_UPDATE values
These options are special.  Since we can't get the values from the mon,
we also shouldn't store them there.  Most of them are not options that
can be changed anyway.

Signed-off-by: Sage Weil <sage@redhat.com>
2020-01-20 13:12:04 -06:00
Kefu Chai
4c6a5798c2
Merge pull request #32222 from toabctl/qa-flake8-py3
qa: Run flake8 on python2 and python3

Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-12-24 10:47:07 +08:00
Sage Weil
253a557f10 qa/workunits: python -> python3 throughout
Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-19 12:38:47 -06:00
Thomas Bechtold
bdcc94a1d1 qa: Run flake8 on python2 and python3
To be able to catch problems with python2 *and* python3, run flake8
with both versions. From the flake8 homepage:

It is very important to install Flake8 on the correct version of
Python for your needs. If you want Flake8 to properly parse new
language features in Python 3.5 (for example), you need it to be
installed on 3.5 for Flake8 to understand those features. In many
ways, Flake8 is tied to the version of Python on which it runs.

Also fix the problems with python3 on the way.
Note: This requires now the six module for teuthology. But this is
already an install_require in teuthology itself.

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2019-12-13 09:24:20 +01:00
Thomas Bechtold
0127cd1e88 qa: Enable flake8 tox and fix failures
There were a couple of problems found by flake8 in the qa/
directory (most of them fixed now). Enabling flake8 during the usual
check runs hopefully avoids adding new issues in the future.

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2019-12-12 10:21:01 +01:00
Sage Weil
09ef9b850f mon/ConfigMap: search nested sections
For an entity a.b.c.d, search all dot-delineated prefix sections.  This
enables you to establish a hierarchical set of options for clients, such
as radosgw daemons.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-11-01 16:51:54 -05:00
Sage Weil
29c97547a9 Merge PR #30859 into master
* refs/pull/30859/head:
	auth: EACCES, not EPERM
	mon: shunt old tell commands from cli interface to asok
	mon: allow mgr to tell mon.foo smart
	mon: include quorum features in quorum_status
	qa/workunits/mon/caps.sh: fix test
	ceph_test_rados_api_cmd: fix MonDescribe test
	Merge branch 'vstart-fs-auth' of git://github.com/batrick/ceph into wip-cleanup-mon-asok
	test/pybind/test_ceph_argparse: fix tests
	vstart: add volume client keys to keyring
	vstart: use fs authorize to create master client key
	vstart: redirect some output to stderr
	vstart: output command strings to stderr
	qa/workunits/cephtool/test.sh: fix 'quorum enter' caller
	qa: change mon_status calls to quorum_status or tell commands
	mon: fix 'heap ...' command
	mon: consolidate 'sync force' commands
	mon: allow asok commands to return an error code
	mon: move 'quorum enter|exit' and 'mon_status' to asok
	mon: fix 'smart' asok command
	mon: remove old 'config set' and 'injectargs'

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2019-10-23 21:05:42 -05:00
Patrick Donnelly
3c4328c0a4
Merge PR #30813 into master
* refs/pull/30813/head:
	qa: get rid of iteritems for python3 compatibility

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-10-21 21:22:00 -07:00
Sage Weil
19984d729f qa/workunits/mon/caps.sh: fix test
I'm not really sure why this test expected EPERM before when it expects 0
a bit earlier, but it should certainly expect EPERM after the user is
deleted.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-21 21:43:43 -05:00
Sage Weil
da533bdd4d Merge branch 'vstart-fs-auth' of git://github.com/batrick/ceph into wip-cleanup-mon-asok 2019-10-21 11:43:01 -05:00
Kefu Chai
18ccae63fa
Merge pull request #30758 from kshtsk/wip-python3-print
tests: use python3 compatible print

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Gregory Farnum <gfarnum@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-10-21 00:34:18 +08:00
Kyr Shatskyy
50b1823fac qa: get rid of iteritems for python3 compatibility
Fixes: https://tracker.ceph.com/issues/42267
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2019-10-15 11:27:39 +02:00
Patrick Donnelly
463d8731d7
Merge PR #30873 into master
* refs/pull/30873/head:
	qa: get rid of iterkeys for py3 compatibility

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
2019-10-14 13:01:36 -07:00
Sage Weil
70367de903 qa: change mon_status calls to quorum_status or tell commands
The tests were doing logs of 'ceph mon_status'; change that to
quorum_status or tell.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-12 12:05:36 -05:00
Kyr Shatskyy
7e87f80a87 tests: use python3 compatible print
Fixes: https://tracker.ceph.com/issues/42210
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2019-10-11 19:02:04 +02:00
Kyr Shatskyy
5f95b532aa qa: get rid of iterkeys for py3 compatibility
Fixes: https://tracker.ceph.com/issues/42287

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2019-10-11 18:54:29 +02:00
Vikhyat Umrao
e1451c92d8 qa/workunits/mon: test for crush rule size in pool set size command
Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
2019-10-08 09:06:22 -07:00
Sage Weil
2806de1147 mon/OSDMonitor: allow 'osd require-osd-release octopus'
Signed-off-by: Sage Weil <sage@redhat.com>
2019-04-02 16:19:43 -05:00
xie xingguo
794e3dfc80 mon/ConfigMonitor: make 'config reset' idempotent
This partially revert 1bc9c86d08.
It's generally not a good idea if a command is not idempotent.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2019-03-25 20:35:42 +08:00
Xie Xingguo
c9dbaf279e
Merge pull request #27090 from xiexingguo/wip-config-mon-core
mon/ConfigMonitor: make 'num' of 'config reset' optional; allow target version 0

Reviewed-by: Sage Weil <sage@redhat.com>
2019-03-25 13:28:41 +08:00
xie xingguo
1bc9c86d08 mon/ConfigMonitor: make 'num' of 'config reset' command optional
This way it can be used to fast cancel/undo the last command.
Also make the tip message a litter bit nicer..

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2019-03-25 09:41:05 +08:00
Kefu Chai
b8082ebc56 qa/workunits/mon/config.sh: s|bin/ceph|ceph|
so we can verify that ceph is able to reject wrong debug levels.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-03-23 22:43:08 +08:00
Sage Weil
cc9a9142fd msg: remove XioMessenger
There is a lot of good stuff going on here, but nobody is investing in xio
and it is not expected to be the path forward for RDMA.  If that ever
changes, we can resurrect the code.  Until then, let's clean up the tree
and reduce friction for changes going forward.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-03-21 00:57:33 -05:00
Sage Weil
ccda488815 crush/CrushWrapper: ensure crush_choose_arg_map.size == max_buckets
The crush/builder.c crush_add_bucket method resizes the max_buckets array
but a power of 2 when it has to expand, but the code in CrushWrapper was
assuming that if the array grew the pos for the new bucket would be the
last position in the new array.  This led to a situation where the
crush_choose_arg_map args array size didn't match max_buckets, and
eventually caused a crash.

Fixes: http://tracker.ceph.com/issues/38664
Signed-off-by: Sage Weil <sage@redhat.com>
2019-03-12 11:26:43 -05:00
Sage Weil
e069c30cb3 Merge remote-tracking branch 'private/wip-mon-kv-fix' into wip-mimic-4 2019-01-04 14:03:56 -06:00
Sage Weil
b255e49259 qa/workunits/mon/pg_autoscaler: clean up pools afterwards
This avoids a huge pg merge from 100s to 4, which takes a long time and
makes the teuthology scrub cleanup time out.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-12-19 14:37:01 -06:00
Sage Weil
2cd1ca6625 qa/suites/rados: add simple pg-autoscaler test
Signed-off-by: Sage Weil <sage@redhat.com>
2018-12-18 13:30:54 -06:00
Joao Eduardo Luis
5fff611041 mon/config-key: limit caps allowed to access the store
Henceforth, we'll require explicit `allow` caps for commands, or for the
config-key service. Blanket caps are no longer allowed for the
config-key service, except for 'allow *'.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2018-10-17 14:42:15 +01:00
Kefu Chai
b35f6a533a qa/workunits/mon/test_mon_config_key.py: bump up the size limit
in b38b8e980c, we changed the upper
limit of size of `config key` 's value to 64k, so we need to update
the test accordingly.

Fixes: http://tracker.ceph.com/issues/36260
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-09-30 16:04:04 +08:00
Kefu Chai
4b0e2c8ed4 qa: fix typos
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-09-21 12:41:42 +08:00
Sage Weil
4d905d5d29 qa/workunits/mon/caps.sh: wait longer to time out
5s -> 5m to gives us more leeway for when the mons are thrashing.

Also, *only* set this timeout when we expect a timeout.  If we don't,
wait forever.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-09-18 08:57:25 -05:00
Sage Weil
35820f4b88 mon/AuthMonitor: raise health warning on invalid caps
Raise a health warning if we have invalid (unparsable) caps in the auth
database.  Include a simple test.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-08-31 15:54:58 -05:00
Sage Weil
2c26fb0fe1 rados: drop mkpool, rmpool commands
- mkpool and rmpool users should use the normal cli/mon commands

Signed-off-by: Sage Weil <sage@redhat.com>
2018-08-31 09:27:36 -05:00
Sage Weil
11044f5f1b osd,mds,common: make 'config rm ...' idempotent
Fixes: http://tracker.ceph.com/issues/24408
Signed-off-by: Sage Weil <sage@redhat.com>
2018-06-04 15:57:40 -05:00