* Run `json.loads` only once
* `nodename` -> `hostname`
* Remove network calls from `repr(OSD(...)`
Fixes: https://tracker.ceph.com/issues/47438
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Refactored this to simplify the control flow. It became obvious that
* `CephadmService.make_daemon_spec`
* `CephadmService.prepare_create`
* `CephadmService.generate_config`
are basically the same thing. They're all called directly
before the deployment of a daemon. All of them should be
unified. This PR makes this refactorization simpler
By renaming `create` to `prepare_create`, we make `create`
no longer being the entrypoint to call
`create_daemon`. Thus all the functions above
return some data structures.
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
This mitigates a potential race, where new host was added *after*
``_refresh_host_daemons()`` was called, but *before*
``_apply_all_specs()`` was called. thus we end up with a hosts
where daemons might be running, but we have not yet detected them.
Imagine:
1. the initial MGR was deployed manually
2. `serve()` is called
3. `_refresh_hosts_and_daemons()` is called
4. `add_host()` is called with the initial host
5. `apply_all_specs()` now deploys an additional MGR on the initial host
Fixes: https://tracker.ceph.com/issues/45093
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
mgr/dashboard: allow getting fresh inventory data from the orchestrator
Reviewed-by: Stephan Müller <smueller@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
Otherwise we might be prone to races, e.g.
a new hosts gets added in between calls to
`get_hosts_func`
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
No need to account for removing (or zeroing) backtrace,
because if item.size is 0, num is already set to 1.
Fixes: https://tracker.ceph.com/issues/47353
Signed-off-by: Yanhu Cao <gmayyyha@gmail.com>
it might be confusing why we don't use explicit specialization for
defining errorator::futurize::stored_to_future.
quote from item 16, § 17.7.3, n4659:
In an explicit specialization declaration for a member of a class
template or a member template that appears in namespace scope, the
member template and some of its enclosing class templates may remain
unspecialized, except that the declaration shall not explicitly
specialize a class member template if its enclosing class templates are
not explicitly specialized as well.
Signed-off-by: Kefu Chai <kchai@redhat.com>
this is a leftover of 260a702ba9. where we
bumped up the Seastar API level to 5, in which seastar::internal::monostate
is used to represent the stored state of a future instead of a tuple<>.
to address FTBFS with GCC-9.2.1
Signed-off-by: Kefu Chai <kchai@redhat.com>
* refs/pull/36987/head:
mgr: PyModuleRegistry::unregister_client() can run endlessly
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Otherwise the error message only reports that something is missing.
No what it is missing, helps debugging when this occurs.
As it sometimes does on FreeBSD because we insert the prebuild rpm
instead of building it from source.
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
instead of converting string constant to char*, construct string_views
from string constants
to silence GCC warnings like:
src/rgw/services/svc_sys_obj_cache.cc:512:7: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
512 | { "cache list name=filter,type=CephString,req=false",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Kefu Chai <kchai@redhat.com>
Since the v1.4.0 release there have been a few improvements to Zstandard
including improved compression ratios, faster compression, and faster
decompression.
Signed-off-by: Bryan Stillwell <bstillwell@godaddy.com>
qa/tests: running rados with -p 80 to produce better test results on …
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
RGWRadosStore::create_bucket() only returns EEXIST errors when a
conflict is detected and the recreation should fail. in other cases,
return success and use the 'bool *existed' flag to notify the caller of
its prior existence
Signed-off-by: Casey Bodley <cbodley@redhat.com>
qa/cephadm: Add iSCSI
Reviewed-by: Adam King <adking@redhat.com>
Reviewed-by: Georgios Kyratsas <gkyratsas@suse.com>
Reviewed-by: Matthew Oliver <moliver@suse.com>
Reviewed-by: Michael Fritch <mfritch@suse.com>
Ensure we always return local status for a mirrored image. The Python
bindings expect it to be included for backwards compatibility. Previously
the local status was not included if at least one remote site was reporting
status.
Fixes: https://tracker.ceph.com/issues/47390
Signed-off-by: Jason Dillaman <dillaman@redhat.com>