]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agoqa: disable xfstest 45 until mount issue is resolved on precise
Sage Weil [Wed, 7 Nov 2012 12:14:12 +0000 (04:14 -0800)]
qa: disable xfstest 45 until mount issue is resolved on precise

Meh

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agocls_rbd: send proper format of key to "last_read" for dir_list
Dan Mick [Tue, 6 Nov 2012 23:28:10 +0000 (15:28 -0800)]
cls_rbd: send proper format of key to "last_read" for dir_list

rbd ls of format-2 images was looping on the first 64 (when more than 64
were present).  The key name passed to the omap layer needs to always
contain the prefix, and the "inside-the-loop next-chunk" statement
was missing the "add the prefix" call.

Also, add a test for listing 100 images, format 1 and 2.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorgw: fix multipart overwrite
Yehuda Sadeh [Wed, 24 Oct 2012 20:15:46 +0000 (13:15 -0700)]
rgw: fix multipart overwrite

Fixes: #3400
Removed a few lines of code that prematurely created the head
part of the final object (before creating the manifest).

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: don't reset multipart parts when updating their metadata
Yehuda Sadeh [Wed, 24 Oct 2012 19:56:59 +0000 (12:56 -0700)]
rgw: don't reset multipart parts when updating their metadata

Fixes: #3401
The problem was that put_obj_meta() was assuming object is going
to be reset, so it was resetting the object anyway. This is not
true when dealing with the immutable multipart upload parts.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: break out of read loop if we got zero bytes
Yehuda Sadeh [Wed, 24 Oct 2012 18:26:53 +0000 (11:26 -0700)]
rgw: break out of read loop if we got zero bytes

If the part that we're reading is corrupted and we end up
reading zero bytes, we need to exit, otherwise we'd just
loop forever.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorbd: allow removal of image even if rbd_children deletion fails
Dan Mick [Tue, 6 Nov 2012 00:13:19 +0000 (16:13 -0800)]
rbd: allow removal of image even if rbd_children deletion fails

Users have been seeing failures where rbd rm is half-done; could be
because of outstanding watches on the rbd_header object.  The state
is that rbd_children no longer contains the child, but other pieces
remain; remove considers this a failure.

Fix: test for ENOENT from remove_child, and treat that as an ignorable
error and drive on.  Simulate this in copy.sh by removing the
rbd_children object altogether, which also results in ENOENT return
from remove_child.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoPG::merge_old_entry: fix case for divergent prior_version
Samuel Just [Fri, 2 Nov 2012 21:13:33 +0000 (14:13 -0700)]
PG::merge_old_entry: fix case for divergent prior_version

Previously, we asserted that a log entry with a divergent
prior_version must be a clone.  Consider the following
case:

6'11(6'2)  m foo
7'12(6'3) m bar
7'13(7'12) m bar

If this is merged with:

6'11(6'2)  m foo
8'12(6'4) m baz

we will hit the assert.  The correct behavior is simply to remove
the object as in the clone case.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoPG: use remove_object_with_snap_hardlinks for divergent objects
Samuel Just [Fri, 2 Nov 2012 20:02:15 +0000 (13:02 -0700)]
PG: use remove_object_with_snap_hardlinks for divergent objects

Otherwise, we end up leaving snap hardlinks in the snapshot
index directories.  This eventually results in an EEXIST error
when we attempt to re-link the clone into place during
recovery.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoceph-disk-activate: avoid duplicating mounts if already activated
Sage Weil [Tue, 30 Oct 2012 21:17:56 +0000 (14:17 -0700)]
ceph-disk-activate: avoid duplicating mounts if already activated

If the given device is already mounted at the target location, do not
mount --move it again and create a bunch of dup entries in the /etc/mtab
and kernel mount table.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoPG: requeue snap_trimmer after scrub finishes
Mike Ryan [Wed, 31 Oct 2012 18:36:49 +0000 (11:36 -0700)]
PG: requeue snap_trimmer after scrub finishes

Previously the snap_trimmer would continuously requeue itself until the
end of scrub. This degrades performance and fills up logs for No Good
Reason.

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
12 years agoceph-disk-prepare: poke kernel into refreshing partition tables
Sage Weil [Fri, 26 Oct 2012 04:21:18 +0000 (21:21 -0700)]
ceph-disk-prepare: poke kernel into refreshing partition tables

Prod the kernel to refresh the partition table after we create one.  The
partprobe program is packaged with parted, which we already use, so this
introduces no new dependency.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph-disk-prepare: fix journal partition creation
Sage Weil [Fri, 26 Oct 2012 04:20:21 +0000 (21:20 -0700)]
ceph-disk-prepare: fix journal partition creation

The end value needs to have + to indicate it is relative to wherever the
start is.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph-disk-prepare: assume parted failure means no partition table
Sage Weil [Fri, 26 Oct 2012 01:14:47 +0000 (18:14 -0700)]
ceph-disk-prepare: assume parted failure means no partition table

If the disk has no valid label we get an error like

  Error: /dev/sdi: unrecognised disk label

Assume any error we get is that and go with an id label of 1.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: make pool_snap_info_t encoding backward compatible
Sage Weil [Mon, 29 Oct 2012 18:03:46 +0000 (11:03 -0700)]
osd: make pool_snap_info_t encoding backward compatible

Way back in fc869dee1e8a1c90c93cb7e678563772fb1c51fb (v0.42) when we redid
the osd type encoding we forgot to make this conditionally encode the old
format for old clients.  In particular, this means that kernel clients
will fail to decode the osdmap if there is a rados pool with a pool-level
snapshot defined.

Fixes: #3290
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: fix leading error string from 'ceph report'
Sage Weil [Fri, 26 Oct 2012 21:55:31 +0000 (14:55 -0700)]
mon: fix leading error string from 'ceph report'

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: fix populate_obc_watchers() assert
Sage Weil [Thu, 25 Oct 2012 00:00:01 +0000 (17:00 -0700)]
osd: fix populate_obc_watchers() assert

There is one case where populate_obc_watchers gets called when the object
is missing: during a revert.  And in that case we *should* do the populate,
since all that is getting reverted is the object version.

Fixes: #3405
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
12 years agoosd: drop conditional check in populate_obc_watchers
Sage Weil [Mon, 22 Oct 2012 17:45:36 +0000 (10:45 -0700)]
osd: drop conditional check in populate_obc_watchers

Turn these into asserts.  The only two callers are create_object_context()
and get_object_context(), and they only get called when the object is no
longer missing.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoosd: populate obc watchers even when degraded
Sage Weil [Mon, 22 Oct 2012 17:45:20 +0000 (10:45 -0700)]
osd: populate obc watchers even when degraded

Bug #3142 appears to be caused by the following sequence:

 - object X missing on primary and replica
 - [assert-ver,watch], notify, unwatch requests come in, get deferred
 - object is recovered on primary, !missing, create_object_context
   - populate_obc_watchers() does nothing, since still degraded
 - notify happens now (odd but ok?)
 - replica recovered, !degraded
 - watch skips bc of bad assert
 - unwatch trips up on an assert because populate_obc_watchers never
   ran

Fix this by populating the obc watcher when !missing, not when
!degraded.  This conditional dates back to Sam's original watch/notify
cleanup in October 2011.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agotest/libcephfs: Fix telldir/seekdir test
Sam Lang [Wed, 17 Oct 2012 17:45:20 +0000 (12:45 -0500)]
test/libcephfs: Fix telldir/seekdir test

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoaddr_parsing: make , and ; and ' ' all delimiters
Sage Weil [Thu, 18 Oct 2012 00:44:12 +0000 (17:44 -0700)]
addr_parsing: make , and ; and ' ' all delimiters

Instead of just ,.  Currently "foo.com, bar.com" will fail because of the
space after the comma.  This patches fixes that, and makes all delim
chars interchangeable.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoradosgw: fix compile warning
Sage Weil [Wed, 17 Oct 2012 00:27:28 +0000 (17:27 -0700)]
radosgw: fix compile warning

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'next'
Gary Lowell [Tue, 16 Oct 2012 23:27:21 +0000 (23:27 +0000)]
Merge branch 'next'

12 years agodoc: Updated the cephx section of the toc for cluster ops.
John Wilkins [Tue, 16 Oct 2012 22:24:11 +0000 (15:24 -0700)]
doc: Updated the cephx section of the toc for cluster ops.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Did a little clean-up work in the cephx guide.
John Wilkins [Tue, 16 Oct 2012 22:23:34 +0000 (15:23 -0700)]
doc: Did a little clean-up work in the cephx guide.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added a new intro for cephx authentication.
John Wilkins [Tue, 16 Oct 2012 22:22:25 +0000 (15:22 -0700)]
doc: Added a new intro for cephx authentication.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agorgw: multiple coverity fixes
Yehuda Sadeh [Tue, 16 Oct 2012 21:13:01 +0000 (14:13 -0700)]
rgw: multiple coverity fixes

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agomds: explicitly queue messages for unconnected clients
Sage Weil [Tue, 16 Oct 2012 20:03:53 +0000 (13:03 -0700)]
mds: explicitly queue messages for unconnected clients

Previously, the messenger would queue messages for a destination that
didn't exist when you were a server; that changed a while back with the
wip-msgr merge (circa v0.52).  The result is that when we force open
client sessions and queue messages, they are dropped on the floor and the
client--when it does connect--gets confusing stuff from the MDS.

Instead, explicitly queue and send these messages.  Also, *always* send
via the Connection* instead of the inst.

Fixes: #2681
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agov0.43 v0.53
Gary Lowell [Tue, 16 Oct 2012 17:42:36 +0000 (17:42 +0000)]
v0.43

12 years agoMerge remote-tracking branch 'gh/wip-fedora18' into next
Sage Weil [Tue, 16 Oct 2012 16:05:55 +0000 (09:05 -0700)]
Merge remote-tracking branch 'gh/wip-fedora18' into next

12 years agoradosgw-admin manpage: Fix broken quotes
Dan Mick [Tue, 16 Oct 2012 01:18:18 +0000 (18:18 -0700)]
radosgw-admin manpage: Fix broken quotes

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoadmin_socket: fix '0' protocol version
Sage Weil [Mon, 15 Oct 2012 23:37:05 +0000 (16:37 -0700)]
admin_socket: fix '0' protocol version

Broken by 895e24d198ced83ab7fed3725f12f75e3bc97b0b.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: avoid possible null deref
Sage Weil [Mon, 15 Oct 2012 21:22:31 +0000 (14:22 -0700)]
client: avoid possible null deref

CID 716910 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
At (6): Dereferencing null pointer "mds_session".

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: fix shadowing in inode ctor
Sage Weil [Mon, 15 Oct 2012 21:20:51 +0000 (14:20 -0700)]
client: fix shadowing in inode ctor

CID 728080 (#1 of 1): Incorrect sizeof expression (BAD_SIZEOF)
Taking the size of pointer parameter "layout" is suspicious.

At (2): Non-static class member field "layout.fl_stripe_unit" is not initialized in this constructor nor in any functions that it calls.
At (4): Non-static class member field "layout.fl_stripe_count" is not initialized in this constructor nor in any functions that it calls.
At (6): Non-static class member field "layout.fl_object_size" is not initialized in this constructor nor in any functions that it calls.
At (8): Non-static class member field "layout.fl_cas_hash" is not initialized in this constructor nor in any functions that it calls.
At (10): Non-static class member field "layout.fl_object_stripe_unit" is not initialized in this constructor nor in any functions that it calls.
At (12): Non-static class member field "layout.fl_unused" is not initialized in this constructor nor in any functions that it calls.
CID 717206 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
At (14): Non-static class member field "layout.fl_pg_pool" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: init readdir fields
Sage Weil [Mon, 15 Oct 2012 21:19:10 +0000 (14:19 -0700)]
client: init readdir fields

At (2): Non-static class member "readdir_offset" is not initialized in this constructor nor in any functions that it calls.
At (4): Non-static class member "readdir_end" is not initialized in this constructor nor in any functions that it calls.
At (6): Non-static class member "readdir_num" is not initialized in this constructor nor in any functions that it calls.
CID 717207 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
At (8): Non-static class member "tid" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMakefile: Add CRYPTO_C(XX)FLAGS to librdb
Gary Lowell [Thu, 11 Oct 2012 18:05:10 +0000 (11:05 -0700)]
Makefile:  Add CRYPTO_C(XX)FLAGS to librdb

12 years agoMakefiles: Add ar-lib to .gitignore.
Gary Lowell [Tue, 9 Oct 2012 22:09:11 +0000 (15:09 -0700)]
Makefiles:  Add ar-lib to .gitignore.

12 years agoautogen.sh: On some platforms, the m4 is created earlier.
Gary Lowell [Tue, 9 Oct 2012 20:36:43 +0000 (13:36 -0700)]
autogen.sh:  On some platforms, the m4 is created earlier.

12 years agoautogen.sh: Create m4 directory for leveldb submodule.
Gary Lowell [Tue, 9 Oct 2012 20:10:15 +0000 (13:10 -0700)]
autogen.sh:  Create m4 directory for leveldb submodule.

12 years agoMakefiles: Update submodule reference to latestes for leveldb.
Gary Lowell [Tue, 9 Oct 2012 19:24:16 +0000 (12:24 -0700)]
Makefiles:  Update submodule reference to latestes for leveldb.

12 years agoMakefile: update submodule reference for leveldb.
Gary Lowell [Tue, 9 Oct 2012 16:28:22 +0000 (09:28 -0700)]
Makefile: update submodule reference for leveldb.

12 years agoleveldb: fix-up submodule entry.
Gary Lowell [Tue, 9 Oct 2012 06:45:45 +0000 (23:45 -0700)]
leveldb: fix-up submodule entry.

12 years agoMakefile: Improve test for boost system library.
Gary Lowell [Tue, 9 Oct 2012 05:56:05 +0000 (22:56 -0700)]
Makefile: Improve test for boost system library.

12 years agoMakefiles: Missing boost library should not be fatal.
Gary Lowell [Tue, 9 Oct 2012 02:18:56 +0000 (19:18 -0700)]
Makefiles:  Missing boost library should not be fatal.

12 years agoMakefiles: ignore the m4 macro directory
Gary Lowell [Tue, 9 Oct 2012 01:12:06 +0000 (18:12 -0700)]
Makefiles:  ignore the m4 macro directory

12 years agoMakefile: Updates to eliminates warnings, add test for boost system lib.
Gary Lowell [Mon, 8 Oct 2012 17:04:25 +0000 (10:04 -0700)]
Makefile:  Updates to eliminates warnings, add test for boost system lib.

12 years agocls_rgw: init var in ctor
Sage Weil [Mon, 15 Oct 2012 21:14:28 +0000 (14:14 -0700)]
cls_rgw: init var in ctor

CID 727992 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
At (2): Non-static class member "tag_timeout" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agorgw: don't add port to url if already has one
Yehuda Sadeh [Mon, 15 Oct 2012 16:43:47 +0000 (09:43 -0700)]
rgw: don't add port to url if already has one

Fixes: #3296
Specifically, is host name string already has ':', then
don't try to append theport (swift auth).

backport: argonaut
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoceph-disk-prepare, debian/control: Support external journals.
Tommi Virtanen [Fri, 5 Oct 2012 17:57:42 +0000 (10:57 -0700)]
ceph-disk-prepare, debian/control: Support external journals.

Previously, ceph-disk-* would only let you use a journal that was a
file inside the OSD data directory. With this, you can do:

  ceph-disk-prepare /dev/sdb /dev/sdb

to put the journal as a second partition on the same disk as the OSD
data (might save some file system overhead), or, more interestingly:

  ceph-disk-prepare /dev/sdb /dev/sdc

which makes it create a new partition on /dev/sdc to use as the
journal. Size of the partition is decided by $osd_journal_size.
/dev/sdc must be a GPT-format disk. Multiple OSDs may share the same
journal disk (using separate partitions); this way, a single fast SSD
can serve as journal for multiple spinning disks.

The second use case currently requires parted, so a Recommends: for
parted has been added to Debian packaging.

Closes: #3078
Closes: #3079
Signed-off-by: Tommi Virtanen <tv@inktank.com>
12 years agologrotate: fix bash syntax
Chris Dunlop [Sun, 14 Oct 2012 05:33:47 +0000 (22:33 -0700)]
logrotate: fix bash syntax

Introduced by 32a6394be0725b4742ebe87d7537b98c7025e4f6.

Signed-off-by: Chris Dunlop <chris@onthe.net.au>
12 years agodoc: remove cephfs warning
Sage Weil [Sun, 14 Oct 2012 03:13:35 +0000 (20:13 -0700)]
doc: remove cephfs warning

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: fix file system recs
Sage Weil [Sun, 14 Oct 2012 03:12:48 +0000 (20:12 -0700)]
doc: fix file system recs

- drop xattr warning; this is not an issue with the leveldb stuff.
- the ext3 vs xattr discussion was somewhat inaccurate.  also, no longer
  relevant.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agorgw: replace bucket creation with explicit pool creation
Yehuda Sadeh [Fri, 12 Oct 2012 21:01:03 +0000 (14:01 -0700)]
rgw: replace bucket creation with explicit pool creation

Following a recent cleanup, usage should create a pool and
not a bucket.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoMerge branch 'wip-fix-getdents'
Sam Lang [Thu, 11 Oct 2012 19:19:04 +0000 (14:19 -0500)]
Merge branch 'wip-fix-getdents'

12 years agorbd: don't issue usage on errors
Dan Mick [Wed, 10 Oct 2012 17:41:05 +0000 (10:41 -0700)]
rbd: don't issue usage on errors

Change bare calls to usage() to an informative targeted error message
Remove all calls to usage() except when requested with -h/--help
Regularize all errors to start with rbd:
Remove a few commented cerrs, wrap cerr calls at 80 cols

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge branch 'master' of https://github.com/ceph/ceph
John Wilkins [Wed, 10 Oct 2012 22:16:17 +0000 (15:16 -0700)]
Merge branch 'master' of https://github.com/ceph/ceph

12 years agodoc: Added radosgw temp remove.
John Wilkins [Wed, 10 Oct 2012 22:15:32 +0000 (15:15 -0700)]
doc: Added radosgw temp remove.

fixes: #3278

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Minor clean-up.
John Wilkins [Wed, 10 Oct 2012 22:14:05 +0000 (15:14 -0700)]
doc: Minor clean-up.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: minor clean-up.
John Wilkins [Wed, 10 Oct 2012 22:13:41 +0000 (15:13 -0700)]
doc: minor clean-up.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agorgw: fix compilation
Noah Watkins [Wed, 10 Oct 2012 21:59:16 +0000 (14:59 -0700)]
rgw: fix compilation

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoMerge branch 'master' of https://github.com/ceph/ceph
John Wilkins [Wed, 10 Oct 2012 21:38:50 +0000 (14:38 -0700)]
Merge branch 'master' of https://github.com/ceph/ceph

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoMerge branch 'master' of https://github.com/ceph/ceph
John Wilkins [Wed, 10 Oct 2012 21:36:51 +0000 (14:36 -0700)]
Merge branch 'master' of https://github.com/ceph/ceph

12 years agoMerge branch 'wip-rbd-openstack-doc'
John Wilkins [Wed, 10 Oct 2012 21:36:13 +0000 (14:36 -0700)]
Merge branch 'wip-rbd-openstack-doc'

12 years agomon: drop command replies on paxos reset
Sage Weil [Tue, 9 Oct 2012 00:14:22 +0000 (17:14 -0700)]
mon: drop command replies on paxos reset

If paxos resets, do not send the reply for the commit we were waiting for;
let the command be reprocessed and re-proposed.

Among other things, this could lead to nondeterministic results for
'ceph osd create <uuid>'.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: Editing and cleanup.
John Wilkins [Wed, 10 Oct 2012 20:22:47 +0000 (13:22 -0700)]
doc: Editing and cleanup.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agotest: Allow randomized tests to be repeatable
Sam Lang [Wed, 10 Oct 2012 02:11:19 +0000 (21:11 -0500)]
test: Allow randomized tests to be repeatable

Outputs the random number used for the Dir_ls
test and allows setting the value through an
environment variable.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoclient: Reset cache_name pos on dirp
Sam Lang [Tue, 9 Oct 2012 22:34:48 +0000 (17:34 -0500)]
client: Reset cache_name pos on dirp

Reset the at_cache_name field on the directory
stream pointer for rewinddir.
This fixes a bug where getdents after readdir at
the end of the stream would return invalid
results after rewinddir had been called.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agorbd cli tests: copy.sh was looking for old version of rbd ls -l output
Dan Mick [Wed, 10 Oct 2012 00:13:03 +0000 (17:13 -0700)]
rbd cli tests: copy.sh was looking for old version of rbd ls -l output

Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoclean up of rbd functionality script
tamil [Tue, 9 Oct 2012 23:42:57 +0000 (16:42 -0700)]
clean up of rbd functionality script

Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
12 years agocleaned up the perl module
tamil [Tue, 9 Oct 2012 23:40:55 +0000 (16:40 -0700)]
cleaned up the perl module

Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
12 years agocleaned up the script
tamil [Tue, 9 Oct 2012 22:50:29 +0000 (15:50 -0700)]
cleaned up the script

Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
12 years agoradosgw-admin: don't try to parse date if wasn't specified
Yehuda Sadeh [Tue, 9 Oct 2012 21:56:28 +0000 (14:56 -0700)]
radosgw-admin: don't try to parse date if wasn't specified

This fixes a regression following the merge of wip-admin-rest.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoceph-debugpack: updates
Sage Weil [Tue, 9 Oct 2012 21:10:48 +0000 (14:10 -0700)]
ceph-debugpack: updates

- avoid copying data around; tar things directly into the tgz
- 'ceph report' instead of all the little bits
- unrotated logs only
- ensure target doesn't already exist

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: separate config from I/O in openstack diagram
Josh Durgin [Tue, 9 Oct 2012 21:06:40 +0000 (14:06 -0700)]
doc: separate config from I/O in openstack diagram

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agodoc: clarify rbd openstack docs
Josh Durgin [Tue, 9 Oct 2012 20:53:37 +0000 (13:53 -0700)]
doc: clarify rbd openstack docs

* give upstart example
* restart all relevant services
* explain OpenStack terminology more

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agogitignore: Update to match packaging changes and additions, rest-bench addition.
Tommi Virtanen [Tue, 9 Oct 2012 20:23:37 +0000 (13:23 -0700)]
gitignore: Update to match packaging changes and additions, rest-bench addition.

Signed-off-by: Tommi Virtanen <tv@inktank.com>
12 years agoconfigure.ac: Typo in human-readable description.
Tommi Virtanen [Tue, 9 Oct 2012 19:47:22 +0000 (12:47 -0700)]
configure.ac: Typo in human-readable description.

Signed-off-by: Tommi Virtanen <tv@inktank.com>
12 years agomon: Monitor: resolve keyring option to a file before loading keyring
Joao Eduardo Luis [Tue, 9 Oct 2012 20:25:54 +0000 (21:25 +0100)]
mon: Monitor: resolve keyring option to a file before loading keyring

Otherwise our keyring default location, or any other similarly formatted
location, will be taken as the actual location for the keyring and fail.

Reported-by: tziOm (at) #ceph
Fixes: 3276
Backport: argonaut

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agodoc: simplify wording for rbd-openstack config
Josh Durgin [Tue, 9 Oct 2012 17:34:51 +0000 (10:34 -0700)]
doc: simplify wording for rbd-openstack config

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-gtest-libcephfs'
Sage Weil [Tue, 9 Oct 2012 16:43:42 +0000 (09:43 -0700)]
Merge remote-tracking branch 'gh/wip-gtest-libcephfs'

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agodoc: Add doxygen style documentation for libcephfs
Sam Lang [Tue, 9 Oct 2012 14:09:37 +0000 (09:09 -0500)]
doc: Add doxygen style documentation for libcephfs

As well as doxygen doc, we document a few parts of
the interface that are otherwise undocumented and
don't match the standard calls.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agotest: Refactored testceph.cc into gtest framework
Sam Lang [Tue, 9 Oct 2012 14:06:16 +0000 (09:06 -0500)]
test: Refactored testceph.cc into gtest framework

Moved all the functionality tests for the libcephfs
API into the gtest framework.  Also adds tests for
directories to improve test coverage of the libcephfs
interfaces.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agotest: Allow readdir test to be repeated
Sam Lang [Tue, 9 Oct 2012 14:14:35 +0000 (09:14 -0500)]
test: Allow readdir test to be repeated

Use test dir/files that include the pid to avoid
hitting errors when running the same test twice.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agolibcephfs: Check that buffer is non-null
Sam Lang [Tue, 9 Oct 2012 14:11:37 +0000 (09:11 -0500)]
libcephfs: Check that buffer is non-null

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-client-stale'
Sage Weil [Tue, 9 Oct 2012 03:56:05 +0000 (20:56 -0700)]
Merge remote-tracking branch 'gh/wip-client-stale'

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomds: Fix removexattr ENODATA error
Sam Lang [Mon, 8 Oct 2012 17:04:57 +0000 (12:04 -0500)]
mds: Fix removexattr ENODATA error

If a client sets an xattr and then attempts to remove in a short
time window, the xattr may not have been committed to the journal
and will only be set on the projected xattrs of the inode.  This
results in a removexattr returning ENODATA at present.  The fix
here checks the xattr name in the projected xattrs, and only
returns ENODATA in the case where the name doesn't exist in that
map either.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoosdmap: fix null deref in dump
Sage Weil [Tue, 9 Oct 2012 03:50:12 +0000 (20:50 -0700)]
osdmap: fix null deref in dump

CID 731938 (#1 of 1): Dereference after null check (FORWARD_NULL)
At (15): Passing null pointer "f" to function "ceph::Formatter::dump_int(char const *, int64_t)", which dereferences it. (The dereference happens because this is a virtual function call.)

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdmap: fix osdmap dump null check
Sage Weil [Tue, 9 Oct 2012 03:49:41 +0000 (20:49 -0700)]
osdmap: fix osdmap dump null check

CID 731939 (#1 of 1): Dereference after null check (FORWARD_NULL)
At (5): Passing null pointer "out" to function "std::operator << <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> > &, char const *)", which dereferences it.

Broken by 13b841c74605d67a172d787079bcef007d1a8fa5.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomds: note fall-thru to please coverity
Sage Weil [Tue, 9 Oct 2012 03:48:30 +0000 (20:48 -0700)]
mds: note fall-thru to please coverity

CID 731940 (#1 of 1): Missing break in switch (MISSING_BREAK)
This case (value 23) is not terminated by a 'break' statement.
1719    case CEPH_MSG_CLIENT_RECONNECT:
1720      ALLOW_MESSAGES_FROM(CEPH_ENTITY_TYPE_CLIENT);
The above case falls through to this one.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agotest_cfuse_cache_invalidate: check for errors
Sage Weil [Tue, 9 Oct 2012 03:47:16 +0000 (20:47 -0700)]
test_cfuse_cache_invalidate: check for errors

CID 731941 (#1 of 2): Argument cannot be negative (NEGATIVE_RETURNS)
At (6): "fd" is passed to a parameter that cannot be negative.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/Elector: fix leak on monmap from peer
Sage Weil [Tue, 9 Oct 2012 03:44:54 +0000 (20:44 -0700)]
mon/Elector: fix leak on monmap from peer

CID 731942 (#1 of 1): Resource leak (RESOURCE_LEAK)
At (12): Variable "peermap" going out of scope leaks the storage it points to.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agotest_cfuse_cache_invalidate: zero buffer
Sage Weil [Tue, 9 Oct 2012 03:44:10 +0000 (20:44 -0700)]
test_cfuse_cache_invalidate: zero buffer

CID 731943 (#1 of 1): Uninitialized scalar variable (UNINIT)
At (5): Using uninitialized element of array "buf" when calling "pwrite(int, void const *, size_t, __off64_t)".

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoFileJournal: ignore osd journal size for block devices
Josh Durgin [Tue, 9 Oct 2012 00:59:36 +0000 (17:59 -0700)]
FileJournal: ignore osd journal size for block devices

Using part of a block device doesn't make much sense. This makes the
common case, where you partition a disk to act as several journals,
easier to configure.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agorgw: switch perm to uint32_t
Yehuda Sadeh [Mon, 8 Oct 2012 23:34:12 +0000 (16:34 -0700)]
rgw: switch perm to uint32_t

Should fix a warning.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: flexible attr fields
Yehuda Sadeh [Mon, 8 Oct 2012 23:13:04 +0000 (16:13 -0700)]
rgw: flexible attr fields

Fixes: #3114
Instead of having a few hard coded attrs that are
special cased, make it more generic. This allows supporting
more header fields, such as cache-control, expires, etc.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: get bucket logging stub
Yehuda Sadeh [Wed, 26 Sep 2012 23:41:17 +0000 (16:41 -0700)]
rgw: get bucket logging stub

Trivial implementation that just returns that
bucket logging is not enabled.

Fixes: #3225
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: check_disk_state also updates other object metadata
Yehuda Sadeh [Fri, 28 Sep 2012 18:11:04 +0000 (11:11 -0700)]
rgw: check_disk_state also updates other object metadata

When we do a check_disk_state() on an object that is not complete,
we need to also update etag, content_type, owner, and display_name.
Otherwise, we'd end up missing that from the bucket index. In
practice this only affects swift, as only there we're actually
looking at that info (when listing a container).

Fixes: #3234
Backport: argonaut
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoMerge branch 'wip-rgw-coverity2'
Yehuda Sadeh [Mon, 8 Oct 2012 22:23:08 +0000 (15:23 -0700)]
Merge branch 'wip-rgw-coverity2'

12 years agorgw: set null termination explicitly
Yehuda Sadeh [Thu, 27 Sep 2012 23:02:21 +0000 (16:02 -0700)]
rgw: set null termination explicitly

Make sure that string is null terminated.
Fixes coverity issue.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agocls_rgw: return returned ret code
Yehuda Sadeh [Thu, 27 Sep 2012 22:33:28 +0000 (15:33 -0700)]
cls_rgw: return returned ret code

Wasn't setting the ret code. A coverity issue.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: add missing parantheses
Yehuda Sadeh [Thu, 27 Sep 2012 22:30:16 +0000 (15:30 -0700)]
rgw: add missing parantheses

.. around logic operations at process_intent_log().
Another coverity fix.

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