]>
git.apps.os.sepia.ceph.com Git - ceph.git/log
Yehuda Sadeh [Tue, 17 May 2011 11:15:10 +0000 (04:15 -0700)]
rgw: don't log operations on unexisting bucket
Colin Patrick McCabe [Tue, 17 May 2011 00:12:45 +0000 (17:12 -0700)]
obsync: preserve user-defined metadata
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Mon, 16 May 2011 23:51:45 +0000 (16:51 -0700)]
obsync: filestore: separate xattr metadata nspace
User-defined s3 metadata lives in a separate namespace from regular S3
metadata like Content-Type, etc.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Mon, 16 May 2011 18:50:21 +0000 (11:50 -0700)]
obysnc: preserve Content-Type
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Sage Weil [Mon, 16 May 2011 21:47:29 +0000 (14:47 -0700)]
client: update ctime for auth, xattr
This mirrors the kclient fix in
d8672d64 . The client can have a newer
ctime due to auth or xattr excl caps. This fixes cases where ctime goes
backwards due to the right sequence of local operations and replies
from the MDS.
Signed-off-by: Sage Weil <sage@newdream.net>
Colin Patrick McCabe [Mon, 16 May 2011 17:54:13 +0000 (10:54 -0700)]
obsync: FileStore: test storing ACLs in xattrs
Update unit tests now that we're storing ACLs in xattrs. Fix a bug.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Mon, 16 May 2011 17:54:13 +0000 (10:54 -0700)]
obsync: FileStore: store ACLs in xattrs
Store the ACL XML in extended attributes rather than in side files.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Mon, 16 May 2011 17:42:36 +0000 (10:42 -0700)]
obsync: FileStore: test for xattr support
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Yehuda Sadeh [Mon, 16 May 2011 13:24:02 +0000 (06:24 -0700)]
rados: don't force order on params
Colin Patrick McCabe [Sat, 14 May 2011 00:19:20 +0000 (17:19 -0700)]
rgw: Move rgw_log_level to md_config_t
Need to do this to get librgw to be usable as a standalone library
without unresolved symbols. Also, this makes it consistent with the rest
of the log level settings.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Sat, 14 May 2011 00:16:04 +0000 (17:16 -0700)]
Makefile.am: add SimpleMessenger.cc to libcommon
libcommon depends on this file, and there's no other library that it
could go in. It is certainly silly to manually include it in every
application and library that uses libcommon.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Fri, 13 May 2011 23:21:15 +0000 (16:21 -0700)]
librgw: only include rgw_acl.cc and librgw.cc
Rather than putting all of RGW into librgw, only put rgw_acl.cc. Have
RGW use librgw instead of re-including the same sources.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Fri, 13 May 2011 23:38:13 +0000 (16:38 -0700)]
rgw_acl: move constructors, destructors to .cc
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Wed, 11 May 2011 22:45:36 +0000 (15:45 -0700)]
obsync: fix eventual consistency handler
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Wed, 11 May 2011 22:36:48 +0000 (15:36 -0700)]
obsync: add DST_CONSISTENCY
The DST_CONSISTENCY variable allows us to specify that the destination
is expected to use read-after-write consistency. If that is the case, we
don't have to do slow retries if certain operations fail.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Wed, 11 May 2011 22:36:17 +0000 (15:36 -0700)]
boto_tool.py: add --rmobjects, --rm_rf
Add some options to help destroy buckets.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Wed, 11 May 2011 22:06:14 +0000 (15:06 -0700)]
boto_tool.py: fix old-style argument-passing
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Wed, 11 May 2011 01:05:39 +0000 (18:05 -0700)]
boto_tool.py: use s3-tests config file
boto_tool now grabs the configuration variables it needs from the
s3-tests config file, similar to s3-tests and test-obsync.
Also, changed argument parsing to be more straightforward.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Tue, 10 May 2011 21:08:42 +0000 (14:08 -0700)]
librgw: use dout for logging
Use dout for logging so that the librgw library user can turn off or
redirect the logs if necessary.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Tue, 10 May 2011 19:58:20 +0000 (12:58 -0700)]
librgw: small error handling fix
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Mon, 2 May 2011 18:51:58 +0000 (11:51 -0700)]
rgw: put XML-to-bin translation into a librgw
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Greg Farnum [Fri, 13 May 2011 23:22:50 +0000 (16:22 -0700)]
uclient: do not accept max_size changes unless they're from auth mds.
Unlike most of the cap options, max_size is an inode member. This meant
that if we got a shared cap grant from a replica MDS, we would set
the max_size to 0!
This caused hangs because when the client would request a new, larger
max_size from the auth MDS then the auth MDS would see the new size
as being smaller than the current max, and drop the message as
being spurious.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Greg Farnum [Fri, 13 May 2011 21:42:22 +0000 (14:42 -0700)]
MDS: do journal on rename if we're auth for the inode.
We missed this case: we can be auth for the inode being moved without
being auth for the srcdn (first case) or owning a clobbered inode
(last case).
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Greg Farnum [Wed, 11 May 2011 00:09:07 +0000 (17:09 -0700)]
MDS: don't journal slave ops if we only have caps.
Previously we wanted to journal if we had caps on something. Now
that we're being strict about only journaling stuff we're auth for,
that's a bad choice to make.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Samuel Just [Fri, 13 May 2011 21:07:05 +0000 (14:07 -0700)]
PG: search_for_missing takes the other osd's missing set
Previously, search_for_missing was erroneously passed the
primary's missing in a few places.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Brian Chrisman [Fri, 13 May 2011 06:39:38 +0000 (23:39 -0700)]
add basic test case for readdir_r
Signed-off-by: Brian Chrisman <brchrisman@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
Brian Chrisman [Fri, 13 May 2011 06:39:37 +0000 (23:39 -0700)]
fix null deref when callback invoked en route from readdir_r rather than readdirplus_r
Signed-off-by: Brian Chrisman <brchrisman@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
Greg Farnum [Thu, 12 May 2011 22:43:23 +0000 (15:43 -0700)]
uclient: compare _revoked_ caps when deciding whether to release.
cap->issued is already set to new_caps, so that branch was never taken!
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Greg Farnum [Thu, 12 May 2011 22:36:26 +0000 (15:36 -0700)]
uclient: clear out cap->wanted when caps get revoked.
This ensures that we will send a response to the MDS letting it know
that we've revoked our caps.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Greg Farnum [Wed, 11 May 2011 00:05:12 +0000 (17:05 -0700)]
uclient: be more careful about sending caps.
This should prevent us from "losing" caps off the dirty list. See
#1063. If we have dirty caps we don't want to short-circuit out
of sending caps just because what we're issued matches what we want.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Brian Chrisman [Thu, 12 May 2011 05:26:47 +0000 (22:26 -0700)]
updated test to cover "." directory stat
Signed-off-by: Brian Chrisman <brchrisman@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
Brian Chrisman [Thu, 12 May 2011 05:26:46 +0000 (22:26 -0700)]
Add analogous special case for "." directory alongside ".." in _lookup
Signed-off-by: Brian Chrisman <brchrisman@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Thu, 12 May 2011 04:18:57 +0000 (21:18 -0700)]
mds: drop unneed default arg
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Thu, 12 May 2011 00:57:07 +0000 (17:57 -0700)]
Merge branch 'osd_pgls'
Sage Weil [Thu, 12 May 2011 00:56:32 +0000 (17:56 -0700)]
objecter: set pgls start_epoch field
For each pg, start out with start_epoch = 0 in the first request. For
subsequent requests, set it to the first reply's epoch. This forces the
OSD to ignore our cookie and "restart" if the pg mapping changes and there
is a possibility of incomplete results.
The price we pay is the possibility of duplicate results.
Fixes: #1030
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Thu, 12 May 2011 00:55:00 +0000 (17:55 -0700)]
osd: add pgls start_epoch field
If the pgls.start_epoch is set, the cookie is only considered valid if the
osd pg interval has not changed since then. If it has, then the cookie
is no longer valid and is ignored, effectively restarting the pgls process.
Old clients never set this and are unaffected.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Thu, 12 May 2011 00:47:50 +0000 (17:47 -0700)]
objecter: fix calc_op_budget bit mask checks
Use the helpers; we need to mask out several bits and compare.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Colin Patrick McCabe [Thu, 12 May 2011 00:27:10 +0000 (17:27 -0700)]
rgw: in S3 PUT, don't crash on Content-Length == 0
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Sage Weil [Wed, 11 May 2011 23:27:18 +0000 (16:27 -0700)]
osd: prepend missing objects to pgls results
This will prepend any missing objects to the set of objects returned by
a sequence of PGLS operations. Because recovery can progress in parallel,
we may get some objects returned twice (first as a missing item, later
because it is on disk). This is better than not getting it at all. The
client will need to uniq the results as needed.
Because the missing set is guaranteed not to grow over a given mapping
interval only, the client should restart the whole PGLS sequence if the
pg primary changes.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Colin Patrick McCabe [Wed, 11 May 2011 18:30:04 +0000 (11:30 -0700)]
obsync: handle eventual consistency issues
Handle eventual consistency issues so that obsync will be usable on more
S3 stores.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Sage Weil [Wed, 11 May 2011 20:58:09 +0000 (13:58 -0700)]
osd: key Missing::rmissing on version (not eversion)
This switches the key to the uint64_t (version_t) only, which is still
unique given a particular timeline (which is all we care about given a
particular Missing::missing). The last_requested pointer is updated
accordingly.
This will facilitate a hack to make PGLS work for degraded PGs (by using
the rmissing version offset as a cookie).
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Samuel Just [Wed, 11 May 2011 20:50:20 +0000 (13:50 -0700)]
PG: choose_log_location, fix error when scanning up set
++up.begin() does not skip the primary. Primary might not be up[0].
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Greg Farnum [Wed, 11 May 2011 20:27:07 +0000 (13:27 -0700)]
Clock: add new clock_offset config option, and use it in g_clock.now()
This way we can test clock drifts without needing to actually
drift the clocks.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Greg Farnum [Wed, 11 May 2011 20:11:58 +0000 (13:11 -0700)]
clock: remove cruft.
There were some odd pieces that are artifacts of a very old and
different use. Remove them to simplify the interface and be
less confusing.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Samuel Just [Wed, 11 May 2011 18:56:34 +0000 (11:56 -0700)]
PG: Replicas send Notifies in response to queries
Replicas only send Infos during activate.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Sage Weil [Wed, 11 May 2011 18:42:27 +0000 (11:42 -0700)]
Merge branch 'next'
Colin Patrick McCabe [Wed, 11 May 2011 18:03:31 +0000 (11:03 -0700)]
test-obsync.sh: fix obsync unit tests
Fix the obsync unit tests to take into account the new ACL changes.
ACLs must be either translated or ignored when copying between the
main and alt test buckets.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Greg Farnum [Wed, 11 May 2011 17:39:31 +0000 (10:39 -0700)]
rados_sync: tolerate ENOENT when deleting an object.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Greg Farnum [Wed, 11 May 2011 17:38:59 +0000 (10:38 -0700)]
librbd: tolerate ENOENT when trying to delete an object.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Greg Farnum [Wed, 11 May 2011 17:30:57 +0000 (10:30 -0700)]
mdcache: check return values when purging an inode.
Previously we weren't looking, and if there's a problem
we probably shouldn't be moving on.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Brian Chrisman [Tue, 10 May 2011 19:38:49 +0000 (12:38 -0700)]
expand testceph to check xattrs
Signed-off-by: Brian Chrisman <brchrisman@gmail.com>
Brian Chrisman [Wed, 11 May 2011 17:28:42 +0000 (10:28 -0700)]
client: support security. namespace
Signed-off-by: Brian Chrisman <brchrisman@gmail.com>
Brian Chrisman [Wed, 11 May 2011 17:27:50 +0000 (10:27 -0700)]
support for xattrs in libceph
Signed-off-by: Brian Chrisman <brchrisman@gmail.com>
Sage Weil [Wed, 11 May 2011 04:35:50 +0000 (21:35 -0700)]
journaler: tolerate ENOENT when prezeroing
ENOENT is okay and expected.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Yehuda Sadeh [Tue, 10 May 2011 21:20:19 +0000 (14:20 -0700)]
osd: unlink of nonexistent object should return -ENOENT
fixes bug #1078.
Sage Weil [Wed, 11 May 2011 04:30:52 +0000 (21:30 -0700)]
monclient: fix crash on shutdown
cur_con may be null on shutdown.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Greg Farnum [Wed, 11 May 2011 00:46:13 +0000 (17:46 -0700)]
Revert "osd: unlink of nonexistent object should return -ENOENT"
This reverts commit
a7f87965f5c49fa878dadd458f87b7974252ab6e .
This commit breaks at least how Filer does zeroing. We
should redo the commit with some audits for what else
will break.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Colin Patrick McCabe [Tue, 10 May 2011 23:58:40 +0000 (16:58 -0700)]
Merge branch 'wip-merge-radostool-with-radossync'
Sage Weil [Tue, 10 May 2011 23:54:23 +0000 (16:54 -0700)]
monclient: maintain explicit session connection; ignore stray messages
Maintain an explicit Connection handle to send messages and mark_down old
monitor connections. Ignore any incoming message that is not part of that
session. This fixes problems with incoming messages that race with
session restarts.
Fixes: #1033
Reported-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Sage Weil <sage@newdream.net>
Colin Patrick McCabe [Tue, 10 May 2011 23:45:39 +0000 (16:45 -0700)]
rados tool: integrate rados_sync with rados tool
* integrate rados_sync with rados_tool
* Improve rados tool usage a bit
* Rename test_rados_sync.sh to test_rados_tool.sh
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Tue, 10 May 2011 23:17:11 +0000 (16:17 -0700)]
rados tool: change initial argument parsing a bit
Use the ceph_argparse functions. Prepare to integrate with rados_sync.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Sage Weil [Tue, 10 May 2011 22:23:26 +0000 (15:23 -0700)]
librados: don't crash if we call connect twice
Fixes: #1034
Reported-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Tue, 10 May 2011 21:33:30 +0000 (14:33 -0700)]
Merge remote branch 'origin/stable'
Yehuda Sadeh [Tue, 10 May 2011 21:20:19 +0000 (14:20 -0700)]
osd: unlink of nonexistent object should return -ENOENT
fixes bug #1078.
Colin Patrick McCabe [Tue, 10 May 2011 18:14:39 +0000 (11:14 -0700)]
rados_sync: implement --delete-after, fix bugs
Implement --delete-after for both export and import.
Fix DIR* leaks.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Mon, 9 May 2011 23:18:48 +0000 (16:18 -0700)]
Allow dashes in ceph_argparse, etc.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Mon, 9 May 2011 23:09:50 +0000 (16:09 -0700)]
test_rados_sync: test --force
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Mon, 9 May 2011 15:16:03 +0000 (08:16 -0700)]
rados_sync: support --force
Support --force, which re-copies all objects all the time.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Sage Weil [Tue, 10 May 2011 15:22:34 +0000 (08:22 -0700)]
osd: initialize oi.oloc if on-disk value is bogus
If the on-disk locator is undefined (upgrade of an old cluster?) initialize
the oloc fields based on the PG::Info.
Reported-by: ar Fred <ar.fred@yahoo.com>
Tested-by: ar Fred <ar.fred@yahoo.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Yehuda Sadeh [Tue, 10 May 2011 12:15:15 +0000 (05:15 -0700)]
rgw: switch bucket creation operations
First we create the pool, then we create the bucket object. This
should have the effect of making the bucket creation sync.
Sage Weil [Mon, 9 May 2011 22:56:20 +0000 (15:56 -0700)]
osd: rename Pending -> WaitActingChange
We only use the Pending state while waiting for the acting set to change.
Rename the state and log it appropriately so we can see how much time the
OSD is spending doing this.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Mon, 9 May 2011 22:55:38 +0000 (15:55 -0700)]
osd: log debug output for Crashed state
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Mon, 9 May 2011 22:50:28 +0000 (15:50 -0700)]
osd: wait for up_thru updates
Before the primary can go active we need to wait for the up_thru in the
osdmap to reflect that we were alive during the current interval. This got
lost in the translation to the new state machine.
Add a new state WaitUpThru between GetMissing and Active, so that we can
continue doing the work of peering and finding unfound objects while we
are waiting for the osdmap to update. Request said update early (in
GetInfo).
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Mon, 9 May 2011 22:37:28 +0000 (15:37 -0700)]
osd: fix pollution of peer_info
The ++ postfix has no effect here! We really want +1.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Mon, 9 May 2011 22:36:39 +0000 (15:36 -0700)]
osd: fix osd$foo typos
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Sat, 7 May 2011 20:22:06 +0000 (13:22 -0700)]
osd: simplify build_might_have_unfound
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Sat, 7 May 2011 20:21:34 +0000 (13:21 -0700)]
osd: reset last_complete on mark_all_unfound_as_lost if no more missing
If we marked _all_ missing as lost, reset last_complete, since missing is
now empty!
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Sat, 7 May 2011 20:10:28 +0000 (13:10 -0700)]
osd: drop bad warning
The stats won't match reality if there are any missing or if there are any
snapped objects.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Colin Patrick McCabe [Mon, 9 May 2011 15:02:25 +0000 (08:02 -0700)]
rados tool: remove import/export
rados_sync replaces rados import / rados export
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Sage Weil [Sat, 7 May 2011 19:56:09 +0000 (12:56 -0700)]
.gitignore: rados_sync
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Sat, 7 May 2011 04:59:59 +0000 (21:59 -0700)]
osd: reassert our assert definition after including boostchart
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Sat, 7 May 2011 04:59:41 +0000 (21:59 -0700)]
assert: make our assert clobber any others too
Two can play this game, /usr/include/assert.h!
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Yehuda Sadeh [Sat, 7 May 2011 05:10:21 +0000 (22:10 -0700)]
osd: fix compilation for some g++ versions
wasn't compiling on lenny, g++ ver 4.3.2. Might be that
it's also due to differebt boost version.
Yehuda Sadeh [Sat, 7 May 2011 04:42:01 +0000 (21:42 -0700)]
rgw: minor cleanup
Yehuda Sadeh [Sat, 7 May 2011 04:32:43 +0000 (21:32 -0700)]
rgw: opening bucket io ctx stats bucket info if failed
this should trigger request of a new osdmap if we were racing
with bucket creation.
Colin Patrick McCabe [Sat, 7 May 2011 00:43:10 +0000 (17:43 -0700)]
Merge branch 'wip-rados-sync'
Colin Patrick McCabe [Sat, 7 May 2011 00:42:23 +0000 (17:42 -0700)]
test_rados_sync: check that second sync does nada
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Sat, 7 May 2011 00:33:07 +0000 (17:33 -0700)]
rados_sync: more fixes
* separate BackedUpObject::from_path and BackedUpObject::from_file.
* librados functions return negative values on error, but most may
return positive values on success, even things like setxattr.
* implement read_xattrs_from_rados
* change rados_sync printout a bit
* fix up test_rados_sync xattr tests
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Sage Weil [Fri, 6 May 2011 23:50:36 +0000 (16:50 -0700)]
osd: warn when obc locator doesn't match ops
This will hopefully help us track down #1028.
Signed-off-by: Sage Weil <sage@newdream.net>
Colin Patrick McCabe [Fri, 6 May 2011 23:41:28 +0000 (16:41 -0700)]
rados_sync: fix memory leak, other misc fixes
* Store BackedUpObject in auto_ptr to avoid memory leaks
* better comment for BackedUpObject::get_fs_path()
* xattrs: handle only_in_a list separately from diff list, since
librados complains if you call setxattr(foo) and there is already an
xattr foo.
* xattrs: add xattrs_to_str for debugging purposes
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Sage Weil [Fri, 6 May 2011 23:26:39 +0000 (16:26 -0700)]
osdmap: refactor mapping; don't assert on missing pool
We were asserting on a pg with a missing pool fed to pg_to_acting_osds
because raw_to_temp_osds called raw_pg_to_pg. Refactor to let us look up
the pool only once, and return gracefully instead of crashing.
Signed-off-by: Sage Weil <sage@newdream.net>
Colin Patrick McCabe [Fri, 6 May 2011 23:13:31 +0000 (16:13 -0700)]
test_rados_sync: test xattr preservation
test xattr preservation across import/export
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Fri, 6 May 2011 23:03:43 +0000 (16:03 -0700)]
test_rados_sync: add import/export test
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Fri, 6 May 2011 23:01:02 +0000 (16:01 -0700)]
rados_sync: complain if import src is inaccessible
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Fri, 6 May 2011 22:55:55 +0000 (15:55 -0700)]
rados_sync: fix --create for import
Fix import's pool creation faculty.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Fri, 6 May 2011 22:55:42 +0000 (15:55 -0700)]
add test_rados_sync.sh
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Sage Weil [Fri, 6 May 2011 22:23:44 +0000 (15:23 -0700)]
client: map file stripes to acting osds
Old result was just wrong if any osds were down.
Signed-off-by: Sage Weil <sage@newdream.net>
Colin Patrick McCabe [Fri, 6 May 2011 22:18:02 +0000 (15:18 -0700)]
rados_sync: fix import a bit
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Colin Patrick McCabe [Fri, 6 May 2011 22:11:44 +0000 (15:11 -0700)]
rados_sync: nicer error formatting
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Sage Weil [Fri, 6 May 2011 21:57:06 +0000 (14:57 -0700)]
common: be a little less scary in our startup warning
- be less scary
- be helpful and tell them where to go
Signed-off-by: Sage Weil <sage@newdream.net>