]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
6 years agoauth/AuthRegistry: only complain about disabling cephx if cephx was enabled
Sage Weil [Tue, 5 Feb 2019 11:39:01 +0000 (05:39 -0600)]
auth/AuthRegistry: only complain about disabling cephx if cephx was enabled

This gets rid of some warnings when auth_supported=none.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoauth/AuthRegistry: fix locking for get_supported_methods()
Sage Weil [Mon, 4 Feb 2019 09:51:47 +0000 (03:51 -0600)]
auth/AuthRegistry: fix locking for get_supported_methods()

The other read-side accessors all consume this method and don't
need their own locking.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoauth: remove AUTH_UNKNOWN weirdness, hardcoded defaults.
Sage Weil [Mon, 4 Feb 2019 09:34:33 +0000 (03:34 -0600)]
auth: remove AUTH_UNKNOWN weirdness, hardcoded defaults.

This is what the old code does so I kept it but I don't think it makes any sense.
Same with the defaults; let's just set the config option to something valid.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async/ProtocolV2: remove unused get_auth_allowed_methods
Sage Weil [Mon, 4 Feb 2019 09:32:02 +0000 (03:32 -0600)]
msg/async/ProtocolV2: remove unused get_auth_allowed_methods

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoosd: set up messener auth_* before setting dispatcher (and going 'ready')
Sage Weil [Mon, 4 Feb 2019 09:28:06 +0000 (03:28 -0600)]
osd: set up messener auth_* before setting dispatcher (and going 'ready')

The messenger doesn't activate until you set the dispatcher.  Set up the auth_client
and auth_server values before that.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/AuthMonitor: request max_global_id increase from peon in tick
Sage Weil [Mon, 4 Feb 2019 08:48:56 +0000 (02:48 -0600)]
mon/AuthMonitor: request max_global_id increase from peon in tick

For authv2, we only increase max_global_id from tick, not via prep_auth(), so we
need to ask the leader for more IDs here as we do there.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon: prime MgrClient only after messengers are initialized
Sage Weil [Sun, 3 Feb 2019 19:58:48 +0000 (13:58 -0600)]
mon: prime MgrClient only after messengers are initialized

If we do it earlier we may crash due to an uninitialised messenger
auth_client.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/suites/rados/workloads/rados_api_tests.yaml: debug mgrc = 20 on mon
Sage Weil [Sun, 3 Feb 2019 13:41:26 +0000 (07:41 -0600)]
qa/suites/rados/workloads/rados_api_tests.yaml: debug mgrc = 20 on mon

Seeing some hangs when the mon is forwarding mgr commands (pg deep-scrub)
to the mgr.  This is a buggy test (it should send it to the mgr directly)
but it is helpful to verify the mon forwarding behavior works.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoauth: document Auth{Client,Server} interfaces
Sage Weil [Fri, 1 Feb 2019 18:17:07 +0000 (12:17 -0600)]
auth: document Auth{Client,Server} interfaces

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoauth: future-proof AUTH_MODE_* a bit in case we need to change the encoding byte
Sage Weil [Fri, 1 Feb 2019 18:14:08 +0000 (12:14 -0600)]
auth: future-proof AUTH_MODE_* a bit in case we need to change the encoding byte

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonClient: request monmap on open instead of ping
Sage Weil [Fri, 1 Feb 2019 17:09:42 +0000 (11:09 -0600)]
mon/MonClient: request monmap on open instead of ping

The ping is useless.  The MMonGetMap ensures we get a monmap (and finish
authenticate()) before we get any other maps/messages, like mgr_map.
Getting other maps sooner rather than later can be confuse to MonClient
users because they will get dispatched MMgrMap before the authenticate()
call has returned.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomgr/PyModuleRegistry: add details for MGR_MODULE_{DEPENDENCY,ERROR}
Sage Weil [Thu, 31 Jan 2019 23:51:36 +0000 (17:51 -0600)]
mgr/PyModuleRegistry: add details for MGR_MODULE_{DEPENDENCY,ERROR}

We want to know what modules failed and why.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agocrimson: fix build
Sage Weil [Fri, 1 Feb 2019 12:38:39 +0000 (06:38 -0600)]
crimson: fix build

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonClient: finsih authenticate() only after we get monmap; fix 'tell mgr'
Sage Weil [Thu, 31 Jan 2019 20:05:37 +0000 (14:05 -0600)]
mon/MonClient: finsih authenticate() only after we get monmap; fix 'tell mgr'

We used to get a valid monmap before we finished the MAuth exchange and
returned from authenticate().  Now, we finish authenticating before we even
send or receive a message, so authenticate() returns quickly.  This
confuses many callers, and is probably a bad idea.  So, rejigger the
_finish_auth and _finish_hunting callers so that we finish hunting as soon
as we have picked a mon but don't finish_auth if we have not gotten our
first monmap.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon: add auth_lock to protect auth_meta manipulation
Sage Weil [Thu, 31 Jan 2019 19:10:31 +0000 (13:10 -0600)]
mon: add auth_lock to protect auth_meta manipulation

In particular, we could be handling a get_auth_request() on a reconnect
while also running handle_auth_request() on a racing connection between
monitors.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoceph-mon: set up auth before binding
Sage Weil [Thu, 31 Jan 2019 15:28:30 +0000 (09:28 -0600)]
ceph-mon: set up auth before binding

Otherwise initial connections will fail because they lack the auth_server.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon: defer initial connection auth attempts until initial quorum is formed
Sage Weil [Thu, 31 Jan 2019 15:29:45 +0000 (09:29 -0600)]
mon: defer initial connection auth attempts until initial quorum is formed

Otherwise e.g. a client.admin connectin will fail because the mon doesn't
have the key in the database yet.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonClient: make MonClientPinger an AuthCleint
Sage Weil [Wed, 30 Jan 2019 23:59:51 +0000 (17:59 -0600)]
mon/MonClient: make MonClientPinger an AuthCleint

Reuse MonConnection to do the authentication.

Note this is a change in behavior: ceph ping mon* now requires
authentication.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoceph_test_msgr: use DummyAuth
Sage Weil [Wed, 30 Jan 2019 18:32:02 +0000 (12:32 -0600)]
ceph_test_msgr: use DummyAuth

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoauth/DummyAuth: dummy auth server and client for test code
Sage Weil [Wed, 30 Jan 2019 18:29:06 +0000 (12:29 -0600)]
auth/DummyAuth: dummy auth server and client for test code

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/Monitor: fix leak of auth_handler if we error out
Sage Weil [Wed, 30 Jan 2019 16:55:12 +0000 (10:55 -0600)]
mon/Monitor: fix leak of auth_handler if we error out

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agodoc/dev/cephx: re-wordwrap
Sage Weil [Wed, 30 Jan 2019 16:40:47 +0000 (10:40 -0600)]
doc/dev/cephx: re-wordwrap

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agodoc/dev/cephx: document nautilus change to cephx
Sage Weil [Fri, 25 Jan 2019 09:05:20 +0000 (03:05 -0600)]
doc/dev/cephx: document nautilus change to cephx

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agovstart.sh: fix --msgr2 option
Sage Weil [Wed, 30 Jan 2019 13:04:21 +0000 (07:04 -0600)]
vstart.sh: fix --msgr2 option

Should be v2 only and turn of v1.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async/ProtocolV2: use shared_ptr to manage auth_meta
Sage Weil [Tue, 29 Jan 2019 17:57:55 +0000 (11:57 -0600)]
msg/async/ProtocolV2: use shared_ptr to manage auth_meta

When we reconnect a session, we need to move the new connection's auth_meta
over to the existing connection.  However, the existing connection may
have a thread that is unlocked and calling into an AuthClient or AuthServer
method making good use of the old auth_meta.

Resolved this by making auth_meta a shared_ptr and taking a local ref
before dropping the connection lock.  This way we are free to move the
auth_meta over to the new connection as long as we are holding the lock,
and at the same time the existing connection can fiddle with the old
auth_meta without being disturbed.  (That old auth_meta is about to get
discarded, but we still need to prevent the two threads from stomping on
each other.)

This also cleans up the reset_recv_state() a bit since we can simply
replace the old auth_meta with a totally fresh one without worrying about
what kind of state might be lurking in there.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoauth/Auth{Client,Server}: pass auth_meta in explicitly
Sage Weil [Tue, 29 Jan 2019 17:46:48 +0000 (11:46 -0600)]
auth/Auth{Client,Server}: pass auth_meta in explicitly

This removes the wonky accessor on Connection, and most importantly
allows the caller to control the lifecycle of the AuthConnectionMeta.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonClient: behave if authorizer can't be built (yet)
Sage Weil [Tue, 29 Jan 2019 16:48:15 +0000 (10:48 -0600)]
mon/MonClient: behave if authorizer can't be built (yet)

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoosd: set_auth_server on client_messenger
Sage Weil [Mon, 28 Jan 2019 15:35:58 +0000 (09:35 -0600)]
osd: set_auth_server on client_messenger

monc sets up the AuthClient, not the AuthServer.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agocommon/ceph_context: get_moduel_type() for seastar cct
Sage Weil [Thu, 24 Jan 2019 22:57:05 +0000 (16:57 -0600)]
common/ceph_context: get_moduel_type() for seastar cct

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoauth: make connection_secret a std::string
Sage Weil [Wed, 23 Jan 2019 16:14:16 +0000 (10:14 -0600)]
auth: make connection_secret a std::string

Move connection mode decision to initial auth_request point so that it
can inform auth implementation how big the connection secret should be.
Pass that value through where appropriate.

The connection_secret is now a std::string filled with random bytes.

For now the v2 protocol just uses the session_key CryptoKey to encrypt,
but this is about to change.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoauth,msg/async/ProtocolV2: negotiate connection modes
Sage Weil [Tue, 22 Jan 2019 22:59:22 +0000 (16:59 -0600)]
auth,msg/async/ProtocolV2: negotiate connection modes

The modes are:

- crc: crc32c checksums to protect against bit errors.  No secrecy or
  authenticity guarantees, so a MITM could alter traffic in flight.
- secure: cryptographic secrecy and authenticity proection (i.e, encrypted
  and signed).

We do not include a 'signed' mode that provides authenticity without
secrecy because the cryptographic protocols appear to be faster than
SHA-2.

New settings:

- ms_cluster_mode  : mode(s list) for intra-cluster connections
- ms_service_mode  : mode(s list) for daemons to allow
- ms_client_mode   : mode(s list) for clients to allow

Also,

- ms_mon_cluster_mode  : mon <-> mon connections
- ms_mon_service_mode  : mon <-> daemon or client connections

The msgr2 protocol is expanded slightly to negotiate a mode.  Client
shares it's allowed/preferred modes, and server picks one as auth finishes.
Negotiation is independent of the authentication, except that the
authentiction mode may precluse certain choices. Specifically, AUTH_NONE
does not support 'secure', only 'crc'.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoauth/AuthRegistry: refactor handling of auth_*_requred options
Sage Weil [Tue, 22 Jan 2019 18:27:29 +0000 (12:27 -0600)]
auth/AuthRegistry: refactor handling of auth_*_requred options

- simplify/consolidate my type and peer type effects on auth method
- watch for runtime config changes

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoosd,mgr,mds: remove unused authorize registries
Sage Weil [Mon, 21 Jan 2019 23:55:58 +0000 (17:55 -0600)]
osd,mgr,mds: remove unused authorize registries

These are handled by AuthClient and AuthServer now.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoswitch monc, daemons to use new msgr2 auth frame exchange
Sage Weil [Mon, 21 Jan 2019 16:22:26 +0000 (10:22 -0600)]
switch monc, daemons to use new msgr2 auth frame exchange

- MonClient implements AuthClient to authenticate as a client
- MonClient implements AuthServer to allow daemons to verify authorizers
- Monitor implements AuthServer to allow clients to authenticate with
  an exchange of msgr2 frames
- Monitor implements AuthClient to authenticate with other monitors

After this change ProtocolV1 and SimpleMessenger still use all of the
old Dispatcher-based callbacks, but ProtocolV2 doesn't need them at
all (except for ms_handle_authentication when we finish).

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agodoc/dev/msgr2: update docs to match implementation for auth frames
Sage Weil [Sun, 20 Jan 2019 23:16:54 +0000 (17:16 -0600)]
doc/dev/msgr2: update docs to match implementation for auth frames

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoauth/AuthClientHandler: add build_initial_request hook
Sage Weil [Sun, 20 Jan 2019 23:06:23 +0000 (17:06 -0600)]
auth/AuthClientHandler: add build_initial_request hook

With msgr2 the initial kickoff of an authentication handshake is client ->
server, while with msgr1 it was server -> client.  So existing
implementations have an empty initial message (outside of the messenger's
envelope).  Future auth implementations that are msgr2 only (e.g., krb)
may want to make use of this initial payload.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/Messenger: attach auth_client and/or auth_server to each Messenger
Sage Weil [Sun, 20 Jan 2019 23:03:55 +0000 (17:03 -0600)]
msg/Messenger: attach auth_client and/or auth_server to each Messenger

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoauth: introduce AuthClient and AuthServer handlers
Sage Weil [Sun, 20 Jan 2019 23:03:18 +0000 (17:03 -0600)]
auth: introduce AuthClient and AuthServer handlers

These will be the primary interfaces consumed by the messenger and
implemented by either MonClient (regular client, or service daemon) or
Monitor for doing authentication.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoauth: codify AUTH_MODE_AUTHORIZER
Sage Weil [Sun, 20 Jan 2019 22:51:12 +0000 (16:51 -0600)]
auth: codify AUTH_MODE_AUTHORIZER

The AuthAuthorizer encoding always begins with byte 0x01.  Codify that
as AUTH_MODE_AUTHORIZER so that we can distinguish an authorizer from
something else (e.g., an attempt to authenticate and get an initial auth
ticket with the mon).

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/Connection: track peer_id (id portion of entity_name_t) for msgr2
Sage Weil [Sun, 20 Jan 2019 22:47:38 +0000 (16:47 -0600)]
msg/Connection: track peer_id (id portion of entity_name_t) for msgr2

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoauth/AuthAuthorizeHandler: add get_supported_methods()
Sage Weil [Sun, 20 Jan 2019 22:45:29 +0000 (16:45 -0600)]
auth/AuthAuthorizeHandler: add get_supported_methods()

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoauth/AuthAuthorizeHandler: fix args for verify_authorizer()
Sage Weil [Fri, 18 Jan 2019 21:54:58 +0000 (15:54 -0600)]
auth/AuthAuthorizeHandler: fix args for verify_authorizer()

const bufferlists in, pointers for output args.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoauth: constify bufferlist arg to AuthAuthorizer::add_challenge()
Sage Weil [Thu, 17 Jan 2019 22:55:28 +0000 (16:55 -0600)]
auth: constify bufferlist arg to AuthAuthorizer::add_challenge()

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoauth/cephx: share all tickets and connection_secret in initial reply
Sage Weil [Wed, 16 Jan 2019 16:46:34 +0000 (10:46 -0600)]
auth/cephx: share all tickets and connection_secret in initial reply

Previously, we would give the client the auth ticket, like a rbd TGT
(ticket granting ticket), and the client would then ask for all of the
other tickets it wants in a separate message.

Instead, have the client specify which tickets it wants up front and pass
them all at the same time.

Also, generate and share the connection_secret, which will be used for
encryption.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async,auth: add AuthConnectionMeta to Protocol
Sage Weil [Wed, 16 Jan 2019 20:57:13 +0000 (14:57 -0600)]
msg/async,auth: add AuthConnectionMeta to Protocol

This will hold all of the authentication-related state in an easy-to-find
section that can be accessed via a Connection* or by the protocol stack
(as needed).

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoauth/AuthClientHandler: pass in session_key, connection_secret pointers
Sage Weil [Wed, 16 Jan 2019 21:00:59 +0000 (15:00 -0600)]
auth/AuthClientHandler: pass in session_key, connection_secret pointers

No functional change.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoauth/AuthServiceHandler: take session_key and connection_secret as args
Sage Weil [Wed, 16 Jan 2019 19:56:43 +0000 (13:56 -0600)]
auth/AuthServiceHandler: take session_key and connection_secret as args

Allow these methods to populate session and connection secrets.

No functional change (yet).

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoauth/cephx: pass more specific type into build_session_auth_info
Sage Weil [Wed, 16 Jan 2019 17:21:42 +0000 (11:21 -0600)]
auth/cephx: pass more specific type into build_session_auth_info

We were passing CephXServiceTicketInfo in, but the only part of it we
needed was the embedded AuthTicket.  Pass that instead.

No functional change.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/Session: separate session creation, peer ident, and registration
Sage Weil [Sun, 20 Jan 2019 23:09:56 +0000 (17:09 -0600)]
mon/Session: separate session creation, peer ident, and registration

- We can now construct a session before we know who it is
- We can later call _ident to identify it
- and also later register it in the session map

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/AuthMonitor: bump max_global_id from on_active() and tick()
Sage Weil [Tue, 15 Jan 2019 20:41:36 +0000 (14:41 -0600)]
mon/AuthMonitor: bump max_global_id from on_active() and tick()

We should get some runway even if there isn't an auth request coming in.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/AuthMonitor: be more careful with max_global_id
Sage Weil [Tue, 15 Jan 2019 17:29:34 +0000 (11:29 -0600)]
mon/AuthMonitor: be more careful with max_global_id

We're potentially handing out ids that haven't committed by increasing
max_global_id before it commits.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon: only all ms_handle_authentication() if auth method says we're done
Sage Weil [Mon, 14 Jan 2019 23:18:13 +0000 (17:18 -0600)]
mon: only all ms_handle_authentication() if auth method says we're done

Previously we would call ms_handle_authentication() possibly multiple
times, and without knowning whether it might succeed. Instead, only call
it when start_session() or handle_request() returns >0 to indicate that
we should.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/AuthMonitor: fix "finished with auth" condition check
Sage Weil [Mon, 14 Jan 2019 22:55:08 +0000 (16:55 -0600)]
mon/AuthMonitor: fix "finished with auth" condition check

We are sending the monmap prematurely (before we finish the authentication
handshake).

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoauth: clean up AuthServiceHandler::handle_request() args
Sage Weil [Mon, 14 Jan 2019 22:45:13 +0000 (16:45 -0600)]
auth: clean up AuthServiceHandler::handle_request() args

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoauth: clean up AuthServiceHandler::start_session()
Sage Weil [Mon, 14 Jan 2019 22:13:53 +0000 (16:13 -0600)]
auth: clean up AuthServiceHandler::start_session()

- return error code, not type (which never changes)
- take const ref for input args
- pointers for output args

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/AuthMonitor: drop unused op arg to assign_global_id()
Sage Weil [Mon, 14 Jan 2019 22:07:16 +0000 (16:07 -0600)]
mon/AuthMonitor: drop unused op arg to assign_global_id()

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async: separate TAG_AUTH_REQUEST_MORE and TAG_AUTH_REPLY_MORE
Sage Weil [Mon, 14 Jan 2019 23:00:17 +0000 (17:00 -0600)]
msg/async: separate TAG_AUTH_REQUEST_MORE and TAG_AUTH_REPLY_MORE

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async: consolidate authorizer checks
Sage Weil [Fri, 11 Jan 2019 21:59:58 +0000 (15:59 -0600)]
msg/async: consolidate authorizer checks

No need to special-case auth methods at this layer.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async: move get_auth_allowed into ProtocolV2.cc
Sage Weil [Fri, 11 Jan 2019 21:46:20 +0000 (15:46 -0600)]
msg/async: move get_auth_allowed into ProtocolV2.cc

We're the only user, and no Dispatchers override.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonClient: trivial cleanup
Sage Weil [Sun, 20 Jan 2019 23:07:01 +0000 (17:07 -0600)]
mon/MonClient: trivial cleanup

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoceph_test_msgr: fix server->client addr discovery 26306/head
Sage Weil [Wed, 6 Feb 2019 22:01:01 +0000 (16:01 -0600)]
ceph_test_msgr: fix server->client addr discovery

The client's myaddr will be an ANY address, but the internel connection table
will use a v1: or v2: address.  Use the get_peer_addrs() to figure out how to
connect instead.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/{async,simple}: make learned_addr a bit smarter
Sage Weil [Wed, 6 Feb 2019 12:23:16 +0000 (06:23 -0600)]
msg/{async,simple}: make learned_addr a bit smarter

Only set type ANY if we are a pure client; otherwise, preserve the
type.  Also, only populate the addr if we have a blank ip (sometimes
we already know it from learn_addr_unknowns).

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async: very protocol type when looking up existing connections
Sage Weil [Tue, 5 Feb 2019 11:08:00 +0000 (05:08 -0600)]
msg/async: very protocol type when looking up existing connections

Since we register client connections as any:, we may have either a ProtocolV1 or V2
connection.  This happens when clients have an imprecise mon search list and connect
to the same mon via both v1 and v2, for example when you do something like

 ceph -m 'v2:127.0.0.1:40648/0,v1:127.0.0.1:40649/0' -s

If we do encounter the other protocol type than what we expect, just mark it down and
proceed.  This is only a temporarily case that happens during mon discovery, the client
is always prepared to retry, and it doesn't actually matter which one succeeds since
it will return a monmap and the client will adapt accordingly.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agocommon/LogEntry: use as_legacy_addr()
Sage Weil [Mon, 4 Feb 2019 11:42:38 +0000 (05:42 -0600)]
common/LogEntry: use as_legacy_addr()

...just in case addrs has an any addr.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/msg_types: add entity_addrvec_t::as_legacy_addr()
Sage Weil [Mon, 4 Feb 2019 11:41:42 +0000 (05:41 -0600)]
msg/msg_types: add entity_addrvec_t::as_legacy_addr()

Return either the actual legacy addr, or an any addr as a legacy addr.  If
neither is available, lie and return a v2 (or other) addr as a legacy adr.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async/AsyncMessenger: drop weird assert
Sage Weil [Mon, 4 Feb 2019 11:34:11 +0000 (05:34 -0600)]
msg/async/AsyncMessenger: drop weird assert

I'm not sure what this was intended for originally...

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/Messenger: be less verbose
Sage Weil [Mon, 4 Feb 2019 11:30:12 +0000 (05:30 -0600)]
msg/Messenger: be less verbose

This message has been annoying me

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/simple: learn client addr as type any
Sage Weil [Mon, 4 Feb 2019 11:23:43 +0000 (05:23 -0600)]
msg/simple: learn client addr as type any

Just like AsyncMessenger.  Best to be consistent!

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/simple: set_addr_unknowns(): use front(), not legacy_addr()
Sage Weil [Mon, 4 Feb 2019 11:09:32 +0000 (05:09 -0600)]
msg/simple: set_addr_unknowns(): use front(), not legacy_addr()

We may be passed an any: address.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/msg_types: drop any: prefix
Sage Weil [Mon, 4 Feb 2019 10:57:51 +0000 (04:57 -0600)]
msg/msg_types: drop any: prefix

If it can be any type of address, then simply don't specify the type.  This
is less confusing for humans.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoremove all Messenger::get_myaddr() users
Sage Weil [Sun, 3 Feb 2019 19:48:21 +0000 (13:48 -0600)]
remove all Messenger::get_myaddr() users

Use get_myaddrs() instead and join the glorious future.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agotest/crimson: fix DummyAuthAuthorizer
Sage Weil [Sun, 3 Feb 2019 19:16:29 +0000 (13:16 -0600)]
test/crimson: fix DummyAuthAuthorizer

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonClient: kill get_myaddr()
Sage Weil [Sun, 3 Feb 2019 19:11:01 +0000 (13:11 -0600)]
mon/MonClient: kill get_myaddr()

Not used, and wrong.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async/ProtocolV1: use legacy v1 address, not any, in protocol
Sage Weil [Wed, 6 Feb 2019 23:04:10 +0000 (17:04 -0600)]
msg/async/ProtocolV1: use legacy v1 address, not any, in protocol

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/Messenger: add get_myaddr_legacy()
Sage Weil [Sun, 3 Feb 2019 18:08:18 +0000 (12:08 -0600)]
msg/Messenger: add get_myaddr_legacy()

This returns a legacy v1 address out of a v1 or any address.  It's
intended to be used in contexts where we *always* want a v1 address,
like SimpleMessenger.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/msg_types: add entity_addr_t::is_any()
Sage Weil [Sun, 3 Feb 2019 18:03:11 +0000 (12:03 -0600)]
msg/msg_types: add entity_addr_t::is_any()

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async: msgr2: send entity type and peer_address in Tag::HELLO frame
Ricardo Dias [Wed, 30 Jan 2019 22:15:29 +0000 (22:15 +0000)]
msg/async: msgr2: send entity type and peer_address in Tag::HELLO frame

Signed-off-by: Ricardo Dias <rdias@suse.com>
6 years agomsg/async: identify client using any: addr
Sage Weil [Mon, 28 Jan 2019 08:15:23 +0000 (02:15 -0600)]
msg/async: identify client using any: addr

The client can speak v1 or v2, so it is misleading to identify it with a v1 or v2
address (it is either).  This avoid some kludgey workarounds.

We also are a bit more precise about what target_addr means.  It is only used by
the client to indicate which of the peer_addrs we are connecting to, or by a
peer to identify which the peer_addrs we *would* reconnect to.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoMerge pull request #26198 from Exotelis/mobile-navigation
Lenz Grimmer [Thu, 7 Feb 2019 10:05:50 +0000 (11:05 +0100)]
Merge pull request #26198 from Exotelis/mobile-navigation

mgr/dashboard: Add description to menu items on mobile navigation

6 years agoMerge pull request #25346 from p-na/wip-pna-prettier-modified
Lenz Grimmer [Thu, 7 Feb 2019 10:04:31 +0000 (11:04 +0100)]
Merge pull request #25346 from p-na/wip-pna-prettier-modified

mgr/dashboard: Fix modified files only (frontend)

Reviewed-by: Sebastian Krah <skrah@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
6 years agoMerge pull request #26308 from liu-chunmei/ceph_seastar_io_read
Kefu Chai [Thu, 7 Feb 2019 08:28:23 +0000 (16:28 +0800)]
Merge pull request #26308 from liu-chunmei/ceph_seastar_io_read

test/crimson: fix build failure of test_alien_echo.

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #26253 from tchaikov/wip-remove-random-cache
Kefu Chai [Thu, 7 Feb 2019 02:47:21 +0000 (10:47 +0800)]
Merge pull request #26253 from tchaikov/wip-remove-random-cache

common/random_cache: remove unused RandomCache

Reviewed-By: Neha Ojha <nojha@redhat.com>
6 years agocrimson: fix build error for test_alien_echo. 26308/head
chunmei Liu [Thu, 7 Feb 2019 00:28:10 +0000 (16:28 -0800)]
crimson: fix build error for test_alien_echo.

Signed-off-by: chunmei Liu <chunmei.liu@intel.com>
6 years agoMerge pull request #25575 from ThoreKr/doc-pool-stats-master
Neha Ojha [Wed, 6 Feb 2019 23:10:11 +0000 (15:10 -0800)]
Merge pull request #25575 from ThoreKr/doc-pool-stats-master

doc: Add mention of ceph osd pool stats

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
6 years agoMerge pull request #26189 from s0nea/wip-dashboard-osd-menu-button
Lenz Grimmer [Wed, 6 Feb 2019 19:45:36 +0000 (20:45 +0100)]
Merge pull request #26189 from s0nea/wip-dashboard-osd-menu-button

mgr/dashboard: Group buttons together into one menu on OSD page

Reviewed-by: Sebastian Krah <skrah@suse.com>
6 years agoMerge pull request #26296 from ricardoasmarques/fix-iscsi-docs-url
Lenz Grimmer [Wed, 6 Feb 2019 18:58:30 +0000 (19:58 +0100)]
Merge pull request #26296 from ricardoasmarques/fix-iscsi-docs-url

Fix iSCSI docs URL

Reviewed-by: Tiago Melo <tmelo@suse.com>
6 years agoMerge pull request #26058 from rhcs-dashboard/37917-sso-404-page
Lenz Grimmer [Wed, 6 Feb 2019 18:57:27 +0000 (19:57 +0100)]
Merge pull request #26058 from rhcs-dashboard/37917-sso-404-page

mgr/dashboard: SSO - UserDoesNotExist page

Reviewed-by: Kanika Murarka <kmurarka@redhat.com>
6 years agoMerge pull request #26290 from dzafman/wip-38027-38195
David Zafman [Wed, 6 Feb 2019 16:41:40 +0000 (08:41 -0800)]
Merge pull request #26290 from dzafman/wip-38027-38195

Wip 38027 38195: osd/osd-backfill-space.sh fails

Reviewed-by: Neha Ojha <nojha@redhat.com>
6 years agoMerge pull request #25918 from rjfd/wip-dashboard-nfs-backend
Lenz Grimmer [Wed, 6 Feb 2019 15:41:49 +0000 (16:41 +0100)]
Merge pull request #25918 from rjfd/wip-dashboard-nfs-backend

mgr/dashboard: NFS Ganesha management REST API

Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
6 years agoMerge pull request #26177 from liewegas/wip-stricter-osd-gate
Kefu Chai [Wed, 6 Feb 2019 11:02:34 +0000 (19:02 +0800)]
Merge pull request #26177 from liewegas/wip-stricter-osd-gate

osd: refuse to start if we're > N+2 from recorded require_osd_release

Reviewed-By: Neha Ojha <nojha@redhat.com>
6 years agoMerge pull request #26181 from iliul/fix-pybind-mgr-pep8
Kefu Chai [Wed, 6 Feb 2019 11:01:45 +0000 (19:01 +0800)]
Merge pull request #26181 from iliul/fix-pybind-mgr-pep8

pybind/mgr: PEP 8 code clean and fix typo

Reviewed-by: Dan Mick <dmick@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #26258 from liewegas/wip-disable-krb
Kefu Chai [Wed, 6 Feb 2019 11:00:01 +0000 (19:00 +0800)]
Merge pull request #26258 from liewegas/wip-disable-krb

build: disable kerberos for nautilus

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #26259 from rzarzynski/wip-bl-freeze-alloc-unit
Kefu Chai [Wed, 6 Feb 2019 10:59:22 +0000 (18:59 +0800)]
Merge pull request #26259 from rzarzynski/wip-bl-freeze-alloc-unit

common: make CEPH_BUFFER_ALLOC_UNIT known at compile-time.

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoFix iSCSI docs URL 26296/head
Ricardo Marques [Wed, 6 Feb 2019 10:04:55 +0000 (10:04 +0000)]
Fix iSCSI docs URL

Signed-off-by: Ricardo Marques <rimarques@suse.com>
6 years agoMerge pull request #26094 from sebastian-philipp/orchestrator-cli-command
Sebastian Wagner [Wed, 6 Feb 2019 09:57:45 +0000 (10:57 +0100)]
Merge pull request #26094 from sebastian-philipp/orchestrator-cli-command

mgr/orchestrator: make use of @CLICommand

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
6 years agoMerge pull request #26178 from dzafman/wip-38070
David Zafman [Tue, 5 Feb 2019 22:51:14 +0000 (14:51 -0800)]
Merge pull request #26178 from dzafman/wip-38070

mon: A PG with PG_STATE_REPAIR doesn't mean damaged data, PG_STATE_IN…

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
6 years agoMerge pull request #26273 from yehudasa/wip-38174
Yehuda Sadeh [Tue, 5 Feb 2019 22:01:24 +0000 (14:01 -0800)]
Merge pull request #26273 from yehudasa/wip-38174

vstart.sh: fix params generation for monmaptool

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
6 years agotest: Ignore kill_daemons() error 26290/head
David Zafman [Tue, 5 Feb 2019 19:31:32 +0000 (11:31 -0800)]
test: Ignore kill_daemons() error

Workaround for: http://tracker.ceph.com/issues/38195

Signed-off-by: David Zafman <dzafman@redhat.com>
6 years agotest: Fix kill_daemon() to check after last large sleep
David Zafman [Mon, 4 Feb 2019 21:30:11 +0000 (13:30 -0800)]
test: Fix kill_daemon() to check after last large sleep

Signed-off-by: David Zafman <dzafman@redhat.com>
6 years agotest: Increase timeouts in osd-backfill-space.sh because of failure seen
David Zafman [Fri, 1 Feb 2019 23:02:57 +0000 (15:02 -0800)]
test: Increase timeouts in osd-backfill-space.sh because of failure seen

Fixes: http://tracker.ceph.com/issues/38027
Signed-off-by: David Zafman <dzafman@redhat.com>