Xuehan Xu [Fri, 18 Dec 2020 04:20:48 +0000 (12:20 +0800)]
crimson/osd: don't get recovery read lock in PGRecvery::on_local_recover()
Now we've changed drop_recovery_read to only care about the recovery_read flag, so
we shouldn't get read lock when acquiring recovery read, otherwise there would be
a chance in which the read lock can't get released
Jason Dillaman [Wed, 16 Dec 2020 15:15:28 +0000 (10:15 -0500)]
librbd/api: avoid retrieving more than max mirror image info records
This could otherwise result in an assertion failure in the API if
it failed to retrieve the status on an image and therefore required
a second iteration through the loop.
Fixes: https://tracker.ceph.com/issues/48522 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Ilya Dryomov [Thu, 3 Dec 2020 10:24:32 +0000 (11:24 +0100)]
qa: krbd_stable_pages_required.sh: move to stable_writes attribute
bdi/stable_pages_required attribute was deprecated in 5.10 and now
always returns 0. The replacement is queue/stable_writes. (It is
also writeable, so we can simplify these test cases somewhat in the
future.)
Kefu Chai [Thu, 17 Dec 2020 03:29:02 +0000 (11:29 +0800)]
crimson/osd: do not use the parallel_for_each() in prep_push()
the caller of prep_push() also loops in target pg shards, so there is no
need to do the loop in prep_push(). in this change, prep_push() just
takes care of a single pg_shard for a single oid instead of collecting
all push ops for all pg_shards to be recovered.
Kefu Chai [Thu, 17 Dec 2020 03:15:04 +0000 (11:15 +0800)]
crimson/osd: create the collected push ops use shared_ptr
do_with() uses a unique_ptr for keeping the captured variables alive. so
it is practically the same thing in concept. but `do_with()` is more
distracting and difficult to reason about, it increases the indent level
also.
so use a lw_shared_ptr() for collecting the push ops map.
Kefu Chai [Thu, 17 Dec 2020 02:05:04 +0000 (10:05 +0800)]
crimson/osd: trade do_with() for plain code
no need to capture the intervals or the data in
`ReplicatedRecoveryBackend::_handle_push()`, they are passed to
`submit_push_data()` by value right after being initialized. so
move the content of `do_with()` block out into the caller.
also, restructure the code preparing the parameters for
`submit_push_data()` to match with the structure of with the code in
`ReplicatedRecoveryBackend::_handle_pull_response()` for better
readability.
Kefu Chai [Thu, 17 Dec 2020 10:52:00 +0000 (18:52 +0800)]
install-deps.sh: do not install libboost-all-dev for old distros
ubuntu disco and ubuntu focal do not ship libboost 1.72 and up, and
we depend on libboost 1.72 or up, so it does not help to install
liboost 1.67 or libboost 1.71 anymore.
Alfonso Martínez [Tue, 15 Dec 2020 08:28:46 +0000 (09:28 +0100)]
mgr/dashboard: CLI commands: read passwords from file
Fixes: https://tracker.ceph.com/issues/48355 Signed-off-by: Alfonso Martínez <almartin@redhat.com> Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
Kefu Chai [Tue, 15 Dec 2020 15:11:47 +0000 (23:11 +0800)]
ceph.in: try harder if asok path does not exist
when handling "ceph daemon <name> ...", we need to figure out the asok
path, if the "<name>" option is not a path but a "name" as it claims to
be. but if the "admin_socket" option includes substitution/meta variable of
"$pid", it will be expanded using its own pid, instead of the process
with the specified "name". but "ceph" cli does not offer a dedicated
option for overriding the pid for ceph-conf which is used "ceph" cli to
retrieve the "admin_socket" option with specified "name".
in this change, "<name>" option is interpreted as "${name}.${pid}" if
the returned admin_socket path does not point to a valid UNIX domain
socket file. and "ceph" cli will try harder by passing "--pid ${pid}"
and "--name ${name}" instead of "--name ${name}.${pid}" to ceph-conf.
Zac Dover [Sat, 5 Dec 2020 02:17:24 +0000 (12:17 +1000)]
doc/dev: update auto pr validation section
This commit updates the "Automated PR Validation"
section of the "Basic Workflow" page in the
Developer Guide. This is part of a project that
aims to clean all of the sentences currently extant
in the Dev Guide, prior to a slight reorganization
of that guide for the sake of clarity and simplicity.
Deepika Upadhyay [Wed, 16 Dec 2020 12:47:01 +0000 (18:17 +0530)]
install-deps.sh: add with_jaeger options for installing it's dependencies
* if WITH_JAEGER flag is specified, install-deps should mangle and update
debian/control + ceph.spec the way we do for adding crimson dependencies
with WITH_SEASTAR flag.
Deepika Upadhyay [Wed, 16 Dec 2020 12:39:00 +0000 (18:09 +0530)]
debian/control: update yaml-cpp version if building with Jaeger
jaeger specifically requires yaml-dev +0.6 but since all supported
distro(bionic) still doesn't have this version, yaml-cpp will be build
from source if enabled.
This fixes the build failure:
```
Could NOT find yaml-cpp: Found unsuitable version "", but required is at
least "0.5.1" (found yaml-cpp_LIBRARY-NOTFOUND)
```
Nizamudeen A [Thu, 26 Nov 2020 10:25:00 +0000 (15:55 +0530)]
mgr/dashboard: Temporary User Lockout if 10 Invalid Login attempts
Implemented a user lockout mechanism if the user enters 10 invalid attempts. The attempt count gets resetted to 0 once the user succesfully logins before getting disabled. Once the user gets disabled administrator has to manually enable the user which will also resets the number of attempts.
Fixes: https://tracker.ceph.com/issues/40914 Signed-off-by: Nizamudeen A <nia@redhat.com>
Nizamudeen A [Wed, 16 Dec 2020 08:23:14 +0000 (13:53 +0530)]
mgr/dashboard: Fixing dashboard logs e2e test
Yesterday there were some changes went in which disables the logging of config set and config-key set to to be logged in mgr audit logs. Dashboard has an e2e test which checks for this config set and broke the current e2e jenkins job. This commit removes that certain test to fix the jenkins job.
Fixes: https://tracker.ceph.com/issues/48623 Signed-off-by: Nizamudeen A <nia@redhat.com>
Kefu Chai [Wed, 16 Dec 2020 07:43:45 +0000 (15:43 +0800)]
rpm: package crimson-store-nbd in ceph-test package
when building with seastar enabled, package crimson-store-ndb in
"ceph-test" package. "crimson-store-nbd" is a new tool for testing
seastore using nbd.
In case the directory was merged but the stale sub directories
maybe still kept in the loaded_anchor_map, then it will add the
sub directores' parent frag CDir, the merged CDir, into the leaves
vector for more than once.
Fixes: https://tracker.ceph.com/issues/48517 Signed-off-by: Patrick Donnelly <pdonnell@redhat.com> Signed-off-by: Xiubo Li <xiubli@redhat.com>
Anthony D'Atri [Tue, 15 Dec 2020 06:02:31 +0000 (22:02 -0800)]
doc: standardize config option names to use interstitial underscores
Ceph config option names may use spaces, underscores, or by one reference hyphens
as interstitial separators. Most usage within the doc tree uses underscores,
though example conf files and especially structured lists of options mostly
use spaces. Mostly. Underscores help differentiate the config names from
surrounding text, and moreover facilitate scripting, grep, awk, etc and match
their form in src/common/options.cc.
This PR conforms these occurrences of option names to use interstitial underscores instead of spaces.
Fixes: https://tracker.ceph.com/issues/48301 Signed-off-by: Anthony D'Atri <anthony.datri@gmail.com>