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>
Tim Serong [Wed, 5 Aug 2020 06:34:20 +0000 (16:34 +1000)]
cephadm: don't add `ceph-volume lvm activate` for adopted simple OSDs
This changes the logic in deploy_daemon_units() to add either `chown` calls
for simple (ceph-disk style) OSDs, or to add `ceph-volume lvm activate` calls
for LVM OSDs, rather than always adding both. When I was working on
https://github.com/ceph/ceph/pull/34703, I'd originally added an "osd_simple"
flag to figure out what type of OSD was being adopted/deployed, but passing
that around was kinda ugly, so was removed from that PR. This time around
I'm checking if /etc/ceph/osd/$OSD_ID-$OSD_FSID.json.adopted-by-cephadm
exists, which seems pretty safe IMO. My only concern with this method is:
what happens if someone adopts a simple OSD, then later wants to migrate it
to LVM. Presumably that's a destroy and recreate, keeping the same OSD ID?
If that's true, then the JSON file probably still exists, so the subsequent
create will do the wrong thing, i.e. will add `chown` calls, not `ceph-volume
lvm activate` calls. Any/all feedback appreciated...
Fixes: https://tracker.ceph.com/issues/46833 Signed-off-by: Tim Serong <tserong@suse.com>
Kefu Chai [Tue, 4 Aug 2020 07:20:46 +0000 (15:20 +0800)]
crimson/admin: read non-string settings as well
before this change, we were using
local_conf().get_val<std::string>(var);
for reading a setting when serving a "config get" command even if the
setting being queried is a non-string. so without this change, a failure
is returned complaining "unrecognized option..."
in this change:
* use get_val(string,string*) for querying the string representation
of the queried setting
* drop the check for existence of "var" parameter, validate_cmd()
always take care of this.
Kefu Chai [Sat, 1 Aug 2020 15:38:15 +0000 (23:38 +0800)]
common/HeartbeatMap: use relaxed order
use memory_order_relaxed instead of memory_order_seq_cst, as the
ordering of storing of `timeout` and `suicide_timeout` does not matter,
and we don't need to synchorinize the cache for the consistent memory
view of local core. what we need is but the atomic read/write operation
of these individual variables.
Jan Fajerski [Thu, 30 Jul 2020 09:46:00 +0000 (11:46 +0200)]
ceph-volume: dependency on python-ceph-common
Since e5b585d15de8b07e0a179344d4187582a5c069f2 ceph-volume depends on
python-ceph-common. This commit introduces this dependency for the
ceph-osd rpm (which includes ceph-volume) and installs the dependency
for tox runs.
Fixes: https://tracker.ceph.com/issues/46772 Fixes: e5b585d15de8b07e0a179344d4187582a5c069f2 Signed-off-by: Jan Fajerski <jfajerski@suse.com>
Or Ozeri [Thu, 16 Jul 2020 11:14:36 +0000 (14:14 +0300)]
librbd: support reading multiple extents in the object dispatch interface
This commit extends the object dispatch read function to support multiple object extents (using a single librados ObjectOperation).
In addition, we add an option to return the version number for that read.
This new function will be used by the new crypto object dispatch layer to support read-modify-write operation required for encrypting and writing unaligned data.
Kefu Chai [Sun, 2 Aug 2020 01:31:01 +0000 (09:31 +0800)]
mgr/cephadm: track dependency in tox.ini
* track dependency for running tox tests with tox.ini. the fix
test is not performed by "make check", so `install-deps.sh`
is not responsible for preparing the autopep8 wheels. hence
we can just put it in tox.ini
* remove "python_version >= '3'" as we do not support python2
Kefu Chai [Sat, 1 Aug 2020 16:28:36 +0000 (00:28 +0800)]
crimson/osd: send pg_stat with correct seq
* set the osd_stat in pg_stat message sent to mgr, otherwise the seq id
in the message would be always 0.
* return the seq id composed of up_epoch and osd_stat_seq when serving
"flush_pg_stats" tell command.
Kefu Chai [Sat, 1 Aug 2020 10:07:35 +0000 (18:07 +0800)]
messages/MPGStats: print seq instead of tid
osd_stat.seq is a monotonic increasing sequence number which marks
the version of the of the report. since we don't use the tid to track
a MPGStats message and its MPGStatsAck message, it's more interesting to
us to print the sequence id. we use it to verify if a pg_stats is
flushed or not from a certain OSD.
Kefu Chai [Sat, 1 Aug 2020 10:04:01 +0000 (18:04 +0800)]
osd/OSD: do not include MPGStatsAck.h
pg_stat report and ack machinery was removed in 528736bed3a6adffa37d0bad6a0e1bedb55db931, and we don't generate or handle
MPGStatsAck anymore since mimic. so remove it.
Kefu Chai [Sat, 1 Aug 2020 05:17:44 +0000 (13:17 +0800)]
cmake: do not check OFED_PREFIX anymore
OFED_PREFIX was added to compile with xio messenger for supporting RDMA
using the Accelio and/or MLNX_OFED package. but xio messenger was removed in
in cc9a9142fd41ee5c98792c6f6d2e5504