Commit Graph

27058 Commits

Author SHA1 Message Date
David Zafman
94ccfac41e rados: Add namespace arg (--namespace, -N) to rados command
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-07-09 14:09:24 -07:00
David Zafman
69af60db73 librados: Add operate()/operate_read() log messages
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-07-09 14:09:24 -07:00
David Zafman
e761e4e55f librados, os, osd, osdc, test: Add support for client specified namespaces
Add rados_ioctx_namespace_set_key() and librados::IoCtx::namespace_set_key()
Add namespace to admin-daemon operations
Support namespace in osd map command
Add namespace to object_locator_t and hobject_t
Add random namespaces to psim program

Feature: #4982 (OSD: namespaces pt 1 (librados/osd, not caps))

Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-07-09 14:09:02 -07:00
David Zafman
3c89a19c92 os: Add missing pool to hobject_t:::dump() and hobject_t::decode()
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-07-09 00:06:35 -07:00
David Zafman
b1b188a5fd os: Remove unused hobject_t::set_filestore_key()
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-07-09 00:06:32 -07:00
David Zafman
72c27a302e librados, osdc: Refactor IoCtxImpl to use operate()/operate_read()
Add ObjectOperation::write() that includes len instead of using bufferlist length
Have selfmanaged_snap_rollback_object() use mutate()

Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-07-09 00:06:32 -07:00
David Zafman
9dd60a634c TestRados: Output error for improper usage instead of Floating Point Exception
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-07-09 00:06:32 -07:00
David Zafman
30c951cc36 osd: Fix object_locator_t::get_pool() return type
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-07-09 00:06:00 -07:00
David Zafman
7efbf5da3b librados: Fix lock names
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-07-09 00:05:57 -07:00
David Zafman
3931bfa6cd psim.cc: Fix comment on how to create .ceph_osdmap
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-07-09 00:05:57 -07:00
David Zafman
313b7a1f45 os: Code conformance in LFNIndex.cc
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-07-09 00:05:43 -07:00
Samuel Just
3564e304e3 Elector.h: features are 64 bit
Fixes: #5497
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Luis <joao.luis@inktank.com>
2013-07-03 13:21:29 -07:00
Samuel Just
4255b5c2fb ceph_features.h: declare all features as ULL
Otherwise, the first 32 get |'d together as ints.  Then, the result
((int)-1) is sign extended to ((long long int)-1) before being |'d
with the 1LL entries.  This results in ~((uint64_t)0).

Fixes: #5497
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Luis <joao.luis@inktank.com>
2013-07-03 13:21:29 -07:00
Samuel Just
bc3e2f09f8 Pipe: use uint64_t not unsigned when setting features
Fixes: #5497
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Luis <joao.luis@inktank.com>
2013-07-03 13:21:28 -07:00
Mark Nelson
14ab4301a3 Merge pull request #393 from ceph/wip-crc
use sse4.2 crc32c instruction
2013-07-03 13:20:10 -07:00
Gary Lowell
db63965a7b ceph.spec.in: Fix file name typo
Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
2013-07-03 13:14:36 -07:00
Sage Weil
08dd35d9e3 common: autoselect crc32c based on cpu features
If the CPu supposts SSE4.2, use the crc32c instructions.  Use the magic
incantation from who knows where to do this.  __builtin_cpu_supports()
is a nicer way to do it, but that is new in gcc 4.8.

Avoid static globals; they are bad.  Sadly that means we redetect the CPU
feature on every call. I assume that is reasonably efficient...

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-03 12:20:51 -07:00
Mark Nelson
7c59288d91 Initial Intel SSE4 crc32c implementation.
Signed-off-by: Mark Nelson <mark.nelson@inktank.com>
2013-07-03 12:20:50 -07:00
Yan, Zheng
4fb782c38c mds: fix O_TRUNC locking
When truncating a file, we should xlock the corresponding filelock.
(revoke any Fw caps from clients).

[note from sw: setattr on size also takes the filelock xlock.]

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-03 11:13:35 -07:00
Sage Weil
cd44a62371 Makefile: include rbdmap in dist tarball
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-03 11:11:19 -07:00
Sage Weil
2f9afb862d Merge pull request #390 from ksperis/rbdmap.init-2
init-rbdmap install

Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-03 07:03:35 -07:00
Sage Weil
9376ce4f08 Merge remote-tracking branch 'gh/next'
Conflicts:
	src/mon/OSDMonitor.cc
2013-07-02 19:43:17 -07:00
Dan Mick
9942efde77 mon: dead code removal
Remove code for 'mds cluster_fail', 'osd tell', and auth_usage()

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-02 17:10:35 -07:00
Sage Weil
09e9fef028 Merge branch 'wip-ceph-disk'
Passed ceph-deploy suite.

Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-07-02 16:55:26 -07:00
Sage Weil
87c98e92d1 sysvinit, upstart: handle symlinks to dirs in /var/lib/ceph/*
Match a symlink to a dir, not just dirs.  This fixes the osd case of e.g.,
creating an osd in /data/osd$id in which ceph-disk makes a symlink from
/var/lib/ceph/osd/ceph-$id.

Fix proposed by Matt Thompson <matt.thompson@mandiant.com>; extended to
include the upstart users too.

Fixes: #5490
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-07-02 14:43:17 -07:00
Sage Weil
cb97338b11 ceph-disk: handle /dev/foo/bar devices throughout
Assume the last component is the unique device name, even if it appears
under a subdir of /dev.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-02 14:00:15 -07:00
Sage Weil
e082f1247f ceph-disk: make is_held() smarter about full disks
Handle the case where the device is a full disk.  Make the partition
check a bit more robust (don't make assumptions about naming aside from
the device being a prefix of the partition).

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-02 14:00:15 -07:00
Sage Weil
a4805efc18 osdc/Objecter: resend command map version checks on reconnect
We already do this for Ops and LingerOps, but missed this when we added
CommandOps to the mix.  The result is that an ill-timed mon disconnect will
leave a command map check (and thus the command) hanging.

This misbehavior was introduced when CommandOp was introduced, back in
commit 2e172225b0, and we failed to fix it
in 8808ca57c6.

Fixes: #5493
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-07-02 13:43:29 -07:00
Sage Weil
08cf4c0d9a Merge pull request #386 from ceph/wip-osd-xattr
automatically enable xattrs in omap; make size limits well defined

Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-07-02 11:32:23 -07:00
Simon Leinen
da1fb93fab mds: man page: Fixed cut & paste error 2013-07-02 11:03:39 -07:00
athanatos
32673bd095 Merge pull request #388 from dachary/master
set object_info_t pool of an ObjectContext if it is undefined or bad

Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-07-02 10:53:04 -07:00
Loic Dachary
a4cd631776 set object_info_t pool of an ObjectContext if it is undefined or bad
When reading object_info_t from an existing object attribute, the pool
may be < 0 and should be set to the pool containing the object. This is done
on the oi object on the stack but overriden later by:

    obc->obs.oi.decode(bv);

This decode is superfluous and is removed so that it does not override
the modified value of the pool.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-07-02 19:40:32 +02:00
Laurent Barbe
0efcccdcc2 Move rbdmap file to /etc/ceph
Signed-off-by: Laurent Barbe <laurent@ksperis.com>
2013-07-02 16:53:11 +02:00
Laurent Barbe
ffe7045893 install rules for init-rbdmap
Signed-off-by: Laurent Barbe <laurent@ksperis.com>
2013-07-02 16:50:40 +02:00
Yehuda Sadeh
08123b6a13 Merge pull request #387 from ceph/wip-5346
rgw: add RGWFormatter_Plain allocation to sidestep cranky strlen()

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-01 21:00:02 -07:00
Sage Weil
49ff63b175 rgw: add RGWFormatter_Plain allocation to sidestep cranky strlen()
Valgrind complains about an invalid read when we don't pad the allocation,
and because it is inlined we can't whitelist it for valgrind.  Workaround
the warning by just padding our allocations a bit.

Fixes: #5346
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-01 18:21:01 -07:00
John Wilkins
94742d4c69 doc: Minor fix.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-07-01 17:06:22 -07:00
Joao Eduardo Luis
935c27842e mon: Paxos: update first_committed on first paxos proposal
We were adding this update to a transaction that would only be applied
on the leader.  The peons would never see a first_committed > 0.

Fixes: #5484

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-01 15:20:51 -07:00
Sage Weil
847465fffd librados: fix test warning on 32-bit platforms
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-01 14:30:03 -07:00
Sage Weil
6d90dad45e os/FileStore: automatically enable 'filestore xattr use omap' as needed
Automatically enable the 'filestore xattr use omap' option if the fs
does not appear to handle large xattrs on its own.

This makes for a more pleasant use experience as they are not told to
enable something that we already know they must enable in order to
continue.

Fixes: #5137
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-01 13:45:25 -07:00
Sage Weil
1b578a804b librados: add test for large and many xattrs
Verify that we can set large and large numbers of attrs on an object.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-01 13:45:25 -07:00
Sage Weil
8694d296de osd/PGLog: populate log_keys_debug from read_old_log()
Fixes: #5470
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-07-01 13:42:25 -07:00
Yehuda Sadeh
1fbd50b1ca Merge pull request #385 from kri5/wip-1779
rgw: Fix return value for swift user not found

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-01 07:08:05 -07:00
Christophe Courtaut
4089001de1 rgw: Fix return value for swift user not found
http://tracker.ceph.com/issues/1779 fixes #1779

Adjust the return value from rgw_get_user_info_by_swift call
in RGW_SWIFT_Auth_Get::execute() to have the correct
return code in response.
2013-07-01 14:57:17 +02:00
Sage Weil
09e374f162 osd: set maximum object attr size
Make a well-defined maximum size of an object attribute.  Since Linus has
a 64KB limit, and that is what we normally use to back this, use that as
the limit.  This means that even when leveldb is backing large xattrs
(as ext4 users must do) we will return EFBIG on >64KB setxattr attempts.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-28 18:29:12 -07:00
Sage Weil
e235958fb1 mds: log before respawning when standby-replay falls behind
Call into an MDS method so that we can write to the log.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-28 14:25:12 -07:00
Sage Weil
946a838cff Merge remote-tracking branch 'gh/wip-5381' into wip-mds
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-06-28 14:24:08 -07:00
Sage Weil
87217e1e3c client: send all request put's through put_request()
Make sure all MetaRequest reference put's go through the same path that
releases inode references, including all of the error paths.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-28 12:21:58 -07:00
Sage Weil
9af3b86b25 client: fix remaining Inode::put() caller, and make method psuedo-private
Not sure I can make this actually private and make Client::put_inode() a
friend method (making all of Client a friend would defeat the purpose).
This works well enough, though!

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-28 11:50:11 -07:00
Sage Weil
2e857a4df6 librados: fix cmd OSDCommand test
If we get ENXIO, buflen will be 0.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-28 06:54:18 -07:00