Sage Weil [Mon, 23 Jan 2012 18:21:04 +0000 (10:21 -0800)]
osd: ignore MInfoRec, MNotifyRec in WaitActingChange
We should ignore logs, infos, and notifies while we are waiting for the
map to change. Peering has reached a dead-end (we need acting to change)
and we will redo our work when that happens. That includes the replicas
resending notifies.
Fixes: #1958 Signed-off-by: Sage Weil <sage.weil@dreamhost.com> Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
Sage Weil [Thu, 19 Jan 2012 02:01:09 +0000 (18:01 -0800)]
osd: do not clobber log on backfill progress update
This is unnecessary and counterproductive, since the log is used to detect
dup ops. It's an artifact of an earlier backfill iteration that didn't
preserve the log on the backfill target.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Yehuda Sadeh [Fri, 20 Jan 2012 20:54:14 +0000 (12:54 -0800)]
rgw: read_user_buckets() fix redone
The problem with the original fix is that it wasn't atomic. Going back
to the original inefficient (though atomic) method. We should limit
the number of buckets per user anyway, and shouldn't get into a point
where this code is actually execised.
Neil Horman [Wed, 18 Jan 2012 17:00:14 +0000 (12:00 -0500)]
Convert mount.ceph to use KEY_SPEC_PROCESS_KEYRING
having mount.ceph use KEY_SPEC_USER_KEYRING to pass keys to the kernel has
several disadvantages:
1) It leaves the key setting in the uid_keyring, which is reachable from the
session keyring via a link (see keyctl list <root session keyring ref>). This
means its accessible to other processes in the same session that don't need
access to it, even after the kernel is done with it.
2) The user keyring has some very counter-intuitive semantics as far as keyring
permissions goes. The user keyring is access via a link from the session
keyring, which a process may not have permission to access in some situations.
For instance if mount.ceph is executed via su without having started a new
session, mount.ceph will not have access to the uid keyring unless the calling
proces (in this case su) has granted access permission. The result is a -EPERM
error when executing mount.ceph to a cephx enabled server. If the same command
is attempted in a new root session (e.g. su - or su -l), the mount command will
work fine
Switching the mount.ceph command to use the KEY_SPEC_PROCESS_KEYRING solves both
of these problems. By using this keyring, accessibility is guaranteed because
its added and accessed in the same process context both in user space and the
kernel, assuring aceesability, despite the session specifics. It also ensures
that the key will get cleaned up after the mount.ceph process exits
automatically, since there is no longer a need for it (the kernel clones the key
during the mount process and releases it on unmount).
I've tested this here on my local ceph cluster, and it works properly under both
su and su -l .
Signed-off-by: Neil Horman <nhorman@tuxdriver.com> CC: Josh Durgin <josh.durgin@dreamhost.com>
Yehuda Sadeh [Wed, 18 Jan 2012 07:42:08 +0000 (23:42 -0800)]
rgw: fix intent log processing
Intent log processing was completely broken. First, it wasn't
parsing the date correctly (due to failure to initalize strptime).
Second, it was trying to load the entire log to memory in one
piece (and in a racy way). This fixed bug #1948.
Sage Weil [Wed, 18 Jan 2012 05:10:05 +0000 (21:10 -0800)]
objecter: gift reply data to outbl _after_ demuxing
Divvy up the result bl first, then gift the whole shebang to outbl. If
we gift it first, there's nothing to demux (since we move intead of copy
the bufferlist ptrs).
Sage Weil [Tue, 17 Jan 2012 19:41:15 +0000 (11:41 -0800)]
filestore: overwrite fsid during --mkfs
This mainly matters because read_fsid() now looks at the file size to
determine if it's an old- or new-style fsid, and not overwriting mean a
downgrade confuses things. Not that anyone would do that, but...
Sage Weil [Thu, 12 Jan 2012 23:42:59 +0000 (15:42 -0800)]
librados: specify read return value pointers in ObjectReadOperation methods
This lets librados do the work of parsing the reply from compound
operations, instead of requiring callers to have knowledge of the internal
encodings.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Sage Weil [Thu, 12 Jan 2012 23:09:18 +0000 (15:09 -0800)]
osd: fill in empty item in peer_missing for strays
If we search_for_missing() on a host, make a corresponding entry in our
peer_missing map (if it isn't already there). This ensure we get (empty)
entries for strays, which makes all_unfound_are_queried_or_lost() happy.
Samuel Just [Thu, 12 Jan 2012 21:13:47 +0000 (13:13 -0800)]
ReplicatedPG: Do a write even for 0 length operation
Otherwise, a 0 length write to an offset past the end of the file will
cause the internal accounting to reflect the full size of the file, but
not the file on disk.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Sage Weil [Thu, 12 Jan 2012 20:59:07 +0000 (12:59 -0800)]
qa/client/gen-1774.sh
Capture Alexandre's script for reproducing #1774 here for posterity, until
we write a properly harnessed test for this. Currently, workunits can't
mount/unmount, and we don't have a way to make ceph-fuse drop it's cache.
Sage Weil [Thu, 12 Jan 2012 19:46:27 +0000 (11:46 -0800)]
osd: fix PG::Log::copy_up_to() tail
The tail needs to refer to the entry preceeding the first entry in the
log. This updates copy_up_to() to match the basic structure of the other
copy_*() methods.
Sage Weil [Thu, 12 Jan 2012 19:07:02 +0000 (11:07 -0800)]
osd: reset last_complete on backfill restart
Since last_backfill is hobject_t(), we can set this equal to last_update.
This fixes a problem where last_complete preceeds the abbreviated log we
send to the replica below.
Sage Weil [Thu, 12 Jan 2012 18:01:40 +0000 (10:01 -0800)]
COPYING: note licenses for all files, not just the default
This (mostly) copies debian/copyright for now, but there are format
restrictions for that file. Suggestions for a cleaner way to handle this
are welcome. In the meantime, this is better...
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>