]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agouclient: do not accept max_size changes unless they're from auth mds.
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>
14 years agoMDS: do journal on rename if we're auth for the inode.
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>
14 years agoMDS: don't journal slave ops if we only have caps.
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>
14 years agoPG: search_for_missing takes the other osd's missing set
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>
14 years agoadd basic test case for readdir_r
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>
14 years agofix null deref when callback invoked en route from readdir_r rather than readdirplus_r
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>
14 years agouclient: compare _revoked_ caps when deciding whether to release.
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>
14 years agouclient: clear out cap->wanted when caps get revoked.
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>
14 years agouclient: be more careful about sending caps.
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>
14 years agoupdated test to cover "." directory stat
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>
14 years agoAdd analogous special case for "." directory alongside ".." in _lookup
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>
14 years agomds: drop unneed default arg
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>
14 years agoMerge branch 'osd_pgls'
Sage Weil [Thu, 12 May 2011 00:57:07 +0000 (17:57 -0700)]
Merge branch 'osd_pgls'

14 years agoobjecter: set pgls start_epoch field
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>
14 years agoosd: add pgls start_epoch field
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>
14 years agoobjecter: fix calc_op_budget bit mask checks
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>
14 years agorgw: in S3 PUT, don't crash on Content-Length == 0
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>
14 years agoosd: prepend missing objects to pgls results
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>
14 years agoobsync: handle eventual consistency issues
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>
14 years agoosd: key Missing::rmissing on version (not eversion)
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>
14 years agoPG: choose_log_location, fix error when scanning up set
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>
14 years agoClock: add new clock_offset config option, and use it in g_clock.now()
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>
14 years agoclock: remove cruft.
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>
14 years agoPG: Replicas send Notifies in response to queries
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>
14 years agoMerge branch 'next'
Sage Weil [Wed, 11 May 2011 18:42:27 +0000 (11:42 -0700)]
Merge branch 'next'

14 years agotest-obsync.sh: fix obsync unit tests
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>
14 years agorados_sync: tolerate ENOENT when deleting an object.
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>
14 years agolibrbd: tolerate ENOENT when trying to delete an object.
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>
14 years agomdcache: check return values when purging an inode.
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>
14 years agoexpand testceph to check xattrs
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>
14 years agoclient: support security. namespace
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>
14 years agosupport for xattrs in libceph
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>
14 years agojournaler: tolerate ENOENT when prezeroing
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>
14 years agoosd: unlink of nonexistent object should return -ENOENT
Yehuda Sadeh [Tue, 10 May 2011 21:20:19 +0000 (14:20 -0700)]
osd: unlink of nonexistent object should return -ENOENT

fixes bug #1078.

14 years agomonclient: fix crash on shutdown
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>
14 years agoRevert "osd: unlink of nonexistent object should return -ENOENT"
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>
14 years agoMerge branch 'wip-merge-radostool-with-radossync'
Colin Patrick McCabe [Tue, 10 May 2011 23:58:40 +0000 (16:58 -0700)]
Merge branch 'wip-merge-radostool-with-radossync'

14 years agomonclient: maintain explicit session connection; ignore stray messages
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>
14 years agorados tool: integrate rados_sync with rados tool
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>
14 years agorados tool: change initial argument parsing a bit
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>
14 years agolibrados: don't crash if we call connect twice
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>
14 years agoMerge remote branch 'origin/stable'
Sage Weil [Tue, 10 May 2011 21:33:30 +0000 (14:33 -0700)]
Merge remote branch 'origin/stable'

14 years agoosd: unlink of nonexistent object should return -ENOENT
Yehuda Sadeh [Tue, 10 May 2011 21:20:19 +0000 (14:20 -0700)]
osd: unlink of nonexistent object should return -ENOENT

fixes bug #1078.

14 years agorados_sync: implement --delete-after, fix bugs
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>
14 years agoAllow dashes in ceph_argparse, etc.
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>
14 years agotest_rados_sync: test --force
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>
14 years agorados_sync: support --force
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>
14 years agoosd: initialize oi.oloc if on-disk value is bogus
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>
14 years agorgw: switch bucket creation operations
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.

14 years agoosd: rename Pending -> WaitActingChange
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>
14 years agoosd: log debug output for Crashed state
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>
14 years agoosd: wait for up_thru updates
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>
14 years agoosd: fix pollution of peer_info
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>
14 years agoosd: fix osd$foo typos
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>
14 years agoosd: simplify build_might_have_unfound
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>
14 years agoosd: reset last_complete on mark_all_unfound_as_lost if no more missing
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>
14 years agoosd: drop bad warning
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>
14 years agorados tool: remove import/export
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>
14 years ago.gitignore: rados_sync
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>
14 years agoosd: reassert our assert definition after including boostchart
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>
14 years agoassert: make our assert clobber any others too
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>
14 years agoosd: fix compilation for some g++ versions
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.

14 years agorgw: minor cleanup
Yehuda Sadeh [Sat, 7 May 2011 04:42:01 +0000 (21:42 -0700)]
rgw: minor cleanup

14 years agorgw: opening bucket io ctx stats bucket info if failed
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.

14 years agoMerge branch 'wip-rados-sync'
Colin Patrick McCabe [Sat, 7 May 2011 00:43:10 +0000 (17:43 -0700)]
Merge branch 'wip-rados-sync'

14 years agotest_rados_sync: check that second sync does nada
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>
14 years agorados_sync: more fixes
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>
14 years agoosd: warn when obc locator doesn't match ops
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>
14 years agorados_sync: fix memory leak, other misc fixes
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>
14 years agoosdmap: refactor mapping; don't assert on missing pool
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>
14 years agotest_rados_sync: test xattr preservation
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>
14 years agotest_rados_sync: add import/export test
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>
14 years agorados_sync: complain if import src is inaccessible
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>
14 years agorados_sync: fix --create for import
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>
14 years agoadd test_rados_sync.sh
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>
14 years agoclient: map file stripes to acting osds
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>
14 years agorados_sync: fix import a bit
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>
14 years agorados_sync: nicer error formatting
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>
14 years agocommon: be a little less scary in our startup warning
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>
14 years agorados_sync: misc bugfixes
Colin Patrick McCabe [Fri, 6 May 2011 21:47:43 +0000 (14:47 -0700)]
rados_sync: misc bugfixes

Avoid using a temporary c_str pointer when it goes out of scope.

Complain if XATTR_FULLNAME is empty, as well as missing.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorados_sync: nicer printouts
Colin Patrick McCabe [Fri, 6 May 2011 21:37:55 +0000 (14:37 -0700)]
rados_sync: nicer printouts

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoman: mkcephfs: small fixes
Sage Weil [Fri, 6 May 2011 21:31:57 +0000 (14:31 -0700)]
man: mkcephfs: small fixes

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agorados_sync: do_export: fix diff'ing
Colin Patrick McCabe [Fri, 6 May 2011 21:28:02 +0000 (14:28 -0700)]
rados_sync: do_export: fix diff'ing

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorados_sync: more improvements to xattr_test
Colin Patrick McCabe [Fri, 6 May 2011 21:22:21 +0000 (14:22 -0700)]
rados_sync: more improvements to xattr_test

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomkcephfs.man: update man page
Sage Weil [Fri, 6 May 2011 21:21:53 +0000 (14:21 -0700)]
mkcephfs.man: update man page

Not beautiful, but at least it's accurate.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agorados_sync: Add xattr_test
Colin Patrick McCabe [Fri, 6 May 2011 21:13:49 +0000 (14:13 -0700)]
rados_sync: Add xattr_test

Add xattr_test to test if the underlying filesystem supports xattrs

Fix BackedUpObject::get_fs_path a bit.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMerge branch 'stable'
Sage Weil [Fri, 6 May 2011 20:43:05 +0000 (13:43 -0700)]
Merge branch 'stable'

14 years agoosd: used fixed size types for fiemap/mapext/sparseread encoding
Sage Weil [Fri, 6 May 2011 20:42:23 +0000 (13:42 -0700)]
osd: used fixed size types for fiemap/mapext/sparseread encoding

The client expects <uint64_t,uint64_t>, so this breaks on any 32-bit osd.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocfuse: don't -d
Sage Weil [Fri, 6 May 2011 20:15:32 +0000 (13:15 -0700)]
cfuse: don't -d

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: assert auth on journal_cow_dentry
Sage Weil [Fri, 6 May 2011 20:15:03 +0000 (13:15 -0700)]
mds: assert auth on journal_cow_dentry

We have no business doing cow (or journaling) non-auth dentries.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: don't journal src when not auth on rename
Sage Weil [Fri, 6 May 2011 20:14:42 +0000 (13:14 -0700)]
mds: don't journal src when not auth on rename

If we aren't auth for the srcdn, don't put it in the journal, or else we'll
barf on journal replay.

This fixes a crash reproduced with

sudo mkdir mnt/foo
sudo touch mnt/foo/a
sudo ln mnt/foo/a mnt/foo/b
sudo rm mnt/foo/a

sudo mkdir mnt/bar
sudo touch mnt/bar/nothing

./ceph mds tell 0 export_dir /bar 1

sudo mv mnt/foo/b mnt/bar/b

+ mds restart.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoPG: choose_acting needs the value of the osd, not its index
Josh Durgin [Fri, 6 May 2011 19:23:45 +0000 (12:23 -0700)]
PG: choose_acting needs the value of the osd, not its index

This caused two osds to keep flipping the acting set between [2] and
[0,2] when osd.0 was far behind and needed a backlog. This is visible
as toggling between peering and peering+degraded.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoCreate rados_sync tool to back up rados pools
Colin Patrick McCabe [Fri, 6 May 2011 19:05:17 +0000 (12:05 -0700)]
Create rados_sync tool to back up rados pools

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agostop.sh: Avoid bashisms.
Tommi Virtanen [Fri, 6 May 2011 18:10:16 +0000 (11:10 -0700)]
stop.sh: Avoid bashisms.

I have a habit of running "sh -x stop.sh" whenever it seems
to fail, and that runs it with dash, not bash. Since it
doesn't actually need the bashisms, remove them.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agostop.sh: Whitespace.
Tommi Virtanen [Fri, 6 May 2011 18:07:05 +0000 (11:07 -0700)]
stop.sh: Whitespace.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoosd: fix include in cosd.cc too
Sage Weil [Fri, 6 May 2011 16:26:59 +0000 (09:26 -0700)]
osd: fix include in cosd.cc too

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: rearrange #includes to get our assert
Sage Weil [Fri, 6 May 2011 16:26:32 +0000 (09:26 -0700)]
osd: rearrange #includes to get our assert

Make sure we include boostchart headers before our common/assert.h so that
ours clobbers theirs.  Otherwise the generic one will clobber ours and our
assert output won't get logged or be as pretty.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomon: fix multi-osd 'ceph in|out N..' operations
Sage Weil [Thu, 5 May 2011 23:27:20 +0000 (16:27 -0700)]
mon: fix multi-osd 'ceph in|out N..' operations

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoceph_argparse: ignore dashes after equals sign
Colin Patrick McCabe [Thu, 5 May 2011 23:17:34 +0000 (16:17 -0700)]
ceph_argparse: ignore dashes after equals sign

When parsing argv, ignore dashes after equals signs. This is so that
things like --log-file=/tmp/foo-file will work correctly.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMerge branch 'wip_pg_refactor'
Sage Weil [Thu, 5 May 2011 23:17:21 +0000 (16:17 -0700)]
Merge branch 'wip_pg_refactor'