Jason Dillaman [Thu, 2 Jul 2015 16:39:42 +0000 (12:39 -0400)]
librbd: closing images now returns a result code
Added new librbd::Image::close method to allow checking the close result
when using the C++ librbd library. rbd_close is no longer hard-coded to
return 0.
Fixes: #12069 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Fri, 26 Jun 2015 13:59:36 +0000 (09:59 -0400)]
librbd: assertion failure race condition if watch disconnected
It's possible for librbd's watch of the header object to be reset by
connection issues just prior to the image being removed. This will
causes an assertion failure which assumes at least one watcher on the
image.
Fixes: #12176
Backport: hammer, firefly Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Swift sends Content-Type HTTP header even if the response
doesn't contain body. We have this behaviour implemented
until applying some changes in end_header() function.
Unfortunately, lack of Content-Type causes early exits in
many Tempest's tests for Swift API verification.
Yehuda Sadeh [Thu, 25 Jun 2015 21:31:03 +0000 (14:31 -0700)]
rgw: error out if frontend did not send all data
Fixes: #11851
The civetweb mg_write() doesn't return error when it can't flush all data
to the user, it just sends the total number of bytes written. Modified the
client io to return total number of bytes and return an error if didn't
send anything.
Jason Dillaman [Thu, 25 Jun 2015 20:51:31 +0000 (16:51 -0400)]
librbd: prevent object map updates from being interrupted
Object map updates were being canceled in-flight when the exclusive lock
is released. This resulted in an ERESTART error code bubbling up to
AioRequest.
Fixes: 12165
Backport: hammer Signed-off-by: Jason Dillaman <dillaman@redhat.com>
When shrinking an image, it's possible that the op flush callback
will be from within the cache callback context. This would result
in a deadlock when attempting to re-lock the cache lock in order to
invalidate the cache.
Fixes: #11743
Backport: hammer Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Tue, 23 Jun 2015 15:14:51 +0000 (11:14 -0400)]
librbd: only update image flags when holding exclusive lock
It was possible for a client to open an image while another client
was shrinking an image. This would result in the former invalidating
the object map on-disk if it openned the image between updating the
image header and resizing the object map.
Fixes: #11791
Backport: hammer Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Yehuda Sadeh [Wed, 17 Jun 2015 18:35:18 +0000 (11:35 -0700)]
rgw: fix assignment of copy obj attributes
Fixes: #11563
Clarify the confusing usage of set_copy_attrs() by switching the source and
destinatiion params (attrs, src_attrs). Switch to use attrs instead of
src_attrs afterwards. In one of the cases we originally used the wrong
variable.
Loic Dachary [Wed, 10 Jun 2015 13:26:00 +0000 (15:26 +0200)]
tests: erasure-code non regression tests must skip isa on i386
When the isa plugin is not present, the isa plugin payloads are not
tested. When that happens, remember that it was intentional by storing
the path that would have been tested so that the inventory is complete.
Loic Dachary [Tue, 9 Jun 2015 11:49:14 +0000 (13:49 +0200)]
tests: automake 1.11 needs parallel-tests
Prior to automake 1.13 the default behavior was serial-tests meaning
tests from make check were run one after the other and their output sent
to stdout/stderr. From automake 1.13 up the default became
parallel-tests which logs the output of each individual test in a
separate .log file and allows them to run in parallel.
Enable parallel-tests so that tests can always run in parallel, even
with automake 1.11 which is the version found in CentOS 6.5 and Ubuntu
12.04 precise.
A nice side effect of always having the logs in separate files is that
tests do not need to worry about being too verbose because their output
will only be read for diagnostic purposes.
Michal Jarzabek [Mon, 11 May 2015 16:46:12 +0000 (17:46 +0100)]
Removed unnecessary inclusion of iostream
In several files the iostream wasn't being used, so it got removed.
In other files the iostream inclusion was replaced by including iosfwd
(for forward declarations), which is much smaller header than iostream,
so in theory should reduce compilation time.
To make this work some of the functions must have been moved from .h to .cc file.
3 functions also needed to have inline removed - this shouldn't affect
performance in any way: two of them are
probably too long to have been inlined anyway and the third one is for
error reporting, so probably won't be called too often.
test/Makefile-client.am: added linker libs
This was required to avoid linker error when linking
src/test/cls_rbd/test_cls_rbd.cc file. Makefile was specyfing
libcommon.a as a part of a linker command even though this wasn't
required and wasn't being linked against. When inline functions from
buffer.h were moved to buffer.cc(and inline was removed) the
libcommon.a library became necessary. This wouldn't link without also
including additional libraries(CRYPTO_LIBS and EXTRA_LIBS)
Loic Dachary [Sun, 7 Jun 2015 11:52:01 +0000 (13:52 +0200)]
tests: ceph-disk.sh test zap gitbuilder false negative
When looking for an error message and testing ceph disk zap, use grep -q
to not display the error message that will be mistaken for a real error
by the gitbuilder parser.
Loic Dachary [Sun, 31 May 2015 11:11:34 +0000 (13:11 +0200)]
tests: add --{show_,}path to ceph_erasure_code_non_regression
The directory in which the payload is stored is created from the plugin
parameters. The --show-path shows the directory and exits. This
directory can then be used with --path to override the path created from
the plugin parameters. This is useful to verifying that the jerasure
variant optimized with AVX, SSE4 etc. instructions can be used on the
same payload and show no difference at all. In this case the directory
used by the default jerasure variant is used for each variant and the
parameter that sets the variant to use ( --parameters jerasure-variant )
must not be taken into account to figure out the location of the
payload.
Nathan Cutler [Sat, 6 Jun 2015 11:44:20 +0000 (13:44 +0200)]
ceph.spec.in: move specific BuildRequires to where they belong
Move distro-specific BuildRequires out of "common" section and
into the appropriate %if statement in the "specific" section.
Also remove a duplicated "Requires: gdisk".
"error: /srv/autobuild-ceph/gitbuilder.git/build/ceph.spec:140: Got a
%endif with no %if"
to a stray %endif but did not remove the one causing problem and in
doing so created another problem. June 4th, in 75e87a20dac05441b97ce99dea76fff8e3a863ac Owen incorrectly fixed
this new problem by removing the %else that is near
BuildRequires: gperftools-devel
around line 116, instead of reverting f94f23297c05019db754ec53b4ceaea7706152c9. As a consequence the
ceph.spec.in became syntactically correct but implemented an if/else
logic different from what was intended originally and a number of
BuildRequires became exclusive to SUSE and were not installed for CentOS
7 etc.
Jason Dillaman [Thu, 7 May 2015 16:51:49 +0000 (12:51 -0400)]
librbd: retry lock requests periodically until acquired
If the exclusive lock owner acks the lock release request but crashes
before it actually releases the lock, the requestor will wait forever.
Therefore, after a certain timeout, retry the request again until it
succeeds.
Fixes: #11537
Backport: hammer Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Mon, 11 May 2015 16:42:41 +0000 (12:42 -0400)]
librbd: trim operation should issue object copyups for overlap extent
Now that child images can be disassociated from their parents even
when snapshots exist, trim operations need to copyup parent objects
before deleting the object from the child.
Fixes: #11579 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Joaquim Rocha [Fri, 5 Jun 2015 12:48:41 +0000 (14:48 +0200)]
build: Add info about tests to --with-debug option
The configure's --with-debug option builds also some of the tests
so this should be mentioned in its doc string in order to let users
know how to build all the tests.
David Disseldorp [Fri, 29 May 2015 16:30:54 +0000 (18:30 +0200)]
tests: fix test_activate_dmcrypt uuid usage
4601e10800a63cf0e03108e1da0bf11c19c33e26 introduced a regression in that
an empty (uninitialised) OSD uuid is passed to test_pool_read_write for
IO. As a result, the "rados put" request times out causing test failure.
This change ensures that a correct OSD uuid is passed to
test_pool_read_write.