]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
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>
6 years agoMerge PR #25508 into master
Sage Weil [Thu, 20 Dec 2018 23:01:54 +0000 (17:01 -0600)]
Merge PR #25508 into master

* refs/pull/25508/head:
kv/rocksdb_cache: Remove C style struct hack undefined behavior

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoMerge PR #25236 into master
Sage Weil [Thu, 20 Dec 2018 23:01:04 +0000 (17:01 -0600)]
Merge PR #25236 into master

* refs/pull/25236/head:
ceph-volume: Add venv to vstart cmake target
mgr/orchestrator: Add test orchestrator

Reviewed-by: Jeff Layton <jlayton@redhat.com>
6 years agodoc: Clean up the snapshot consistency note 25655/head
Greg Farnum [Thu, 20 Dec 2018 18:33:38 +0000 (10:33 -0800)]
doc: Clean up the snapshot consistency note

The old note made it sound like we weren't crash-consistent, and had a
confusing section about needing to clone before mounting.
You *do* need to clone the snapshot before mounting it, but that has
nothing to do fs freezing or consistency.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
6 years agoauth/krb: Fix Kerberos build warnings 25639/head
Daniel Oliveira [Tue, 18 Dec 2018 02:17:09 +0000 (19:17 -0700)]
auth/krb: Fix Kerberos build warnings

Signed-off-by: Daniel Oliveira <doliveira@suse.com>
6 years agoMerge pull request #25207 from cyx1231st/wip-crimson-msgr-dispatch-events
Kefu Chai [Thu, 20 Dec 2018 15:51:20 +0000 (23:51 +0800)]
Merge pull request #25207 from cyx1231st/wip-crimson-msgr-dispatch-events

crimson/net: encapsulate protocol implementations with states (remaining part)

Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agocrimson/net: let conn directly verify the authorizer with dispatcher 25207/head
Yingxin [Thu, 20 Dec 2018 19:30:02 +0000 (03:30 +0800)]
crimson/net: let conn directly verify the authorizer with dispatcher

Signed-off-by: Yingxin <yingxin.cheng@intel.com>
6 years agocrimson/net: remove the messenger gate
Yingxin [Wed, 21 Nov 2018 22:09:49 +0000 (06:09 +0800)]
crimson/net: remove the messenger gate

There is no need to use messenger gate if SocketConnection themselves
are properly gated.

Signed-off-by: Yingxin <yingxin.cheng@intel.com>
6 years agocrimson/net: encapsulate protocol implementations with accept/connect
Yingxin [Wed, 21 Nov 2018 22:00:08 +0000 (06:00 +0800)]
crimson/net: encapsulate protocol implementations with accept/connect

Signed-off-by: Yingxin <yingxin.cheng@intel.com>
6 years agocrimson/net: no open connections in accepting_conns
Yingxin [Wed, 21 Nov 2018 21:40:58 +0000 (05:40 +0800)]
crimson/net: no open connections in accepting_conns

It should an atomic operation to move the connection from
accepting_conns to connections when switch to the open state.

Signed-off-by: Yingxin <yingxin.cheng@intel.com>
6 years agocrimson/net: don't execute_open() if exception is thrown
Yingxin [Wed, 21 Nov 2018 21:35:10 +0000 (05:35 +0800)]
crimson/net: don't execute_open() if exception is thrown

Signed-off-by: Yingxin <yingxin.cheng@intel.com>
6 years agocrimson/net: encapsulate protocol implementations with open state
Yingxin [Wed, 21 Nov 2018 21:24:31 +0000 (05:24 +0800)]
crimson/net: encapsulate protocol implementations with open state

Signed-off-by: Yingxin <yingxin.cheng@intel.com>
6 years agocrimson/net: remove unecessary future dependencies for accept/dispatch
Yingxin [Wed, 21 Nov 2018 21:09:20 +0000 (05:09 +0800)]
crimson/net: remove unecessary future dependencies for accept/dispatch

Signed-off-by: Yingxin <yingxin.cheng@intel.com>
6 years agocrimson/net: dispatch events in SocketConnection
Yingxin [Wed, 21 Nov 2018 20:39:37 +0000 (04:39 +0800)]
crimson/net: dispatch events in SocketConnection

* move dispatch(), and exception handling logics in accept() and
  connect() from SocketMessenger into SocketConnection, so we can manage
  the state transition in the same class and at the same abstraction
  level.
* gate the dangling futures in SocketConnection, because the
  connection's smart_ptr won't be hold by messenger any more during
  exception handling.
* don't return close() inside SocketConnection to prevent recursive
  gating -- dead lock.

Signed-off-by: Yingxin <yingxin.cheng@intel.com>
6 years agoMerge pull request #25647 from tchaikov/wip-ftbfs-aarch64-gcc-8.1
Kefu Chai [Thu, 20 Dec 2018 15:42:38 +0000 (23:42 +0800)]
Merge pull request #25647 from tchaikov/wip-ftbfs-aarch64-gcc-8.1

test/crimson: fix FTBFS of unittest_seastar_perfcounters on arm64

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
6 years agoMerge pull request #25641 from tchaikov/cmake-rbd-tracing
Kefu Chai [Thu, 20 Dec 2018 14:16:07 +0000 (22:16 +0800)]
Merge pull request #25641 from tchaikov/cmake-rbd-tracing

cmake: let rbd_api depend on librbd-tp

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
6 years agoMerge pull request #25340 from sebastian-philipp/orchestrator-json-output
Sebastian Wagner [Thu, 20 Dec 2018 14:14:01 +0000 (15:14 +0100)]
Merge pull request #25340 from sebastian-philipp/orchestrator-json-output

mgr/orchestrator: Add JSON output to CLI commands

Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Tim Serong <tserong@suse.com>
6 years agoMerge PR #25630 into master
Sage Weil [Thu, 20 Dec 2018 12:48:41 +0000 (06:48 -0600)]
Merge PR #25630 into master

* refs/pull/25630/head:
osd/OSDMap: cancel mapping if target osd is out

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoMerge PR #25598 into master
Sage Weil [Thu, 20 Dec 2018 12:48:24 +0000 (06:48 -0600)]
Merge PR #25598 into master

* refs/pull/25598/head:
common: avoid bl::get_current_ptr()-driven ref counting in denc.h.

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoMerge pull request #25585 from SUSE/wip-remove-cython-subinterpreter-check
Kefu Chai [Thu, 20 Dec 2018 11:30:08 +0000 (19:30 +0800)]
Merge pull request #25585 from SUSE/wip-remove-cython-subinterpreter-check

cmake,deb,rpm: remove cython 0.29's subinterpreter check, re-enable build with cython 0.29+

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
Reviewed-by: Ricardo Dias <rdias@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agotest/crimson: fix FTBFS of unittest_seastar_perfcounters on arm64 25647/head
Kefu Chai [Thu, 20 Dec 2018 10:49:43 +0000 (18:49 +0800)]
test/crimson: fix FTBFS of unittest_seastar_perfcounters on arm64

this should address the GCC bug which causes following failure:

/home/jenkins-build/build/workspace/ceph-pull-requests-arm64/src/test/crimson/test_perfcounters.cc:35:9:
internal compiler error: in tsubst_decomp_names, at cp/pt.c:16537
         for (const auto &[path, perf_counter_ref] : by_path) {
         ^~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoceph-volume: Add venv to vstart cmake target 25236/head
Sebastian Wagner [Mon, 10 Dec 2018 13:36:47 +0000 (14:36 +0100)]
ceph-volume: Add venv to vstart cmake target

Adds new add_custom_target `ceph-volume-venv-setup`
that creates a virtual environment, and
calls `python setup.py develop`

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
6 years agomgr/orchestrator: Add test orchestrator
Sebastian Wagner [Fri, 23 Nov 2018 13:55:15 +0000 (14:55 +0100)]
mgr/orchestrator: Add test orchestrator

1. To be able to run the cli without an external orchestrator.
2. Run the CLI in Teuthology.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
6 years agocmake: let rbd_api depend on librbd-tp 25641/head
Kefu Chai [Thu, 20 Dec 2018 04:51:37 +0000 (12:51 +0800)]
cmake: let rbd_api depend on librbd-tp

whoever includes tracing/librbd.h should depends on librbd-tp.

this fix the FTBFS of:

ceph/src/librbd/librbd.cc:50:10: fatal error: tracing/librbd.h: No such
file or directory
 #include "tracing/librbd.h"
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
src/librbd/CMakeFiles/rbd_api.dir/build.make:62: recipe for target
'src/librbd/CMakeFiles/rbd_api.dir/librbd.cc.o' failed

Signed-off-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge PR #25622 into master
Sage Weil [Thu, 20 Dec 2018 03:23:26 +0000 (21:23 -0600)]
Merge PR #25622 into master

* refs/pull/25622/head:
Objecter.cc: make op resend logic more readable

Reviewed-by: Gregory Farnum <gfarnum@redhat.com>
Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
6 years agoMerge PR #25360 into master
Sage Weil [Thu, 20 Dec 2018 03:22:35 +0000 (21:22 -0600)]
Merge PR #25360 into master

* refs/pull/25360/head:
qa/workunits/mon/pg_autoscaler: clean up pools afterwards
qa/suites/rados/singletone/all/pg-autoscaler: whitelist health warnings
qa/tasks/ceph: wait for splits/merges before final scrub
mon/OSDMonitor: be tidy with target_size_ratio and pre-nautilus code
mgr/pg_autoscaler: simplify conditions
qa/suites/rados: add simple pg-autoscaler test
qa/workunits/cephtool/test.sh: pg_autoscale_mode=off while testing pg_num etc
doc/rados/operations: document autoscaler and its health warnings
mgr/pg_autoscaler: add pg autoscaler module
pybind/mgr/mgr_util: move format_ helpers out of status module
mon/OSDMonitor: accept optional target_size_{bytes,ratio} to 'osd pool create'
mon/OSDMonitor: remove max_split_count configurable
osd/osd_types: pool_opts_t: int -> int64_t
osd/osd_types: pool_opts: fix whitespace
osd/osd_types: pool_opts_t: make encoding feature-dependent
mgr/devicehealth: pg_num_min 1 for device_health_metrics pool
mon/OSDMonitor: accept optional pg_num_min to 'osd pool create'
mon/OSDMonitor: apply osd_pool_default_pg_autoscale_mode to new pools
pybind/mgr/mgr_module: some accessors
mon/MgrMonitor: enable progress module by default
osd/osd_types: add pool pg_autoscale_mode, pg_num_min, target_size_{bytes,ratio} properties
osdc/Objecter: revise get_latest_version locking
os/memstore: ignore OP_COLL_SET_BITS
qa: generalise REQUIRE_MEMSTORE
mgr: drop GIL in get_config
mon: add 'size' arg to `osd pool create`
mon: use pg_num_target for checks during creation
mgr: revise locking in getter paths
common/options: add `mon_target_pg_per_osd`
mgr: expose OSDMap.pool_raw_used_rate

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
6 years agoqa/workunits/mon/pg_autoscaler: clean up pools afterwards 25360/head
Sage Weil [Wed, 19 Dec 2018 20:36:38 +0000 (14:36 -0600)]
qa/workunits/mon/pg_autoscaler: clean up pools afterwards

This avoids a huge pg merge from 100s to 4, which takes a long time and
makes the teuthology scrub cleanup time out.

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/suites/rados/singletone/all/pg-autoscaler: whitelist health warnings
Sage Weil [Wed, 19 Dec 2018 13:16:27 +0000 (07:16 -0600)]
qa/suites/rados/singletone/all/pg-autoscaler: whitelist health warnings

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoqa/tasks/ceph: wait for splits/merges before final scrub
Sage Weil [Wed, 19 Dec 2018 13:14:30 +0000 (07:14 -0600)]
qa/tasks/ceph: wait for splits/merges before final scrub

Signed-off-by: Sage Weil <sage@redhat.com>
6 years agoMerge pull request #25056 from fghaas/doc-rgw-openstack
Yehuda Sadeh [Wed, 19 Dec 2018 20:28:55 +0000 (12:28 -0800)]
Merge pull request #25056 from fghaas/doc-rgw-openstack

doc: Improve OpenStack integration and multitenancy docs for radosgw

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
Reviewed-by: Abhishek Lekshmanan <abhishek@suse.com>
Reviewed-by: Kai Wagner <kwagner@suse.com>
Reviewed-by: Maxime Guyot <maxime@root314.com>
6 years agoMerge pull request #25610 from jtlayton/wip-orchestrator
jtlayton [Wed, 19 Dec 2018 19:11:46 +0000 (14:11 -0500)]
Merge pull request #25610 from jtlayton/wip-orchestrator

mgr/orchestrator: fix _list_services display

6 years agoMerge PR #25614 into master
Sage Weil [Wed, 19 Dec 2018 17:45:29 +0000 (11:45 -0600)]
Merge PR #25614 into master

* refs/pull/25614/head:
cls/rgw: update rgw_cls_usage_log_trim_op encode version

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoos/bluestore: more robust handling for lack of per-pool stats cases. 25620/head
Igor Fedotov [Tue, 18 Dec 2018 22:10:02 +0000 (01:10 +0300)]
os/bluestore: more robust handling for lack of per-pool stats cases.

Fixes: https://tracker.ceph.com/issues/37652
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
6 years agoImprove OpenStack integration and multitenancy docs for radosgw 25056/head
Florian Haas [Mon, 12 Nov 2018 12:49:15 +0000 (13:49 +0100)]
Improve OpenStack integration and multitenancy docs for radosgw

Add explanatory information on:

* "rgw swift account in url" (including the Swift account in the Swift
  API url and Keystone endpoint)
* "rgw swift versioning enabled" (enabling Swift object versioning)
* "rgw s3 auth use keystone" (enabling S3 authentication against
  Keystone)
* "rgw keystone implicit tenants" (multi-tenancy via Keystone, including
  its implications for the Swift and S3 APIs)

Fixes: http://tracker.ceph.com/issues/36765
Signed-off-by: Florian Haas <florian@citynetwork.eu>
6 years agoMerge pull request #25629 from tchaikov/wip-37707
Kefu Chai [Wed, 19 Dec 2018 12:46:23 +0000 (20:46 +0800)]
Merge pull request #25629 from tchaikov/wip-37707

install-deps.sh: disable centos-sclo-rh-source

Reviewed-by: Sage Weil <sage@redhat.com>
6 years agoMerge pull request #25628 from rhcs-dashboard/masthead-changes
Lenz Grimmer [Wed, 19 Dec 2018 12:30:31 +0000 (13:30 +0100)]
Merge pull request #25628 from rhcs-dashboard/masthead-changes

mgr/dashboard: Changed background color of Masthead to brand gray

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
6 years agotest: add a json tester 25632/head
Yehuda Sadeh [Wed, 19 Dec 2018 11:36:11 +0000 (03:36 -0800)]
test: add a json tester

specifically test issue #37706

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
6 years agoceph_json: parser sets data on all types when parsing
Yehuda Sadeh [Wed, 19 Dec 2018 11:15:30 +0000 (03:15 -0800)]
ceph_json: parser sets data on all types when parsing

Fixes: http://tracker.ceph.com/issues/37706
This was changed in e47a228a868, but breaks existing usage.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
6 years agomgr/orchestrator: fix _list_services display 25610/head
Jeff Layton [Wed, 19 Dec 2018 11:12:02 +0000 (06:12 -0500)]
mgr/orchestrator: fix _list_services display

I see this error when using "ceph orchestrator service ls":

Error EINVAL: Traceback (most recent call last):
  File "/usr/lib64/ceph/mgr/orchestrator_cli/module.py", line 318, in handle_command
    return self._handle_command(inbuf, cmd)
  File "/usr/lib64/ceph/mgr/orchestrator_cli/module.py", line 330, in _handle_command
    return self._list_services(cmd)
  File "/usr/lib64/ceph/mgr/orchestrator_cli/module.py", line 165, in _list_services
    s.config_location))
AttributeError: 'ServiceDescription' object has no attribute 'config_location'

The config_locations field should be rados_config_location.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
6 years agoosd/OSDMap: cancel mapping if target osd is out 25630/head
xie xingguo [Wed, 19 Dec 2018 09:01:23 +0000 (17:01 +0800)]
osd/OSDMap: cancel mapping if target osd is out

Suppose we have a bad pg_upmap_item, say:
```
pg_upmap_items 2.0 [0,8,5,4,6,12]
```
which maps osd.6 to osd.12 that is currently marked as out.

It turns out **maybe_remove_pg_upmaps** can not handle the
above case well because **_apply_upmap** will silently discard
any bad mappings whenver they try to target at some current
__out__ OSDs. So if you call **pg_to_raw_up(2.0)**, you'll probably
get something like: ```up [8,4,6] ``` (e.g., the last mapping pair 6->12
is simply ignored by **_apply_upmap**).

Make **clean_pg_upmaps** do the tidy-up check instead, since it
already has __bare__ access to those pg_upmaps and pg_upmap_items.

Fixes: http://tracker.ceph.com/issues/37501
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Signed-off-by: ningtao <ningtao@sangfor.com.cn>
6 years agoinstall-deps.sh: skip unavailable repos 25629/head
Kefu Chai [Wed, 19 Dec 2018 08:37:55 +0000 (16:37 +0800)]
install-deps.sh: skip unavailable repos

as centos-sclo-rh-source leads us to 404 at this moment. and we are not
using the source repo for building ceph. so we can just skip any
unavailable repo.

Fixes: http://tracker.ceph.com/issues/37707
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>