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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>