Commit Graph

93903 Commits

Author SHA1 Message Date
Kefu Chai
f847f6ac5d crimson: integrate mon::Client into OSD
and register them as dispatchers using ChainedDispatchers

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-01-18 12:39:37 +08:00
Kefu Chai
60f5b50f47 crimson: add ChainedDispatchers
it will be used to glue multiple dispatchers for subscribing events
emitted by messenger

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-01-18 12:36:59 +08:00
Kefu Chai
81d78fe5fe crimson: add prototype of crimson/osd
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-01-18 12:36:59 +08:00
Kefu Chai
9fae689b6e crimson: add a dummy object store
CyanStore only provides just-enough facility for booting an OSD.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-01-18 12:32:21 +08:00
Kefu Chai
fc21dcf4cf crimson: set src for message
monitor will panic at seeing a MOSDBoot message which is not from an
OSD. see OSDMonitor::preprocess_boot()
```
ceph_assert(m->get_orig_source_inst().name.is_osd());
```

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-01-18 12:32:21 +08:00
Kefu Chai
7875183c76 crimson: ignore v2 only addvec
crimson need to be v2 compatible. but let's leave this for another PR.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-01-18 12:32:21 +08:00
Kefu Chai
3aa8d90b36 cmake: silence -Wsign-compare in libfmt
* silence -Wsign-compare in libfmt
* silence -Wattributes in seastar

to silence warnings like:

/home/jenkins-build/build/workspace/ceph-pull-requests-arm64/src/seastar/fmt/include/fmt/format.h:
In instantiation of 'constexpr bool fmt::v5::internal::find(Ptr, Ptr, T,
Ptr&) [with bool IS_CONSTEXPR = false; T = char; Ptr = const wchar_t*]':
/home/jenkins-build/build/workspace/ceph-pull-requests-arm64/src/seastar/fmt/include/fmt/format.h:2154:32:
required from 'constexpr void
fmt::v5::internal::parse_format_string(fmt::v5::basic_string_view<Char>,
Handler&&)::writer::operator()(const Char*, const Char*) [with bool
IS_CONSTEXPR = false; Char = wchar_t; Handler =
fmt::v5::format_handler<fmt::v5::arg_formatter<fmt::v5::back_insert_range<fmt::v5::internal::basic_buffer<wchar_t>
> >, wchar_t,
fmt::v5::basic_format_context<std::back_insert_iterator<fmt::v5::internal::basic_buffer<wchar_t>
>, wchar_t> >&]'
/home/jenkins-build/build/workspace/ceph-pull-requests-arm64/src/seastar/fmt/include/fmt/format.h:2164:3:
required from 'constexpr void
fmt::v5::internal::parse_format_string(fmt::v5::basic_string_view<Char>,
Handler&&) [with bool IS_CONSTEXPR = false; Char = wchar_t; Handler =
fmt::v5::format_handler<fmt::v5::arg_formatter<fmt::v5::back_insert_range<fmt::v5::internal::basic_buffer<wchar_t>
> >, wchar_t,
fmt::v5::basic_format_context<std::back_insert_iterator<fmt::v5::internal::basic_buffer<wchar_t>
>, wchar_t> >&]'
/home/jenkins-build/build/workspace/ceph-pull-requests-arm64/src/seastar/fmt/include/fmt/format.h:3346:39:
required from 'typename Context::iterator fmt::v5::vformat_to(typename
ArgFormatter::range, fmt::v5::basic_string_view<Char>,
fmt::v5::basic_format_args<Context>) [with ArgFormatter =
fmt::v5::arg_formatter<fmt::v5::back_insert_range<fmt::v5::internal::basic_buffer<wchar_t>
> >; Char = wchar_t; Context =
fmt::v5::basic_format_context<std::back_insert_iterator<fmt::v5::internal::basic_buffer<wchar_t>
>, wchar_t>; typename Context::iterator =
std::back_insert_iterator<fmt::v5::internal::basic_buffer<wchar_t> >;
typename ArgFormatter::range =
fmt::v5::back_insert_range<fmt::v5::internal::basic_buffer<wchar_t> >]'
/home/jenkins-build/build/workspace/ceph-pull-requests-arm64/src/seastar/fmt/include/fmt/format.h:3457:64:
required from here

/home/jenkins-build/build/workspace/ceph-pull-requests-arm64/src/seastar/fmt/include/fmt/format.h:2120:14:
error: comparison of integer expressions of different signedness: 'const
wchar_t' and 'char' [-Werror=sign-compare]
     if (*out == value)
         ~~~~~^~~~~~~~
cc1plus: all warnings being treated as errors

where libfmt compares a wchar_t with a literal '}', which is char.
because the former is unsigned, and the latter is of a signed type,
GCC is annoyed. but since both of them are ASCII, and when performing
comparison, the signed one is converted to unsigned, then result of
comparison is correct per-se. hence, it's safe to silence this very
warning.

and warning like:

/home/jenkins-build/build/workspace/ceph-pull-requests-arm64/src/seastar/src/core/future-util.cc:61:5:
required from 'seastar::future<> seastar::sleep_abortable(typename
Clock::duration, seastar::abort_source&) [with Clock =
std::chrono::_V2::steady_clock; typename Clock::duration =
std::chrono::duration<long int, std::ratio<1, 1000000000> >]'
/home/jenkins-build/build/workspace/ceph-pull-requests-arm64/src/seastar/src/core/future-util.cc:68:105:
required from here
/home/jenkins-build/build/workspace/ceph-pull-requests-arm64/src/seastar/src/core/future-util.cc:48:28:
error: 'seastar::sleep_abortable(typename Clock::duration,
seastar::abort_source&)::sleeper::sleeper(typename Clock::duration,
seastar::abort_source&) [with Clock = std::chrono::_V2::steady_clock;
typename Clock::duration = std::chrono::duration<long int, std::ratio<1,
1000000000> >]::<lambda()>' declared with greater visibility than the
type of its field 'seastar::sleep_abortable(typename Clock::duration,
seastar::abort_source&)::sleeper::sleeper(typename Clock::duration,
seastar::abort_source&) [with Clock = std::chrono::_V2::steady_clock;
typename Clock::duration = std::chrono::duration<long int, std::ratio<1,
1000000000> >]::<lambda()>::<this capture>' [-Werror=attributes]
                 : tmr([this] { done.set_value(); }) {
                            ^
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-01-18 12:32:21 +08:00
Kefu Chai
8e180acf95 seastar: pick up the cmake fix
to pick up the fix for seastar/issues/576

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-01-18 12:32:21 +08:00
Kefu Chai
71239019b2 crimson: set default keyring path
otherwise crimson-osd won't be able to load the keyring

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-01-18 12:32:21 +08:00
Kefu Chai
1d6b3e7344 crimson: add entity_addrvec_t interfaces to Messenger
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-01-18 12:32:19 +08:00
Kefu Chai
07365e71b3 crimson/monc: add subcription helpers
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-01-18 12:30:15 +08:00
Kefu Chai
90361af7e3 crimson/monc: add start() method
to boot strap mon::Client once seastar and msgr is ready. this allows us
to allocate mon::Client on stack.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-01-18 12:30:15 +08:00
Kefu Chai
9622fac190 test/crimson/monc: start/stop perf counter
in CephContext::CephContext(), we assume that
ceph::common::local_perf_coll() is ready when a CephContext is to be
contructed. so we need to prepare start it before creating CephContext.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-01-18 12:30:15 +08:00
Kefu Chai
a37d19dc9b crimson/monc: set name using a setter
* set entity_name using a setter not pass it to constructor, because
  the entity_name is retrieved in seastar's app.run() by ConfigProxy,
  while it'd be simpler if we can instantiate mon::Client in main()
  as a local variable, instead of managing it on heap using a smart
  pointer. so we cannot pass the entity_name as a parameter of ctor.
* also cleanup the #include's, as they are included already in the
  header.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-01-17 20:23:13 +08:00
Kefu Chai
6621f79997 crimson: pass entity_name and cluster to ctor of ConfigProxy
as we always need to set entity_name and cluster before start using
ConfigProxy, and we do not read these settings from config file,
this makes these two setting special. so it'd be simpler to just
pass them as parameters of constructor.

and more importantly, we need to parse the command line arguments
using ceph_argparse_early_args() first, as it will consume the parsed
arguments, and leave the unparsed ones in the input parameter of `args`,
and then, we can pass the unparsed args to app.run().

it's not a perfect solution. as there are some options that both parsers
are interested, for instance, `-c` -- ceph take it as the conf file's
path, while seastar takes it as the number of cores to use. but let's
feed ceph's parser first. unless it's fine to drop the backward
compatibility of command line syntax of ceph-osd.

Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2019-01-17 20:23:12 +08:00
Kefu Chai
61d41cf099 crimson/auth: add domain specific error types
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-01-17 20:23:12 +08:00
Lenz Grimmer
bb4e49bacd
Merge pull request #25870 from votdev/validate_ip_addr
mgr/dashboard: Improve RGW address parser

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Patrick Nawracay <pnawracay@suse.com>
2019-01-17 13:08:48 +01:00
Xie Xingguo
66712c360c
Merge pull request #25959 from xiexingguo/wip-memory-leak
crush: fix memory leak

Reviewed-by: Sage Weil <sage@redhat.com>
2019-01-17 18:23:23 +08:00
Xie Xingguo
18b3f73ecb
Merge pull request #25941 from xiexingguo/wip-warn-enable-upmap
mgr/balancer: blame if upmap won't actually work

Reviewed-by: Sage Weil <sage@redhat.com>
2019-01-17 18:22:28 +08:00
Lenz Grimmer
d6826b892e
Merge pull request #25836 from votdev/improve_rgw_status_endpoint
mgr/dashboard: Improve exception handling in /api/rgw/status

Reviewed-by: Patrick Nawracay <pnawracay@suse.com>
Reviewed-by: Ricardo Marques <rimarques@suse.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
2019-01-17 09:05:34 +01:00
Gregory Farnum
619304ba83
Merge pull request #25950 from gregsfortytwo/wip-githubmap
Wip githubmap
2019-01-16 21:09:29 -08:00
Kefu Chai
035e9f534a
Merge pull request #25751 from batrick/stackstringstream-reset
common: reinit StackStringStream on clear

Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-01-17 10:43:35 +08:00
Patrick Donnelly
b57f896ed5
Merge PR #25994 into master
* refs/pull/25994/head:
	qa: silence read-only WRN for damage testing

Reviewed-by: Jeff Layton <jlayton@redhat.com>
2019-01-16 12:43:35 -08:00
Patrick Donnelly
ac302de7b7
qa: silence read-only WRN for damage testing
Fixes: http://tracker.ceph.com/issues/37944

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-01-16 11:55:54 -08:00
Sage Weil
63ba6d249a Merge PR #25934 into master
* refs/pull/25934/head:
	msg/msg_type: entity_addr_t: fix legacy decode
	msg/msg_types: make set_sockaddr() work with AF_UNSPEC (i.e., zeroed)
	msg/msg_types: make set_sockaddr() a bit more robust
	msg/async: fix IP inference

Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-01-16 13:12:35 -06:00
Patrick Donnelly
f8da35cc5b
Merge PR #25975 into master
* refs/pull/25975/head:
	doc: complete documentation for ceph fs administration commands

Reviewed-by: Sage Weil <sage@redhat.com>
2019-01-16 10:17:50 -08:00
Sebastian Wagner
9e3d90b17e
Merge pull request #25964 from jmolmo/get_config_replaced
mgr/ansible: Replace deprecated <get_config> calls

Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-01-16 16:50:06 +01:00
Sage Weil
559afb80f8 Merge PR #25966 into master
* refs/pull/25966/head:
	doc: add mimic 13.2.3 and 13.2.4 to releases chart

Reviewed-by: Yuri Weinstein <yweins@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2019-01-16 08:44:34 -06:00
Patrick Donnelly
5be993d36c
doc: complete documentation for ceph fs administration commands
Fixes: http://tracker.ceph.com/issues/24580

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-01-16 06:42:08 -08:00
Sage Weil
88824a9750 msg/msg_type: entity_addr_t: fix legacy decode
If we decode a zeroed sockaddr, we should end up with a TYPE_NONE
entity_addr_t, not v1::/0.

This was obscured by unit test TestAddrvecEncodeAddrDecode3, which
took an addrvec with all v2 addrs, decoded to an addr variable that
previously had v1:1.2.3.4:/0, and asserted the result was not v1::/0.
The test passed before because the set_sockaddr() failed on AF_UNSPEC
and the addr kept v1:1.2.3.4, but with the previous commit it failed
because it equaled v1::/0.  In reality, addr should get - (addr TYPE_NONE).

The TestEmptyAddrvecEncodeAddrDecode test case is similarly adjusted.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-01-16 08:30:44 -06:00
Sebastian Wagner
6b170687d1
Merge pull request #25970 from jtlayton/wip-rook
Fix rook spec and have service_describe provide rados_config_location field for nfs services

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-01-16 14:49:03 +01:00
Lenz Grimmer
6b1970933b
Merge pull request #25376 from rhcs-dashboard/about-modal
mgr/dashboard: About modal proposed changes

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Ricardo Marques <rimarques@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
2019-01-16 12:20:16 +01:00
Kefu Chai
7b111bd524
Merge pull request #25978 from falcon78921/wip-submitting-patches-doc
SubmittingPatches: added inline markup to important references

Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-01-16 18:42:02 +08:00
Lenz Grimmer
d4a16f4de6
Merge pull request #25865 from Devp00l/wip-issue-37841
mgr/dashboard: RbdMirroringService test suite fails in dev mode

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
2019-01-16 11:38:45 +01:00
Volker Theile
a0e05fd7d8 mgr/dashboard: Improve exception handling in /api/rgw/status
In some cases the exception message was not forwarded to the caller.

Signed-off-by: Volker Theile <vtheile@suse.com>
2019-01-16 10:55:35 +01:00
Kanika Murarka
175b83c56e mgr/dashboard: About modal proposed changes
Fixes: http://tracker.ceph.com/issues/35693
Signed-off-by: Kanika Murarka <kmurarka@redhat.com>
2019-01-16 12:55:09 +05:30
Kefu Chai
5a2849f26c
Merge pull request #25939 from cyx1231st/wip-crimson-msgr-fix-segfault
crimson/net: fix misc issues for segment-fault and test-failures

Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-01-16 15:15:14 +08:00
James McClune
d78863e049 SubmittingPatches: added inline markup to important references
Signed-off-by: James McClune <jmcclune@mcclunetechnologies.net>
2019-01-15 22:42:05 -05:00
xie xingguo
c7356c66b0 mgr/balancer: blame if upmap won't actually work
With automatic balancing on, and if mode is set to upmap,
balancer will fail silently if min_compat_client is lower than
luminous.
You can't figure out that unless you take a closer look at the
mgr log, which is super annoying..

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2019-01-16 09:19:54 +08:00
Xie Xingguo
51ea3b2538
Merge pull request #25940 from xiexingguo/wip-balancer-pools-support
mgr/balancer: auto balance a list of pools

Reviewed-by: Sage Weil <sage@redhat.com>
2019-01-16 08:52:29 +08:00
Jeff Layton
90b4c5157f mgr/rook: populate rados_config_location field
The dashboard ganesha management code requires the rados:// config
URL for the nfs-ganesha daemons. Ensure that we populate that.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2019-01-15 14:14:35 -05:00
Jeff Layton
5df34eeb11 mgr/rook: lowercase the "RADOS" dict label
rook is lowercasing this tag in the CRD in response to review comments.
Change the orchestrator accordingly.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2019-01-15 12:41:19 -05:00
Nathan Cutler
0a46fb0f45 doc: add mimic 13.2.3 and 13.2.4 to releases chart
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-01-15 18:40:16 +01:00
Juan Miguel Olmo Martínez
77f20e725c
mgr/ansible: Replace deprecated <get_config> calls
Changes needed to replace the obsolete get_config by the new get_module_option manager module method

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
2019-01-15 18:04:06 +01:00
Sage Weil
38a99f04f4 Merge PR #25947 into master
* refs/pull/25947/head:
	msg/Messenger: remove get_connection() and send_message()
	ceph_test_msgr: remove final get_connection() user

Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-01-15 09:42:40 -06:00
Patrick Donnelly
d0355acb36
common: restore constructor fmtflags on clear
This is to prevent fmtflags changes from a previous use (e.g. debug message)
leaking into the the next (i.e. the next debug message).

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-01-15 06:41:39 -08:00
Patrick Donnelly
cb1e7e5fd0
common: use better name reset for clear method
Reset is more analogous to re-initilization which is the intent.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2019-01-15 06:41:39 -08:00
Sage Weil
469f02d6c1 msg/msg_types: make set_sockaddr() work with AF_UNSPEC (i.e., zeroed)
Signed-off-by: Sage Weil <sage@redhat.com>
2019-01-15 08:24:48 -06:00
Sebastian Wagner
db677babac
Merge pull request #25649 from SUSE/wip-orchestrator-service-op
mgr/orchestrator: Add service_action method

Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Ricardo Dias <rdias@suse.com>
2019-01-15 14:37:35 +01:00
Sebastian Wagner
18a7863657
Merge pull request #25669 from sebastian-philipp/orchestrator-type-hinting
mgr/orchestrator: Improve docstrings, add type hinting

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Tim Serong <tserong@suse.com>
2019-01-15 14:36:40 +01:00