Commit Graph

39650 Commits

Author SHA1 Message Date
Yehuda Sadeh
e82ac10901 rgw: only finialize finisher if it's not null
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2015-03-05 12:29:24 -08:00
Yehuda Sadeh
7bab9f7c68 rgw: fix watch initialization and reinit on error
We can't just call rados->finalize_watch() and rados->init_watch() from
the watcher, as these calls modify the watcher itself. Also, we can't just
enable the cache after successful watch, because there's more than one
watcher. Only enable the cache if all watchers are set.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2015-03-05 12:29:24 -08:00
Yehuda Sadeh
387e4f8587 rgw: move watch reinit into a finisher
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2015-03-05 12:29:24 -08:00
Yehuda Sadeh
30c32b412f rgw: add support for new watch/notify functionality
Disable and invalidate cache on watch error, then reinitialize watch,
reenable cache.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>

Conflicts:
	src/rgw/rgw_cache.h
	src/rgw/rgw_rados.cc
	src/rgw/rgw_rados.h
2015-03-05 12:29:23 -08:00
Sage Weil
04437e416e rgw: switch to new watch/notify API
Note that we don't really use it fully, yet.  The main semantic change
here is that we have to explicitly ack the notify.

However, still missing is re-registration of the watch if we see a failure,
and ignoring the cache if watch_check tells us the watch is stale.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-03-05 12:29:23 -08:00
Sage Weil
2694f80b27 Merge pull request #3836 from ceph/wip-10546
mon: Monitor: fix timecheck rounds period

Reviewed-by: Sage Weil <sage@redhat.com>
2015-03-05 12:12:07 -08:00
Ken Dreyer
9e1c49c087 ceph.spec.in: loosen ceph-test's dependencies
In Debian, the ceph-test package can be installed with any version of
ceph-common.

Prior to this commit, in RHEL, we're much more strict about which
version of the dependencies we require. We depend directly on
librados2/librbd1/libcephfs1 instead of ceph-common, and we also require
the specific versions of these libraries to match the version of
ceph-test.

For testing Ceph, it is nice to have the ability to upgrade the
librados2/librbd1/libcephfs1 libraries on a host without having to also
upgrade the ceph-test package as well.

Remove the version number requirements, and change the dependencies from
librados2/librbd1/libcephfs1 to simply "ceph-common". That will make
/etc/ceph/ and /var/log/ceph present for the tests.

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

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
(cherry picked from commit 924f85f157)
2015-03-05 10:57:18 -08:00
Loic Dachary
452c651151 Merge pull request #3822 from dachary/wip-10947-setcrushmap
mon: timeout if crushtool takes longer than mon_lease

Reviewed-by: Joao Eduardo Luis <joao@redhat.com>
2015-03-05 14:28:27 +01:00
Samuel Just
569b12035a Merge pull request #3789 from athanatos/wip-9891
DBObjectMap: lock header_lock on sync()

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-03-04 07:11:40 -08:00
Josh Durgin
8aafa04731 Merge pull request #3864 from ceph/wip-10968
librbd: delay completions for AioRequest

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-03-03 17:59:05 -08:00
Matt Benjamin
a6a6df6821 cmake: build fixes
* librbd
* test/ceph_dencoder

Signed-off-by: Matt Benjamin <matt@cohortfs.com>
(cherry picked from commit 9ad02c9303)
2015-03-03 11:22:42 -08:00
Jason Dillaman
137800a3c9 librbd: delay completion of AioRequest::read_from_parent
If the object map is enabled, it's possible for a read request to
instantly complete due to the skipped librados operations.  Now
AioRequest will block the completion of read_from_parent requests
to prevent the possibility of the parent image being closed while
the read_from_parent method invocation is in-progress.

Fixes: #10968
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-03-03 11:33:03 -05:00
Jason Dillaman
7d2fe5b8f3 librbd: allow AioCompletions to be blocked
Blocked AioCompletions will not fire their callback until unblocked.
This is an expansion / replacement of the previous 'building' flag
used to block completions while additional requests were added to the
completion.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-03-02 21:18:39 -05:00
Jason Dillaman
416ce7621d librbd: delete Contexts when object map aio_update not required
If an object map update is not required when modifying an image,
properly free the memory allocated for the callback Context.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-03-02 21:18:39 -05:00
Jason Dillaman
1bfd760898 librbd: handle possible aio_read return error code
AioRead and CopyupRequest were not properly handling possible
error codes from aio_read.  They now correctly free the completion
and invoke the callback context.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-03-02 21:18:39 -05:00
Jason Dillaman
fb2caa0141 librbd: add log message for completion of AioRequest
The log message will simplify future debugging activities.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-03-02 21:18:39 -05:00
Loic Dachary
1e3f814869 mon: ignore crushtool validation if too long
The crushtool is aborted if it takes more than mon lease seconds. Since
the monitor blocks while running it, this is mandatory otherwise the
monitor will be considered down and new elections triggered.

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-03-03 02:13:27 +01:00
Loic Dachary
7a5a635ffb mon: do not hardwire crushtool command line
Make crushtool a configuration value that defaults to crushtool and
allow it to be injected. It helps with testing: the command can be
replaced with another that misbehaves in various ways.

Signed-off-by: Loic Dachary <loic@dachary.org>
2015-03-03 02:13:08 +01:00
Josh Durgin
8a83c824a0 Merge pull request #3850 from ceph/wip-10962
test/cli-integration/rbd: updated to new CLI 

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-03-02 16:53:29 -08:00
Jason Dillaman
eca153e910 test/cli-integration/rbd: updated to new CLI
rbd CLI now includes rbd image flags and no longer defaults
to enabling the new exclusive locking feature.

Fixes: #10962
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-03-02 18:47:54 -05:00
Jason Dillaman
6c2d92948c rbd: permit v2 striping for clones and imports
rbd did not previously support specifying striping params
for cloned and imported images.  Extend the behavior to
these other CLI commands.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-03-02 18:46:56 -05:00
Jason Dillaman
b5050b6ac5 rbd: fixed formatted output of rbd image features
All feature flags were being displayed when using JSON/XML
formatted output.  Now use the same formatting routing for
plain/JSON/XML output for features and flags.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-03-02 17:39:20 -05:00
Josh Durgin
172f24ccc6 Merge pull request #3848 from ceph/wip-10990
qa/workunits/rbd/copy.sh: remove all image locks

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-03-02 14:28:47 -08:00
Jason Dillaman
6cff494e18 qa/workunits/rbd/copy.sh: remove all image locks
If the exclusive lock feature is enabled, all locks need
to be removed prior removing the image.

Fixes: #10990
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-03-02 16:24:17 -05:00
Jason Dillaman
0e584635f9 librbd: missing callback log message for CopyupRequest object map update
Add log message to assist in future debugging of the CopyupRequest
state machine.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-03-02 14:19:06 -05:00
Jason Dillaman
ed9e358244 librbd: hide flush log message if no flushes are pending
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-03-02 14:19:06 -05:00
Josh Durgin
206cb706bf Merge pull request #3812 from ceph/wip-10958
librbd: flush pending AIO before resize

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-03-02 08:30:45 -08:00
Jason Dillaman
e2283e3066 librbd: flush pending AIO after acquiring lock
There was a potential race condition between a delayed AIO
operation waiting on acquiring a lock and a snap_create
flushing all pending IO.  Since snap_create owned md_lock, the
delayed AIO would not be allowed to complete -- deadlocking the
flush.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-03-02 08:31:45 -05:00
Jason Dillaman
472db64e2e librbd: hold snap_lock between clipping IO and registering AIO
In the case where concurrent IO is occurring when a trim resize
operation is initiated, hold the snap_lock between clipping the
IO operation and registering the pending op.  That allows the
resize state machine to properly flush all operations issued
before the clip region was updated.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-03-02 08:31:43 -05:00
Loic Dachary
7e89f51d8f mon: do not pollute directory with cvs files from crushtool
The --output-csv option to crushtool will create files in the current
directory of the monitor. The only reason for using it is because
crushtool requires at least one option for display. Relax this
constraint in crushtool and remove the option from the call made by the
monitor to validate a new crushmap.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-03-02 11:09:28 +01:00
Joao Eduardo Luis
2e749599ac mon: Monitor: fix timecheck rounds period
Fixes: #10546
Backports: dumpling?,firefly,giant

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2015-03-01 10:20:43 +00:00
Jenkins
6d0c464897 Merge branch 'hammer' of jenkins.front.sepia.ceph.com:ceph/ceph into hammer 2015-02-27 13:21:03 -08:00
Jason Dillaman
1584104f73 librbd: moved flush / cache invalidate to resize state machine
Keep async_resize truly async by moving flush and invalidate cache
operations to individual states within the resize state machine.

Fixes: #10958
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-02-27 13:24:23 -05:00
Jason Dillaman
9fed4b90c7 librbd: add AIO version of invalidate_cache
Break the existing synchronous behavior into pre- and post-
flush routines using the existing logic.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-02-27 13:24:21 -05:00
Loic Dachary
3e365fe9cc Merge pull request #3825 from ceph/wip-hammer-gplv2-text
Add GPLv2 text file

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-02-27 19:09:06 +01:00
Jenkins
bebf8e9a83 0.93 2015-02-27 09:52:54 -08:00
Ken Dreyer
6f31458729 Add GPLv2 text file
Most of the ceph tree is LGPLv2.1, but there are some files that are
under the full GPLv2.

Add a copy of the GNU General Public License (version 2) to the
distribution. This file was copied verbatim from
https://www.gnu.org/licenses/gpl-2.0.txt

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2015-02-27 10:43:26 -07:00
Jason Dillaman
2c666f3aba librbd: C_SaferCond memory leak
Unlike the other Context derived classes, C_SaferCond is not
a suicidal object which deletes itself.  Swap heap allocations
of C_SaferCond to stack-based allocations as a result.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-02-27 10:19:21 -05:00
Gregory Farnum
5f42b54ab1 Merge pull request #3681 from ceph/wip-fusesystem-10710
ceph-fuse: check for failures on system() invocation

Reviewed-by: John Spray <john.spray@redhat.com>
2015-02-26 15:54:21 -08:00
Greg Farnum
7ed9640dfe ceph-fuse: test dentry invalidation options and fail out if we fail
We identify the Linux kernel version and based on that either expect to
be able to invalidate dentries effectively, or expect to be able to remount
the ceph-fuse mountpoint. Test it using the Client functions and callbacks by
spinning off a thread to invoke the test that is separate from the main
FUSE loop.

Most unfortunately, there doesn't seem to be a good interface to tell
FUSE to shut down if we need to do that. See
http://fuse.996288.n3.nabble.com/libfuse-exiting-fuse-session-loop-td10686.html
I tried changing our signal invocation or attempting a simple action on
the mount point but those were ineffectual at terminating the remaining
processes; fusermount actually gets rid of them all.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2015-02-26 15:24:21 -08:00
Greg Farnum
694529ae7d Client: support using dentry invalidation callbacks on older kernels
This brings back a few small code chunks that were removed in
0827bb79ea. We check the kernel version,
and if it is less than 3.18 we use these dentry invalidation callbacks
instead of the remount callback. This should resolve a number of
issues with racing against remount, including #10916, and lets older
unprivileged users on older kernels run even if they can't apply
options on mount (#10542).

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2015-02-26 15:23:21 -08:00
Greg Farnum
a6ebf6786b Client: add functions to test remount functionality
Unprivileged users can't use options when remounting; see
http://tracker.ceph.com/issues/10542. We're about to use this
in ceph-fuse when starting up.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2015-02-26 15:23:21 -08:00
Greg Farnum
cd95b297d7 Client: check for failures on system() invocation
Fixes: #10710

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2015-02-26 15:23:16 -08:00
Josh Durgin
4e6d885346 Merge pull request #3806 from ceph/wip-10961
qa/workunits/rbd/copy.sh: explicitly choose the image format

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-02-26 12:01:01 -08:00
Gregory Farnum
a54864a388 Merge pull request #3802 from ceph/hammer-10912
client: re-send requsets before composing the cap reconnect message

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-02-26 10:14:09 -08:00
Jason Dillaman
3ec52dae63 qa/workunits/rbd/copy.sh: explicitly choose the image format
The rbd CLI now utilizes the rbd_default_format configuration
setting, therefore the copy test now needs to tell rbd which image
format it is expecting to create.

Fixes: #10961
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-02-26 12:06:53 -05:00
Sage Weil
b7539e59c9 Merge pull request #3800 from ceph/wip-10864-hammer-packaging-rbd-udev
packaging: move rbd udev rules to ceph-common

Reviewed-by: Sage Weil <sage@redhat.com>
2015-02-25 21:05:09 -08:00
Yan, Zheng
286a8863ac client: re-send requsets before composing the cap reconnect message
After commit 419800fe (client: re-send request when MDS enters reconnecting
stage), cephfs client can send both unsafe requests and normal requests when
MDS is in reconnecting stage. Normal requests can have embedded cap releases,
the client code encodes these embedded cap releases after composing the cap
reconnect message. This causes the client sliently drop some caps. The fix
is re-send requsets (which add embedded cap releases) before composing the
cap reconnect message

Fixes: #10912
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit 8ea5a811b3)
2015-02-26 12:13:31 +08:00
Josh Durgin
32fd355086 Merge pull request #3796 from ceph/wip-librbd-async-operations
librbd: better handling for async maintenance requests

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-02-25 18:52:19 -08:00
Jason Dillaman
6db92330d2 Merge pull request #3791 from ceph/wip-librbd-mdlock
librbd: fix object map locking

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2015-02-25 21:37:48 -05:00