This PR is solving an error: Directory not empty.
This was encountered during removal of the downloaded keycloak package from keycloak.py
Signed-off-by: Kalpesh Pandya <kapandya@redhat.com>
When connecting to remote cluster via mon address, the cluster
confuration file is not required. However, the mirror daemon
fills up the ceph context with the cluster name resulting in
the following warning in (systemctl) logs:
auth: unable to find a keyring on ...
These warning messages need to be silence as they can mislead
the user.
Fixes: http://tracker.ceph.com/issues/51204
Signed-off-by: Venky Shankar <vshankar@redhat.com>
* refs/pull/41431/head:
mds: progress the recover queue immediately after the inode is enqueued
mds: switch to mdr->get_client()
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
to ensure the support for the new syntax of "prefix --name bon,jour"
does not break existing behavior of "prefix hello cruel,world" where value2
contains reads "hello,world", and the parsed result should be
prefix="prefix"
value=["hello", "cruel,world"]
instead of something like
prefix="prefix"
value=["hello", "cruel", "world"]
or
prefix="prefix"
value=["cruel", "world"]
the above test only applies to the test where "value" is a CephString.
if "value" is a CephChoices, the parsed argument should be
prefix="prefix"
value=["hello", "cruel", "world"]
Signed-off-by: Kefu Chai <kchai@redhat.com>
instead of comparing the validated argument with empty dict, check for
its content for better coverage of testing.
Signed-off-by: Kefu Chai <kchai@redhat.com>
otherwise nose tries to run it as a test as its name contains "test", like
E.
======================================================================
ERROR: Runs validate in different arg/kargs ways.
----------------------------------------------------------------------
TypeError: arg_kwarg_test() missing 3 required positional arguments: 'prefix', 'args', and 'sig'
Signed-off-by: Kefu Chai <kchai@redhat.com>
"scrub" command was marked obsoleted in
e9a5ce0897, so the test_ceph_argparse
cannot retrieve its command description using "get_command_descriptions"
cli tool anymore, let's drop the related test accordingly.
Signed-off-by: Kefu Chai <kchai@redhat.com>
if desc.N is not None, we should take the argument as a comma separated
values, and validate the values individually.
restructure the validate() function and its helpers to pass the
validated args if desc.N explicitly, as desc.instance.val should only
hold a single value of desc.instance type, otherwise we need to reset
it after collecting all the argument in a CSV string value is parsed.
this change would be less consistent and hackish.
and update a test to verify this behavior.
Fixes: https://tracker.ceph.com/issues/51145
Signed-off-by: Kefu Chai <kchai@redhat.com>
fixup for `--mon-ip` bootstrap test (introduced b3e2c43):
ValueError: 'eth0' does not appear to be an IPv4 or IPv6 address
Signed-off-by: Michael Fritch <mfritch@suse.com>
as later, it could be assigned with None or a str or an int, so make
sure its type is annotated to appease mypy.
also, do not cast it to int, as in other branches, this variable
is just a str.
Signed-off-by: Kefu Chai <kchai@redhat.com>
no need to calculate the alignment first, cbits() would suffice. as it
counts the first set bit and the follow 0's in a number. the result
is identical to the cbit(alignment of that number).
Signed-off-by: Kefu Chai <kchai@redhat.com>
before this change AvlAllocator::_block_picker() is used by both the
best-fit mode and first-fit mode. but since we cannot achieve the
locality by searching in the area pointed by curosr in best-fit mode,
we just pass a dummy cursor to AvlAllocator::_block_picker() when
searching in the best-fit mode.
but since the range_size_tree is already sorted by the size of ranges,
if _block_picker() fails to find one by the size, we should just give
up right away, and instead try again using a smaller size.
after this change, instead of sharing AvlAllocator::_block_picker()
across both the first-fit mode and the best-fit mode, this method
is specialize to two different variants: one for first-fit, and the
simplified one for best-fit.
Signed-off-by: Kefu Chai <kchai@redhat.com>
Right now scrub_test picks any pg in ceph. Unfortunately, it picked the
.mgr pool's only pg in [1]:
2021-05-16T11:36:35.035 DEBUG:teuthology.orchestra.run.smithi049:> adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage rados --cluster ceph --pool rbd setomapval main.db-journal.0000000000000000 key val
Instead, only pick a pg in the rbd pool.
[1] /ceph/teuthology-archive/kchai-2021-05-16_11:19:39-rados-wip-kefu-testing-2021-05-16-1043-distro-basic-smithi/6117396/teuthology.log
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
This is mostly for testing: a lot of tests assume that there are no
existing pools. These tests relied on a config to turn off creating the
"device_health_metrics" pool which generally exists for any new Ceph
cluster. It would be better to make these tests tolerant of the new .mgr
pool but clearly there's a lot of these. So just convert the config to
make it work.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
"device_health_metrics" pool is gone -- .mgr pool is in.
I don't think the pool removal code in some test cases is necessary any
longer with recent changes to remove those warnings; so that code is
gone too.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
This commit just modifies the module to use the sqlite3 database for
storing health metrics. A followup commit loads the legacy pool's data.
Fixes: https://tracker.ceph.com/issues/50278
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>