Dongsheng Yang [Thu, 8 Mar 2018 07:35:38 +0000 (02:35 -0500)]
rbd: support osd_request_timeout in rbd map command
Default of osd_request_timeout in krbd is 0 means no timeout,
but we sometimes need to set this value by rbd command. then
pass osd_request_timeout to kernel rbd in rbd mapping.
Fixes: http://tracker.ceph.com/issues/23073 Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
Ilya Dryomov [Wed, 7 Mar 2018 10:32:02 +0000 (11:32 +0100)]
krbd: include sys/sysmacros.h for major, minor and makedev
Previously we got these through sys/types.h, but that's now deprecated:
warning: In the GNU C Library, "major" is defined
by <sys/sysmacros.h>. For historical compatibility, it is
currently defined by <sys/types.h> as well, but we plan to
remove this soon. To use "major", include <sys/sysmacros.h>
directly. If you did not intend to use a system-defined macro
"major", you should undefine it after including <sys/types.h>.
Kefu Chai [Wed, 7 Mar 2018 09:17:24 +0000 (17:17 +0800)]
test/mgr: restructure dashboard tests
* restructure dashboard tests so they follow the model of other tests
based on ceph-helpers.sh. i.e. extract the TEST_* out of run()
function.
* expose mon-host using CEPH_ARGS env variable.
* mgr-dashboard_v2-smoke.sh: do not export CEPH_ARGS in a subshell, so
the run_mgr() and ceph cli can also have access to the updated
CEPH_ARGS, and hence they will be able to locate the mon. and because
auth-supported=none is populated using CEPH_ARGS, this test won't fail
because of missing keyring.
Kefu Chai [Wed, 7 Mar 2018 07:04:33 +0000 (15:04 +0800)]
cmake: check for "npm" before using it
and allows use to specify the path in which npm is installed. in my
case, if $HOME/.npmrc points "prefix" to ${HOME}/.npm-packages, i will
be able to run
xie xingguo [Wed, 7 Mar 2018 08:36:03 +0000 (16:36 +0800)]
osd/OSD: batch-list objects to reduce memory consumption
For PG with a huge amount of objects, it wouldn't be an ideal
way to list all of them at a time. Split them into small batches
which we can handle individually efficiently should instead be
the preferred option.
Yupeng Chen [Wed, 7 Mar 2018 05:17:21 +0000 (13:17 +0800)]
msg/async: size of EventCenter::file_events should be greater than fd.
When trying to generate a file event from an FD greater than or equal to the size of file_events vector,
make sure that the resized vector can hold the FD safely.
xie xingguo [Mon, 5 Mar 2018 01:30:45 +0000 (09:30 +0800)]
mon/OSDMonitor: kill pending upmap changes too if pool is gone
There are quite a lot mgr/balancer related tests that I can observe
the following logged errors:
```
2018-03-03 08:14:00.359946 7fdda18cc700 -1 maybe_remove_pg_upmaps unable to load crush-rule of pg 5.b
```
which turns out to be a *pool-deletion* vs *balancer-auto-injected-upmap-changes*
race issue.
The root cause is that we don't clean up those *pending*
pg_upmap/pg_upmap_items injected by the mgr/balancer properly simultaneously
when the corresponding pool is gone, and hence the above problem can be fixed by:
1. clean up any pending upmap changes too if the corresponding pool is gone
2. re-check pending pool removal queue before we can safely apply any new upmap changes
* refs/pull/20502/head:
test: cap waits in delegation tests at 60s
tests: add a test for doing a getattr while caps are recalled but before returned
client: allow getattr, lookup, fstatx, and readdir to use implemented caps
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com> Reviewed-by: Zheng Yan <zyan@redhat.com>
Sage Weil [Mon, 5 Mar 2018 18:59:32 +0000 (12:59 -0600)]
mon/MonClient: fix auth timeout vs error race
It's possible that we successfully set active_con *and* time out the
cond WaitUntil. Only set the error if we don't have a connection; if we
set it *and* time out then let's call it success.
Sage Weil [Wed, 28 Feb 2018 21:59:25 +0000 (15:59 -0600)]
common/config: intercept "keyfile", translate into "key"
The keyfile arg might be - (stdin), which we can only read once. Ensure
that we consume it once by intercepting the CLI value early and inserting
the value into the 'key' option.
This robs future code of the knowledge that the key came from --keyfile
and not --key, but avoids the issue of multiple users (notably, KeyRing.cc
and the OSD mkfs code).
Remove the - special case from OSD at the same time, since it can no
longer be reached (unless something other than the CLI specified '-', but
neither ceph.conf nor the mon config make sense here).
Sage Weil [Wed, 28 Feb 2018 21:37:34 +0000 (15:37 -0600)]
librados: fix common_init_finish timing
Common_init_finish does start_service_thread and does
set_safe_to_start_threads() on the cct, which switches us to 'runtime'
mode where we can't accept many config options. Do that *after* we fetch
our config from the mon so that we can accept+set runtime options (and
not complain to stderr about it).
Sage Weil [Mon, 26 Feb 2018 18:41:46 +0000 (12:41 -0600)]
common/config: check against raw value (no meta) to detect unchanged option
If we are looking at a new value from the mon and comparing it to what we
already have active, compare the non-meta-substituted form. This way a
value from the mon that can't update at runtime but we have already set to
the same value will not be falsely flagged as ignored.
Sage Weil [Tue, 13 Feb 2018 03:47:21 +0000 (21:47 -0600)]
mon/MonClient: apply timeout while fetching config
The normal timeouts automatically apply during the authenticate() stage,
but not to the explicit wait for a config. If we don't get that quickly
we shoudl retry another monitor because it is possible we will connect to
an out-of-quorum (or otherwise unresponsive) mon.
Sage Weil [Thu, 8 Feb 2018 17:20:40 +0000 (11:20 -0600)]
ceph-disk: --no-mon-config
Some of these cases make sense to fetch mon configs, but we are deprecating
ceph-disk anyway, and the tests currently make use of ceph-disk in places
that do not have a mon_host defined via a ceph.conf or other environment.
This avoids breaking those test cases without any real impact on users
(which will either use ceph-volume or presumably remain in a legacy config
environment).