Commit Graph

94168 Commits

Author SHA1 Message Date
Ricardo Dias
1b097e8164
msg/async: msgr2: don't force write event on every message received
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-25 19:42:37 +00:00
Sage Weil
5145120c2e
msg/async/ProtocolV2: be forgiving in server identity check
If we parse something out of mon_host or are given an addr by a user,
we should succeed as long as our target_addr is one of the destination's
addrs.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-01-25 09:15:19 +00:00
Sage Weil
71f1e1604b
msg/async/ProtocolV2: fault if we connect to the wrong peer
Someone else may have bound to the same port.  If they identify as someone
else, fault and back off.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-01-24 16:50:28 +00:00
Ricardo Dias
23c0883d4f
msg/async: msgr2: clean cookie if connection failed in ACCEPT_SESSION
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-24 09:48:44 +00:00
Sage Weil
b2b123435f
msg/async/ProtocolV2: do not bump connect_seq for fault during ACCEPTING_SESSION
If we have a connection race, and we lose, we may end up with outgoing
messages *and* be in ACCEPTING_SESSION.  If we then fault, we want to
leave connect_seq at 0 to avoid triggering a reset.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-01-24 07:17:41 +00:00
Ricardo Dias
10220d0eb4
msg/async: msgr2: don't send SESSION_RETRY_GLOBAL in handle_existing_connection
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:29 +00:00
Ricardo Dias
db131b3130
msg/async: msgr2: organizing log messages
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:29 +00:00
Ricardo Dias
97f30e9913
msg/async: msgr2: fix connection fault when replacing
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:29 +00:00
Ricardo Dias
126431053a
msg/async: msgr2: fix replacing race handling
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:28 +00:00
Ricardo Dias
1c6491840a
msg/async: msgr2: fix connection race when existing connection is newer
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:28 +00:00
Ricardo Dias
0a6a6a1272
msg/async: msgr2: assign recv_stamp in handle_message
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:28 +00:00
Ricardo Dias
a9c879089e
msg/async: msgr2: fix peer_addrs discovery
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:28 +00:00
Ricardo Dias
9da6ef7925
msg/async: msgr2: keep authorizer bufferlist across reconnects
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:28 +00:00
Ricardo Dias
9a2864d38d
msg/async: msgr2: fix connection secret problems for WITH_SEASTAR builds
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:28 +00:00
Ricardo Dias
fc6ceeb8bf
msg/async: msgr2: send keepalive on connection race winner
Msgr2 version of PR #25754

Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:28 +00:00
Ricardo Dias
c5fe37277b
msg/async: msgr2: fix client address learning
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:28 +00:00
Ricardo Dias
467571972b
msg/async: msgr2: fix keepalive_ack message
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:27 +00:00
Ricardo Dias
e1b431bc08
msg/async: msgr2: do not force updating rotating keys inline
Msgr2 version of PR #25859

Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:27 +00:00
Ricardo Dias
f4beb0e7c4
msg/async: msgr2: fix mark_down vs accept race
Msgr2 version of PR #25823

Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:27 +00:00
Ricardo Dias
3093667b19
msg/async: msgr2: unregister con from accept vs mark_down race
Msgr2 version of PR #25755

Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:27 +00:00
Sage Weil
1a95c5ba18
auth/cephx/CephxSessionHandler: use connection_secret for encryption
Signed-off-by: Sage Weil <sage@redhat.com>
2019-01-23 13:59:27 +00:00
Sage Weil
67218f12e3
msg,cephx: establish a unique connection_secret for every connection
The session_key is unique for each time we newly authenticate with the
mon--e.g., for each client instantiation.  This is not ideal for
encryption, since we don't want to encrypt all connections with the same
key.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-01-23 13:59:27 +00:00
Ricardo Dias
4af9e4c9ac
msg/async: msgr2: use sha256_digest_t to print signature hex strings
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:27 +00:00
Ricardo Dias
3a382e473f
types.h,rgw: merge sha*_digest_t definitions
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:26 +00:00
Ricardo Dias
290131b676
msg/async: msgr2: close connection when no authorizer is given
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:26 +00:00
Ricardo Dias
514213de6d
msg/async: msgr2: formatting fixes
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:26 +00:00
Ricardo Dias
4341c1d6ee
msg/async: msgr2: send client v2 address when only v1 address is defined
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:26 +00:00
Ricardo Dias
101d75c1f2
msg/async: msgr2: add payload length to banner
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:26 +00:00
Ricardo Dias
da141adcad
msg/async: msgr2: check protocol state after fast dispatch
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:26 +00:00
Ricardo Dias
f43cc51cdb
msg/async: msgr2: reduce log level for sending messages event
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:26 +00:00
Ricardo Dias
5312d97efe
msg/async: msgr2: call verify authorizer when CEPH_AUTH_NONE is used
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:25 +00:00
Ricardo Dias
27cd977a74
msg/async: msgr2: store peer entity name in the protocol
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:25 +00:00
Ricardo Dias
83eb0b3bc0
msg/async: msgr2: apply sign/encrypt to messages data payload
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:25 +00:00
Ricardo Dias
ff752f2e08
msg/async: msgr2: encryption/decryption of frames
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:25 +00:00
Ricardo Dias
6ec5c9c117
cephx: added encrypt/decrypt bufferlist method to session handler
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:25 +00:00
Ricardo Dias
68fe3ff734
msg/async: msgr2: refactored the frame structures
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:25 +00:00
Ricardo Dias
caf65b063e
cephx: add sign bufferlist method
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:25 +00:00
Ricardo Dias
289d88bd31
options: msgr2 enable/disable signing and encrytion options
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:24 +00:00
Ricardo Dias
01b247b110
msg/async: msgr2: cephx authentication
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:24 +00:00
Ricardo Dias
2063fa9ecf
msg/async: msgr2: implement reconnect
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:24 +00:00
Ricardo Dias
98741f3a07
msg/async: msgr2: fault handling
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:24 +00:00
Ricardo Dias
38eafa721e
msg/async: msgr2: messange exchange phase
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:24 +00:00
Ricardo Dias
6032ae85f2
msg/async: msgr2: message flow handshake
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:24 +00:00
Ricardo Dias
31d022a0e5
msg/async: msgr2: authentication phase
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:23 +00:00
Ricardo Dias
b0bd699e02
msg/async: msgr2: exchange peer_type in banner phase
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:23 +00:00
Ricardo Dias
094b1e4d23
test/msgr: cloned test_msgr test for testing msgr2 protocol
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:23 +00:00
Ricardo Dias
4eeb361e81
msg/async: msgr2: banner exchange
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:23 +00:00
Ricardo Dias
f9d2328a50
msg/async: asyncconnection: update the source address info
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:23 +00:00
Ricardo Dias
372f6303d0
msg/async: move base class Protocol its own source file
Signed-off-by: Ricardo Dias <rdias@suse.com>
2019-01-23 13:59:23 +00:00
Lenz Grimmer
ba556a7722
Merge pull request #25991 from jtlayton/wip-dashboard
mgr/dashboard: add a script to run an API request on a rook cluster

Reviewed-by: Ricardo Dias <rdias@suse.com>
2019-01-23 12:04:35 +01:00