Commit Graph

162 Commits

Author SHA1 Message Date
Kamoltat
0972dbf225 qa/workunits: modified tests for noautoscale flag change
modified:

`qa/workunits/mon/test_noautoscale_flag.sh`
`qa/workunits/cephtool/test.sh`

adding test coverage to files mentioned above

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

Signed-off-by: Kamoltat <ksirivad@redhat.com>
2023-09-25 12:46:36 +00:00
Kamoltat
009430b554 qa/workunits/mon/pg_autoscaler: Added bug-reproducer/test
Added a bug-reproducer/test to fix:

https://tracker.ceph.com/issues/58894

Signed-off-by: Kamoltat <ksirivad@redhat.com>
2023-03-01 21:07:54 +00:00
Sage Weil
39da18b31b qa/workunits/mon/auth_key_rotation.sh: exercise pending key / rotation
Signed-off-by: Sage Weil <sage@newdream.net>
2022-09-12 17:02:59 +00:00
Yuri Weinstein
7bd2450f11
Merge pull request #45078 from kamoltat/wip-ksirivad-fix-target-size-ratio-bound
mon/MonCommands.h: fix target_size_ratio range

Reviewed-by: Neha Ojha <nojha@redhat.com>
2022-03-15 09:22:58 -07:00
Kamoltat
4add5feff6 qa/workunits/mon/pg_autoscaler.sh: clean up white space
remove white space and weird indentations

Signed-off-by: Kamoltat <ksirivad@redhat.com>
2022-03-04 16:40:07 +00:00
Nitzan Mordechai
674489490f qa/workunit: Adding whitespace unit test for config set,get,rm
Update the workunit/mon/config.sh to include set/get/rm commands with and without whitespaces

Fixes: https://tracker.ceph.com/issues/44092
Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
2022-01-25 11:45:50 +02:00
Sage Weil
d2265e81fb Merge PR #44054 into master
* refs/pull/44054/head:
	doc/rados/operations: document pg_num_max
	mgr: set max of 32 pgs for .mgr pool
	mgr/dashboard: expect pg_num_max property for pools
	mon/OSDMonitor: add option --pg-num_max arg for create pool
	mon/OSDMonitor: disallow setting pg_num < min or > max
	mgr/pg_autoscaler: apply pg_num_max
	mon: add pg_num_max pool property

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2022-01-06 08:54:45 -05:00
Sage Weil
2d8753f4fe mon/OSDMonitor: disallow setting pg_num < min or > max
Signed-off-by: Sage Weil <sage@newdream.net>
2022-01-03 14:12:54 -05:00
Sage Weil
4439035c32 mon: add pg_num_max pool property
Signed-off-by: Sage Weil <sage@newdream.net>
2022-01-03 14:11:14 -05:00
Kamoltat
bb42c71e7e qa: Added workunit test for noautoscale flag
set and unset the noautoscale flag,
evaluate if the results are what
we expected. As well as, evaluate
if the flag is correct when we
create new pools.

Signed-off-by: Kamoltat <ksirivad@redhat.com>
2021-12-22 21:42:28 +00:00
Kamoltat
c194f4a3eb qa/workunits/mon/pg_autoscaler: modified test script
Modified test scrtipt to include `bulk` and
remove all `profile` options.

Signed-off-by: Kamoltat <ksirivad@redhat.com>
2021-12-20 21:46:37 +00:00
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