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>
* 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>
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>
* 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>
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>
mgr/dashboard: RbdMirroringService test suite fails in dev mode
Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
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>
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>
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>
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>
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>
mgr/dashboard: Filter out tasks depending on permissions
Reviewed-by: Ricardo Dias <rdias@suse.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
If we remove the last item of bucket, there should still be
one final entry in the __weights__ field of __weight_set__.
Free the corresponding memory before we __null__ the pointer.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
This is to facilitate service start/stop/reload (for example,
after altering NFS Ganesha configuration, we need to trigger
a service reload).
Signed-off-by: Tim Serong <tserong@suse.com>
All the write/flush in SocketConnection should be serialized, or nasty
segment-fault could happen in seastar which is hard to diagnose.
This fix serializes the writes in `handle_keepalive2()` with other
writes in the open state.
Signed-off-by: Yingxin Cheng <yingxincheng@gmail.com>
pick_address.cc reference cct->_conf, so it should include the
definition of of CephContext explicitly instead of relying on the fact
that some headers it includes include its definition.
Signed-off-by: Kefu Chai <kchai@redhat.com>