Commit Graph

21220 Commits

Author SHA1 Message Date
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
John Wilkins
203ba59ed2 :doc: Trimmed the tree for failures/troubleshooting. RGW remains.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-11 12:52:12 -07:00
John Wilkins
662fd0325b :doc: removed. RBD now has its own section.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-11 12:51:06 -07:00
Sage Weil
e6141005f2 mon: adjust number of req args for loc
At least one loc key/value pair is required to do anything useful with
these commands.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-11 12:05:01 -07:00
Sage Weil
344fef772e mon: move loc map parsing into a helper
Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-11 12:05:01 -07:00
Sage Weil
50c957dbdc crush: constify loc map arguments
Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-11 12:05:01 -07:00
Sage Weil
9636991376 crush: add const string& versions of accessors
Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-11 12:05:01 -07:00
Sage Weil
babef41a06 doc/control.rst: add 'osd crush create-or-move ...'
Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-11 12:05:01 -07:00
Sage Weil
dd9819e376 doc: make note of crush usage change
Even tho it is compatible.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-11 12:05:01 -07:00
Sage Weil
0817b941d5 mon: make redundant osd.NNN argument optional
Instead of 'osd crush set NNN osd.NNN weight loc...', make the second
osd.NNN option optional, and allow either NNN or osd.NNN to specify the
osd id.  This makes the usage much more sane, but maintains backward
compatibility.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-11 12:05:01 -07:00
Sage Weil
01a8146983 ceph tool: add 'osd crush create-or-move ...' to help
Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-11 11:35:45 -07:00
John Wilkins
44fa233b77 :doc: Deleting this. Wrote a new one, but will be revised a bit soon.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-11 11:26:19 -07:00
John Wilkins
32f30f9aff :doc: Removed old ops pool section.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-11 11:19:47 -07:00
John Wilkins
0313365ddf :doc: Removed old authentication section.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-11 11:19:22 -07:00
John Wilkins
d1053d9d75 :doc: Removed old resize OSD section.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-11 11:18:55 -07:00
John Wilkins
ad909f3f45 :doc: Removed old mon resize section.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-11 11:15:17 -07:00
John Wilkins
7d881dc809 :doc: Removed from old ops doc. Still needs to be composed though.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-11 11:14:40 -07:00
John Wilkins
bf342d1474 :doc: New cluster ops section addresses the todo.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-11 11:13:53 -07:00
John Wilkins
e844989576 :doc: Removed old OSD troubleshooting. New version to be updated shortly.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-11 11:13:17 -07:00
John Wilkins
72f802c52e :doc: Removed old monitor troubleshooting. New version to be revised shortly.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-11 11:12:37 -07:00
John Wilkins
fe609b7a10 :doc: Removed old mds troubleshooting. Still needs to be composed.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-11 11:12:01 -07:00
John Wilkins
a4733b864e :doc: Removed old cephfs disucssion.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-11 11:11:16 -07:00
John Wilkins
d4e00bce76 :doc: Trimmed toctree to last bits of legacy data.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-11 11:10:44 -07:00
John Wilkins
922c59ff10 :doc: Updated FAQ with a friendlier message.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-09-11 11:09:01 -07:00
Sage Weil
f1b605c0cb mon: parse '<id>' or 'osd.<id>' for 'osd crush create-or-move ...'
Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-11 10:48:02 -07:00
Sage Weil
1da73e5df4 mon: fail on trailing characters after parsing numbers
parse '8' but not '8asdf'.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-11 10:48:02 -07:00
Sage Weil
b2409a2c80 mon: 'osd crush create-or-move <id> <initial-weight> <loc ...>'
Create an item in the tree with the given weight, or move it (without
touching the weight) if it is already present.

Closes: #3101
Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-11 10:48:02 -07:00
Sage Weil
adedd6b600 crush: create_or_move_item()
Create an item if it doesn't exist, with the specified weight.  If it is
already in the tree, move it, but do not adjust the weight.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-11 10:48:01 -07:00
Sage Weil
588b263dd7 crush: get_item_weight[f]()
Get the weight for an item, or at least the first instance of an item in
the tree.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-11 10:48:01 -07:00
Sage Weil
f8d9f86ecd osdmap: 4 decimal places for osd tree
This makes it print out more nicely for reasonable weights.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-09-11 10:48:01 -07:00
Yehuda Sadeh
d51d7b3416 rgw: fix rgw_dir_suggest_changes() to set header_changed
Apparently we weren't setting header_changed to true in the
case where we handled the CEPH_RGW_UPDATE case and cur_disk.exists
was false. In practice what this created is that in case where
object was created but the index complete call failed (or timed
out), calling rgw_dir_suggest_changes() fixed the entry, however,
we didn't account the new entry. This would lead to negative
stats on the bucket index.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-09-10 17:28:47 -07:00
Yehuda Sadeh
63c0909399 Merge branch 'wip-swift-manifest'
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-09-10 12:42:55 -07:00
Yehuda Sadeh
f8c365e690 rgw: add missing ret code check
Also, for some reason we used cerr instead of dout so fix
that too.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-09-10 12:41:33 -07:00