]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
10 years agorbd: explicitly close images to check for unexpected errors 5131/head
Jason Dillaman [Thu, 2 Jul 2015 16:59:45 +0000 (12:59 -0400)]
rbd: explicitly close images to check for unexpected errors

While errors shouldn't occur during image close, it is possible that
they could occur.  In this case, the user should be informed.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agopybind: RBD close can now raise an exception on close
Jason Dillaman [Thu, 2 Jul 2015 16:46:28 +0000 (12:46 -0400)]
pybind: RBD close can now raise an exception on close

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agolibrbd: closing images now returns a result code
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>
10 years agoMerge pull request #5089 from rzarzynski/wip-enforce_content-type_for_swift-next
Yehuda Sadeh [Fri, 26 Jun 2015 16:18:54 +0000 (09:18 -0700)]
Merge pull request #5089 from rzarzynski/wip-enforce_content-type_for_swift-next

rgw [next]: enforce Content-Type in Swift responses.

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoMerge pull request #5090 from ceph/wip-12176-next
Josh Durgin [Fri, 26 Jun 2015 15:52:26 +0000 (11:52 -0400)]
Merge pull request #5090 from ceph/wip-12176-next

librbd: assertion failure race condition if watch disconnected

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
10 years agoMerge pull request #5080 from ceph/wip-12165-next
Josh Durgin [Fri, 26 Jun 2015 15:51:48 +0000 (11:51 -0400)]
Merge pull request #5080 from ceph/wip-12165-next

librbd: prevent object map updates from being interrupted

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
10 years agolibrbd: assertion failure race condition if watch disconnected 5090/head
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>
10 years agorgw: enforce Content-Type in Swift responses. 5089/head
Radoslaw Zarzynski [Tue, 23 Jun 2015 09:54:09 +0000 (11:54 +0200)]
rgw: enforce Content-Type in Swift responses.

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.

Fixes: #12157
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
10 years agoMerge pull request #5081 from ceph/wip-11851
Orit Wasserman [Fri, 26 Jun 2015 09:45:33 +0000 (11:45 +0200)]
Merge pull request #5081 from ceph/wip-11851

rgw: error out if frontend did not send all data

10 years agorgw: error out if frontend did not send all data 5081/head
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.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agolibrbd: prevent object map updates from being interrupted 5080/head
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>
10 years agoMerge pull request #5061 from ceph/wip-11791-next
Josh Durgin [Wed, 24 Jun 2015 15:29:15 +0000 (11:29 -0400)]
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>
10 years agoMerge pull request #5063 from ceph/wip-11743-next
Josh Durgin [Wed, 24 Jun 2015 15:24:43 +0000 (11:24 -0400)]
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>
10 years agotests: verify that image shrink properly handles flush op 5063/head
Jason Dillaman [Tue, 23 Jun 2015 18:20:16 +0000 (14:20 -0400)]
tests: verify that image shrink properly handles flush op

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agolibrbd: invalidate cache outside cache callback context
Jason Dillaman [Tue, 23 Jun 2015 18:18:20 +0000 (14:18 -0400)]
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>
10 years agotests: add new unit tests for object map invalidation 5061/head
Jason Dillaman [Tue, 23 Jun 2015 15:17:12 +0000 (11:17 -0400)]
tests: add new unit tests for object map invalidation

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agolibrbd: only update image flags when holding exclusive lock
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>
10 years agoMerge pull request #4995 from ceph/wip-11563
Orit Wasserman [Tue, 23 Jun 2015 07:42:45 +0000 (09:42 +0200)]
Merge pull request #4995 from ceph/wip-11563

rgw: fix assignment of copy obj attributes

10 years agoMerge pull request #4996 from ceph/wip-11974
Yehuda Sadeh [Mon, 22 Jun 2015 20:54:17 +0000 (13:54 -0700)]
Merge pull request #4996 from ceph/wip-11974

rgw: fix reset_loc()

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge remote-tracking branch 'origin/wip-11579' into next
Josh Durgin [Thu, 18 Jun 2015 03:15:25 +0000 (20:15 -0700)]
Merge remote-tracking branch 'origin/wip-11579' into next

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
10 years agolibrbd: flush operations need to acquire owner lock
Jason Dillaman [Tue, 9 Jun 2015 17:20:54 +0000 (13:20 -0400)]
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>
10 years agoMerge remote-tracking branch 'origin/wip-11537' into next
Josh Durgin [Thu, 18 Jun 2015 01:01:20 +0000 (18:01 -0700)]
Merge remote-tracking branch 'origin/wip-11537' into next

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
10 years agorgw: fix reset_loc() 4996/head
Yehuda Sadeh [Wed, 17 Jun 2015 22:11:28 +0000 (15:11 -0700)]
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>
10 years agorgw: fix assignment of copy obj attributes 4995/head
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.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Wed, 10 Jun 2015 17:14:46 +0000 (13:14 -0400)]
Merge remote-tracking branch 'gh/next'

10 years agoMerge pull request #4910 from dachary/wip-11932-non-regression-typo
Loic Dachary [Wed, 10 Jun 2015 15:43:55 +0000 (17:43 +0200)]
Merge pull request #4910 from dachary/wip-11932-non-regression-typo

tests: ceph_erasure_code_non_regression s/stipe/stripe/

10 years agoMerge pull request #4873 from liewegas/wip-rgw-civetweb-port
Yehuda Sadeh [Wed, 10 Jun 2015 15:12:05 +0000 (08:12 -0700)]
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>
10 years agoMerge pull request #4838 from ceph/wip-10950
Gregory Farnum [Wed, 10 Jun 2015 14:18:48 +0000 (07:18 -0700)]
Merge pull request #4838 from ceph/wip-10950

#10950: Fix confusing errors using "mds rm"

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
10 years agoMerge pull request #4835 from ceph/wip-11746
Gregory Farnum [Wed, 10 Jun 2015 14:17:43 +0000 (07:17 -0700)]
Merge pull request #4835 from ceph/wip-11746

tools: chunk reads in Dumper

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
10 years agoMerge pull request #4825 from tchaikov/wip-drop-ignored-mdsbeacon
Gregory Farnum [Wed, 10 Jun 2015 14:15:38 +0000 (07:15 -0700)]
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>
10 years agotests: erasure-code non regression tests must skip isa on i386 4910/head
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.

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

Signed-off-by: Loic Dachary <loic@dachary.org>
10 years agoMerge pull request #4707 from stiopaa1/IosFwdNew
Kefu Chai [Wed, 10 Jun 2015 05:22:00 +0000 (13:22 +0800)]
Merge pull request #4707 from stiopaa1/IosFwdNew

Removed unnecessary inclusion of iostream in several files

Reviewed-by: Kefu Chai <kchai@redhat.com>
10 years agorgw: remove trailing :port from host for purposes of subdomain matching 4873/head
Sage Weil [Tue, 9 Jun 2015 18:15:10 +0000 (14:15 -0400)]
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>
10 years agoMerge pull request #4775 from yuyuyu101/wip-async-crc-decouple
Sage Weil [Tue, 9 Jun 2015 17:54:11 +0000 (10:54 -0700)]
Merge pull request #4775 from yuyuyu101/wip-async-crc-decouple

AsyncMessenger: Make send/receive logic independent

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agotests: ceph_erasure_code_non_regression s/stipe/stripe/
Loic Dachary [Tue, 9 Jun 2015 14:22:43 +0000 (16:22 +0200)]
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>
10 years agoMerge pull request #4815 from dachary/wip-9720-erasure-code-corpus-variants
Loic Dachary [Tue, 9 Jun 2015 14:28:48 +0000 (16:28 +0200)]
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>
10 years agoMerge pull request #4908 from dachary/wip-11931-parallel-tests
Loic Dachary [Tue, 9 Jun 2015 13:50:12 +0000 (15:50 +0200)]
Merge pull request #4908 from dachary/wip-11931-parallel-tests

tests: automake 1.11 needs parallel-tests

Reviewed-by: Nathan Cutler <ncutler@suse.com>
10 years agotests: automake 1.11 needs parallel-tests 4908/head
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.

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>
10 years agoRemoved unnecessary inclusion of iostream 4707/head
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)

Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
10 years agoMerge pull request #4879 from SUSE/wip-master-specfile-cleanup
Loic Dachary [Tue, 9 Jun 2015 05:32:17 +0000 (07:32 +0200)]
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>
10 years agoMerge pull request #4784 from ceph/wip-10794
Samuel Just [Tue, 9 Jun 2015 02:04:33 +0000 (19:04 -0700)]
Merge pull request #4784 from ceph/wip-10794

ceph-objectstore-tool improvements

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #4903 from theanalyst/doc/arch-watch-notify
Josh Durgin [Mon, 8 Jun 2015 19:36:35 +0000 (12:36 -0700)]
Merge pull request #4903 from theanalyst/doc/arch-watch-notify

doc: architecture minor fixes in watch notify

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
10 years agodoc: architecture minor fixes in watch notify 4903/head
Abhishek Lekshmanan [Mon, 8 Jun 2015 18:51:58 +0000 (00:21 +0530)]
doc: architecture minor fixes in watch notify

Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@ril.com>
10 years agoceph.spec.in: remove duplicate BuildRequires 4879/head
Nathan Cutler [Sat, 6 Jun 2015 11:33:35 +0000 (13:33 +0200)]
ceph.spec.in: remove duplicate BuildRequires

Signed-off-by: Nathan Cutler <ncutler@suse.com>
10 years agoMerge pull request #4880 from SUSE/wip-master-specfile-cleanup2
Ken Dreyer [Mon, 8 Jun 2015 16:27:16 +0000 (10:27 -0600)]
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>
10 years agoMerge pull request #4893 from dachary/wip-11272-ceph-disk-false-negative 4277/head
Kefu Chai [Mon, 8 Jun 2015 14:12:46 +0000 (22:12 +0800)]
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>
10 years agoMerge pull request #4888 from dachary/wip-11905-test-isa
Kefu Chai [Mon, 8 Jun 2015 02:38:52 +0000 (10:38 +0800)]
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>
10 years agotests: ceph-disk.sh test zap gitbuilder false negative 4893/head
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.

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agotests: skip isa tests if the plugin is not available 4888/head
Loic Dachary [Sun, 7 Jun 2015 08:53:49 +0000 (10:53 +0200)]
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>
10 years agotests: use erasure_code_plugin_exists from ceph-helpers.sh
Loic Dachary [Sun, 7 Jun 2015 08:52:31 +0000 (10:52 +0200)]
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>
10 years agotests: implement erasure_code_plugin_exists in ceph-helpers.sh
Loic Dachary [Sun, 7 Jun 2015 08:51:07 +0000 (10:51 +0200)]
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>
10 years agoMerge pull request #4713 from dachary/wip-10358-erasure-code-k-1-m-1
Loic Dachary [Sun, 7 Jun 2015 07:58:26 +0000 (09:58 +0200)]
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>
10 years agotests: sync ceph-erasure-code-corpus to verify jerasure variants 4815/head
Loic Dachary [Sun, 31 May 2015 11:18:39 +0000 (13:18 +0200)]
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>
10 years agotests: add --{show_,}path to ceph_erasure_code_non_regression
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.

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge pull request #4811 from dachary/wip-11346-isa
Loic Dachary [Sat, 6 Jun 2015 22:12:11 +0000 (00:12 +0200)]
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>
10 years agoerasure-code: add sanity check to guard against k=1 4713/head
Loic Dachary [Sun, 17 May 2015 22:29:31 +0000 (00:29 +0200)]
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>
10 years agoMerge pull request #4882 from SUSE/wip-submitting-patches-clarification
Sage Weil [Sat, 6 Jun 2015 13:24:17 +0000 (06:24 -0700)]
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>
10 years agoSubmittingPatches: clarify how Reviewed-by lines are added 4882/head
Nathan Cutler [Sat, 6 Jun 2015 13:16:16 +0000 (15:16 +0200)]
SubmittingPatches: clarify how Reviewed-by lines are added

Signed-off-by: Nathan Cutler <ncutler@suse.com>
10 years agoMerge pull request #4878 from dachary/wip-11901-spec
Loic Dachary [Sat, 6 Jun 2015 12:37:23 +0000 (14:37 +0200)]
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>
10 years agoceph.spec.in: move specific BuildRequires to where they belong
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".

Signed-off-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoinstall-deps.sh: detect yum-builddep errors 4878/head
Loic Dachary [Sat, 6 Jun 2015 10:28:03 +0000 (12:28 +0200)]
install-deps.sh: detect yum-builddep errors

yum-builddep does not exit on error when an error happens: grep the
output for the error: string instead.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoceph.spec.in: add missing BuildRequires from SUSE block
Loic Dachary [Sat, 6 Jun 2015 08:20:02 +0000 (10:20 +0200)]
ceph.spec.in: add missing BuildRequires from SUSE block

The %endif removed by f94f23297c05019db754ec53b4ceaea7706152c9 is restored.
The %else removed by 75e87a20dac05441b97ce99dea76fff8e3a863ac is restored.
The stray %endif added by d8abde3338b0c7df373b762e35099ad5123866bf is removed.

May 29th, in d8abde3338b0c7df373b762e35099ad5123866bf Owen added a stray
%endif after

   BuildRequires: gperftools-devel

around line 133. June 3rd, in f94f23297c05019db754ec53b4ceaea7706152c9
Ken correctly attributed the error

     "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.

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoerasure-code: implement ErasureCode::sanity_check_k
Loic Dachary [Sun, 17 May 2015 22:16:04 +0000 (00:16 +0200)]
erasure-code: implement ErasureCode::sanity_check_k

Implement the ErasureCode::sanity_check_k helper for plugins
that need to verify k >= 2.

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge pull request #4834 from liewegas/wip-11461
Noah Watkins [Fri, 5 Jun 2015 19:12:13 +0000 (12:12 -0700)]
Merge pull request #4834 from liewegas/wip-11461

fix build on arm w/ old kernels

Signed-off-by: Noah Watkins <nwatkins@redhat.com>
10 years agoMerge remote-tracking branch 'origin/wip-client-fsync'
Greg Farnum [Fri, 5 Jun 2015 18:25:21 +0000 (11:25 -0700)]
Merge remote-tracking branch 'origin/wip-client-fsync'

Conflicts:
src/client/Client.cc

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
10 years agoMerge pull request #4831 from ceph/wip-11807
Gregory Farnum [Fri, 5 Jun 2015 18:22:53 +0000 (11:22 -0700)]
Merge pull request #4831 from ceph/wip-11807

qa: fix multiple_rsync.sh to avoid using /usr/ directly

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #4743 from ceph/wip-client-oldest-tid
Gregory Farnum [Fri, 5 Jun 2015 18:21:20 +0000 (11:21 -0700)]
Merge pull request #4743 from ceph/wip-client-oldest-tid

Wip client oldest tid

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
10 years agoMerge pull request #4723 from ceph/wip-snap-misc
Gregory Farnum [Fri, 5 Jun 2015 18:16:50 +0000 (11:16 -0700)]
Merge pull request #4723 from ceph/wip-snap-misc

Wip snap misc

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
10 years agoMerge pull request #4702 from tchaikov/wip-fix-11590
Gregory Farnum [Fri, 5 Jun 2015 18:15:25 +0000 (11:15 -0700)]
Merge pull request #4702 from tchaikov/wip-fix-11590

mon: always reply mdsbeacon

Reviewed-by: Joao Eduardo Luis <joao@suse.de>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
10 years agoMerge pull request #4602 from ceph/wip-11504
Gregory Farnum [Fri, 5 Jun 2015 18:13:42 +0000 (11:13 -0700)]
Merge pull request #4602 from ceph/wip-11504

mon: refine check_remove_tier checks

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
10 years ago9.0.1 v9.0.1
Jenkins [Fri, 5 Jun 2015 17:59:02 +0000 (10:59 -0700)]
9.0.1

10 years agolibrbd: don't cancel request lock early 4695/head
Jason Dillaman [Fri, 15 May 2015 15:18:29 +0000 (11:18 -0400)]
librbd: don't cancel request lock early

It's possible that a stale notice is received and will
be discarded after the request lock has been canceled.
This will stale the client.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agotests: new test for transitioning exclusive lock
Jason Dillaman [Thu, 14 May 2015 20:13:38 +0000 (16:13 -0400)]
tests: new test for transitioning exclusive lock

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agotests: verify that librbd will periodically resend lock request
Jason Dillaman [Thu, 7 May 2015 17:31:50 +0000 (13:31 -0400)]
tests: verify that librbd will periodically resend lock request

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agocommon: Mutex shouldn't register w/ lockdep if disabled
Jason Dillaman [Fri, 15 May 2015 14:49:36 +0000 (10:49 -0400)]
common: Mutex shouldn't register w/ lockdep if disabled

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agolibrbd: improve debugging output for ImageWatcher
Jason Dillaman [Fri, 15 May 2015 14:47:04 +0000 (10:47 -0400)]
librbd: improve debugging output for ImageWatcher

Include the instance pointer so that different images
can be differentiated in the logs.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agolibrados_test_stub: watcher id should be the instance id (gid)
Jason Dillaman [Fri, 15 May 2015 14:45:04 +0000 (10:45 -0400)]
librados_test_stub: watcher id should be the instance id (gid)

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agolibrbd: retry lock requests periodically until acquired
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>
10 years agolibrbd: don't hold owner_lock for write during flush
Jason Dillaman [Thu, 7 May 2015 16:35:36 +0000 (12:35 -0400)]
librbd: don't hold owner_lock for write during flush

The various IO callback codepaths will attempt to take
the lock, which will result in deadlock since the flush
cannot complete.

Backport: hammer
Fixes: #11537
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Conflicts:
src/librbd/ImageWatcher.cc

10 years agolibrbd: CoR should copyup empty object to prevent future CoR attempts 4730/head
Jason Dillaman [Thu, 21 May 2015 20:25:37 +0000 (16:25 -0400)]
librbd: CoR should copyup empty object to prevent future CoR attempts

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agolibrbd: don't attempt to (re-)update the object map for CoW
Jason Dillaman [Thu, 21 May 2015 19:22:13 +0000 (15:22 -0400)]
librbd: don't attempt to (re-)update the object map for CoW

The AbstractWrite state machine has already taken care of updating
the object map to the correct state.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agolibrbd: hide ENOENT errors during copyup operations
Jason Dillaman [Thu, 21 May 2015 04:22:07 +0000 (00:22 -0400)]
librbd: hide ENOENT errors during copyup operations

It's possible for this to occur when shrinking an image with
snapshots and a zeroed data block.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agolibrbd: avoid infinite loop if copyup fails
Jason Dillaman [Thu, 21 May 2015 04:13:31 +0000 (00:13 -0400)]
librbd: avoid infinite loop if copyup fails

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agolibrbd: whole-object discards should copyup when snapshots exist
Jason Dillaman [Wed, 20 May 2015 19:04:54 +0000 (15:04 -0400)]
librbd: whole-object discards should copyup when snapshots exist

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agoMerge pull request #4781 from ceph/wip-librbd-perf-counters
Josh Durgin [Fri, 5 Jun 2015 15:59:15 +0000 (08:59 -0700)]
Merge pull request #4781 from ceph/wip-librbd-perf-counters

librbd: re-add missing discard perf counters

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
10 years agotests: verify copyup behavior during object discard
Jason Dillaman [Wed, 20 May 2015 18:33:47 +0000 (14:33 -0400)]
tests: verify copyup behavior during object discard

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agolibrbd: trim operation should issue object copyups for overlap extent
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>
10 years agolibrbd: new AioTrim operation to force copyup on object removal
Jason Dillaman [Wed, 20 May 2015 17:55:18 +0000 (13:55 -0400)]
librbd: new AioTrim operation to force copyup on object removal

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agolibrbd: default to data_ctx for post-copyup operations
Jason Dillaman [Wed, 20 May 2015 18:51:41 +0000 (14:51 -0400)]
librbd: default to data_ctx for post-copyup operations

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agolibrados_test_stub: truncate should honor op snapshot context
Jason Dillaman [Wed, 20 May 2015 17:54:48 +0000 (13:54 -0400)]
librados_test_stub: truncate should honor op snapshot context

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agolibrbd: always use current parent overlap
Jason Dillaman [Wed, 20 May 2015 17:03:14 +0000 (13:03 -0400)]
librbd: always use current parent overlap

With deep-copyup, there is no longer a reason to shrink the
parent overlap for IO operations.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agotests: verify that copyup properly handle image shrinking
Jason Dillaman [Mon, 11 May 2015 14:20:27 +0000 (10:20 -0400)]
tests: verify that copyup properly handle image shrinking

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agolibrbd: add new copyup helper method
Jason Dillaman [Fri, 8 May 2015 19:15:29 +0000 (15:15 -0400)]
librbd: add new copyup helper method

ImageCtx::get_copyup_snap_id returns the oldest snapshot
to be used when calculating parent image overlaps.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Conflicts:
src/librbd/AioRequest.cc

10 years agolibrbd: include actual write op type in AbstractWrite debug output
Jason Dillaman [Fri, 8 May 2015 18:32:04 +0000 (14:32 -0400)]
librbd: include actual write op type in AbstractWrite debug output

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Conflicts:
src/librbd/AioRequest.cc

10 years agolibrbd: removed unused ImageCtx::parent_io_len method
Jason Dillaman [Fri, 8 May 2015 18:02:00 +0000 (14:02 -0400)]
librbd: removed unused ImageCtx::parent_io_len method

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agoMerge pull request #4870 from joaquimrocha/extra_doc_info_for_debug_option
Loic Dachary [Fri, 5 Jun 2015 13:22:48 +0000 (15:22 +0200)]
Merge pull request #4870 from joaquimrocha/extra_doc_info_for_debug_option

build: Add info about tests to --with-debug option

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agobuild: Add info about tests to --with-debug option 4870/head
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.

Signed-off-by: Joaquim Rocha <joaquim.rocha@cern.ch>
10 years agoMerge pull request #4866 from ddiss/fix_test_ceph_disk_dmcrypt_uuid_only
Loic Dachary [Fri, 5 Jun 2015 09:56:37 +0000 (11:56 +0200)]
Merge pull request #4866 from ddiss/fix_test_ceph_disk_dmcrypt_uuid_only

tests: fix test_activate_dmcrypt uuid usage

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agotests: fix test_activate_dmcrypt uuid usage 4866/head
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.

Signed-off-by: David Disseldorp <ddiss@suse.de>
10 years agoMerge pull request #4528 from ceph/wip-librbd-helgrind
Josh Durgin [Fri, 5 Jun 2015 01:55:43 +0000 (18:55 -0700)]
Merge pull request #4528 from ceph/wip-librbd-helgrind

librbd: correct issues discovered via lockdep / helgrind

Reviewed-by: Josh Durgin <jdurgin@redhat.com>