Ilya Dryomov [Tue, 11 Aug 2020 15:45:18 +0000 (17:45 +0200)]
qa: update krbd tests for snap create
"rbd snap create" now reports progress. Pass --no-progress, as in
commit b5a5fea9e2b4 ("test/cli-integration/rbd: tweak after snap create
started to show progress").
Patrick Donnelly [Tue, 11 Aug 2020 22:55:52 +0000 (15:55 -0700)]
Merge PR #36351 into master
* refs/pull/36351/head:
qa/tasks/cephfs/nfs: Add tests for cluster config set and reset
doc/cephfs/nfs: Update the doc about 'reset' and 'set' config interfaces
mgr/volumes/nfs: Add interface for adding user defined configuration
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Dan Mick [Thu, 6 Aug 2020 02:05:10 +0000 (02:05 +0000)]
cmake: don't include tags for Python imports, .tox, build/ dirs
For things like cephadm, where there is a lot of "from X import Y",
the import tags become cumbersome. .tox dirs and
python-common/build are just repeats of source files found elsewhere
so result in duplicate tags
Patrick Donnelly [Mon, 10 Aug 2020 20:40:36 +0000 (13:40 -0700)]
Merge PR #36221 into master
* refs/pull/36221/head:
client: switch lock_guard to scoped_lock
client: remove useless unsafe_sync_write
client: make the root member under the client_lock
client: add mount/initialize states support and convert to RWRef
client: add RWRef support
Reviewed-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Kefu Chai [Fri, 7 Aug 2020 08:49:58 +0000 (16:49 +0800)]
common/ConfUtils: expose parse_buffer()
so it can be used by crimson for reading settings from a conf file.
crimson reads file with async read. since we already have a specialized
ConfigProxy for crimson, it'd be simpler to expose the shared facility
from ConfUtils instead of specializing it in ConfUtils.
Kefu Chai [Fri, 7 Aug 2020 08:28:30 +0000 (16:28 +0800)]
crimson/osd: use "ceph" for default cluster_name
for couple reasons:
* to avoid the pain to guess / update the cluster name when loading
conf file. in the past, we use "ceph" as a fallback for the cluster
name, which is in turn used as a meta name when expanding setting
values containing "$cluster". so to ensure those settings continue
working, we have to at least set cluster_name a safe value, and
"ceph" is what we've been using.
* in
http://lists.ceph.com/pipermail/ceph-users-ceph.com/2017-June/018519.html,
we decided to drop the cluster_name support in deploy tools, and to
keep this feature in code. so in the long run, we can assume
new clusters will be all named "ceph".
* it's difficult to properly implement the feature to use "ceph",
if no --conf option is specified, as, in Ceph, even the path pointing
to conf file is allowed to contain "$cluster". so, to get it
right, we need to update cluster name stored in options before
reading the option files, this forces us to populate the setting
twice when reading the settings from a conf file. or we could
specialize the process, but i don't think it worthy of the
efforts.
so i think we can just use "ceph" for the cluster name in crimson.
Rishabh Dave [Fri, 3 Jul 2020 06:17:50 +0000 (11:47 +0530)]
ceph-volume: remove class Volumes from api/lvm.py
And remove methods is_lv(), get_lv() and get_lv_from_argument() since
these methods uses class Volumes and get_first_lv() or get_lv() can be
easily used instead when needed in future.
Rishabh Dave [Fri, 3 Jul 2020 05:28:02 +0000 (10:58 +0530)]
ceph-volume: remove class VolumeGroups from api/lvm.py
And remove get_vg() since its based on VolumesGroups and get_first_vg()
or get_vg() can be easily used instead in future when needed. Also,
update tests accordingly.
Rishabh Dave [Fri, 3 Jul 2020 05:15:23 +0000 (10:45 +0530)]
ceph-volume: remove PVolumes from api/lvm.py
And method get_pv() since it's based on PVolumes and get_first_pv() and
get_pvs() can be easily used instead in future. Also, update tests
accordingly.
Rishabh Dave [Sat, 1 Aug 2020 18:36:25 +0000 (00:06 +0530)]
ceph-volume: add tests for new functions that run LVM commands
... and for supporting functions. Specifically, these functions are
get_pvs(), get_vgs(), get_lvs(), get_first_pv(), get_first_vg(),
get_first_lv() and make_filters_lvmcmd_ready().
* refs/pull/36501/head:
qa: add tests for mds_min_caps_working_set
mds: add working set minimum for caps
qa: use config_set/config_get
qa: do not append file names to dirname
qa: add exception for test timeouts
A client may hold many inodes pinned in its cache for open files. That
client may be unable to release those caps to respond to cache pressure
from the MDS (or quiescent client cap recall). We should not complain if
that number of capabilities is reasonable (< 10k by default).
Fixes: https://tracker.ceph.com/issues/46830 Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Otherwise the files generated are not actually under the sub-directory!
This is correcting a confusing aspect of the test infrastructure but
doesn't actually require any changes to the tests.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
librbd/cache: Fix scoping issue with lambda capture renaming
Clang complains:
/home/jenkins/workspace/ceph-master-compile/src/librbd/cache/ParentCacheObjectDispatch.cc:97:66: error: 'object_off' in capture list does not name a variable
([this, read_data, dispatch_result, on_dispatched, object_no, object_off,
^
/home/jenkins/workspace/ceph-master-compile/src/librbd/cache/ParentCacheObjectDispatch.cc:98:6: error: 'object_len' in capture list does not name a variable
object_len, snap_id, &parent_trace](ObjectCacheRequest* ack) {
^
/home/jenkins/workspace/ceph-master-compile/src/librbd/cache/ParentCacheObjectDispatch.cc:99:41: error: reference to local binding 'object_off' declared in enclosing function 'librbd::cache::ParentCacheObjectDispatch::read'
handle_read_cache(ack, object_no, object_off, object_len, snap_id,
^
/home/jenkins/workspace/ceph-master-compile/src/librbd/cache/ParentCacheObjectDispatch.cc:81:9: note: 'object_off' declared here
auto [object_off, object_len] = extents.front();
^
/home/jenkins/workspace/ceph-master-compile/src/librbd/cache/ParentCacheObjectDispatch.cc:99:53: error: reference to local binding 'object_len' declared in enclosing function 'librbd::cache::ParentCacheObjectDispatch::read'
handle_read_cache(ack, object_no, object_off, object_len, snap_id,
^
/home/jenkins/workspace/ceph-master-compile/src/librbd/cache/ParentCacheObjectDispatch.cc:81:21: note: 'object_len' declared here
auto [object_off, object_len] = extents.front();
^
/home/jenkins/workspace/ceph-master-compile/src/librbd/cache/ParentCacheObjectDispatch.cc:99:41: error: reference to local binding 'object_off' declared in enclosing function 'librbd::cache::ParentCacheObjectDispatch<librbd::ImageCtx>::read'
handle_read_cache(ack, object_no, object_off, object_len, snap_id,
^
/home/jenkins/workspace/ceph-master-compile/src/librbd/cache/ParentCacheObjectDispatch.cc:242:31: note: in instantiation of member function 'librbd::cache::ParentCacheObjectDispatch<librbd::ImageCtx>::read' requested here
template class librbd::cache::ParentCacheObjectDispatch<librbd::ImageCtx>;
^
/home/jenkins/workspace/ceph-master-compile/src/librbd/cache/ParentCacheObjectDispatch.cc:81:9: note: 'object_off' declared here
auto [object_off, object_len] = extents.front();
^
/home/jenkins/workspace/ceph-master-compile/src/librbd/cache/ParentCacheObjectDispatch.cc:99:53: error: reference to local binding 'object_len' declared in enclosing function 'librbd::cache::ParentCacheObjectDispatch<librbd::ImageCtx>::read'
handle_read_cache(ack, object_no, object_off, object_len, snap_id,
^
/home/jenkins/workspace/ceph-master-compile/src/librbd/cache/ParentCacheObjectDispatch.cc:81:21: note: 'object_len' declared here
auto [object_off, object_len] = extents.front();
^
6 errors generated.
fixes: https://github.com/ceph/ceph/pull/36145 Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>