Commit Graph

14419 Commits

Author SHA1 Message Date
Yehuda Sadeh
0b6cb47d1c rgw: fix logging 2011-05-17 06:18:43 -07:00
Yehuda Sadeh
b7b47a02b9 rgw: fix typo 2011-05-17 04:24:51 -07:00
Yehuda Sadeh
8836b8447a rgw: don't log operations on unexisting bucket 2011-05-17 04:15:10 -07:00
Colin Patrick McCabe
e043962601 obsync: preserve user-defined metadata
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-16 17:12:45 -07:00
Colin Patrick McCabe
24233f210e 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>
2011-05-16 16:51:45 -07:00
Samuel Just
265ab99273 PG: Don't use exit to call proc_master_log
exit is also invoked when transitioning to Reset...

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-05-16 16:26:12 -07:00
Colin Patrick McCabe
f863862c67 obysnc: preserve Content-Type
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-16 15:56:40 -07:00
Sage Weil
a4bd854f86 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>
2011-05-16 14:47:29 -07:00
Colin Patrick McCabe
8e6b53fed1 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>
2011-05-16 14:25:33 -07:00
Sage Weil
3865ca5688 mon: health WARN if monitor quorum is incomplete
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-16 13:42:31 -07:00
Colin Patrick McCabe
a82e062e1c 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>
2011-05-16 10:54:13 -07:00
Colin Patrick McCabe
ac6afe066a obsync: FileStore: test for xattr support
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-16 10:42:36 -07:00
Yehuda Sadeh
1db29a2610 rados: don't force order on params 2011-05-16 06:24:02 -07:00
root
e93c0fc08b fix segfault introduced by commit de640d85fa
That commit introduces the line 'cur_con->put()' which has the possibility
of being called while cur_con is not initialized.
2011-05-15 20:56:07 -07:00
Sage Weil
cd75a9d2be osd: lazily close connections to down peers
If we hear from a peer that should be dead, tell them, but mark our
connection so that it will close after that message is delivered or if
it encounters any errors.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-14 14:07:29 -07:00
Sage Weil
a5b5aea4d8 msgr: mark_down_on_empty and mark_disposable
Mark a connection to close when messages are sent, and to close on any
error.  We can use this to tell people who should be dead that they should
be dead, but not waste resources reconnecting to them.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-14 14:07:28 -07:00
Sage Weil
5ecc42b5c2 PG: Remove downed osds from peer_missing and peer_info
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-14 13:46:09 -07:00
Samuel Just
ba753630dc PG: Only pull the master log from a member of the prior_set
There must be a member of the prior_set such that no other
osd has a more recent last_update.  This way, prior_set_affected
will ensure that we reset peering if the master log source
goes down.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-05-14 13:42:00 -07:00
Colin Patrick McCabe
6af0379e27 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>
2011-05-13 17:26:00 -07:00
Colin Patrick McCabe
56cab8ca1d 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>
2011-05-13 17:16:04 -07:00
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
Sage Weil
3d4971b326 Merge remote branch 'origin/osd_snap' into stable 2011-05-13 14:19:58 -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
Samuel Just
e0d83fe7db 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 13:56:35 -07:00
Sage Weil
89a821c6d9 radosgw_admin: fix clitest
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-13 13:13:39 -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
Sage Weil
91a268edc4 radosgw_admin: dump log by object
instead of only by date+bucket.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-12 11:01:06 -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
Colin Patrick McCabe
222126e882 rgw: in S3 PUT, don't crash on Content-Length == 0
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-11 17:51:06 -07:00