Commit Graph

14351 Commits

Author SHA1 Message Date
Sage Weil
d90458a933 osdmap: set type 0 to 'osd'
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-17 13:58:26 -07:00
Sage Weil
f6dc19e344 crushtool: fix error handling for adding devices
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-17 13:58:17 -07:00
Sage Weil
c73e37b0c8 crushtool: fix unittest map
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-17 13:35:04 -07:00
Sage Weil
c9a257e362 crushtool: fix usage
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-17 13:33:42 -07:00
Sage Weil
e46804bbf8 osdmap: use straw buckets everywhere by default
We were using uniform for the leaf buckets. Use straw instead.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-17 13:30:49 -07:00
Sage Weil
d40010bd55 crush: add add_item and reweight functions
Insert a device at a particular point in the hierarchy, and adjust weights
as appropriate.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-17 13:30:49 -07:00
Sage Weil
042139d1ac crushtool: include cumulative bucket weight in decompile
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-17 13:03:38 -07:00
Sage Weil
9a2def6e5a crush: fix up constness some
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-17 13:03:01 -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
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
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
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