Kefu Chai [Thu, 5 Dec 2019 07:34:12 +0000 (15:34 +0800)]
common/pick_address.cc: silence GCC warning
* use `string_view` instead of string
* use `auto` instead of `int` to silence the warning
* use `enum class` instead of plain `enum`
* do not specify the value of enum, as
we don't care about it
this change silences following warning
```
../src/common/pick_address.cc: In function ‘int get_iface_numa_node(const string&, int*)’:
../src/common/pick_address.cc:517:11: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const size_type’ {aka ‘const long unsigned int’} [-Wsign-com\
pare]
517 | if (pos != string::npos ) {
| ~~~~^~~~~~~~~~~~~~~
```
Sage Weil [Tue, 10 Dec 2019 22:40:58 +0000 (16:40 -0600)]
Merge PR #31772 into master
* refs/pull/31772/head:
qa/standalone/test_ceph_daemon.sh: clone corpus explicitly
ceph-daemon: re-enable the OSD standalone test
ceph-daemon: move standalone test tgz to corpus
ceph-daemon: add ceph-daemon-adoption-corpus.git submodule
Reviewed-by: Tim Serong <tserong@suse.com> Reviewed-by: Sebastian Wagner <swagner@suse.com> Reviewed-by: Sage Weil <sage@redhat.com>
Ali Maredia [Mon, 25 Nov 2019 02:30:03 +0000 (21:30 -0500)]
qa: update s3-test download code for s3-test tasks
- Ensure the download code for all tasks running
s3-tests is consistent.
- Simplify download code to only use the config
variable 'force-branch' for the branch being
cloned.
- make ceph-master the force-branch for all
suites using s3-tests.
Fixes: https://tracker.ceph.com/issues/43077 Signed-off-by: Ali Maredia <amaredia@redhat.com>
Enabling mirroring for an image that does not support journaling
assumes snapshot based mirroring, which is supported only when the
pool is in the "image" mirror mode.
Also for the pool in the "image" mirror mode disabling/enabling
journaling feature for a mirroring image will switch
snapshot/journal mirror mode.
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()
Michael Fritch [Mon, 9 Dec 2019 16:53:31 +0000 (09:53 -0700)]
ceph-daemon: combine SUDO and ARGS into a single var
- reduce the amount of typing/noise for each CEPH_DAEMON invocation
- ensure the `--image` param is passed to each test invocation
- allow passing additional args to ceph-daemon via CEPH_DAEMON_ARGS
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.