Kefu Chai [Sat, 11 Jan 2020 08:37:17 +0000 (16:37 +0800)]
crimson: avoid creating temporary with protected dtor
to address the compiler error from clang 9.0.1:
../src/crimson/os/cyanstore/cyan_collection.cc:16:34: error: temporary of type 'boost::intrusive_ref_counter<Object, boost::thread_unsafe_counter>' has protected destructor
return new crimson::os::Object{};
^
/opt/ceph/include/boost/smart_ptr/intrusive_ref_counter.hpp:157:30: note: declared protected here
BOOST_DEFAULTED_FUNCTION(~intrusive_ref_counter(), {})
^
Kefu Chai [Sat, 11 Jan 2020 08:26:54 +0000 (16:26 +0800)]
crimson: move() explicitly to avoid copy
to silence following warnings from clang 9.0.1:
src/crimson/osd/heartbeat.cc:143:14: warning: local variable 'extras' will be copied despite being returned by name [-Wreturn-std-move]
return extras;
^~~~~~
../src/crimson/osd/heartbeat.cc:143:14: note: call 'std::move' explicitly to avoid copying
return extras;
^~~~~~
std::move(extras)
Kefu Chai [Sat, 11 Jan 2020 08:07:42 +0000 (16:07 +0800)]
crimson: do not capture unused variables
this silences warnings from clang:
src/crimson/osd/heartbeat.cc:109:14: warning: lambda capture 'this' is
not used [-Wunused-lambda-capture]
.then([this, &info=peer_info->second] (auto xcon_front, auto
xcon_back) {
^~~~~
Patrick Donnelly [Sat, 11 Jan 2020 00:16:00 +0000 (16:16 -0800)]
Merge PR #32213 into master
* refs/pull/32213/head:
cephfs-shell: don't catch libcephfs.Error unnecessarily
cephfs-shell: make every command set a return value on failure
pybind/cephfs: move LibCephFSStateError closer to base class
pybind/cephfs: add method to get error code in Error and OSError
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Milind Changire [Fri, 10 Jan 2020 06:31:34 +0000 (12:01 +0530)]
mds: throttle scrub start for multiple active MDS
* add check to "scrub start" command handler to dishonor request if
multiple MDS are "active" for a recursive scrub request
* add check to MDSRank::handle_mds_map() to see if scrubbing is in
progress and max_mds is greater than 1, if so then scrubbing is
aborted. This is supposed to take care of the condition when scrubbing
has been started with max_mds == 1 and then bumped to a higher value
Kefu Chai [Fri, 10 Jan 2020 05:28:10 +0000 (13:28 +0800)]
qa/tasks/mgr: set mgr module option with --force
if mgr is not active, monitor will refuse to set any option consumed by
mgr modules.
the reason the tests pass somtimes is that, we have a racing here:
1. stop all mgr daemons
2. MgrMonitor gets updated and updates its mgr_module_options
accordingly.
3. in TestDashboard.setUp(), we reset the port number for dashboard
using "ceph config set mgr mgr/dashboard/y/ssl_server_port 7789"
4. restart all mgr daemons
but the 2nd step and 3rd step could race with each other, if the 2nd
step happens after 3rd step, the test passes. otherwise it fails.
in this change, "--force" is passed to the "ceph config set" command,
so ConfigMonitor can bypass the sanity test for the option, and just
set this option.
Kefu Chai [Thu, 9 Jan 2020 11:36:37 +0000 (19:36 +0800)]
qa/tasks/cephfs_test_runner: setattr to class not instance
before this change, `setattr()` sets the instance specialized with a certain method
of test case, so in `MgrTestCase.setUpClass()`
assert cls.mgr_cluster is not None
fails,
after this change, instead of test case, the class of test suite is updated with the
specified params, even if we pass a certain test to test runner.
so we can
Rishabh Dave [Fri, 13 Dec 2019 06:51:03 +0000 (12:21 +0530)]
pybind/cephfs: move LibCephFSStateError closer to base class
At first look it appears that class OSError is the only class derived
from class Error which makes class Error look redundant. Therefore, it's
better to move class LibCephFSStateError from the bunch of exception
classes derived from OSError to closer to class Error.
Kefu Chai [Thu, 9 Jan 2020 07:35:57 +0000 (15:35 +0800)]
cmake: let vstart depend on radosgwd
in f528f173, in cmake, the target of executable "radosgw" is renamed
to "radosgwd", and the static library of "radosgw_a" was renamed to
"radosgw". this broke the tests which expected radosgw to be available
if "tests" was built.
in this change, both "vstart" and "tests" now depend on "radosgwd"
instead of "radosgw".
Kefu Chai [Tue, 7 Jan 2020 08:15:51 +0000 (16:15 +0800)]
qa/tasks/ceph_manager: do not pick a pool is there is no pools
random.choice(seq) raises IndexError if seq is empty. we cannot ensure
there is always one or more pools in the cluster while using pool
related thrasher. so skip the thrasher action if there is no pools at
that moment.
client: propagate -ENOTCONN errors for ll_releasedir
When initially added via e2dc1b6bf284, the unconditional
ceph_ll_releasedir() zero-return doesn't appear to have had any effect,
as Client::ll_releasedir() always returned zero. efca340596ef added -ENOTCONN errors when Client::ll_releasedir() is
called during unmount. Ensure that this error is propagated.
"fs fail" will only fail the MDS that are part of the file system which
will generally allow us to avoid spurious MDS_INSUFFICIENT_STANDBY
warnings. Further, only restart the MDS, there's no reason to leave them
offline.
Fixes: https://tracker.ceph.com/issues/43514 Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
* refs/pull/30802/head:
cephfs-shell: Modify Quota Test
cephfs-shell: Fix permission errors on quota tests
cephfs-shell: Add tests for quota
cephfs-shell: Print max_bytes and max_files as string on get Quota
cephfs-shell: Remove extra length argument passed to setxattr()
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com> Reviewed-by: Rishabh Dave <ridave@redhat.com>
* refs/pull/32347/head:
cephfs-shell: set shell.exit_code to 1 when reading conf fails
cephfs-shell: cephfs-shell breaks when conf_get() returns None
cephfs-shell: use libcephfs for exceptions
cephfs-shell: fix incorrect use of str.strip
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
* refs/pull/32459/head:
qa/tasks: Nothing to clean up if the volume was not created
mgr/volumes: drop obsolete comment in _cmd_fs_volume_create
mgr/volumes: cleanup on fs create error
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Tatjana Dehler [Thu, 2 Jan 2020 12:22:48 +0000 (13:22 +0100)]
mgr/dashboard: fix failing user tests
Choose another future_date_1 date (9 days instead of 10) to
make sure the expiration date will be between future_date_1
and future_date_2. Otherwise the expiration date might be
equal to future_date_1.
Also wait for 10 seconds before the password refresh in
test_pwd_expiration_date_update to prevent date equality.
Fixes: https://tracker.ceph.com/issues/43431 Signed-off-by: Tatjana Dehler <tdehler@suse.com>
Ronen Friedman [Mon, 6 Jan 2020 07:46:49 +0000 (09:46 +0200)]
crimson: fix lambda captures of non-variables
One cannot just capture a structured binding "non-variable".
(From the C++ standard, $8.4.5.2:
"If a lambda-expression [...] captures a structured binding (explicitly or implicitly),
the program is ill-formed.")