Commit Graph

17838 Commits

Author SHA1 Message Date
Sage Weil 374fec4725 objector: document Objecter::init_ops()
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-01-27 12:23:33 -08:00
Sage Weil 6d37d5c95e objecter: fix out_* initialization
This looks more like the real cause for #1986.  Op ctor gets a vector of
ops but out_* aren't initialized to match.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-01-27 12:23:23 -08:00
Sage Weil 946da5a338 filestore: dump offending transaction on any error
Clean this code up to explicitly whitelist what is ok so that the flow is
less annoying to follow/maintain, and so that we dump the transaction
contents on whitelisted errors.

Signed-off-by: Sage Weil <sage@newdream.net>
Reviewed-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-01-27 10:45:21 -08:00
Sage Weil 6453123cfa objecter: warn when OSD returns mismatched op vector
The osd shouldn't do this (even though we should tolerate it).

Signed-off-by: Sage Weil <sage@newdream.net>
Reviewed-by: Greg Farnum <gregory.farnum@dreamhost.com>
2012-01-27 10:40:14 -08:00
Sage Weil 0cc26a94c8 objecter: fix bounds checking on op reply demuxing
We can't assume that the size of out_ops (from the reply) matches the
op->out_* vectors from our request state.  In particular, the out_ops might
be shorter than what we sent the OSD if the OSD was sloppy.  Check them.

We can assume that op->ops and op->out_* all match; assert as much in
op_submit().

Fixes: #1986
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Reviewed-by: Greg Farnum <gregory.farnum@dreamhost.com>
2012-01-27 10:39:49 -08:00
Sage Weil 9b554d4c7c mds: remove test assert
Grr!

Signed-off-by: Sage Weil <sage@newdream.net>
2012-01-27 10:01:47 -08:00
Sage Weil b8e6a6bd53 assert: include timestamp
Also drop quotes around thread id.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-01-27 06:32:37 -08:00
Sage Weil 2bc7105665 filestore: fix typo
Grr

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-01-25 14:07:06 -08:00
Sage Weil 0b088eb537 Merge branch 'wip-kb'
Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
2012-01-25 14:03:18 -08:00
Sage Weil ec7a1402d4 filestore: zero btrfs vol_args prior to ioctl
Just to be paranoid.  Nothing we haven't set *should* affect the ABI,
but...

Always do this immediately after declaration so that we catch everything.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-01-25 13:52:48 -08:00
Samuel Just 4454d39150 Merge remote branch 'upstream/wip-osd-clone-obc' 2012-01-25 13:58:58 -08:00
Sage Weil dedf57580b mon: num_kb -> num_bytes in cluster perfcounters
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-01-25 12:40:49 -08:00
Sage Weil 625b0b0291 osd: remove num_kb from object_stat_sum_t stats
This is redundant--we can just use num_bytes.  If we're worried about the
per-object overhead or rounding, we can factor in some overhead based on
num_objects.

And, the kb accounting has a bug (#1988).

Avoid changing the encoding at all for now.  Next time the encoding changes
we'll drop the old field.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-01-25 12:40:49 -08:00
Sage Weil acb164c81e osd: improve object context debug output
Include pointer.  This may help with #1979.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-01-25 09:56:58 -08:00
Sage Weil f16b38deae osd: track obc for clone from log replay
We need to keep an in-memory obc to track the state of the in-flight io
to disk.  This is analogous to when an object is pushed + written, and we
can share the same completion function.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-01-24 22:03:51 -08:00
Sage Weil 44b11441ad osd: set object_info_t::oid properly when recovering clones
I saw a case (#1973) where the clone had the oid set to the head.  That is
clearly wrong.  Not sure what damage this caused.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-01-24 21:34:27 -08:00
Sage Weil abc005a5df Merge remote branch 'gh/wip-filestore-errors' 2012-01-24 21:19:44 -08:00
Alexandre Oliva eec87bb862 package *.py* files
Some post-install rpmbuild defaults byte-compile all packaged python
files, so don't bother removing the .pyc files, and package .py* to
get both .pyo and .pyc.  It wastes a tiny little bit of space, but it
makes the spec file portable across a wider range of rpm and python
configurations.

Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicam.br>
Signed-off-by: Sage Weil <sage@newdream.net>
2012-01-24 21:18:49 -08:00
Josh Durgin 2c2cc1596c librbd: don't infinite loop when header is too large
Since snapshots are currently stored at the end of the header, having
many snapshots made the header larger than the read size, resulting in
an infinite loop when the offset was not changed.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
2012-01-24 17:08:28 -08:00
Samuel Just 746a230285 ReplicatedPG: data_subset may be empty during sub_op_push
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Reviewed-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-01-24 16:50:18 -08:00
Josh Durgin f3d200c0da filestore: fix non-::-prefixed close
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-01-24 13:23:21 -08:00
Josh Durgin a49a53d7b2 filestore: add debugging to each error case in lfn_open
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-01-24 13:22:21 -08:00
Sage Weil ae36f599f1 filestore: TEMP_FAILURE_RETRY on ::close(2)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-01-24 13:16:52 -08:00
Sage Weil a43937f05e filestore: return -errno from lfn_open
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-01-24 13:16:52 -08:00
Sage Weil 0fd6ca9a8e filestore: audit + clean up error checks
- use temp var for errno
- in general return -errno from helpers

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-01-24 13:16:52 -08:00
Sage Weil 1e4210937f Merge commit '9dc7b9233b985bf859751fc89a5b02253e829836'
Reviewed-by: Greg Farnum <gregory.farnum@dreamhost.com>
2012-01-23 13:50:19 -08:00
Sage Weil 9dc7b9233b rgw: fix warning
rgw/rgw_rest.cc:258: warning: comparison between signed and unsigned integer expressions

Signed-off-by: Sage Weil <sage@newdream.net>
2012-01-23 12:50:06 -08:00
Sage Weil cfe1d011e8 ceph: bail out on first failing command
Signed-off-by: Sage Weil <sage@newdream.net>
2012-01-23 12:50:06 -08:00
Sage Weil 54a76734b1 ceph: don't write output on error
Accumulate all output, and write it at the end.  This way we can avoid
writing it if any of the commands fail.

Fixes: #1954
Signed-off-by: Sage Weil <sage@newdream.net>
2012-01-23 12:50:06 -08:00
Sage Weil 7ce544e640 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>
2012-01-23 10:21:22 -08:00
Yehuda Sadeh d9eedf534b rgw: fix warning in 32bit arch 2012-01-23 09:53:24 -08:00
Josh Durgin 92a8f5e73e pg: unindex entries when clearing or removing from the log
Leaving the index around could cause use of the indexes to access
freed memory.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-01-23 09:02:25 -08:00
Sage Weil 5451d871cf 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>
2012-01-23 09:02:14 -08:00
Yehuda Sadeh aea6a305e6 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.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-01-20 12:56:36 -08:00
Sage Weil fdaf91e250 osd: implement --dump-journal
Dump the contents of the journal to stdout in text form.  Useful for
debugging.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-01-20 10:55:20 -08:00
Yehuda Sadeh a52762ac42 rgw: read large bucket directory correctly
Issue #1955. When there wre too many buckets, we failed reading
the bucket directory.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-01-20 10:50:36 -08:00
Yehuda Sadeh 6c275c8195 rgw: fix warning
Signed-off-by: Yehuda Sadeh <yehuda.sadeh@dreamhost.com>
2012-01-19 09:11:09 -08:00
Sage Weil 3650fd61e3 Merge remote branch 'gh/wip-op-data-mux'
Reviewed-by: Greg Farnum <greg.farnum@dreamhost.com>
Reviewed-by: Yehuda Sadeh <yehuda.sadeh@dreamhost.com>
2012-01-18 20:41:04 -08:00
Neil Horman e016cca9be 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>
2012-01-18 15:52:35 -08:00
Yehuda Sadeh f1f75dd476 Merge branch 'wip-rgw-simplelog' 2012-01-18 11:46:24 -08:00
Yehuda Sadeh 8a9252f9cf rgw: adjust high level debug level
setting it to 2 instead of 1

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-01-18 11:37:59 -08:00
Sage Weil b890838c03 Merge remote branch 'gh/wip-rgw-simplelog'
* gh/wip-rgw-simplelog:
  rgw: add timestamp to high level log
  rgw: log host_bucket, http status
  rgw: simple request logging

Reviewed-by: Sage Weil <sage@newdream.net>
2012-01-18 11:25:13 -08:00
Yehuda Sadeh 148031b7ea 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.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-01-17 23:42:08 -08:00
Yehuda Sadeh 731c8832e8 rgw: initialize tm before calling strptime
strptime assumes tm is already initialized.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-01-17 23:40:52 -08:00
Sage Weil 0aab08902a objecter: some helpful multiop result debug output
Signed-off-by: Sage Weil <sage@newdream.net>
2012-01-17 21:59:32 -08:00
Sage Weil 6f35e32298 objecter: make getxattrs set rval on decode error
Signed-off-by: Sage Weil <sage@newdream.net>
2012-01-17 21:32:11 -08:00
Sage Weil f441adfd76 objecter: add stat ops to op vector!
They work better that way.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-01-17 21:31:56 -08:00
Sage Weil 1d5c8fd306 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).

Signed-off-by: Sage Weil <sage@newdream.net>
2012-01-17 21:10:05 -08:00
Sage Weil 2bffed3bc9 Merge remote branch 'gh/master' into wip-op-data-mux 2012-01-17 17:33:57 -08:00
Sage Weil 905e8d80de osd: make in/outdata split/merge helpers static OSDOp methods
Avoid defining new global functions.

Also add basic doxygen descriptions.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-01-17 17:33:37 -08:00