crush/CrushTester: return EINVAL if crushtool returns non-zero
this backports a tiny part of ec02441, otherwise
CrushTester will return 1, and "ceph" cli will take it
as EPERM, which is miss leading, and fails
osd-crush.sh:TEST_crush_reject_empty.
* Back in Hammer, the osd-crush.sh individual tests did not run the
monitor, it was taken care of by the run() function. An attempt to run
another mon fails with:
This problem was introduced by cc1cc033930e8690a57674e842a003f6bbc7a242
from https://github.com/ceph/ceph/pull/4936
* replace test/mon/mon-test-helpers.sh with test/ceph-helpers.sh as
we need run_osd() in this newly added test
* update the run-dir of commands: ceph-helpers.sh use the different
convention for the run-dir of daemons.
Loic Dachary [Wed, 10 Jun 2015 21:16:01 +0000 (23:16 +0200)]
tests: display the output of failed make check runs
After a make check fails, it shows a summary but not the output of the
failed tests although they contain information to diagnose the problem.
Set the VERBOSE=true automake variable which is documented to collect
and display the failed script output at the end of a run (the content of
the test-suite.log file (valid from automake-1.11 up).
Kefu Chai [Mon, 25 May 2015 12:14:32 +0000 (20:14 +0800)]
mon: validate new crush for unknown names
* the "osd tree dump" command enumerates all buckets/osds found in either the
crush map or the osd map. but the newly set crushmap is not validated for
the dangling references, so we need to check to see if any item in new crush
map is referencing unknown type/name when a new crush map is sent to
monitor, reject it if any.
Kefu Chai [Tue, 26 May 2015 04:08:09 +0000 (12:08 +0800)]
crush/CrushTester: add check_name_maps() method
* check for dangling bucket name or type names referenced by the
buckets/items in the crush map.
* also check for the references from Item(0, 0, 0) which does not
necessarily exist in the crush map under testing. the rationale
behind this is: the "ceph osd tree" will also print stray OSDs
whose id is greater or equal to 0. so it would be useful to
check if the crush map offers the type name indexed by "0"
(the name of OSDs is always "OSD.{id}", so we don't need to
look up the name of an OSD item in the crushmap).
Samuel Just [Tue, 7 Jul 2015 18:43:01 +0000 (11:43 -0700)]
OSDMonitor: allow addition of cache pool with non-empty snaps with config
We need to be able to allow the version of ceph_test_* from earlier
versions of ceph to continue to work. This patch also adjusts the
work unit to use a single rados snap to test the condition without
--force-nonempty to ensure that we don't need to be careful about
the config value when running that script.
This fixes a problem, wherein calamari does not provide
popup drill-downs for warnings or errors, should the summary
be missing.
Calamari gets health info from /api/v1/cluster/$FSID/health.
If the data here has a summary field, this summary is provided
in a popup window:
/api/v1/cluster/$FSID/health is populated (ultimately) with
status obtained via librados python bindings from the ceph
cluster. In the case where there's clock skew, the summary
field supplied by the ceph cluster is empty.
No summary field, no popup window with more health details.
Kefu Chai [Fri, 15 May 2015 14:50:36 +0000 (22:50 +0800)]
mon: always reply mdsbeacon
the MDS (Beacon) is always expecting the reply for the mdsbeacon messages from
the lead mon, and it uses the delay as a metric for the laggy-ness of the
Beacon. when it comes to the MDSMonitor on a peon, it will remove the route
session at seeing a reply (route message) from leader, so a reply to
mdsbeacon will stop the peon from resending the mdsbeacon request to the
leader.
if the MDSMonitor re-forwards the unreplied requests after they are
outdated, there are chances that the requests reflecting old and even wrong
state of the MDSs mislead the lead monitor. for example, the MDSs which sent
the outdated messages could be dead.
Sage Weil [Wed, 29 Apr 2015 19:34:25 +0000 (12:34 -0700)]
mon: prevent pool with snapshot state from being used as a tier
If we add a pool with snap state as a tier the snap state gets clobbered
by OSDMap::Incremental::propogate_snaps_to_tiers(), and may prevent OSDs
from starting. Disallow this.
Jason Dillaman [Wed, 8 Apr 2015 23:06:52 +0000 (19:06 -0400)]
librbd: avoid blocking AIO API methods
Enqueue all AIO API methods within the new librbd thread pool to
reduce the possibility of any blocking operations. To maintain
backwards compatibility with the legacy return codes of the API's
AIO methods, it's still possible to block attempting to acquire
the snap_lock.
Samuel Just [Wed, 27 May 2015 18:00:54 +0000 (11:00 -0700)]
ReplicatedPG: start_flush: use filtered snapset
Otherwise, we might send our deletes based on deleted snaps. This is
problematic since we may have trimmed the clones to which those snaps
belong, causing us to send them at an earlier snap than we used before.
The specific situation was
78:[78, 70, 63, 5a, 58, 57]:[64(63), 58(58, 57)]
with 58 already clean. To flush 64, we send:
delete@58
delete@59
copyfrom@62
Then, snap 63 is trimmed leaving us with a snapset of:
78:[78, 70, 63, 5a, 58, 57]:[58(58, 57)]
since trim_object doesn't filter the head object snapset snaps. This
isn't really a bug since in general all snapset users must be aware
that there may be trimmed snaps in snapset::snaps. However, here
it becomes a problem when we go to flush head:
delete@58 -- ignored due to snapc
delete@59 -- ignored due to snapc
copyfrom@78 -- not ignored
The base pool head is at snap seq 62, so it clones that value into
clone 78(78, 70) instead of forgetting it. What should have happened
is that we should have based our flushes on filtered snapset:
78:[78, 70, 58, 57]:[58(58, 57)]
Causing us to instead send:
delete@58 -- ignored due to snapc
delete@69 -- not ignored, causes no clone to be made
copyfrom@78 -- not ignored, updates head such that a subsequent clone
will leave 70 out of the clone snaps vector.
* #include "strtol.h" in strtol.cc, to ensure the function defintions
are consistent.
* add a test accordingly
* fix the testcase of converting 1024E.
* do not accept integers overflow after adding SI suffix
* do not accept integers underflow (i.e. negative values)
Anton Aksola [Fri, 10 Apr 2015 10:25:21 +0000 (13:25 +0300)]
rgw: always check if token is expired
Fixes: #11367
Currently token expiration is only checked by the token cache. With PKI
tokens no expiration check is done after decoding the token. This causes
PKI tokens to be valid indefinitely. UUID tokens are validated by
keystone after cache miss so they are not affected by this bug.
This commit adds explicit token expiration check to
RGWSwift::validate_keystone_token()
Signed-off-by: Anton Aksola <anton.aksola@nebula.fi> Reported-by: Riku Lehto <riku.lehto@nexetic.com>
(cherry picked from commit 2df069390ea3bbcfbab5022750e89f51d197cc11)
Loic Dachary [Thu, 28 May 2015 08:35:51 +0000 (10:35 +0200)]
debian: ceph-dbg steals ceph-objectstore-tool from ceph-test-dbg
When ceph-objectstore-tool was moved from ceph-test to
ceph by 61cf5da0b51e2d9578c7b4bca85184317e30f4ca, the ceph package in
debian/control was updated accordingly, as recommended by
https://www.debian.org/doc/debian-policy/ch-relationships.html#s-replaces
The same must be done for the ceph-dbg package because
/usr/lib/debug/usr/bin/ceph-objectstore-too is no longer in
ceph-test-dbg.
Although the change was merged may 6th, 2015 8f23382064c189b657564d58c3f9d17720e891ed, teuthology jobs were not
always failing because packages were not systematically upgraded during
the installation. The missing dependencies that were responsible for
this upgrade problem were fixed by f898ec1e4e3472b0202280f09653a769fc62c8d3 on may 18th, 2015 and all
upgrade tests relying on ceph-*-dbg packages started to fail
systematically after this date.
* if ceph is not reading from a tty, expect EOF instead of "quit"
as the end of input.
* do not panic at seeing the EOF
* update the test case test_mon_injectargs_SI(). since we disables
"ceph injectargs <args,...>" in a458bd83, in which the arguments
of "injectargs" are supposed to be consumed by "tell" instead.
so "ceph injectargs ..." is taken as an incomplete command, and
this command will bring ceph cli into the interactive mode,
redirecting its stdin to /dev/null helps ceph cli quit the loop,
but in a way of throwing EOFError exception. this change handles
the EOF, so the "ceph injectargs ..." does not throws anymore.
but the side effect is that the test fails since it expects a
non-zero return code. so replace it with an equivalent "tell"
command which also fails but due to the non-SI postfix.
Ken Dreyer [Mon, 18 May 2015 16:50:58 +0000 (10:50 -0600)]
debian: set rest-bench-dbg ceph-test-dbg dependencies
Debian's debug packages ought to depend on their respective binary
packages. This was the case for many of our ceph packages, but it was
not the case for ceph-test-dbg or rest-bench-dbg.
Add the dependencies on the relevant binary packages, pinned to
"= ${binary:Version}" per convention.
Yehuda Sadeh [Thu, 14 May 2015 00:05:22 +0000 (17:05 -0700)]
rgw: merge manifests correctly when there's prefix override
Fixes: #11622
Backport: hammer, firefly
Prefix override happens in a manifest when a rados object does not
conform to the generic prefix set on the manifest. When merging
manifests (specifically being used in multipart objects upload), we need
to check if the rule that we try to merge has a prefix that is the same
as the previous rule. Beforehand we checked if both had the same
override_prefix setting, but that might not apply as both manifests
might have different prefixes.