Commit Graph

14336 Commits

Author SHA1 Message Date
Colin Patrick McCabe
924c000b28 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>
2011-05-13 17:10:10 -07:00
Colin Patrick McCabe
298e5c7229 rgw_acl: move constructors, destructors to .cc
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-13 16:39:45 -07:00
Colin Patrick McCabe
bf81df27be obsync: fix eventual consistency handler
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-13 16:08:06 -07:00
Colin Patrick McCabe
12deaaa4a7 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>
2011-05-13 16:08:06 -07:00
Colin Patrick McCabe
6f4f702b9d boto_tool.py: add --rmobjects, --rm_rf
Add some options to help destroy buckets.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-13 16:08:06 -07:00
Colin Patrick McCabe
50e41fbe3f boto_tool.py: fix old-style argument-passing
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-13 16:08:06 -07:00
Colin Patrick McCabe
0dea92f603 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>
2011-05-13 16:08:06 -07:00
Colin Patrick McCabe
1c98da66c9 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>
2011-05-13 16:08:06 -07:00
Colin Patrick McCabe
883d180763 librgw: small error handling fix
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-13 16:08:06 -07:00
Colin Patrick McCabe
9847eb8b9f rgw: put XML-to-bin translation into a librgw
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-13 16:08:06 -07:00
Greg Farnum
e8504c0be1 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>
2011-05-13 16:28:48 -07:00
Greg Farnum
b8ddecce57 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>
2011-05-13 16:28:48 -07:00
Greg Farnum
a17db024f3 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>
2011-05-13 16:28:48 -07:00
Samuel Just
6e0e553208 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>
2011-05-13 14:07:49 -07:00
Brian Chrisman
72ca96e165 add basic test case for readdir_r
Signed-off-by: Brian Chrisman <brchrisman@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-13 09:59:53 -07:00
Brian Chrisman
8161122b1f 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>
2011-05-13 09:59:53 -07:00
Greg Farnum
84644dc561 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>
2011-05-12 15:43:23 -07:00
Greg Farnum
932f4eb018 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>
2011-05-12 15:36:26 -07:00
Greg Farnum
5e2b57d000 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>
2011-05-12 14:34:56 -07:00
Brian Chrisman
30491e8fcb updated test to cover "." directory stat
Signed-off-by: Brian Chrisman <brchrisman@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-12 08:50:13 -07:00
Brian Chrisman
4456b6c343 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>
2011-05-12 08:50:12 -07:00
Sage Weil
935f7dc1f2 mds: drop unneed default arg
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-11 21:21:41 -07:00
Sage Weil
2655a2b5db Merge branch 'osd_pgls' 2011-05-11 17:57:07 -07:00
Sage Weil
a6417c6a3a 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>
2011-05-11 17:56:32 -07:00
Sage Weil
8a1644ef46 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>
2011-05-11 17:55:00 -07:00
Sage Weil
5c382d3582 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>
2011-05-11 17:47:50 -07:00
Colin Patrick McCabe
1d29cc7c76 rgw: in S3 PUT, don't crash on Content-Length == 0
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-11 17:27:10 -07:00
Sage Weil
c155a2b77a 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>
2011-05-11 16:27:18 -07:00
Colin Patrick McCabe
d9896b3c31 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>
2011-05-11 14:00:51 -07:00
Sage Weil
82f9a923ea 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>
2011-05-11 13:58:09 -07:00
Samuel Just
f1af92fb3d 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>
2011-05-11 13:54:48 -07:00
Greg Farnum
2dc891f6da 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>
2011-05-11 13:27:07 -07:00
Greg Farnum
7aed34c21d 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>
2011-05-11 13:11:58 -07:00
Samuel Just
d3aa0c1e03 PG: Replicas send Notifies in response to queries
Replicas only send Infos during activate.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-05-11 11:56:55 -07:00
Sage Weil
151bf29d44 Merge branch 'next' 2011-05-11 11:42:27 -07:00
Colin Patrick McCabe
1429d776af 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>
2011-05-11 11:04:19 -07:00
Greg Farnum
484e6e6f96 rados_sync: tolerate ENOENT when deleting an object.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-05-11 11:37:30 -07:00
Greg Farnum
8d201d4bfb librbd: tolerate ENOENT when trying to delete an object.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-05-11 11:37:30 -07:00
Greg Farnum
140886c8c4 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>
2011-05-11 11:37:21 -07:00
Brian Chrisman
0f42099ae7 expand testceph to check xattrs
Signed-off-by: Brian Chrisman <brchrisman@gmail.com>
2011-05-11 10:28:48 -07:00
Brian Chrisman
b0e0c36170 client: support security. namespace
Signed-off-by: Brian Chrisman <brchrisman@gmail.com>
2011-05-11 10:28:44 -07:00
Brian Chrisman
3521771cb6 support for xattrs in libceph
Signed-off-by: Brian Chrisman <brchrisman@gmail.com>
2011-05-11 10:28:17 -07:00
Sage Weil
3a8f36f570 journaler: tolerate ENOENT when prezeroing
ENOENT is okay and expected.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-10 21:35:50 -07:00
Yehuda Sadeh
d2243e8221 osd: unlink of nonexistent object should return -ENOENT
fixes bug #1078.
2011-05-10 21:32:29 -07:00
Sage Weil
f114cf1807 monclient: fix crash on shutdown
cur_con may be null on shutdown.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-10 21:31:12 -07:00
Greg Farnum
6f3404568a Revert "osd: unlink of nonexistent object should return -ENOENT"
This reverts commit a7f87965f5.

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>
2011-05-10 17:46:13 -07:00
Colin Patrick McCabe
5999590853 Merge branch 'wip-merge-radostool-with-radossync' 2011-05-10 16:58:40 -07:00
Sage Weil
de640d85fa 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>
2011-05-10 16:54:23 -07:00
Colin Patrick McCabe
3425a8e503 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>
2011-05-10 16:45:39 -07:00
Colin Patrick McCabe
15756550fb 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>
2011-05-10 16:25:48 -07:00