Commit Graph

97843 Commits

Author SHA1 Message Date
Kefu Chai
1070a1f788 auth/Auth: pass utime_t by const reference
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-04-29 00:12:57 +08:00
Kefu Chai
8dbb9a1c91 auth/cephx: do not require a cct for accessing config
crimson/msgr does not depend on ConfigProxy at the time of writing. we
want to decouple it from config subsystem in hope to have less cross
subsystem dependencies and speed up the compiling speed.

but, to introduce cephx to msgr, we need to enable msgr to read from
ConfigProxy at runtime. so, to avoid keeping a CephContext instance
simply for accessing the ConfigProxy reference in it, it would be more
efficient to define a free function `conf()` which hides the difference
between crimson and classic user of auth/cephx.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-04-29 00:12:57 +08:00
Kefu Chai
2283f9580a crimson/net: learn my address from peer
OSD always relies on its server to tell its address, without this
feature, it will advertise a blank ip address to monitor in MOSDBoot.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-04-29 00:12:57 +08:00
Kefu Chai
e9dc950a16 crimson/mon: pass cct to verify_authorizer()
CephxAuthorizeHandler::verify_authorizer() uses it for querying config
and for a RNG, so we have to pass it a CephContext which has `_conf` and
`random()`.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-04-29 00:12:57 +08:00
Kefu Chai
4cef78aa91 crimson/osd: pass Connection* to Dispatch::ms_dispatch()
it's a regression introduced by c69bf0c002

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-04-29 00:12:57 +08:00
Kefu Chai
04786235c2 crimson/net: sign message and check it if authorizer is available
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-04-29 00:12:57 +08:00
Kefu Chai
1d30bb4e79 crimson/mon: set entity_name before trying to connect to mon
otherwise Monitor.cc or AuthMonitor.cc won't be able to find it in the
keyring.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-04-29 00:12:57 +08:00
Kefu Chai
ad5fe6a70d crimson/mgr: connect mgr with v2 protocol
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-04-29 00:12:57 +08:00
Kefu Chai
5f61282e8e crimson: remove ms_get_authorizer() and friends
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-04-29 00:12:57 +08:00
Kefu Chai
2eb4ee45d5 test/crimson: disable authorizer for tests
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-04-29 00:12:57 +08:00
Kefu Chai
1a3a14628c crimson/osd: sync msgr's require_authorizer with osdmap
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-04-29 00:12:57 +08:00
Kefu Chai
0a1095968a crimson/mon: tolerate lack of authorizer for some messengers
also, we should not crash on empty auth request buffer.

see also 64eddc4d and b99daab1

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-04-29 00:12:57 +08:00
Yingxin Cheng
88588cf70a crimson/net: migrate protocol v1 to auth-client/server
Signed-off-by: Yingxin Cheng <yingxincheng@gmail.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-04-29 00:12:57 +08:00
Sage Weil
ab565beba6 osd: reenable authorizer on hb messenger for nautilus+
Signed-off-by: Sage Weil <sage@redhat.com>
2019-04-28 10:37:45 -05:00
Kefu Chai
176db063be crimson: add Messenger::{set,get}_require_authorizer()
This flag is used for compatibility with pre-nautilus OSDs, which do not
send authorizers on the OSD heartbeat connections.  However, because the
AuthServer is implemented by MonClient, which is shared across all
OSD messengers, we can't set this to false for the OSD without disabling
all auth.  Instead, make it a Messenger property, and set it only on the
heartbeat server messengers.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-04-28 23:23:49 +08:00
Sage Weil
b99daab134 mon/MonClient: do not crash on empty auth request buffer
Signed-off-by: Sage Weil <sage@redhat.com>
2019-04-28 08:45:03 -05:00
Sage Weil
f10660e84f msg: set_require_authorizer on messenger, not dispatcher
This flag is used for compatibility with pre-nautilus OSDs, which do not
send authorizers on the OSD heartbeat connections.  However, because the
AuthServer is implemented by MonClient, which is shared across all
OSD messengers, we can't set this to false for the OSD without disabling
all auth.  Instead, make it a Messenger property, and set it only on the
heartbeat server messengers.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-04-28 08:43:28 -05:00
Jason Dillaman
cb40cc2594 librbd: removed 'ImageCtx::parent_lock'
The ImageCtx parent-related data structures are now protected
by the image_lock.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-04-28 09:15:25 -04:00
Jason Dillaman
e1fe6d5a6a librbd: removed 'ImageCtx::object_map_lock'
The 'image_lock' now protects the 'object_map' pointer and
the contents of the object-map itself are protected by a
private lock.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-04-28 09:15:20 -04:00
Jason Dillaman
a8882932e7 librbd: protect object map with a private member lock
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-04-28 09:15:19 -04:00
Jason Dillaman
d1eb013fc9 librbd: removed 'ImageCtx::md_lock'
This lock used to protect the IO pathway to prevent writes but
that is now handled by the io::ImageRequestWQ. Additional
historical uses have been temporarily moved to the
'ImageCtx::image_lock'

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-04-28 09:15:19 -04:00
Jason Dillaman
236ffa3181 librbd: renamed 'ImageCtx::snap_lock' to 'image_lock'
This is the first step in consolidating multiple locks under a single
reader/writer lock for simplicity.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-04-28 09:15:14 -04:00
Kefu Chai
2ff7c1328b
Merge pull request #27766 from majianpeng/msg-noneed-set-connection
msg/async: no-need set connection for Message.

Reviewed-by: Ricardo Dias <rdias@suse.com>
2019-04-28 19:20:49 +08:00
Kefu Chai
994de982c2
Merge pull request #27767 from tchaikov/wip-buf-denc-const
buffer, denc: more constness

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
2019-04-28 19:18:38 +08:00
Yuval Lifshitz
0e8ac0618c
Merge pull request #27671 from yuvalif/fix_arn_issue
rgw/pubsub: fix topic arn. tenant support to multisite tests
2019-04-28 11:43:02 +03:00
Kefu Chai
62c6cb4451 crimson/net: prefer <fmt/chrono.h> over <fmt/time.h>
in latest libfmt, <fmt/time.h> is deprecated.

to silence warnings like

/home/kchai/ceph/src/fmt/include/fmt/time.h:13:2: warning: #warning
fmt/time.h is deprecated, use fmt/chrono.h instead [-Wcpp]
 #warning fmt/time.h is deprecated, use fmt/chrono.h instead
  ^~~~~~~
In file included from
/home/kchai/ceph/src/seastar/include/seastar/core/reactor.hh:72:0,
                 from
/home/kchai/ceph/src/seastar/include/seastar/core/sharded.hh:24,
                 from /home/kchai/ceph/src/crimson/net/Fwd.h:18,
                 from /home/kchai/ceph/src/crimson/net/Protocol.h:9,
                 from /home/kchai/ceph/src/crimson/net/ProtocolV2.h:6,
                 from /home/kchai/ceph/src/crimson/net/ProtocolV2.cc:4:

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-04-28 16:02:25 +08:00
Sage Weil
90e4c5fad5 mon/Monitor: allow probe if MMonProbe::mon_release == 0
Mimic doesn't set this, but we still need to allow them to probe us.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-04-27 11:03:30 -05:00
Mykola Golub
ab1c8043b0
Merge pull request #27757 from dillaman/wip-39021-2
librbd: copyup read stats were incorrectly tied to child

Reviewed-by: Mykola Golub <mgolub@suse.com>
2019-04-27 18:58:53 +03:00
Sage Weil
dcde01e306 mon: fix min_mon_release print
Signed-off-by: Sage Weil <sage@redhat.com>
2019-04-27 10:56:11 -05:00
Sage Weil
cf45294686 Merge PR #18694 into master
* refs/pull/18694/head:
	Merge branch 'master' into sk-add_current_num_in_quota_info
	mon/OSDMonitor.cc: Add current numbers of objects and bytes

Reviewed-by: Sage Weil <sage@redhat.com>
2019-04-27 10:41:18 -05:00
Sage Weil
f5314cfb33 Merge PR #22411 into master
* refs/pull/22411/head:
	common/WorkQueue: narrow ThreadPool::_lock in func worker.

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2019-04-27 10:41:01 -05:00
Sage Weil
320acd45a0 Merge PR #27821 into master
* refs/pull/27821/head:
	common/options: allow osd_pool_default_pg_autoscale_mode to update a runtime

Reviewed-by: Neha Ojha <nojha@redhat.com>
2019-04-27 10:40:44 -05:00
Sage Weil
f4c4e112b0 Merge PR #27823 into master
* refs/pull/27823/head:
	msg/async/ProtocolV1: generate authorizer for mon to mon connections
	mon/Monitor: require authorizer from peer monitors

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
2019-04-27 10:40:29 -05:00
Neha Ojha
f4684eb864
Merge pull request #27798 from neha-ojha/wip-39441
osd/PG: do not use approx_missing_objects pre-nautilus

Reviewed By: Xie Xingguo <xie.xingguo@zte.com.cn>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2019-04-26 16:00:53 -07:00
David Zafman
a8b8ce5c75
Merge pull request #27209 from dzafman/wip-38840
osd: Don't evict after a flush if intersecting scrub range

Reviewed-by: Neha Ojha <nojha@redhat.com>
2019-04-26 15:23:37 -07:00
David Zafman
66b041fa4a
Merge pull request #27769 from dzafman/wip-39333
osd-backfill-space.sh test failed in TEST_backfill_multi_partial()

Reviewed-by: Neha Ojha <nojha@redhat.com>
2019-04-26 11:55:04 -07:00
Sage Weil
d1b8093174 Merge PR #27732 into master
* refs/pull/27732/head:
	common/assert: include ceph_abort_msg(arg) arg in log output

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
2019-04-26 13:24:01 -05:00
Sage Weil
d2520707e0 Merge PR #27729 into master
* refs/pull/27729/head:
	osd: take heartbeat_lock when calling heartbeat()

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
2019-04-26 13:23:36 -05:00
Sage Weil
fe3ead1802 Merge PR #26176 into master
* refs/pull/26176/head:
	os/bluestore: do not check osd_max_object_size in _open_path()

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
Reviewed-by: Sage Weil <sage@redhat.com>
2019-04-26 13:23:21 -05:00
Sage Weil
8de8eadc6e Merge PR #27786 into master
* refs/pull/27786/head:
	qa/suites/upgrade/*-x-singleton: enable bluestore debugging settings

Reviewed-by: Neha Ojha <nojha@redhat.com>
2019-04-26 13:23:04 -05:00
Sage Weil
b9a04409aa msg/async/ProtocolV1: generate authorizer for mon to mon connections
Signed-off-by: Sage Weil <sage@redhat.com>
2019-04-26 13:18:42 -05:00
Sage Weil
e2f32372a4 mon/Monitor: require authorizer from peer monitors
Mon to mon links use authorizers.  It's only non-mons connecting to mons
that use MAuth messages.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-04-26 13:07:18 -05:00
Greg Farnum
d11672db82 common, osd: remove erroneous 'section' in dump functions
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2019-04-26 11:03:53 -07:00
David Zafman
9931023457 test: osd-backfill-spsace.sh doesn't matter which PG wins the race
Fixes: http://tracker.ceph.com/issues/39333

Signed-off-by: David Zafman <dzafman@redhat.com>
2019-04-26 10:11:00 -07:00
Sage Weil
23e6b0c5ea common/options: allow osd_pool_default_pg_autoscale_mode to update a runtime
Signed-off-by: Sage Weil <sage@redhat.com>
2019-04-26 11:26:21 -05:00
Sage Weil
c25d26375c Merge PR #27789 into master
* refs/pull/27789/head:
	os/bluestore: correctly measure deferred writes into new blobs

Reviewed-by: Igor Fedotov <ifedotov@suse.com>
2019-04-26 10:40:47 -05:00
Sage Weil
908ea39b3b Merge PR #27655 into master
* refs/pull/27655/head:
	common/options: flag misc ms_* options STARTUP
	common/options: flag misc options STARTUP
	common/options: mark cluster log options with FLAG_RUNTIME, use get_val
	common/options: mark a bunch of options with FLAG_STARTUP

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
2019-04-26 10:40:31 -05:00
Jason Dillaman
483074ef7a
Merge pull request #27724 from idryomov/wip-rbd-copyup-zeros
librbd: snapshot object maps can go inconsistent during copyup

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2019-04-26 08:11:58 -04:00
Jason Dillaman
334241998e
Merge pull request #27755 from trociny/wip-rbd-io-scheduler-leak
librbd: leak on canceling simple io scheduler timer task

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2019-04-26 08:11:17 -04:00
Jan Fajerski
c0e58bd8ae monitoring: add a few prometheus alerts
Alerts are from
https://github.com/SUSE/DeepSea/blob/SES5/srv/salt/ceph/monitoring/prometheus/files/ses_default_alerts.yml
but updated for the mgr module and node_exporter >= 0.15.

Signed-off-by: Jan Fajerski <jfajerski@suse.com>
2019-04-26 11:21:39 +02:00