Commit Graph

21302 Commits

Author SHA1 Message Date
John Wilkins
f60ea3836b :doc: Removing old init section.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-18 11:02:41 -07:00
Josh Durgin
4f3642c5f4 rbd: only open the destination pool for import
Otherwise importing into another pool when the default pool, rbd,
doesn't exist results in an error trying to open the rbd pool.

Reported-by: Sébastien Han <han.sebastien@gmail.com>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-18 10:10:50 -07:00
Gary Lowell
46883a5a0f ceph.spec.in: Add new rados libraries, libcls_kvs.so and libcls_refcount.so. 2012-09-17 22:21:15 -07:00
Sage Weil
cb49823569 osd: default journal size to 1 GB
The default is used to create or extend the journal when it is a file.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-17 18:23:39 -07:00
Sage Weil
6b0c9ffc8b filejournal: do not enforce that bdev size >= osd journal size
If the configure osd journal size is > the block device size, warn, but
do not generate an error and abort startup.  This makes it safe to have
a default 'osd journal size' value of, say, 1 GB without fear of breaking
existing clusters with smaller jouranl block devices.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Tommi Virtanen <tv@inktank.com>
2012-09-17 18:23:39 -07:00
Sage Weil
de930440e7 remove obsync
This now lives at http://github.com/ceph/obsync

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-17 18:23:39 -07:00
John Wilkins
f1819f05dc :doc: Changed from bullet list to section titles.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-17 16:25:54 -07:00
John Wilkins
18cf1b6d61 :doc: Usage consistent with Tyler's notes.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-17 16:01:36 -07:00
John Wilkins
da1a9f914f :doc: Corrected a path.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-17 16:00:58 -07:00
John Wilkins
00e58a509d :doc: Addresses DOCUMENTATION #3155
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-17 15:59:45 -07:00
Josh Durgin
f46a5f1c79 Merge branch 'wip-rbd-import' 2012-09-17 08:27:03 -07:00
Yehuda Sadeh
4251d783db rgw: update cache interface
RGWRados::delete_obj() was updated in commit
93218aeab7, but we
failed to update the corresponding RGWCache api.
This commit fixes it.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-09-15 15:21:56 -07:00
Yehuda Sadeh
ff2ce1cbd8 Merge branch 'wip-2923'
Conflicts:
	src/rgw/rgw_admin.cc
	src/rgw/rgw_log.cc
	src/rgw/rgw_log.h
	src/rgw/rgw_main.cc
	src/rgw/rgw_op.cc
	src/rgw/rgw_rados.cc
	src/rgw/rgw_rados.h

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-09-15 15:17:08 -07:00
Yehuda Sadeh
6756f9afef rgw-admin: add cluster info command
A new radosgw-admin command to dump cluster info

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-09-15 13:33:47 -07:00
Yehuda Sadeh
7fe1f0b11e rgw: simplify create_pool
create_pool should only create pool. A pool is not a bucket,
so we don't need to attach any attrs to it. Also, no reason
to make it exclusive.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-09-15 13:33:36 -07:00
Yehuda Sadeh
ff0f88a6ce rgw: store cluster params in a special object
We now have a cluster root pool that should hold the
cluster params. The cluster params are now read from
this object on startup, if object does not exist we
set its defaults and write it.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-09-15 13:30:05 -07:00
Yehuda Sadeh
a16fa0492e Merge branch 'wip-rgw-refcount' 2012-09-15 13:02:54 -07:00
Yehuda Sadeh
a150cf3c1e rgw: document how refcount objclass works
Added some explanations in the client header.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-09-15 13:01:48 -07:00
Yehuda Sadeh
539a8c7e04 cls_refcount: add a unitest
test cls_refcount functionality.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-09-15 13:01:31 -07:00
Yehuda Sadeh
93218aeab7 rgw_rados: adjustments for refcount objclass
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-09-15 13:01:25 -07:00
Yehuda Sadeh
cfe4830516 rgw: set atomic context for copy operation src and dest
This is required so that we handle both src and dest atomically. We
also set the prefetch flag on the src object, so that we read the
first chunk along with its attrs.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-09-15 12:56:02 -07:00
Yehuda Sadeh
3cd17fb9dd rgw: copy of objects using refcount
For objects with manifest that have a tail, we
copy only the head, and the manifest, and increasing
the reference count on the tail objects.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-09-15 12:52:26 -07:00
Yehuda Sadeh
20c785278c rgw: use refcount put instead of obj delete where needed
Tie in new refcount objclass methods.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-09-15 12:51:35 -07:00
Josh Durgin
78d6a60c59 qa: test args for rbd import
Make sure that --pool/--dest-pool and --image/--dest all work
interchangeably.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-14 17:17:29 -07:00
Josh Durgin
fd4b294280 rbd: make --pool/--image args easier to understand for import
There's no need to set the default pool in set_pool_image_name - this
is done later, in a way that doesn't ignore --pool if --dest-pool
is not specified.

This means --pool and --image can be used with import, just like
the rest of the commands. Without this change, --dest and --dest-pool
had to be used, and --pool would be silently ignored for rbd import.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-14 17:17:29 -07:00
Josh Durgin
0bf7723733 doc: fix indentation
Before this the list of steps was split into two lists
after the conf example.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-13 16:58:13 -07:00
tamil
cf6899d859 Adding RBD CLI test automation script, RbdLib and cephscrub.sh
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2012-09-13 13:54:23 -07:00
Sage Weil
539786a85a osd: move permissions check into pg op thread
The permission check examines the PG::pool struct.  Instead of adding
additional locking there, just push the check into the op thread.  This
makes life a bit simpler for the dispatch thread, which is particularly
hot.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-13 08:02:17 -07:00
Sage Weil
221fc788e7 osd: drop unnecessary can_discard_request() in PG::queue_op()
We perform the same check in PG::do_request(), and it is no longer safe to
do this at enqueue_op() time because we aren't holding PG::_lock (only
PG::_qlock).

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-13 08:02:17 -07:00
Andreas Bluemle
2223ac78e5 osd: introduce PG::_qlock to protect queuing
Taking the PG::_lock when queuing each op for the worker threads can intorduce
long delays that hold up subsequent operations on other PGs.  Use a separate
lock to protect the queuing.

Signed-off-by: Andreas Bluemle <andreas.bluemle@itxperts.de>
Reviewed-by: Sage Weil <sage@inktank.com>
2012-09-13 08:02:17 -07:00
Samuel Just
d697b54c9b test/rados-api/aio.cc: use read operation for omap cmp test
The error code field is not filled in on writes.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2012-09-12 16:37:11 -07:00
Yan, Zheng
c1372f91bb osd/OSD.cc: Fix typo in OSD::heartbeat_check()
The check 'p->second.last_tx > cutoff' should always be false
since last_tx is periodically updated by OSD::heartbeat()

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-12 14:14:15 -07:00
Yan, Zheng
e89cab6b6c osd/ReplicatedPG: set truncate_seq when handling CEPH_OSD_OP_APPEND
We need set truncate_seq when redirect the newop to CEPH_OSD_OP_WRITE,
otherwise the code handles CEPH_OSD_OP_WRITE may quietly drop the data.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-12 14:13:08 -07:00
Sage Weil
c73c440e29 Makefile: rename 'core' -> 'base', add a few things
Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-12 11:00:42 -07:00
Josh Durgin
24c3cae15d librbd, cls_rbd: close snapshot creation race with old format
If two clients created a snapshot at the same time, the one with the
higher snapshot id might be created first, so the lower snapshot id
would be added to the snapshot context and the snaphot seq would be
set to the lower one.

Instead of allowing this to happen, return -ESTALE if the snapshot id
is lower than the currently stored snapshot sequence number. On the
client side, get a new id and retry if this error is encountered.

Backport: argonaut
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2012-09-12 09:15:59 -07:00
Sage Weil
dfcb48d406 Merge pull request #23 from javacruft/master
Refactor the way that dh_makeshlibs is called to be slightly more elegant
2012-09-12 08:07:29 -07:00
James Page
31560ca55b Rejig the way the shared libraries are processed so that manual postinst/postrm scripts are not required for lib* packages, ensuring that the .so's in the ceph package are not detected 2012-09-12 10:40:01 +01:00
Tommi Virtanen
9474765145 upstart: Give everything a stop on stanza.
These are all tasks, and expected to exit somewhat quickly,
but e.g. ceph-create-keys has a loop where it waits for mon
to reach quorum, so it might still be in that loop when the
machine is shut down.
2012-09-11 16:42:12 -07:00
Tommi Virtanen
60e273ad5c upstart: Start mds,mon,radosgw after a reboot.
They had no "start on" stanzas, so they didn't get started earlier.
2012-09-11 16:42:12 -07:00
Tommi Virtanen
fb6c5c3e9a upstart: Use "ceph osd crush create-or-move".
Now the weight is only set when adding the OSD to the CRUSH map for
the first time. Once it's there, it's only moved, and the weight is
left untouched.

Change the ceph.conf option for the initial weight from
osd_crush_weight to osd_crush_initial_weight, to reflect this.

If you don't want new OSDs to store data automatically (to minimize
balancing and keep a human in the control loop), you can now
set osd_crush_initial_weight=0.

Closes: #3101
Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-09-11 16:40:08 -07:00
Sage Weil
331bbcfbc0 Merge remote-tracking branch 'gh/wip-crush'
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-09-11 16:04:58 -07:00
Tommi Virtanen
d8cb19dd09 upstart: Add ceph-create-keys.conf to package.
Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-09-11 15:31:06 -07:00
John Wilkins
ced6c2c358 :doc: Fixed typo.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-11 15:24:12 -07:00
Sage Weil
de811db914 obsync: if OrdinaryCallingFormat fails, try SubdomainCallingFormat
This blindly tries the Subdomain calling format if the ordinary method
fails.  In particular, this works around buckets that present a
PermanentRedirect message.

See bug #3128.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Matthew Wodrich <matthew.wodrich@dreamhost.com>
2012-09-11 14:50:53 -07:00
Samuel Just
ef3eab74e3 Merge remote-tracking branch 'upstream/next'
Conflicts:
	src/osd/ReplicatedPG.cc
2012-09-11 14:06:51 -07:00
Samuel Just
4e5283d476 ReplicatedPG: do not start_recovery_op if we are already pushing
Should fix bug #2761.

If we are already pushing soid, recovery_ops will only be decremented once for
all current pushes, so only increment recovery_ops if we are not currently
pushing it.

This bug causes us to leak a recovery op and get stuck in backfill.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2012-09-11 13:37:03 -07:00
Sage Weil
656ab158ce osd: fill in user log entry last after snapdir tran
Reorder the snapdir logic and ctx->at_version adjustments prior to filling
in the object_info_t and user_versions and all that stuff.  Adjust
at_version after appending the log entry (so that it points to the next
position/version we will write at.. culminating in the actual user
event).

The user log entry contains the request id, which will be used
by replay ops to put themselves in the correct place in the
waiting_for_commit/ack maps.  Thus, the repop needs to be tagged
with the same version as the log entry with the request id.
Thus, the request id bearing log entry should be the last in
the log entry vector.

This should fix #3072, wherein a replay which should wait on
the repop tagged as version '36 will instead wait on '35.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2012-09-11 13:37:03 -07:00
John Wilkins
a4fb9c1a09 :doc: Added tunables to cruch-map.rst.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-11 13:05:07 -07:00
John Wilkins
911433fd7d :doc: Removed old pg tuning. New section was added.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-11 13:00:22 -07:00
John Wilkins
9256a2955a :doc: Trimmed the old ops tree. Will remove when all porting verified.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-11 12:59:35 -07:00