Commit Graph

42183 Commits

Author SHA1 Message Date
Jason Dillaman
af276de4f2 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>
2015-06-26 09:59:36 -04:00
Josh Durgin
555da2a15b Merge pull request #5061 from ceph/wip-11791-next
librbd: only update image flags when holding exclusive lock

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-06-24 11:29:15 -04:00
Josh Durgin
4e30f853ce Merge pull request #5063 from ceph/wip-11743-next
librbd: possible crash while concurrently writing and shrinking an image

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-06-24 11:24:43 -04:00
Jason Dillaman
8dfcc72071 tests: verify that image shrink properly handles flush op
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-06-23 17:55:09 -04:00
Jason Dillaman
726d699b77 librbd: invalidate cache outside cache callback context
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>
2015-06-23 14:18:20 -04:00
Jason Dillaman
0215e9753c tests: add new unit tests for object map invalidation
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-06-23 11:21:37 -04:00
Jason Dillaman
eb81a6a7e3 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>
2015-06-23 11:21:32 -04:00
Orit Wasserman
b806b00a79 Merge pull request #4995 from ceph/wip-11563
rgw: fix assignment of copy obj attributes
2015-06-23 09:42:45 +02:00
Yehuda Sadeh
0f6060c7c8 Merge pull request #4996 from ceph/wip-11974
rgw: fix reset_loc()

Reviewed-by: Sage Weil <sage@redhat.com>
2015-06-22 13:54:17 -07:00
Josh Durgin
664123890c Merge remote-tracking branch 'origin/wip-11579' into next
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-06-17 20:15:25 -07:00
Jason Dillaman
adfa2e0070 librbd: flush operations need to acquire owner lock
Cache writeback operations will expect the owner lock to be held.

Fixes: #11938
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-06-17 18:22:04 -07:00
Josh Durgin
574785c645 Merge remote-tracking branch 'origin/wip-11537' into next
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-06-17 18:01:20 -07:00
Yehuda Sadeh
d3bd27f485 rgw: fix reset_loc()
Fixes: #11974

Only need to set locator for underscore if namespace is empty

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2015-06-17 15:33:50 -07:00
Yehuda Sadeh
e41d97c8e3 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.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2015-06-17 11:46:15 -07:00
Sage Weil
c06fd71a1a Merge remote-tracking branch 'gh/next' 2015-06-10 13:14:46 -04:00
Loic Dachary
1c1f2c3243 Merge pull request #4910 from dachary/wip-11932-non-regression-typo
tests: ceph_erasure_code_non_regression s/stipe/stripe/
2015-06-10 17:43:55 +02:00
Yehuda Sadeh
20f49348a3 Merge pull request #4873 from liewegas/wip-rgw-civetweb-port
rgw: strip off port from HTTP_HOST when determining bucket from URL

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2015-06-10 08:12:05 -07:00
Gregory Farnum
5441f89c02 Merge pull request #4838 from ceph/wip-10950
#10950: Fix confusing errors using "mds rm"

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-06-10 07:18:48 -07:00
Gregory Farnum
04a11f0f2f Merge pull request #4835 from ceph/wip-11746
tools: chunk reads in Dumper

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-06-10 07:17:43 -07:00
Gregory Farnum
b408f009b6 Merge pull request #4825 from tchaikov/wip-drop-ignored-mdsbeacon
mon: drop ignored mdsbeacon

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Reviewed-by: Joao Eduardo Luis <joao@suse.de>
2015-06-10 07:15:38 -07:00
Loic Dachary
2d76e2cbba 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.

http://tracker.ceph.com/issues/11949 Fixes: #11949

Signed-off-by: Loic Dachary <loic@dachary.org>
2015-06-10 15:26:37 +02:00
Kefu Chai
5a5dc5f0aa Merge pull request #4707 from stiopaa1/IosFwdNew
Removed unnecessary inclusion of iostream in several files

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-06-10 13:22:00 +08:00
Sage Weil
abe4ec293d rgw: remove trailing :port from host for purposes of subdomain matching
Some clients (ahem, CrossFTP) include the :port in the HTTP_HOST header.
Strip it out.

Switch req_info field to a std::string and avoid copying it in preprocess.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-06-09 14:15:10 -04:00
Sage Weil
8d7024a20e Merge pull request #4775 from yuyuyu101/wip-async-crc-decouple
AsyncMessenger: Make send/receive logic independent

Reviewed-by: Sage Weil <sage@redhat.com>
2015-06-09 10:54:11 -07:00
Loic Dachary
e4011158e7 tests: ceph_erasure_code_non_regression s/stipe/stripe/
Synchronize withe the ceph-erasure-code-corpus submodule in which all
file names were modified to fix the typo.

http://tracker.ceph.com/issues/11932 Fixes: #11932

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-06-09 16:35:02 +02:00
Loic Dachary
7e0536af25 Merge pull request #4815 from dachary/wip-9720-erasure-code-corpus-variants
tests: sync ceph-erasure-code-corpus to verify jerasure variants 

Reviewed-by: Andreas Peters <andreas.joachim.peters@cern.ch>
2015-06-09 16:28:48 +02:00
Loic Dachary
b239945374 Merge pull request #4908 from dachary/wip-11931-parallel-tests
tests: automake 1.11 needs parallel-tests

Reviewed-by: Nathan Cutler <ncutler@suse.com>
2015-06-09 15:50:12 +02:00
Loic Dachary
9193afd3d2 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.

http://lists.gnu.org/archive/html/automake/2012-12/msg00038.html

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.

http://tracker.ceph.com/issues/11931 Fixes: #11931
http://tracker.ceph.com/issues/11906 Fixes: #11906

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-06-09 14:56:49 +02:00
Michal Jarzabek
83f819877f 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)

Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
2015-06-09 07:26:56 +01:00
Loic Dachary
bfb92bd14b Merge pull request #4879 from SUSE/wip-master-specfile-cleanup
ceph.spec.in: remove duplicate BuildRequires

Reviewed-by: Loic Dachary <ldachary@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-06-09 07:32:17 +02:00
Samuel Just
228ee47cfd Merge pull request #4784 from ceph/wip-10794
ceph-objectstore-tool improvements

Reviewed-by: Samuel Just <sjust@redhat.com>
2015-06-08 19:04:33 -07:00
Josh Durgin
ebc38f4a4b Merge pull request #4903 from theanalyst/doc/arch-watch-notify
doc: architecture minor fixes in watch notify

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-06-08 12:36:35 -07:00
Abhishek Lekshmanan
437c9e1e25 doc: architecture minor fixes in watch notify
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@ril.com>
2015-06-09 00:21:58 +05:30
Nathan Cutler
21f9e1f66c ceph.spec.in: remove duplicate BuildRequires
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-06-08 20:11:15 +02:00
Ken Dreyer
142a6ce711 Merge pull request #4880 from SUSE/wip-master-specfile-cleanup2
ceph.spec.in: move specific BuildRequires to where they belong

Reviewed-by: Loic Dachary <ldachary@redhat.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2015-06-08 10:27:44 -06:00
Kefu Chai
2c1f4d4afb Merge pull request #4893 from dachary/wip-11272-ceph-disk-false-negative
tests: ceph-disk.sh test zap gitbuilder false negative

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-06-08 22:12:46 +08:00
Kefu Chai
66f3b192ae Merge pull request #4888 from dachary/wip-11905-test-isa
tests: skip isa tests if the plugin is not available

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-06-08 10:38:52 +08:00
Loic Dachary
3e12863784 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.

http://tracker.ceph.com/issues/11272 Refs: #11272

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-06-07 13:52:01 +02:00
Loic Dachary
4d58c07490 tests: skip isa tests if the plugin is not available
http://tracker.ceph.com/issues/11905 Fixes: #11905

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-06-07 10:53:49 +02:00
Loic Dachary
90baef866f tests: use erasure_code_plugin_exists from ceph-helpers.sh
Instead of the local plugin_exists helper that does the same.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-06-07 10:52:31 +02:00
Loic Dachary
deb651b61c tests: implement erasure_code_plugin_exists in ceph-helpers.sh
Return 0 if the erasure code *plugin* is available, 1 otherwise.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-06-07 10:51:07 +02:00
Loic Dachary
2beba7c9d1 Merge pull request #4713 from dachary/wip-10358-erasure-code-k-1-m-1
ceph osd erasure-code-profile set myprofile k=1 should fail

Reviewed-by: Andreas Peters <andreas.joachim.peters@cern.ch>
2015-06-07 09:58:26 +02:00
Loic Dachary
fda586f5f8 tests: sync ceph-erasure-code-corpus to verify jerasure variants
http://tracker.ceph.com/issues/9720 Refs: #9720

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-06-07 00:15:05 +02:00
Loic Dachary
864e2007d9 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.

http://tracker.ceph.com/issues/9720 Refs: #9720

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-06-07 00:15:05 +02:00
Loic Dachary
1d60786c39 Merge pull request #4811 from dachary/wip-11346-isa
ceph-erasure-code-corpus: isa: add k=10 m=4

Reviewed-by: Yuan Zhou <yuan.zhou@intel.com>
2015-06-07 00:12:11 +02:00
Loic Dachary
3ec41030cc erasure-code: add sanity check to guard against k=1
Add a call to ErasureCode::sanity_check_k for the isa and jerasure
plugins, with associated tests.

http://tracker.ceph.com/issues/10358 Fixes: #10358

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-06-06 23:51:57 +02:00
Sage Weil
efededa010 Merge pull request #4882 from SUSE/wip-submitting-patches-clarification
SubmittingPatches: clarify how Reviewed-by lines are added

Reviewed-by: Sage Weil <sage@redhat.com>
2015-06-06 06:24:17 -07:00
Nathan Cutler
85b327f85a SubmittingPatches: clarify how Reviewed-by lines are added
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-06-06 15:16:16 +02:00
Loic Dachary
eefdeb6b79 Merge pull request #4878 from dachary/wip-11901-spec
ceph.spec.in: add missing BuildRequires from SUSE block

Reviewed-by: Nathan Cutler <ncutler@suse.cz>
2015-06-06 14:37:23 +02:00
Nathan Cutler
e1cb7e5104 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".

Signed-off-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-06-06 14:14:50 +02:00