Commit Graph

577 Commits

Author SHA1 Message Date
Radoslaw Zarzynski
dea8aa67c2 common, mon, qa: Mon-related updates for squid
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2023-12-04 16:27:51 +01:00
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
Ramana Raja
b545fb9f56 mgr: store names of modules that register RADOS clients in the MgrMap
The MgrMap stores a list of RADOS clients' addresses registered by the
mgr modules. During failover of ceph-mgr, the list is used to blocklist
clients belonging to the failed ceph-mgr.

Store the names of the mgr modules that registered the RADOS clients
along with the clients' addresses in the MgrMap. During debugging, this
allows easy identification of the mgr module that registered a
particular RADOS client by just dumping the MgrMap (`ceph mgr dump`).

Following is the MgrMap output with a module's client name displayed
along with its client addrvec,
$ ceph mgr dump | jq '.active_clients[0]'
{
  "name": "devicehealth",
  "addrvec": [
    {
      "type": "v2",
      "addr": "10.0.0.148:0",
      "nonce": 612376578
    }
  ]
}

Fixes: https://tracker.ceph.com/issues/58691
Signed-off-by: Ramana Raja <rraja@redhat.com>
2023-02-28 09:20:28 -05:00
Radoslaw Zarzynski
905540db14 doc, common, mon, qa: Mon-related updates for reef
This bases on two commits:
  * 7bbc92eda3 and
  * 6b22d47863 which seems to be
    a fixup to former one.

In contrast to them, in `OSDMonitor::create_initial()` I updated
also `newmap.require_osd_release` to pacific when
`mon_debug_no_require_reef` and `mon_debug_no_require_quincy`.
Please take have an extra look on that during the review.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2022-09-20 14:26:59 +00:00
Sage Weil
b723bd03b6 mon/AuthMonitor: no stderr output on success
These messages are distracting.

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2022-09-12 17:03:24 +00:00
Nikhilkumar Shelke
217c1d2bb2 qa/workunits/cephtool: check_response didn't find erasure-code string
1. If data or metadata pool is already in-use by filesystem
then it is not allowed to reuse the same pool for another
filesystems.

2. Test is failing because above(1) restrictions/checks comes
before checking erasure-code pools. Hence test is failing
and not finding expected error string in output.

3. Proposed fix checks newly added error string instead of
'erasure-code'.

4. Also adding new tests to verify string 'erasure-code'
by passing --force option so that check for pools reuse(1)
will be skipped and check for 'erasure-code' will be hit.

Fixes: https://tracker.ceph.com/issues/56384
Signed-off-by: Nikhilkumar Shelke <nshelke@redhat.com>
2022-06-29 12:28:55 +05:30
Yuri Weinstein
bc02a55d3a
Merge pull request #45409 from NUABO/tancz
mon: add proxy to cache tier options

Reviewed-by: Neha Ojha <nojha@redhat.com>
2022-05-24 07:59:36 -07:00
tancz1
77ad5a810c mon: add proxy to cache tier options
When we set the proxy mode to remove a writeback cache according to
the ceph official documentation an error occurred:

[root@controller-1 root]# ceph osd tier cache-mode cachepool proxy
Invalid command: proxy not in writeback|readproxy|readonly|none
osd tier cache-mode writeback|readproxy|readonly|none [--yes-i-really-mean-it]:
specify the caching mode for cache tier

According to the description of the official website document: since
a writeback cache may have modified data, you must take steps to ensure
that you do not lose any recent changes to objects in the cache before
you disable and remove it. Change the cache mode to proxy so that new and
modified objects will flush to the backing storage pool.

Fixes: https://tracker.ceph.com/issues/54576
Signed-off-by: tan changzhi <544463199@qq.com>
2022-04-29 10:40:40 +08:00
Greg Farnum
63db714890 test: use the same address input format as output will generate
Otherwise, our grep fails!

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

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2022-04-23 00:00:59 +00:00
Greg Farnum
1ca89ca76d test: check range blocklist in cephtool/test.sh
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2022-04-13 00:14:16 +00:00
Greg Farnum
8246892172 test: fix negative blocklist tests
These tests are supposed to be validating we don't accept invalid IPs,
but they left out the "add" subcommand so they're all failing on that!

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2022-04-13 00:14:16 +00:00
Kamoltat
09785475f1 qa/workunits/cephtool/test.sh: added test cases for target_size_ratio
Test the commands:

`osd pool create` <pool> --target_size_ratio <float>

`osd pool set` <pool> target_size_ratio <float>

`osd pool get` <pool> target_size_ratio

Signed-off-by: Kamoltat <ksirivad@redhat.com>
2022-03-04 16:38:44 +00:00
Kamoltat
b218335dcc qa/workunits/cephtool: modified test.sh
Included bulk flag in the test script
such it tests the `get` and `set` of
the flag

Signed-off-by: Kamoltat <ksirivad@redhat.com>
2021-12-20 21:46:37 +00:00
Sage Weil
f988b2a833 ceph: make -h/--help show match when some args are supplied
Currently,

 # ceph orch ls -h
 ...
 orch ls [<service_type>] [<service_name>] [--export] [--  List services known to orchestrator
  format {plain|json|json-pretty|yaml}] [--refresh]
 # ceph orch ls osd -h
 ... nothing ...

because the CLI is provided more arguments than the command prefix.  Make
-h drop right-hand args until we get at least one prefix match.  This
means we can have a partial command written with some args and add -h to
get a usage for that command.

Signed-off-by: Sage Weil <sage@newdream.net>
2021-11-10 16:30:47 -05: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
Sage Weil
8bcb281a7d osd: propagate base pool application_metadata to tiers
If there is application metadata on the base pool, it should be mirrored
to any other tiers in the set.  This aligns with the fact that the
'ceph osd pool application ...' commands refuse to operate on a non-base
pool.

This fixes problems with accessing tiers (e.g., cache tiers) when the
cephx cap is written in terms of application metadata.

Fixes: https://tracker.ceph.com/issues/49788
Signed-off-by: Sage Weil <sage@newdream.net>
2021-03-13 11:51:19 -05:00
Sage Weil
fafdb1e47d Merge PR #39149 into master
* refs/pull/39149/head:
	qa/workunits/cephtool/test.sh: tolerate some settling for osd info vs dump test

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2021-02-01 16:25:01 -06:00
Sage Weil
7bbc92eda3 mon: updates for quincy
Signed-off-by: Sage Weil <sage@newdream.net>
2021-01-28 13:29:28 -06:00
Sage Weil
a4eb550615 qa/workunits/cephtool/test.sh: tolerate some settling for osd info vs dump test
Signed-off-by: Sage Weil <sage@newdream.net>
2021-01-28 13:20:22 -06:00
Sage Weil
bb702eda19 mon: add 'mgr stat' command
This is analogous to 'osd stat' and 'mds stat'.

Signed-off-by: Sage Weil <sage@newdream.net>
2021-01-25 08:48:44 -06:00
Joao Eduardo Luis
122388429d
qa/cephtool: test 'mon stat' commands
Signed-off-by: Joao Eduardo Luis <joao@suse.com>
2020-10-13 08:31:24 +00:00
Greg Farnum
d02625331c Merge remote-tracking branch 'origin/master' into wip-stretch-mode 2020-09-14 02:32:19 +00:00
Sage Weil
dfd01d7653 blacklist -> blocklist
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Neha Ojha <nojha@redhat.com>
2020-08-24 19:53:08 +00:00
Greg Farnum
1093d5a680 mon: elector: add some flexibility when dropping out-of-quorum propose messages
I haven't seen it be an issue, but I'm worried a slight different in ping
report timing might result in flapping leaders even with the new
ignore-out-of-quorum code.
Imagine DCs A, B, C where A and B are netsplit: C might first elect A, then
get a propose from B immediately following a successful ping reply that gives
it a better score than A and thus gets an election win; then A could do
the same, etc.

In a default 12-hour halflife, 2-second ping config, the most a single ping
can change the score is by 0.00002314814. Therefore a code default of .0001
and a config default of .0005 should be plenty of room to prevent that in
sane monitor configurations, while still responding quickly if connections are
restored.

Plus of course this only applies to out-of-quorum monitors to peons, so if
a monitor manages to contact the leader they will be allowed to join
instantly.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2020-07-08 04:26:03 +00:00
Greg Farnum
83e321d432 mon: don't let users disallow monitors in CLASSIC mode
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2020-07-08 04:26:03 +00:00
Greg Farnum
9cabf3320f mon: add/remove disallowed monitors from the command line
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2020-07-08 04:26:03 +00:00
Greg Farnum
467415ee64 mon: make the election strategy configurable at setup and runtime
Finally, a user-visible command!

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2020-07-08 04:26:03 +00:00
Nathan Cutler
4f0cecbadd qa/cephtool: clean up after removal of cache-tier modes
The "proxy" and "forward" cache-tier modes have been completely removed,
so it's sufficient to test once that they cannot be set.

Fixes: a0a3ed324a
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-05-21 13:42:09 +02:00
Neha Ojha
61ad12e6ad
Merge pull request #34541 from neha-ojha/wip-balancer-on
mgr: turn on balancer in upmap mode by default

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2020-04-15 15:03:28 -07:00
Neha Ojha
bca3b3f6e0 qa/workunits/cephtool/test.sh: don't set-require-min-compat-client luminous
This should not be required since mon_osd_initial_require_min_compat_client
is now luminous.

Signed-off-by: Neha Ojha <nojha@redhat.com>
2020-04-14 00:05:02 +00:00
Sage Weil
6833f89990 qa/workunits/cephtool/test.sh: fix require-osd-release test
Signed-off-by: Sage Weil <sage@redhat.com>
2020-04-08 08:09:41 -05:00
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
3eb830e938 Merge PR #33188 into master
* refs/pull/33188/head:
	qa/workunits/cephtool/test.sh: delete test_erasure pool

Reviewed-by: Neha Ojha <nojha@redhat.com>
2020-02-11 08:28:27 -06:00
Sage Weil
4332eeb694 qa/workunits/cephtool/test.sh: delete test_erasure pool
Other parts of this script leave OSDs reweighted, which can make this test
fail to go fully clean.

 0   ssd 0.08789         osd.0          up  0.63213 1.00000
 1   ssd 0.08789         osd.1          up  0.63213 1.00000
 2   ssd 0.08789         osd.2          up  1.00000 1.00000

35.0 raw ([2,1,2147483647], p2) up ([2,1,2147483647], p2) acting ([2,1,2], p2)

Fix by just deleting this pool when we're done.

Fixes: https://tracker.ceph.com/issues/44067
Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-10 11:25:51 -06:00
Sage Weil
013a5cc3f8 ceph.in: fix -h/help behavior for tell commands
- add "Tell $type commands" heading
- 'ceph tell mon.a -h' now works
- 'ceph tell mon.a prefix -h' also works

Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-10 08:24:44 -06:00
Sage Weil
780b0c1205 mon/OSDMonitor: accept 'autoscale_mode' argument to 'osd pool create'
Allow the autoscale mode to be set atomically with pool creation.

Fixes: https://tracker.ceph.com/issues/42638
Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-06 07:04:00 -06:00
Kefu Chai
acbd038522 mon: drop "mon compact" command
quote from Sage's reply

> This is a mon-specific command--it doesn't make sense as a CLI command
> for the entire cluster--it only makes sense as a command to tell a
> specific monitor.  Like ``ceph tell mon.a compact``.  Back when Joao
> did #4595 these commands were all mixed together and putting it under
> 'ceph mon ...' made sense, but now you're specifially sending it to a
> mon, so the 'mon' part of the command is redundant.

so let's drop "mon compact" in favor of "compact" command

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-20 15:56:04 +08:00
Kefu Chai
e9a5ce0897 mon: mark "scrub" commands obsolete
"scrub" was marked deprecated in
1814d7441b. this commit
was in turn included by v10.0.0. so it's long enough for its
retirement.

the test is updated accordingly

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-20 15:56:04 +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
Kefu Chai
4594ab9aa7 qa/workunits/cephtool/test.sh: set min_{bytes,pgs}_per_osd for reweight
otherwise ceph-mgr will refuse to perform reweight

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-11-18 21:17:57 +08:00
Kefu Chai
abc237960a qa/workunits/cephtool/test.sh: create pool with power-of-2 pg num
otherwise wait_for_health() fails like:

wait_for_health:  ceph health detail
HEALTH_WARN 1 pool(s) have non-power-of-two pg_num
[WRN] POOL_PG_NUM_NOT_POWER_OF_TWO: 1 pool(s) have non-power-of-two pg_num
    pool 'rbd' pg_num 10 is not a power of two
../qa/workunits/cephtool/../../standalone/ceph-helpers.sh:1613: wait_for_health:  return 1

the failure was found when testing test_mon_pg().

this behavior was introduced by 6e46b1c0e5

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-11-18 21:17:57 +08:00
Kefu Chai
2977086d1d qa/workunits/cephtool/test.sh: use "ceph compact" in test_mon_deprecated_commands()
both "compact" and "scrub" are now cli command, so we cannot issue them
using "tell" anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-11-18 21:17:56 +08:00
Kefu Chai
e96df8c44b qa/workunits/cephtool/test.sh: use "sessions" in test_mon_tell()
"version" is not an asok command anymore in the sense that it's served
by registered asock hook. so in this change, we replace "version" with
"sessions", so we can verify that audit channel does not the dispatched
"sessions" command sent from ceph cli.

also, restructure the test as a loop for better readability

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-11-18 17:08:07 +08:00
Kefu Chai
6f7842080d qa/workunits/cephtool/test.sh: use tell instead of --admin-daemon for asok commands
ceph cli will be able to route the command to the target daemon when
handling "tell" commands.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-11-18 13:51:19 +08:00
Kefu Chai
5bec1b3f7d qa/workunits/cephtool/test.sh: remove heap cli tests
"heap" cli commands are removed in the big asok/tell cleanup, they are now
asock commands.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-11-18 13:51:19 +08:00
Kefu Chai
d28057a487 qa/workunits/cephtool/test.sh: fix iec/si tests
tests all IEC and SI units related test with a tier pool. as
`target_max_objects` and `target_size_bytes` only apply to tier
pools. so, for the sake of simplicity, tests all of them using
a tier pool.

introduced by 9095f67e

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-11-18 13:51:19 +08:00
Kefu Chai
5830813f2e
Merge pull request #31291 from liewegas/bug-42578
mgr/ActivePyModules: behave if a module queries a devid that does not exist

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-11-05 04:17:17 -08:00
Sage Weil
67e5139b02 mgr/ActivePyModules: behave if a module queries a devid that does not exist
The GIL reacquire was being handled in the lambda, but that was not
getting called if the device didn't exist, leading to a crash.

Add a trivial CLI test.

Fixes: https://tracker.ceph.com/issues/42578
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-31 10:44:16 -05:00
Sage Weil
9095f67e92 mon/OSDMonitor: expand iec_options for 'osd pool set'
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-28 10:27:53 -05:00
Sage Weil
fab205d45a qa/workunits/cephtool/test.sh: fix 'quorum enter' caller
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-12 12:05:36 -05:00