]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
6 years agoqa/suites/fs/upgrade: don't bind to v2 addrs
Sage Weil [Fri, 21 Dec 2018 19:21:57 +0000 (13:21 -0600)]
qa/suites/fs/upgrade: don't bind to v2 addrs

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/tasks/mon_thrash: avoid 'mon addr' in mon section
Sage Weil [Fri, 21 Dec 2018 18:20:57 +0000 (12:20 -0600)]
qa/tasks/mon_thrash: avoid 'mon addr' in mon section

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonClient: disable ms_bind_msgr2 if NAUTILUS feature not set
Sage Weil [Fri, 21 Dec 2018 14:57:22 +0000 (08:57 -0600)]
mon/MonClient: disable ms_bind_msgr2 if NAUTILUS feature not set

Do not try to bind to v2 addresses until all of the mons will know what
we are doing and will be able to advertise those addresses.

This avoids the possibility of corner cases where we bind to one thing
but advertise something different via the various cluster maps.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoosd/OSDMap: maintain compat addr fields
Sage Weil [Fri, 21 Dec 2018 14:38:00 +0000 (08:38 -0600)]
osd/OSDMap: maintain compat addr fields

Fixes b47d9135d5345816037899cd1d12a5a20b54e6c1 and
9fb1e521c7c75c124b0dbf193e8b65ff1b5f461e.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/msg_types: add get_legacy_str()
Sage Weil [Fri, 21 Dec 2018 14:37:25 +0000 (08:37 -0600)]
msg/msg_types: add get_legacy_str()

Render a pre-nautilus entity_addr_t string.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomds/MDSMap.h: maintain compat addr field
Sage Weil [Fri, 21 Dec 2018 14:32:05 +0000 (08:32 -0600)]
mds/MDSMap.h: maintain compat addr field

This avoids breaking anyone looking at a pre-nautilus dump.
Fixes ea1481d08d561cdf0229e440b70b88fe336d3f89.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MgrMap: maintain compat active_addr field
Sage Weil [Fri, 21 Dec 2018 14:30:03 +0000 (08:30 -0600)]
mon/MgrMap: maintain compat active_addr field

This avoids breaking anyone looking at a pre-nautilus dump.  Fixes
7f787704cdcd55df18d204c5251cdd6a3cedd604.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonClient: reconnect to mon if it's addrvec appears to have changed
Sage Weil [Fri, 21 Dec 2018 13:17:34 +0000 (07:17 -0600)]
mon/MonClient: reconnect to mon if it's addrvec appears to have changed

This primarily kicks in if we connect to a mon's v1 address during the
initial probe and then discover that it has v2+v1.  It's a catch-all,
though, so that we'll reconnect to the (er, a) mon in any case where we
see it's addresses change.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/tasks/ceph.conf.template: increase mon_mgr_mkfs_grace
Sage Weil [Thu, 20 Dec 2018 22:55:45 +0000 (16:55 -0600)]
qa/tasks/ceph.conf.template: increase mon_mgr_mkfs_grace

The grace starts with the monmap creation stamp, and ceph.py does a lot
of work between creating that map and actually starting daemons (e.g.,
preparing all of the osd devices), leading to occasional MGR_DOWN errors.
Double the grace period.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async/ProtocolV2: fill in IP for all peer_addrs
Sage Weil [Thu, 20 Dec 2018 19:23:59 +0000 (13:23 -0600)]
msg/async/ProtocolV2: fill in IP for all peer_addrs

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async: print all addrs on debug lines
Sage Weil [Thu, 20 Dec 2018 19:21:49 +0000 (13:21 -0600)]
msg/async: print all addrs on debug lines

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonMap: no noname- mon name prefix when for_mkfs
Sage Weil [Thu, 20 Dec 2018 16:57:44 +0000 (10:57 -0600)]
mon/MonMap: no noname- mon name prefix when for_mkfs

Teuthology no longer puts mon addr in ceph.conf, and instead sets the
mon_host option globally.  That means a different path for
ceph-monstore-tool rebuild to regenerate the monmap, and the generated
map's names need to match teuthologies.

This change fixes the teuthology rebuild test because that tests's mon
names happen to also be 'a', 'b', 'c'.  It's fragile, but it works.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoceph-monstore-tool: print initial monmap
Sage Weil [Thu, 20 Dec 2018 16:54:24 +0000 (10:54 -0600)]
ceph-monstore-tool: print initial monmap

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async/ProtocolV2: advertise ourselves as a v2 addr when using v2 protocol
Sage Weil [Wed, 19 Dec 2018 22:38:01 +0000 (16:38 -0600)]
msg/async/ProtocolV2: advertise ourselves as a v2 addr when using v2 protocol

We may have learned our address from a v1 connection, so myaddrs() is
a v1 addr like [v1:1.2.3.4:123/4392].  When we connect to someone using
msgr2, we should advertise ourselves as a v2 address, or else we risk
confusing everyone because we are a "v1" endpoint using the v2 protocol.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async: assert existing protocol matches current protocol
Sage Weil [Wed, 19 Dec 2018 20:53:43 +0000 (14:53 -0600)]
msg/async: assert existing protocol matches current protocol

If we are (potentially) replacing a connection, assert that the protocol
version matches.  If it doesn't, something very weird is going on!

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async: add missing modelines
Sage Weil [Wed, 19 Dec 2018 20:52:18 +0000 (14:52 -0600)]
msg/async: add missing modelines

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonMap: add missing modeline
Sage Weil [Wed, 19 Dec 2018 20:51:59 +0000 (14:51 -0600)]
mon/MonMap: add missing modeline

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agovstart.sh: put mon addrs in mon_host, not 'mon addr'
Sage Weil [Wed, 19 Dec 2018 16:42:58 +0000 (10:42 -0600)]
vstart.sh: put mon addrs in mon_host, not 'mon addr'

Notably, mon addr won't take an addrvec, while everything else will.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async: better debug around conn map lookups and updates
Sage Weil [Wed, 19 Dec 2018 16:39:55 +0000 (10:39 -0600)]
msg/async: better debug around conn map lookups and updates

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonClient: dump initial monmap at debug level 10
Sage Weil [Wed, 19 Dec 2018 16:37:15 +0000 (10:37 -0600)]
mon/MonClient: dump initial monmap at debug level 10

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/standalone/osd/osd-fast-mark-down: use v1 addr w/ simplemessenger
Sage Weil [Wed, 19 Dec 2018 16:03:48 +0000 (10:03 -0600)]
qa/standalone/osd/osd-fast-mark-down: use v1 addr w/ simplemessenger

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/tasks/ceph: set initial monmap features with using addrvec addrs
Sage Weil [Wed, 19 Dec 2018 03:35:28 +0000 (21:35 -0600)]
qa/tasks/ceph: set initial monmap features with using addrvec addrs

The --add option will only infer a bare IP to include a v2 addr if the
NAUTILUS feature is there, and that isn't normally present on a freshly
generate monmap.  Add it if we are doing addrvecs!

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomonmaptool: add --enable-all-features option
Sage Weil [Wed, 19 Dec 2018 03:34:30 +0000 (21:34 -0600)]
monmaptool: add --enable-all-features option

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/tasks/ceph: only use monmaptool --addv if addr has [,:v]
Sage Weil [Wed, 19 Dec 2018 03:28:49 +0000 (21:28 -0600)]
qa/tasks/ceph: only use monmaptool --addv if addr has [,:v]

Otherwise, we want the --add path, which has the logic to infer ports,
v2+v1, etc.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/tasks/ceph_manager: make get_mon_status use mon addr
Sage Weil [Wed, 19 Dec 2018 03:18:57 +0000 (21:18 -0600)]
qa/tasks/ceph_manager: make get_mon_status use mon addr

We don't have the 'mon addr' config property any more.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/tasks/ceph: keep mon addrs in ctx namespace
Sage Weil [Wed, 19 Dec 2018 03:18:31 +0000 (21:18 -0600)]
qa/tasks/ceph: keep mon addrs in ctx namespace

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/OSDMonitor: log all osd addrs on boot
Sage Weil [Tue, 18 Dec 2018 18:52:24 +0000 (12:52 -0600)]
mon/OSDMonitor: log all osd addrs on boot

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/simple: behave when v2 and v1 addrs are present at target
Sage Weil [Tue, 18 Dec 2018 13:17:12 +0000 (07:17 -0600)]
msg/simple: behave when v2 and v1 addrs are present at target

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonClient: warn if global_id changes
Sage Weil [Mon, 17 Dec 2018 19:18:29 +0000 (13:18 -0600)]
mon/MonClient: warn if global_id changes

Shouldn't happen!

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/Connection: add warning/note on get_peer_global_id
Sage Weil [Mon, 17 Dec 2018 19:15:00 +0000 (13:15 -0600)]
msg/Connection: add warning/note on get_peer_global_id

This field isn't populated for loopback connections because the msgr
doesn't have any insight into what global_id its user has.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomds/MDSDaemon: clean up handle_mds_map debug output a bit
Sage Weil [Mon, 17 Dec 2018 13:33:48 +0000 (07:33 -0600)]
mds/MDSDaemon: clean up handle_mds_map debug output a bit

The old wording was misleading!

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/suites/rados/upgrade: debug mds
Sage Weil [Mon, 17 Dec 2018 04:09:04 +0000 (22:09 -0600)]
qa/suites/rados/upgrade: debug mds

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomds/MDSRank: improve is_stale_message to handle addrvecs
Sage Weil [Fri, 14 Dec 2018 21:53:30 +0000 (15:53 -0600)]
mds/MDSRank: improve is_stale_message to handle addrvecs

If we get a connection on a loopback from ourselves, get_source_addrs()
will have everything we bound to, but the mdsmap may only have the v1
address.  Avoid the addrvec comparison by instead comparing the
ConnectionRefs.

NOTE: this implementation is a stopgap.  We should really maintain a map
of ConnectionRefs for the current up set and compare the ConnectionRefs
directly instead of comparing addr(vecs).

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async: make loopback detect when sending to one of our many addrs
Sage Weil [Fri, 14 Dec 2018 21:10:50 +0000 (15:10 -0600)]
msg/async: make loopback detect when sending to one of our many addrs

Drop the assert just because it's inefficient and not necessary.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/suites/rados/upgrade: no aggressive pg num changes
Sage Weil [Thu, 13 Dec 2018 22:04:19 +0000 (16:04 -0600)]
qa/suites/rados/upgrade: no aggressive pg num changes

We now run with mixed mons and old mgrs, so this won't work.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/OSDMonitor: require nautilus mons for require_osd_release=nautilus
Sage Weil [Thu, 13 Dec 2018 15:15:17 +0000 (09:15 -0600)]
mon/OSDMonitor: require nautilus mons for require_osd_release=nautilus

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/OSDMonitor: require mimic mons for require_osd_release=mimic
Sage Weil [Thu, 13 Dec 2018 15:14:03 +0000 (09:14 -0600)]
mon/OSDMonitor: require mimic mons for require_osd_release=mimic

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/suites/rados/thrash-old-clients: use legacy addr syntax in ceph.conf
Sage Weil [Thu, 13 Dec 2018 14:46:47 +0000 (08:46 -0600)]
qa/suites/rados/thrash-old-clients: use legacy addr syntax in ceph.conf

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async: preserve peer features when replacing a connection
Sage Weil [Sun, 9 Dec 2018 17:44:36 +0000 (11:44 -0600)]
msg/async: preserve peer features when replacing a connection

The features are now stored in the protocol implementation.  When we replace
an existing connection, copy those features so that our connect_msg_reply
calculates the correct features for the session.

This fixes an issue where a 3-mon cluster, after upgrading the two followers
but not the leader, was unable to include the (luminous) leader in the
quorum because it was seeing missing features in the connect reply, because
the new mons were replacing an old instance of the connection and weren't
copying the features, and that old instance had connect_msg.features == 0.

Add some debug lines that helped (finally) identify the problem.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/tasks/ceph.py: move methods from teuthology.git into ceph.py directly; support...
Sage Weil [Fri, 7 Dec 2018 19:16:31 +0000 (13:16 -0600)]
qa/tasks/ceph.py: move methods from teuthology.git into ceph.py directly; support mon bind * options

Having these live in teuthology.git is silly, since they are only consumed
by the ceph task, and it is hard to revise the behavior.

Revise the behavior by adding mon_bind_* options.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonMap: adjust build_initial behavior for mkfs vs probe
Sage Weil [Tue, 11 Dec 2018 03:32:39 +0000 (21:32 -0600)]
mon/MonMap: adjust build_initial behavior for mkfs vs probe

For the mkfs case, interpret an ambiguous port as a v2 address.  For probe,
try both.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonMap: improve ambiguous addr behavior
Sage Weil [Fri, 7 Dec 2018 16:23:16 +0000 (10:23 -0600)]
mon/MonMap: improve ambiguous addr behavior

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/suites/rados/upgrade: spread mons a bit
Sage Weil [Fri, 7 Dec 2018 18:48:09 +0000 (12:48 -0600)]
qa/suites/rados/upgrade: spread mons a bit

This will mean 2/3 mons have default ports.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/rados/thrash-old-clients: keep mons on separate hosts
Sage Weil [Fri, 7 Dec 2018 14:51:32 +0000 (08:51 -0600)]
qa/rados/thrash-old-clients: keep mons on separate hosts

This ensures the mons can use default ports, ceph.conf won't have v1: or
v2: prefixes, and old clients will be happy.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/standalone/mon/misc.sh: tweak test to be more robust
Sage Weil [Thu, 6 Dec 2018 20:16:48 +0000 (14:16 -0600)]
qa/standalone/mon/misc.sh: tweak test to be more robust

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/tasks/mon_seesaw: expect v1/v2 prefix in addr
Sage Weil [Thu, 6 Dec 2018 17:25:48 +0000 (11:25 -0600)]
qa/tasks/mon_seesaw: expect v1/v2 prefix in addr

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoosd/OSDMap: fix is_blacklisted() check to assume type ANY
Sage Weil [Wed, 5 Dec 2018 22:24:38 +0000 (16:24 -0600)]
osd/OSDMap: fix is_blacklisted() check to assume type ANY

Note that this still does a copy of the addr struct (as it did before).
This could be more efficient...

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/OSDMonitor: use ANY addr type for blacklisting
Sage Weil [Wed, 5 Dec 2018 22:23:12 +0000 (16:23 -0600)]
mon/OSDMonitor: use ANY addr type for blacklisting

Client addresses are untyped in that they can connect to v1 or v2 server
endpoints, so blacklist them as TYPE_ANY.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/msg_types: TYPE_V1ORV2 -> TYPE_ANY
Sage Weil [Wed, 5 Dec 2018 22:13:47 +0000 (16:13 -0600)]
mon/msg_types: TYPE_V1ORV2 -> TYPE_ANY

..and allow us to parse it.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/workunits/cephtool: fix blacklist test
Sage Weil [Wed, 5 Dec 2018 22:11:40 +0000 (16:11 -0600)]
qa/workunits/cephtool: fix blacklist test

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/suites/upgrade: install old version with only v1 addrs
Sage Weil [Tue, 4 Dec 2018 22:33:43 +0000 (16:33 -0600)]
qa/suites/upgrade: install old version with only v1 addrs

v1+v2 support is new in nautilus.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agocommon/options: by default, bind to both msgr v1 and v2 addresses
Sage Weil [Mon, 3 Dec 2018 21:14:56 +0000 (15:14 -0600)]
common/options: by default, bind to both msgr v1 and v2 addresses

This will be the case for some time, until v1 clients are fully phased out.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agovstart.sh: add --msgr1, --msgr2, --msgr21 options
Sage Weil [Fri, 30 Nov 2018 19:13:45 +0000 (13:13 -0600)]
vstart.sh: add --msgr1, --msgr2, --msgr21 options

..and clean up the monmap IP generation.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async/ProtocolV2: be flexible with server identity check
Sage Weil [Fri, 30 Nov 2018 16:28:56 +0000 (10:28 -0600)]
msg/async/ProtocolV2: be flexible with server identity check

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/msg_types: fix entity_addrvec_t::parse() with null end arg
Sage Weil [Tue, 27 Nov 2018 04:12:11 +0000 (22:12 -0600)]
msg/msg_types: fix entity_addrvec_t::parse() with null end arg

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/suites/rados/basic/msgr: no msgr2 addrs in initial monmaps
Sage Weil [Mon, 26 Nov 2018 20:00:56 +0000 (14:00 -0600)]
qa/suites/rados/basic/msgr: no msgr2 addrs in initial monmaps

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/tasks/ceph: add 'mon_bind_addrvec' and 'mon_bind_msgr2' options
Sage Weil [Mon, 26 Nov 2018 20:00:38 +0000 (14:00 -0600)]
qa/tasks/ceph: add 'mon_bind_addrvec' and 'mon_bind_msgr2' options

- Sometimes we don't want to use v2 addrs
- Sometimes we don't want addrvecs at all (e.g., upgrades)

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomonmaptool: add --addv argument to pass in addrvec directly
Sage Weil [Mon, 26 Nov 2018 17:49:54 +0000 (11:49 -0600)]
monmaptool: add --addv argument to pass in addrvec directly

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/suites/rados/basic/msgr: do not use msgr2 with simplemessenger
Sage Weil [Mon, 26 Nov 2018 16:53:53 +0000 (10:53 -0600)]
qa/suites/rados/basic/msgr: do not use msgr2 with simplemessenger

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/suites/rados/basic/msgr: async is not experimental
Sage Weil [Mon, 26 Nov 2018 16:53:37 +0000 (10:53 -0600)]
qa/suites/rados/basic/msgr: async is not experimental

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomessages/MOSDBoot: fix compat with pre-nautilus
Sage Weil [Mon, 19 Nov 2018 14:53:19 +0000 (08:53 -0600)]
messages/MOSDBoot: fix compat with pre-nautilus

We can't make an addr -> addrvec transition without a compat encoding,
unfortunately (I screwed this one up back when then ADDR2 feature was
introduced).

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonMap: allow v1 or v2 to be explicitly specified along with part
Sage Weil [Tue, 6 Nov 2018 23:22:03 +0000 (17:22 -0600)]
mon/MonMap: allow v1 or v2 to be explicitly specified along with part

If there is a v1: or v2: prefix, that's the protocol/addr type.  Otherwise,
we assume msgr2.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/msg_types: allow parsing of IPs without assuming v1 vs v2
Sage Weil [Tue, 6 Nov 2018 23:21:21 +0000 (17:21 -0600)]
msg/msg_types: allow parsing of IPs without assuming v1 vs v2

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/msg_types: default parse to v2 addrs
Sage Weil [Tue, 6 Nov 2018 22:08:26 +0000 (16:08 -0600)]
msg/msg_types: default parse to v2 addrs

If we parse "1.2.3.4", parse to v2:1.2.3.4:0/0, not a v1 legacy addr.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg: standarize on v1: and v2: prefixes for *all* entity_addr_t's
Sage Weil [Wed, 31 Oct 2018 16:12:04 +0000 (11:12 -0500)]
msg: standarize on v1: and v2: prefixes for *all* entity_addr_t's

This is more consistent than 1.2.3.4:0/0 being v1 and msgr2:1.2.3.4:0/0
being v2.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agovstart.sh: use msgr2 by default
Sage Weil [Mon, 30 Jul 2018 22:03:52 +0000 (17:03 -0500)]
vstart.sh: use msgr2 by default

This is useful because we tend to bind to random ports

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonMap: remove get_addr() methods
Sage Weil [Mon, 30 Jul 2018 21:35:41 +0000 (16:35 -0500)]
mon/MonMap: remove get_addr() methods

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoceph-mon: adjust startup/bind/join sequence to use addrs
Sage Weil [Mon, 30 Jul 2018 21:35:11 +0000 (16:35 -0500)]
ceph-mon: adjust startup/bind/join sequence to use addrs

- Use the addrvecs in the monmap, and bind accordingly
- If we are joining the cluster, generate sane addrvec for ourselves
- Adjsut warning about mismatched ceph.conf.  Note that this may become
noisy for old clusters, mostly because the conf-based mon addr options
are ancient and crufty and should not be used.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon: use MonMap::get_addrs() (instead of get_addr())
Sage Weil [Mon, 16 Jul 2018 01:49:38 +0000 (20:49 -0500)]
mon: use MonMap::get_addrs() (instead of get_addr())

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonClient: change pending_cons to addrvec-based map
Sage Weil [Fri, 13 Jul 2018 22:00:59 +0000 (17:00 -0500)]
mon/MonClient: change pending_cons to addrvec-based map

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonMap: fix set_addr() caller, kill wrapper
Sage Weil [Fri, 13 Jul 2018 19:48:43 +0000 (14:48 -0500)]
mon/MonMap: fix set_addr() caller, kill wrapper

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonMap: remove addr-based add()
Sage Weil [Fri, 13 Jul 2018 16:27:02 +0000 (11:27 -0500)]
mon/MonMap: remove addr-based add()

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomonmaptool: fix --add to do either legacy or msgr2+legacy
Sage Weil [Fri, 13 Jul 2018 16:43:45 +0000 (11:43 -0500)]
monmaptool: fix --add to do either legacy or msgr2+legacy

Base the decision on the monmap's required_features vs FEATURE_NAUTILIUS.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomonmaptool: clean up iterator use a bit
Sage Weil [Fri, 13 Jul 2018 16:42:28 +0000 (11:42 -0500)]
monmaptool: clean up iterator use a bit

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonMap: handle ambiguous mon addrs by trying both legacy and msgr
Sage Weil [Fri, 13 Jul 2018 14:30:21 +0000 (09:30 -0500)]
mon/MonMap: handle ambiguous mon addrs by trying both legacy and msgr

If we are given a mon addr (a raw IP or hostname) we don't know whether
it is a legacy or msgr2 entity_addr_t.  Either infer from the port number
or probe both protocol types.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonMap: take addrvec for set_initial_members
Sage Weil [Fri, 13 Jul 2018 13:57:22 +0000 (08:57 -0500)]
mon/MonMap: take addrvec for set_initial_members

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonMap: use addrvecs for test instances
Sage Weil [Tue, 10 Jul 2018 21:21:37 +0000 (16:21 -0500)]
mon/MonMap: use addrvecs for test instances

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon: pass addrvec via MMonJoin
Sage Weil [Tue, 10 Jul 2018 19:37:25 +0000 (14:37 -0500)]
mon: pass addrvec via MMonJoin

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonmapMonitor: fix 'mon add' to populate addrvec
Sage Weil [Tue, 10 Jul 2018 18:50:16 +0000 (13:50 -0500)]
mon/MonmapMonitor: fix 'mon add' to populate addrvec

If a port is not specified (or the legacy port is specified), add both
the new IANA and legacy addrs to the map.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomon/MonMap: addr -> addrvec
Sage Weil [Tue, 10 Jul 2018 19:11:10 +0000 (14:11 -0500)]
mon/MonMap: addr -> addrvec

Modify MonMap to store an addrvec instead of just an addr.

Add temporary helper/wrapper methods to avoid changing all of the callers
(yet).

No big semantic changes yet!

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async/ProtocolV2: only update socket_addr if we learned our addr
Sage Weil [Mon, 29 Oct 2018 22:23:05 +0000 (17:23 -0500)]
msg/async/ProtocolV2: only update socket_addr if we learned our addr

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoosd: go active even if mon only accepted our v1 addr
Sage Weil [Mon, 29 Oct 2018 17:15:54 +0000 (12:15 -0500)]
osd: go active even if mon only accepted our v1 addr

We may bind to v1 and v2 addrs, but we need to behave if the mon only
recognized our v1 addr and still go active.  That's because whether they
see our v2 addr depends on whether we connected to the mon via the v1 or
v2 port, and the mon may not be binding to v2 (yet, or ever).

Add a legacy_equals to entity_addrvec_t, and use that instead of
probably_equals for the OSD boot checks.  The probably_equals returns true
if the IP address portion of the address is empty.. which should never
happen in the OSD boot case since we have learned our real IP long before
we try to send osd_boot.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agotest/msgr: add test for msgr2 protocol
Ricardo Dias [Tue, 11 Sep 2018 06:45:42 +0000 (07:45 +0100)]
test/msgr: add test for msgr2 protocol

Signed-off-by: Ricardo Dias <rdias@suse.com>
6 years agomsg/async/ProtocolV2: share socket_addr and all addrs during handshake
Sage Weil [Fri, 26 Oct 2018 21:39:44 +0000 (16:39 -0500)]
msg/async/ProtocolV2: share socket_addr and all addrs during handshake

Also, drop the sloppy addr checks.. I'm not sure we need them?

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async: print socket_addr for the connection
Sage Weil [Fri, 26 Oct 2018 21:38:31 +0000 (16:38 -0500)]
msg/async: print socket_addr for the connection

When we bind to multiple addrs, print the one the current connection is
using for the given connection.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async: msgr2 protocol placeholder
Ricardo Dias [Fri, 26 Oct 2018 16:54:48 +0000 (17:54 +0100)]
msg/async: msgr2 protocol placeholder

This commit adds messenger V2 protocol. This V2 protocol is a clone of
the V1 protocol with the additional support for address vectors.
After the banner exchange the peers exchange their address vectors.

Signed-off-by: Ricardo Dias <rdias@suse.com>
6 years agomsg/async: move ProtocolV1 class to its own source file
Ricardo Dias [Thu, 11 Oct 2018 16:02:48 +0000 (17:02 +0100)]
msg/async: move ProtocolV1 class to its own source file

Signed-off-by: Ricardo Dias <rdias@suse.com>
6 years agomsg/async: keep listen addr in ServerSocket, pass to new connections
Sage Weil [Fri, 26 Oct 2018 21:36:59 +0000 (16:36 -0500)]
msg/async: keep listen addr in ServerSocket, pass to new connections

When we accept a connection, we want to know what listening addr we
accepted on.  Because the addr can change after we create teh listening socket
(when we learn the addr and fill in the IP portion), instead store the position
in our myaddrs addrvec.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agomsg/async/AsyncMessenger: fix set_addr_unknowns
Sage Weil [Fri, 26 Oct 2018 20:28:56 +0000 (15:28 -0500)]
msg/async/AsyncMessenger: fix set_addr_unknowns

Fill in IP address from a v1 or v2 address into any v1 or v2 addresses.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoMerge PR #25620 into master
Sage Weil [Fri, 21 Dec 2018 16:12:42 +0000 (10:12 -0600)]
Merge PR #25620 into master

* refs/pull/25620/head:
os/bluestore: more robust handling for lack of per-pool stats cases.

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoMerge PR #25632 into master
Sage Weil [Fri, 21 Dec 2018 15:49:37 +0000 (09:49 -0600)]
Merge PR #25632 into master

* refs/pull/25632/head:
test: add a json tester
ceph_json: parser sets data on all types when parsing

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoMerge pull request #22800 from wjwithagen/wjw-ctest-timeout
Kefu Chai [Fri, 21 Dec 2018 15:40:27 +0000 (23:40 +0800)]
Merge pull request #22800 from wjwithagen/wjw-ctest-timeout

cmake: allow setting of the CTest timeout during building.

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #25661 from joscollin/wip-doc-changing-monitors
Kefu Chai [Fri, 21 Dec 2018 06:46:48 +0000 (14:46 +0800)]
Merge pull request #25661 from joscollin/wip-doc-changing-monitors

doc: fix typo in add-or-rm-mons

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge pull request #25639 from oliveiradan/wip-krb_pr25566_cleanup_oliveiradan
Kefu Chai [Fri, 21 Dec 2018 06:36:51 +0000 (14:36 +0800)]
Merge pull request #25639 from oliveiradan/wip-krb_pr25566_cleanup_oliveiradan

auth/krb: Fix Kerberos build warnings

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoMerge pull request #25537 from jecluis/dev/wip-mgr-module-error
Kefu Chai [Fri, 21 Dec 2018 06:09:40 +0000 (14:09 +0800)]
Merge pull request #25537 from jecluis/dev/wip-mgr-module-error

mgr: make module error message more descriptive

Reviewed-by: Ricardo Dias <rdias@suse.com>
Reviewed-by: Lenz Grimmer <lgrimmer@suse.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
6 years agoMerge pull request #25595 from rzarzynski/wip-ec-drop_bl_crosstalk_dependency
Kefu Chai [Fri, 21 Dec 2018 06:06:08 +0000 (14:06 +0800)]
Merge pull request #25595 from rzarzynski/wip-ec-drop_bl_crosstalk_dependency

ec: lrc doesn't depend on crosstalks between bufferlists anymore.

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoMerge pull request #25503 from ceph/rbd-mirror-ceph-base
Kefu Chai [Fri, 21 Dec 2018 06:04:34 +0000 (14:04 +0800)]
Merge pull request #25503 from ceph/rbd-mirror-ceph-base

spec: requires ceph base instead of common

Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
6 years agodoc: fix typo in add-or-rm-mons 25661/head
Jos Collin [Fri, 21 Dec 2018 05:17:04 +0000 (10:47 +0530)]
doc: fix typo in add-or-rm-mons

Signed-off-by: Jos Collin <jcollin@redhat.com>
6 years agoMerge pull request #25655 from gregsfortytwo/wip-rbd-snap-doc
Jason Dillaman [Thu, 20 Dec 2018 23:07:36 +0000 (18:07 -0500)]
Merge pull request #25655 from gregsfortytwo/wip-rbd-snap-doc

doc: Clean up the snapshot consistency note

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
6 years agoMerge PR #25577 into master
Sage Weil [Thu, 20 Dec 2018 23:02:15 +0000 (17:02 -0600)]
Merge PR #25577 into master

* refs/pull/25577/head:
test: allow ceph_kvstorebench to be build on FreeBSD

Reviewed-by: Kefu Chai <kchai@redhat.com>