Nathan Cutler [Wed, 28 Aug 2019 11:57:43 +0000 (13:57 +0200)]
script/ceph-backport.sh: wholesale refactor
This commit refactors the script to make it more user-friendly and
maintainable. Added features:
* script now determine release/milestone from backport issue instead of
requiring user to provide it
* script now generates a more verbose PR description
* backport PR title is based on original PR instead of the tracker issue
* improved error handling
* new --debug option that triggers "set -x"
* new --verbose option
* errors and diagnostic messages are now printed to stderr
Ilya Dryomov [Wed, 28 Aug 2019 15:07:07 +0000 (17:07 +0200)]
qa: krbd_parent_overlap.t: fix read test
It turns out this test has not been triggering the right code path for
a while now (krbd_parent_overlap.t was added just over a year ago, but
the original test goes back a few years).
To do its job it needs an empty clone with the overlap set to somewhere
in the middle of an object. The test relied on shrinking for this, but
shrinking no longer fits the bill because a copyup is now performed for
the object with the overlap -- we never go to the parent after that.
Let's size the parent so that it ends in the middle of an object and
then grow an empty clone instead. Also, while reading from page cache
does seem to trigger a read that straddles the overlap, it's not very
reliable, so supplement it with a direct read.
Before this commit, backport-resolve-issue would blindly grab the first tracker
URL it saw in the GitHub PR description. With this commit, it examines all the
tracker URLs it sees in the PR description and uses the first one that
corresponds to an issue in the Redmine Backport tracker.
mgr/dashboard: improve overall E2E stability of navigation
The `navigateTo` method will check if a table exists on the table it has
been used to navigate to and if so, wait for the data of the table to
be loaded.
Fixes: https://tracker.ceph.com/issues/41349 Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
mgr/dashboard: replace E2E test `moveClick` with `clickCheckbox`
Ceph Dashboard replaces the original checkbox with a fancy replacement
using the pseudo selector "::before" inside the <label> tag. When the
fancy replacement checkbox is clicked, it actually triggers a click on
the label of the checkbox. `clickCheckbox` does the same.
Removed `moveClick` as it was used to perform an action that the user
would not be able to perform, namely clicking on the checkbox instead of
the checkboxes' label. It was also used for cases where it was not
necessary to be used for, hence the replacement `clickCheckbox` has been
introduced. It checks if the argument passed to it is of type `checkbox`
or `label`. If it is of type `label`, the label will be clicked. If it
is of type `checkbox`, the corresponding `label` is determined and
clicked. This replaces the old implementation with a solution that has
an easy to understand purpose. It also prevents every false application.
This method is designed to be used on all checkboxes of Ceph Dashboard.
Fixes: https://tracker.ceph.com/issues/40693 Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
Kefu Chai [Tue, 27 Aug 2019 16:50:06 +0000 (00:50 +0800)]
crimson/net/ProtocolV2: include fmt/chrono.h if fmt version >= 6.0
* check libfmt version instead of the exisistence of chrono.h, as
libfmt merged fmt/time.h into fmt/chrono.h since v 6.0, while in
libfmt v5.3, fmt/chrono.h did not provide all the necessary bits
for fmt::to_format(..., const tm&). see also
https://github.com/fmtlib/fmt/commit/a939c75956d27996680ce498529da0d1668c4eac
and https://github.com/fmtlib/fmt/blob/master/ChangeLog.rst
* use fmt API instead of libc API for getting `localtime()`, it's
more C++ friendly than plain `localtime_r()`
Kefu Chai [Wed, 28 Aug 2019 03:05:43 +0000 (11:05 +0800)]
seastar: pick up latest changes
* v2 api: remove variadic futures. let's be in sync with upstream.
* warn if the returned future is ignored. this helps us to catch
bugs and to improve the readability of the code -- we need to
explicitly ignore a future if we want to. and ideally, we should
document the reason why a future is ignored.
chunmei Liu [Thu, 22 Aug 2019 07:47:40 +0000 (00:47 -0700)]
crimson: add FuturizedCollection
we will need to talk to BlueStore, and currently `ceph::os::Collection`
only works with `CyanStore`, so a wrapper around `ceph::os::Collection`
is added. we can subclass it to adapt to CyanStore and to BlueStore.
the underlying concrete `FuturizedStore` classes are responsible to
cast `FuturizedCollection` to their own `Collection` type if they
want to access the interface not exposed by `FuturizedCollection`.
Signed-off-by: chunmei Liu <chunmei.liu@intel.com>
Kefu Chai [Thu, 22 Aug 2019 08:47:19 +0000 (16:47 +0800)]
crimson/osd: lift continuation in PGMeta::load()
after making `open_collection()` return a future, we don't need to chain
the body of `PGMeta::load()` after `omap_get_values()`. instead we can
lift it.
Nathan Cutler [Wed, 21 Aug 2019 14:49:26 +0000 (16:49 +0200)]
script: add backport-resolve-issue
This script processes GitHub backport PRs, checking for proper cross-linking
with a Redmine Backport tracker issue and, if a PR is merged and properly
cross-linked, it can optionally resolve the tracker issue and correctly
populate the "Target version" field.
The script takes a single positional argument, which is optional. If the
argument is an integer, it is assumed to be a GitHub backport PR ID (e.g. "28549").
In this mode ("single PR mode") the script processes a single GitHub backport
PR and terminates.
If the argument is not an integer, or is missing, it is assumed to be a
commit (SHA1 or tag) to start from. If no positional argument is given, it
defaults to the tag "BRI", which might have been added by the last run of the
script. This mode is called "scan merge commits mode".
In both modes, the script scans a local git repo, which is assumed to be
in the current working directory. In single PR mode, the script will work
only if the PR's merge commit is present in the current branch of the local
git repo. In scan merge commits mode, the script starts from the given SHA1
or tag, taking each merge commit in turn and attempting to obtain the GitHub
PR number for each.
For each GitHub PR, the script interactively displays all relevant information
(NOTE: this includes displaying the GitHub PR and Redmine backport issue in
web browser tabs!) and prompts the user for her preferred disposition.
Kefu Chai [Tue, 27 Aug 2019 01:22:34 +0000 (09:22 +0800)]
install-deps.sh: only prepare wheels for "make check"
* move `for_make_check` to the beginning of script, as FreeBSD will also
use this variable
* extract `preload_wheels_for_tox()` function out to improve readability
* call `preload_wheels_for_tox()` only if `for_make_check` is true
When --resolve-parent is provided on the command line, the script
will check the status of backport issues for those parent issues
all of whose backport issues already exist. If all the backport
issues are in status "Resolved", the parent issue's status is set
to "Resolved" as well.
Kefu Chai [Sun, 25 Aug 2019 13:22:16 +0000 (21:22 +0800)]
common/DecayCounter: do not decay when testing denc
check-generated.sh tries to verify the invariance of a type after
encoding and decoding. so we should keep the value of `DecayCounter` the
same when encoding/decoding/dumping.
we should update explicit loc and location even if
`ofs >= manifest->obj_size`. there is chance that we are updating an end
iterator whose ofs is equal to obj_size. before being updated, the end
iterator points to an implicit location, while after being updated, the
manifest could be using an explicit location, so we should update the
end iterator as well.