doc/man/8/ceph-volume: specify "program" for subcommands
as per
https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html
> Like py:currentmodule, this directive produces no output. Instead, it
> serves to notify Sphinx that all following option directives document
> options for the program called name.
> ...
> The program name may contain spaces (in case you want to document
> subcommands like svn add and svn commit separately).
without specifying -Og, -O0 is used. as per
https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
> -O0
> Reduce compilation time and make debugging produce the expected
> results. This is the default.
and
> -Og
> Optimize debugging experience. -Og should be the optimization level of
> choice for the standard edit-compile-debug cycle, offering a reasonable
> level of optimization while maintaining fast compilation and a good
> debugging experience. It is a better choice than -O0 for producing
> debuggable code because some compiler passes that collect debug
> information are disabled at -O0.
and Debug is the default built type if .git directory is found under
the root source directory, so by adding "-Og -g" to CMAKE_C_FLAGS_DEBUG,
developers can have better debugging experience when testing Ceph
built from a git repo. but the downside is that it might take longer
to build the tree.
this change should also enable us to link crimson on aarch64.
the same applies to Clang,
> -O0 Means “no optimization”: this level compiles the fastest and generates the most debuggable code.
> -O1 Somewhere between -O0 and -O2.
> -O2 Moderate level of optimization which enables most optimizations.
> -Og Like -O1. In future versions, this option might disable different optimizations in order to improve debuggability.
see
https://clang.llvm.org/docs/CommandGuide/clang.html#cmdoption-o0
see also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101448
crimson/os/seastore: measure transactional efforts that are discarded or committed
The efforts of a transaction include the number and bytes of its read,
mutate, retire and fresh extents, and the bytes of delta generated.
This helps to understand the following aspects:
* The ratio of discarded efforts vs committed efforts;
* The average efforts of a transaction;
* The distribution of read/mutate/delta/retire/fresh efforts;
* The memory overhead and potential disk overhead of a transaction;
* How early a transaction invalidation happens;
* The average extent length;
It is possible to extend the effort metrics to be labeled by extent
types, in case we want to distinguish and profile the efforts at the
sub-component level.
crimson/os/seastore: assert the committing delta is not empty
It makes no sense to commit an empty delta. It is mostly an issue that
user forget to generate delta during mutation, or there are futile
copy-on-write operations.
per https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
> -Og
> Optimize debugging experience. -Og should be the optimization level of
> choice for the standard edit-compile-debug cycle, offering a reasonable
> level of optimization while maintaining fast compilation and a good
> debugging experience. It is a better choice than -O0 for producing
> debuggable code because some compiler passes that collect debug
> information are disabled at -O0.
so instead of using -O0, for better developer experience, -Og is
recommended.
cmake: use add_compile_options() to pass compile options
add_definitions() is for adding "-D" define flags, while "-include" does
not define flags, so let's be explicit and use add_compile_options()
instead.
this change partially reverts 5fb90bb79671b8e22f507728e4b4b948a591f98f.
back then, we were using ubuntu bionic for building windows packages.
but since we've switched to ubuntu focal, where cmake 3.16 is available,
there is no reason to stick with add_definitions() anymore.
since we dropped the support of bionic, we now have the luxury of using
newer CMake! and by using CMake 3.16, we now have access to
* add_compile_definitions(), which was introduced in cmake 3.12
also, drop the comment of
> remove cmake/modules/FindPython* once 3.12 is required
because we need to support python 3.10 in future, better off keeping
the FindPython files around, so we can backport cmake changes from
upstream when necessary.
we are allowed to bump up the CMake's required to 3.16, because:
- ubuntu focal ships with cmake 3.16.3
- RHEL/CentOS8's AppStream has cmake 3.18
do not rely on the uninitialized bits on stack for testing, otherwise
there is chance that we have following test failure:
64: ../src/test/test_ipaddr.cc:226: Failure
64: Expected equality of these values:
64: two.ifa_addr
64: Which is: 127.0.0.1:57677
64: result
64: Which is: 127.0.0.1:57677
the root cause is just that the "result" is actually `one.ifa_addr`,
which is marked UP as that's what the uninitialized bits on stack
indicate.
to initialize an alienstore with a reference of
seastar::alien::instance is but the internal of AlienStore, would be
better if we could avoid exposing it as a part of the interface of
crimson::osd::OSD().
so, in this change, instead of creating FuturizedStore in OSD(), we
create it in main() where the app is available, so we can just create
FuturizedStore without passing the alien instance all the way down to
OSD().
crimson/osd: use app.alien() to initialize AlienStore::alien
in e53ea0886fba9073904f59ea85fb73d854565921, the new alien::submit_to() API
is used in the place of the old one. but seastar::alien::instance::_qs
should be initialized before we are able to use the alien instance, just
creating an instance of alien::instance is not enough.
in this change, instead of creating an instance of alien::instance using
make_unique<>, the return value of app.alien() is used to initialize the
alien member variable of AlienStore. app.alien() is always properly
initialized by reactor.
test/crimson/test_alien_echo: msgr->stop() before shutdown
it is required to remove all registered dispatchers before shutting down a
messenger. otherwise assert(dispatchers.empty()) in SocketMessenger::shutdown() fails.
Sage Weil [Thu, 15 Jul 2021 20:17:23 +0000 (15:17 -0500)]
mon: allow a MON_DOWN grace period after cluster mkfs
During teuthology tests, the initial cluster bootstrap often starts up
the mon sbut doesn't include all mons in the initial quorum, due to
mon startup misalignment and random delays. Provide a short grace period
where we will not raise a MON_DOWN alert even though the quorum is not
complete.
Fixes: https://tracker.ceph.com/issues/43584 Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Thu, 15 Jul 2021 15:05:22 +0000 (11:05 -0400)]
Merge PR #42073 into master
* refs/pull/42073/head:
doc/mgr/nfs: fix 'export apply', pool name
PendingReleaseNotes: document workaround for NFS storage change
qa/tasks/mgr/test_orchestrator_cli: fix test
qa/suites/orch/cephadm/mgr-nfs-upgrade: add test for nfs migration
mgr/cephadm: migrate nfs grace file
mgr/nfs: migrate pre-pacific nfs.ganesha-foo clusters to nfs.foo
doc/cephfs/fs-nfs-exports: document new export apply capabilities
qa/tasks/cephfs/test_nfs: define NFS_POOL_NAME
mgr/nfs: use NFS_POOL_NAME in test_nfs.py
mgr/nfs: test export apply on JSON list
mgr/nfs: add test for ganesha conf apply/import
qa/tasks/cephfs/test_nfs: retry mount a few times
mgr/cephadm: migrate all legacy nfs exports to new .nfs pool
mgr/nfs: adjust cephfs export caps if necessary
python-common: don't accept pool/ns for NFSServiceSpec
mgr/orchestrator: drop rados_config_location ServiceDescription property
mgr/cephadm: move rados_config_location() out of NFSServiceSpec
mgr/nfs: change nfs pool to .nfs
mgr/nfs/export: accept a JSON or ganesha EXPORT config
mgr/nfs: allow 'nfs export apply' to take a list of exports
python-common: remove pool + namespace from NFSServiceSpec
mgr/nfs: used fixed pool + ns
mgr/rook: used fixed pool + ns
mgr/dashboard: use fixed pool + ns
mgr/cephadm: always use fixed pool and namespace
mgr/nfs: adjust test to match pool name
mgr/nfs: always create ganesha pool with well-defined name
cmake: add transitive dependency on legacy-option-headers
the legacy-option-headers target is only marked as a dependency of the
common-objs and common-common-objs. because those targets are OBJECT
libraries, their dependencies aren't inherited by the targets that link
common-objs or common-common-objs
this adds the dependencies manually, so that changes to the config
yaml files will cause legacy-option-headers to regenerate the headers