Commit Graph

20458 Commits

Author SHA1 Message Date
Sage Weil
74e620511e CephContext: drop obsolete ceph_destroy_context
Drop this useless helper and call cct->put() directly.  The comment that
this can't be used after global_init is no longer relevant as long as
nobody puts a reference they don't own... and nobody owns
g_ceph_context.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-09 21:32:15 -07:00
Sage Weil
074df64d46 librados: use CephContext ref counts
Take ownership of the passed cct.  Drop it when we destroy the
RadosClient.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-09 21:27:11 -07:00
Sage Weil
6aa9f496f5 CephContext: ref count
These get shared via the librados API.

Fixes: #845
Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-09 21:27:11 -07:00
Sage Weil
58f46bb94f test_stress_watch: just one librados instance
This was creating a new cluster connection/session per iteration, and
along with it a few service threads and sockets and so forth.

Unfortunately, librados leaks like a sieve, starting with CephContext
and ceph::crypto::init().  See #845 and #2067.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-09 21:27:11 -07:00
Samuel Just
67a5e75ed6 ReplicatedPG: don't warn if backfill peer stats don't match
pinfo.stats might be wrong if we did log-based recovery on the
backfilled portion in addition to continuing backfill.

bug #2750

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-07-09 18:01:28 -07:00
Samuel Just
645ac87b84 ReplicatedPG: fix replay op ordering
After a client reconnect, the client replays outstanding ops.  The
OSD then immediately responds with success if the op has already
committed (version < ReplicatedPG::get_first_in_progress).
Otherwise, we stick it in waiting_for_ondisk to be replied to when
eval_repop concludes that waitfor_disk is empty.

Fixes #2508

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-07-09 18:01:28 -07:00
Josh Durgin
67361c10ea librbd: return an error when removing a non-existent image
Try treating the image as new format if it's not in the old-style
directory, which is the last step in old-style removal. Then if the
image is not found in the new-style directory, -ENOENT will be
returned, preserving the semantics that existed prior to
6f096b6cdc.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-07-09 17:27:42 -07:00
Dan Mick
ec87a1ea43 cls_rbd: add logging for failed set_parent steps
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-07-09 13:58:02 -07:00
Sage Weil
96ca508dcd Merge remote-tracking branch 'gh/wip-rbd-id' 2012-07-09 11:43:05 -07:00
John Wilkins
b23e4e5894 doc: Removed legacy paths and keyname settings from examples.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-07-09 11:06:27 -07:00
Sage Weil
b387077b1d debian: include librados-config in librados-dev
Reported-by: Laszlo Boszormenyi <gcs@debian.hu>
Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-08 20:33:12 -07:00
Sage Weil
8e5fe62a43 doc: remove reference to 'ceph stop' command
It doesn't exist anymore.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-08 14:39:52 -07:00
Sage Weil
dddf783fa4 Merge branch 'wip-cond'
Reviewed-by: Greg Farnum <greg@inktank.com>
2012-07-06 20:01:33 -07:00
Sage Weil
03c2dc244a lockdep: increase max locks
Hit this limit with the rados api tests.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-06 16:45:29 -07:00
Sage Weil
b554d112c1 config: add unlocked version of get_my_sections; use it internally
Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-06 16:45:24 -07:00
Sage Weil
01da287b8f config: fix lock recursion in get_val_from_conf_file()
Introduce a private, already-locked version.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-06 16:45:08 -07:00
Sage Weil
c73c64a0f7 config: fix recursive lock in parse_config_files()
The _impl() helper is only called from parse_config_files(); don't retake
the lock.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-06 16:45:05 -07:00
Yehuda Sadeh
97c1562dda rgw: handle response-* params
Handle response-* params that set response header field values.
Fixes #2734, #2735.
Backport: argonaut

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-07-06 16:43:57 -07:00
Sage Weil
6646e891ff rgw: initialize fields of RGWObjEnt
This fixes various valgrind warnings triggered by the s3test
test_object_create_unreadable.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-06 16:43:07 -07:00
Yehuda Sadeh
b33553aae6 rgw: handle response-* params
Handle response-* params that set response header field values.
Fixes #2734, #2735.
Backport: argonaut

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-07-06 16:44:58 -07:00
Sage Weil
74f687501a osd: add missing formatter close_section() to scrub status
Also add braces to make the open/close matchups easier to see.  Broken
by f366173927.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-06 15:17:30 -07:00
Mike Ryan
020b299613 pg: report scrub status
Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
2012-07-06 13:45:06 -07:00
Mike Ryan
db6d83b3ed pg: track who we are waiting for maps from
Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
2012-07-06 13:45:04 -07:00
Mike Ryan
e1d4855fa1 pg: reduce scrub write lock window
Wait for all replicas to construct the base scrub map before finalizing
the scrub and locking out writes.

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
2012-07-06 13:45:02 -07:00
John Wilkins
72bf66f654 doc: added some discussion to libvirt.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-07-06 12:21:34 -07:00
Sage Weil
1316f86827 cond: cleanup
Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-06 12:14:45 -07:00
Sage Weil
da7a3284de cond: drop unused Wait variant
This was used for debugging forever ago.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-06 12:14:44 -07:00
Sage Weil
9c6fdd5a92 librados: drop unused local variables
This is unused boilerplate cruft.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-06 12:14:44 -07:00
Sage Weil
b5693a6ecb librados: take lock when signaling notify cond
When we are signaling the cond to indicate that a notify is complete,
take the appropriate lock.  This removes the possibility of a race
that loses our signal.  (That would be very difficult given that there
are network round trips involved, but this makes the lock/cond usage
"correct.")

Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-06 12:14:44 -07:00
Sage Weil
7c919e9b3a workqueue: kick -> wake or _wake, depending on locking
Break kick() into wake() and _wake() methods, depending on whether the
lock is already held.  (The rename ensures that we audit/fix all
callers.)

Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-06 12:14:44 -07:00
Sage Weil
8de0c227e2 cond: assert that we are holding the same mutex as the waiter
Try to verify that we are holding the same mutex that the waiter is
waiting on.  Specifically:

 * only wait on a single mutex for this cond
 * remember which mutex that is
 * if we signal and someone has waited, try to make sure we are holding
   the mutex as well.  (Mutex::is_locked() is unsufficient here; it doesn't
   ensure that *our* thread tool the mutex.  it is necessary, though!)

Introduce a sloppy_signal() method that can be used if we actually mean
to signal the cond without holding the proper lock (and, presumably,
don't care about losing a signal).

Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-06 12:07:10 -07:00
Sage Weil
b486f2fff7 client: fix locking for SafeCond users
Need to wait on flock, not client_lock.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-06 12:07:10 -07:00
John Wilkins
5746345587 Merge branch 'master' of github.com:ceph/ceph 2012-07-06 11:29:55 -07:00
John Wilkins
540c2c3a06 doc: Minor cleanup on deploy with Chef.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-07-06 11:29:31 -07:00
Yehuda Sadeh
3df51040b1 rgw: don't store bucket info indexed by bucket_id
Issue #2701. This info wasn't really used anywhere and we weren't
removing it. It was also sharing the same pool namespace as the
info indexed by bucket name, which is bad.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-07-06 10:18:09 -07:00
Yehuda Sadeh
27409aa161 rgw: don't store bucket info indexed by bucket_id
Issue #2701. This info wasn't really used anywhere and we weren't
removing it. It was also sharing the same pool namespace as the
info indexed by bucket name, which is bad.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-07-06 10:17:21 -07:00
Yehuda Sadeh
84ba6bf6e1 Merge branch 'stable' into next 2012-07-06 10:16:07 -07:00
Yehuda Sadeh
9814374a2b test_rados_tool.sh: test copy pool
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-07-06 10:15:34 -07:00
Yehuda Sadeh
d75100667a rados tool: copy object in chunks
Instead of reading the entire object and then writing it,
we read it in chunks.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-07-06 10:15:34 -07:00
Yehuda Sadeh
16ea64fbde rados tool: copy entire pool
A new rados tool command that copies an entire pool
into another existing pool.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-07-06 10:15:34 -07:00
Yehuda Sadeh
960c212480 rados tool: copy object
New rados command: rados cp <src-obj> [dest-obj]

Requires specifying source pool. Target pool and locator can be specified.
The new command preserves object xattrs and omap data.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-07-06 10:15:34 -07:00
Yehuda Sadeh
d59b2db4ab Merge remote-tracking branch 'origin/stable' into next 2012-07-06 10:12:23 -07:00
Sage Weil
23d31d3e2a ceph.spec.in: add ceph-disk-{activate,prepare}
Reported-by: Jimmy Tang <jtang@tchpc.tcd.ie>
Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-06 08:47:44 -07:00
Sage Weil
668ce00a55 osd: make on_removal() pure virtual
Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-05 21:28:06 -07:00
Sage Weil
3d00130bcd osd: fix PG dtor compile error
We need at least none non-pure virtual method to tell gcc where the
vtable goes.  The destructor wins!

libosd.a(libosd_a-ReplicatedPG.o): In function `~PG':
/home/sage/src/ceph/src/osd/PG.h:1367: undefined reference to `vtable for PG'
libosd.a(libosd_a-ReplicatedPG.o):(.rodata._ZTI12ReplicatedPG[typeinfo for ReplicatedPG]+0x10): undefined reference to `typeinfo for PG'
libosd.a(libosd_a-PG.o): In function `PG':
/home/sage/src/ceph/src/osd/PG.cc:85: undefined reference to `vtable for PG'
...

Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-05 21:26:27 -07:00
Sage Weil
6e3fb20dec Merge remote-tracking branch 'gh/wip_osd_threading' 2012-07-05 17:20:14 -07:00
Samuel Just
09af670b1d PG,ReplicatedPG: on_removal must handle repop and watcher state
on_removal is now in ReplicatedPG in order to handle watcher state
and repop state.  Addionally, workqueue dequeues are handled already
in OSD::_remove_pg.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-07-05 17:18:55 -07:00
Samuel Just
691741985a OSDMonitor: disable cluster snapshot
The map handling changes broke cluster snapshot support.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-07-05 17:18:55 -07:00
Samuel Just
8e93e8b00a OSD: ensure that OpSequencer lives through on_commit callback
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-07-05 17:18:55 -07:00
Samuel Just
816d424727 ReplicatedPG.cc: C_OSD_CommittedPushedObject move pg->put() to finish
This should clarify the ownership of the pg ref.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-07-05 17:18:55 -07:00