Kefu Chai [Thu, 7 Feb 2019 13:13:14 +0000 (21:13 +0800)]
msg/msg_types.h: do not cast `ceph_entity_name` to `entity_name_t` for printing
in GCC-9, `-Waddress-of-packed-member` is enabled, so we have warnings like:
src/msg/msg_types.h:142:41: warning: converting a packed 'const
ceph_entity_name' pointer (alignment 1) to a 'const entity_name_t'
pointer (alignment 8) may result in an unaligned pointer value
[-Waddress-of-packed-member]
142 | return out << *(const entity_name_t*)&addr;
| ^~~~
since the alignment of these two structures are different, we cannot
cast a structure with the alignment of 1 to a structure with the
alignment of 8. as the code generated by compiler accessing the members
of alignment 8 won't work with the members of alignment 1, we need to
create a temporary structure for printing it.
Yingxin Cheng [Wed, 30 Jan 2019 02:29:33 +0000 (10:29 +0800)]
crimson/net: crimson messenger performance test tool
Support the following settings:
* mode: both, client mode, server mode;
* set server address;
* rounds of messages;
* keepalive-ratio;
* block size;
* io-depth;
Tiago Melo [Mon, 11 Feb 2019 15:08:25 +0000 (15:08 +0000)]
mgr/dashboard: Fix order of table buttons
"float:none" is changing the order of the table buttons.
By reverting this change and setting .oadatatableactions to "float:left",
we get the same result as intended before.
Kefu Chai [Tue, 12 Feb 2019 08:30:03 +0000 (16:30 +0800)]
rpm,deb: remove python-jinja2 dependency
python-jinja2 dependency was added for the dashboard v1 in 87399bea. but
dashboard v2, which is now known as "dashboard" has taken the place of
the old dashboard. and dashboard now does not use jinja2, so we should
drop this dependency.
Yingxin Cheng [Tue, 12 Feb 2019 05:11:16 +0000 (13:11 +0800)]
crimson/net: enable connections on all cores
Implement the sharded crimson-messenger:
* Sharded Messenger: provides shared-nothing Messenger for each shard,
it's interfaces are symmetric to be called, any modifications will be
applied to all shards.
* Sharded/non-sharded Dispatcher interface: allow connections to be
dispatched, and related resources (such as Session) to be managed in
its own shard or not.
* Sharded Connection: A connection only lives at one dedicated core
during its lifecycle. It's sharded by its peer_IP in this PoC, because
peer port and nonce are not available when a socket is accepted. While
its interfaces are safe to be called from all shards.
* Replace `boost::intrusive_ptr` by seastar native smart ptrs for
`Connection` and `SocketConnection`, because they need to be
destructed from its original core.
* Unit test: establish multiple connections on both client and server
sides, they runs concurrently and creates sessions that are also
following shared-nothing design.
Sage Weil [Mon, 11 Feb 2019 23:26:19 +0000 (17:26 -0600)]
Merge PR #26282 into master
* refs/pull/26282/head:
mon: include progress events in 'ceph status' output
mon/MgrStatMonitor: persist progress events
mgr: send progress events to mon
mgr/progress: revise message syntax a bit
mgr/progress: report events into mgr
mgr: allow progress events to be reported from modules
mgr/progress: make persist period/interval configurable
mgr/progress: prune completed events
Sage Weil [Mon, 11 Feb 2019 17:02:28 +0000 (11:02 -0600)]
msg/async/ProtocolV2: refuse incoming reconnect attempt intended for someone else
The same scenario that was possible on client_ident is also possible
for reconnect: on the accepting side we recognized the client_addrs
but the client is trying to reach someone else. Since the cookie is a
random 64-bit value it is unlikely, but still possible, that we will
match an existing session that is not for the client.
Sage Weil [Mon, 11 Feb 2019 15:29:30 +0000 (09:29 -0600)]
msg/async/ProtocolV2: refuse incoming connection intended for someone else
If we get a client_ident frame, and they are trying to talk to someone
else, drop the connection.
This is an inelegant workaround to http://tracker.ceph.com/issues/38247.
A nicer fix would be to restructure the protocol so that the client knows
who they connected to before they try to open a session. That is a bigger
change that can follow...
Fixes: http://tracker.ceph.com/issues/38247 Signed-off-by: Sage Weil <sage@redhat.com>
Jason Dillaman [Fri, 8 Feb 2019 15:14:03 +0000 (10:14 -0500)]
librbd: get_parent API method should properly handle migrating image
The true parent of a migrating parent is actually the parent of the
migration source image. There are other API methods available to
retreive the details of the migration source.
Fixes: http://tracker.ceph.com/issues/37998 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Ernesto Puerta [Wed, 6 Feb 2019 17:04:23 +0000 (18:04 +0100)]
doc: mgr/dashboard: feature-toggles: Fix config
Add '*.inc.rst' to the list of excluded patterns from sphinx-build. This
allows for using '*.inc.rst' as includes, and avoids duplicates. The
benefit of keeping the trailing '.rst' extension is that most IDEs use
that to render reStructured Text files.
Sage Weil [Sat, 9 Feb 2019 19:46:51 +0000 (13:46 -0600)]
Merge PR #25977 into master
* refs/pull/25977/head:
qa/suites: exclude new packages when installing old versions
rpm: add dependency on python-kubernetes module to ceph-mgr-rook package
rpm,deb: add rbd_support module to ceph-mgr
packaging: split ceph-mgr diskprediction and rook plugins into own packages
Reviewed-by: Tim Serong <tserong@suse.com> Reviewed-by: Kefu Chai <kchai@redhat.com> Reviewed-by: Sage Weil <sage@redhat.com>
Sage Weil [Sat, 9 Feb 2019 14:29:18 +0000 (08:29 -0600)]
Merge PR #26327 into master
* refs/pull/26327/head:
doc/dev/msgr2: bring up to date with new HELLO, different RECONNECT
msg/async/ProtocolV2: separate IDENT into {CLIENT,SERVER}_IDENT
Sage Weil [Fri, 8 Feb 2019 14:59:52 +0000 (08:59 -0600)]
osd/OSD: respect osdmap message limits
We restructure the function significantly to let us work forwards instead
of backwards through epochs. We also make the assumption that the OSD
will have the maps it is supposed to have. If we for some reason fail to
load a map, we fall back to something minimal, but in general there is
little point to sending a more complete message when local maps are missing
since it shouldn't ever happen anyway and the receiver can always go get
maps from the mon.
Fixes: http://tracker.ceph.com/issues/38040 Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Fri, 8 Feb 2019 13:16:07 +0000 (07:16 -0600)]
ceph-osd: fix warning
/home/sage/src/ceph/src/ceph_osd.cc: In function ‘int main(int, const char**)’:
/home/sage/src/ceph/src/ceph_osd.cc:478:31: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
require_osd_release + 2 < ceph_release()) {
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
Kefu Chai [Fri, 8 Feb 2019 08:09:11 +0000 (16:09 +0800)]
Merge pull request #26301 from tchaikov/wip-cxx17-aggre-init
changes to address FTBFS on fc30
Reviewed-by: Brad Hubbard <bhubbard@redhat.com> Reviewed-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
Sage Weil [Thu, 7 Feb 2019 22:51:39 +0000 (16:51 -0600)]
Merge PR #26059 into master
* refs/pull/26059/head:
mon/MonClient: fix keepalive with v2 auth
msg/async/ProtocolV2: reject peer_addrs of -
msg/async/ProtocolV2: clean up feature management
mon/MonClient: set up rotating_secrets, etc before msgr ready
msg/async: let client specify preferred order of modes
msg/async/ProtocolV2: include entity_name, features in reconnect
msg/async/ProtocolV2: fix write_lock usage around AckFrame
qa/suites/rados/verify/validator/valgrind: debug refs = 5
qa/standalone/ceph-helpers: fix health_ok test
auth/AuthRegistry: only complain about disabling cephx if cephx was enabled
auth/AuthRegistry: fix locking for get_supported_methods()
auth: remove AUTH_UNKNOWN weirdness, hardcoded defaults.
msg/async/ProtocolV2: remove unused get_auth_allowed_methods
osd: set up messener auth_* before setting dispatcher (and going 'ready')
mon/AuthMonitor: request max_global_id increase from peon in tick
mon: prime MgrClient only after messengers are initialized
qa/suites/rados/workloads/rados_api_tests.yaml: debug mgrc = 20 on mon
auth: document Auth{Client,Server} interfaces
auth: future-proof AUTH_MODE_* a bit in case we need to change the encoding byte
mon/MonClient: request monmap on open instead of ping
mgr/PyModuleRegistry: add details for MGR_MODULE_{DEPENDENCY,ERROR}
crimson: fix build
mon/MonClient: finsih authenticate() only after we get monmap; fix 'tell mgr'
mon: add auth_lock to protect auth_meta manipulation
ceph-mon: set up auth before binding
mon: defer initial connection auth attempts until initial quorum is formed
mon/MonClient: make MonClientPinger an AuthCleint
ceph_test_msgr: use DummyAuth
auth/DummyAuth: dummy auth server and client for test code
mon/Monitor: fix leak of auth_handler if we error out
doc/dev/cephx: re-wordwrap
doc/dev/cephx: document nautilus change to cephx
vstart.sh: fix --msgr2 option
msg/async/ProtocolV2: use shared_ptr to manage auth_meta
auth/Auth{Client,Server}: pass auth_meta in explicitly
mon/MonClient: behave if authorizer can't be built (yet)
osd: set_auth_server on client_messenger
common/ceph_context: get_moduel_type() for seastar cct
auth: make connection_secret a std::string
auth,msg/async/ProtocolV2: negotiate connection modes
auth/AuthRegistry: refactor handling of auth_*_requred options
osd,mgr,mds: remove unused authorize registries
switch monc, daemons to use new msgr2 auth frame exchange
doc/dev/msgr2: update docs to match implementation for auth frames
auth/AuthClientHandler: add build_initial_request hook
msg/Messenger: attach auth_client and/or auth_server to each Messenger
auth: introduce AuthClient and AuthServer handlers
auth: codify AUTH_MODE_AUTHORIZER
msg/Connection: track peer_id (id portion of entity_name_t) for msgr2
auth/AuthAuthorizeHandler: add get_supported_methods()
auth/AuthAuthorizeHandler: fix args for verify_authorizer()
auth: constify bufferlist arg to AuthAuthorizer::add_challenge()
auth/cephx: share all tickets and connection_secret in initial reply
msg/async,auth: add AuthConnectionMeta to Protocol
auth/AuthClientHandler: pass in session_key, connection_secret pointers
auth/AuthServiceHandler: take session_key and connection_secret as args
auth/cephx: pass more specific type into build_session_auth_info
mon/Session: separate session creation, peer ident, and registration
mon/AuthMonitor: bump max_global_id from on_active() and tick()
mon/AuthMonitor: be more careful with max_global_id
mon: only all ms_handle_authentication() if auth method says we're done
mon/AuthMonitor: fix "finished with auth" condition check
auth: clean up AuthServiceHandler::handle_request() args
auth: clean up AuthServiceHandler::start_session()
mon/AuthMonitor: drop unused op arg to assign_global_id()
msg/async: separate TAG_AUTH_REQUEST_MORE and TAG_AUTH_REPLY_MORE
msg/async: consolidate authorizer checks
msg/async: move get_auth_allowed into ProtocolV2.cc
mon/MonClient: trivial cleanup