Sage Weil [Tue, 10 Dec 2019 14:49:52 +0000 (08:49 -0600)]
Merge PR #32132 into master
* refs/pull/32132/head:
osd/OSDMap: rename old calc_pg_role -> calc_pg_role_broken
osd/OSDMap: remove dead osd_is_valid_op_target
osd/OSDMap: fix get_pg_acting_role()
osd: use spg_t for pending_creates_from_osd
osd/OSDMap: drop unused get_pg_acting_role()
osd/OSDMap: fix+simplify is_up_acting_osd_shard
osd: use new and improved calc_pg_role()
osd/OSDMap: new calc_pg_role() that takes a pg_shard_t
osd/OSDMap: calc_pg_rank -> calc_pg_role
osd/PeeringState: debug lines for upacting_features, proc_lease
osd/PeeringState: use pg_vector_string for operator<<
Roman Penyaev [Thu, 21 Mar 2019 17:10:11 +0000 (18:10 +0100)]
os/bluestore: introduce new io_uring IO engine
This implements low-level IO engine, which utilizes brand-new
io_uring IO interface: https://lwn.net/Articles/776428/
By default libaio is used. If bluestore_ioring=true is set but kernel
does not support io_uring or architecture is not x86-64, libaio will be
used instead.
In current patch liburing library is used in order not to open code
everything.
In order to compile with liburing WITH_LIBURING=ON should be specified.
Kefu Chai [Tue, 10 Dec 2019 04:41:36 +0000 (12:41 +0800)]
doc: use console lexer for rendering command line sessions
by default the pygements uses python lexer for rendering literal blocks,
and `#` is considered as the marker for inline comments. in this change,
the "console" lexer is specified explicitly. see
https://pygments.org/docs/lexers/#lexers-for-various-shells for more details,
in which "BashSessionLexer" is for this very use case.
Kefu Chai [Tue, 10 Dec 2019 03:03:13 +0000 (11:03 +0800)]
cmake: silence messages when cppcheck/IWYU is not found
* remove messages spit when these tools are not found
they are not necessary for building Ceph. and the messages in the cmake
output are distracting.
* fix a typo
Sage Weil [Mon, 9 Dec 2019 20:46:39 +0000 (14:46 -0600)]
Merge PR #31489 into master
* refs/pull/31489/head:
pybind/rados: add WriteOp::writesame() and test WriteOp::writesame()
pybind/rados: add Ioctx::aio_writesame() and test Ioctx::aio_writesame()
pybind/rados: add Ioctx::writesame() and test Ioctx::writesame()
Sage Weil [Mon, 9 Dec 2019 16:30:26 +0000 (10:30 -0600)]
Merge PR #31907 into master
* refs/pull/31907/head:
mgr/dashboard: properly handle a missing rbd-mirror service status
mgr: cull service daemons when the last instance has been removed
mgr: ensure new daemons are properly indexed by hostname
Reviewed-by: Sage Weil <sage@redhat.com> Reviewed-by: Tatjana Dehler <tdehler@suse.com> Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Ilya Dryomov [Wed, 4 Dec 2019 18:08:46 +0000 (19:08 +0100)]
qa: kernel.sh: unlock before rolling back
"rbd snap rollback" expects an unlocked image, but we may get there
locked if object map is enabled (or if lock_on_read is specified in
rbd_default_map_options).
Ilya Dryomov [Wed, 4 Dec 2019 14:26:54 +0000 (15:26 +0100)]
qa: krbd_exclusive_option.sh: update for recent kernel changes
Since 5.3:
- a plain "rbd map" acquires the lock, so it's not different from
"rbd map -o exclusive" in this regard
- if the lock is held by the exclusive peer, I/O is failed right away
instead of blocking
- lock_timeout option is respected only by "rbd map" and not by I/O
Since 5.5:
- if the mapping is read-only, the lock isn't acquired
Added blacklisting test case, dropped lock_timeout test case.
Sage Weil [Mon, 9 Dec 2019 15:44:11 +0000 (09:44 -0600)]
osd: use new and improved calc_pg_role()
An acting set might be [0,1,2,1], and we want pgs 1.0s2 and 1.0s4 on
osd.1 to get roles 1 and 3, respectively (instead of 1 and -1). This
allows the second EC PG on the OSD to have role >= 0.
This probably was unnoticed before, but now it leads to hangs in the
rados/thrash-erasure-code collection because proc_lease() bails out
when is_nonprimary() fails (due to role < 0).
Fixes: https://tracker.ceph.com/issues/43189 Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Mon, 9 Dec 2019 15:41:31 +0000 (09:41 -0600)]
osd/OSDMap: new calc_pg_role() that takes a pg_shard_t
If you have an acting set like [0,1,2,1] then osd.1 has two possible roles
(1 and 3). If we simply return the first one we see then we can't
correctly calculate a role for a pg like 1.0s3. Take pg_shard_t instead.
Jos Collin [Tue, 3 Dec 2019 09:12:28 +0000 (14:42 +0530)]
mgr/volumes: check for string values in uid/gid
chown allows strings as per bbbfb44453f204286a8ff312349d42afde5fced6,
which caused this error. Eventhough uid/gid are input as CephInt, the
qa tests can pass in only string values to _fs_cmd. So try converting
the incoming uid/gid to int in create_subvolume and create_group.
It might be a valid string.
Fixes: https://tracker.ceph.com/issues/43038 Signed-off-by: Jos Collin <jcollin@redhat.com>
taodd [Sun, 8 Dec 2019 02:10:59 +0000 (10:10 +0800)]
ceph-volume: fix the type mismatch, covert the tries and interval to int from string. Fixes: https://tracker.ceph.com/issues/43186 Signed-off-by: dongdong tao <dongdong.tao@canonical.com>
Sage Weil [Sat, 7 Dec 2019 21:34:59 +0000 (15:34 -0600)]
mgr/diskprediction_local: import scipy early to fix self-test deadlock
We are seeing a hang on centos7 (but not ubuntu 18.04) from
from .predictor import get_diskfailurepredictor_path
in _predict_life_expentancy.
Doing that same predictor import at the top of the file doesn't help--it
hangs right when the diskpredictor_local module is loaded. Commenting
out the import scipy in predictor.py avoids the hang.
I'm not sure why, but doing the full scipy import here appears to work
around the problem.
Fixes: https://tracker.ceph.com/issues/42764 Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Sat, 7 Dec 2019 18:28:15 +0000 (12:28 -0600)]
Merge PR #32039 into master
* refs/pull/32039/head:
test: Improve races by using kill_daemons which waits for OSDs terminate
test: run-standalone.sh: Only run execs in the subdirectories of qa/standalone
test: Use activate_osd() when restarting OSDs
test: osd-scrub-snaps.sh: Fix race with osd restart and doing a scrub
Sage Weil [Fri, 6 Dec 2019 21:54:06 +0000 (15:54 -0600)]
qa/tasks/mgr/test_orchestrator_cli: test with valid network or IP
Passing 'network' will fail with
Error EINVAL: Failed to parse host list: '['host1:network', 'host2:network', 'host3:network']': u'network' does not appear to be an IPv4 or IPv6 address
Sage Weil [Fri, 6 Dec 2019 21:14:31 +0000 (15:14 -0600)]
ceph-daemon: fix bootstrap ownership of tmp monmap file
The file is created with mode 0644 by the ceph:ceph user, but root
cannot write to that. Instead, create the tmp file owned by root, write
to it, then chown it to user ceph.
David Zafman [Fri, 6 Dec 2019 17:01:41 +0000 (09:01 -0800)]
test: run-standalone.sh: Only run execs in the subdirectories of qa/standalone
This will ignore scripts placed at the qa/standalone level, though
I'm not sure if we should be putting any tests there. It does
allow support scripts present like ceph-helper.sh without modifying
run-standalone.sh to ignore it.