summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* rgw: don't copy object idtag when copying objectwip-5204Yehuda Sadeh2013-05-301-0/+1
| | | | | | | | | | Fixes: #5204 When copying object we ended up also copying the original object idtag which overrode the newly generated one. When refcount put is called with the wrong idtag the count does't go down. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
* osd: initialize new_state field when we use itSage Weil2013-05-291-1/+4
| | | | | | | | | | | If we use operator[] on a new int field its value is undefined; avoid reading it or using |= et al until we initialize it. Fixes: #4967 Backport: cuttlefish, bobtail Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 50ac8917f175d1b107c18ecb025af1a7b103d634)
* HashIndex: sync top directory during start_split,merge,col_splitSamuel Just2013-05-281-3/+12
| | | | | | | | | | | | Otherwise, the links might be ordered after the in progress operation tag write. We need the in progress operation tag to correctly recover from an interrupted merge, split, or col_split. Fixes: #5180 Backport: cuttlefish, bobtail Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com> (cherry picked from commit 5bca9c38ef5187c7a97916970a7fa73b342755ac)
* mon: Paxos: get rid of the 'prepare_bootstrap()' mechanismJoao Eduardo Luis2013-05-274-26/+4
| | | | | | | | | | | | | | | | We don't need it after all. If we are in the middle of some proposal, then we guarantee that said proposal is likely to be retried. If we haven't yet proposed, then it's forever more likely that a client will eventually retry the message that triggered this proposal. Basically, this mechanism attempted at fixing a non-problem, and was in fact triggering some unforeseen issues that would have required increasing the code complexity for no good reason. Fixes: #5102 Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com> (cherry picked from commit e15d29094503f279d444eda246fc45c09f5535c9)
* mon: Paxos: finish queued proposals instead of clearing the listJoao Eduardo Luis2013-05-271-4/+6
| | | | | | | | | | | | | | | | | | | | | By finishing these Contexts, we make sure the Contexts they enclose (to be called once the proposal goes through) will behave as their were initially planned: for instance, a C_Command() may retry the command if a -EAGAIN is passed to 'finish_contexts', while a C_Trimmed() will simply set 'going_to_trim' to false. This aims at fixing at least a bug in which Paxos will stop trimming if an election is triggered while a trim is queued but not yet finished. Such happens because it is the C_Trimmed() context that is responsible for resetting 'going_to_trim' back to false. By clearing all the contexts on the proposal list instead of finishing them, we stay forever unable to trim Paxos again as 'going_to_trim' will stay True till the end of time as we know it. Fixes: #4895 Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com> (cherry picked from commit 586e8c2075f721456fbd40f738dab8ccfa657aa8)
* mon: Paxos: finish_proposal() when we're finished recoveringJoao Eduardo Luis2013-05-271-0/+2
| | | | | Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com> (cherry picked from commit 2ff23fe784245f3b86bc98e0434b21a5318e0a7b)
* Merge branch 'wip_scrub_tphandle' into cuttlefishSamuel Just2013-05-234-33/+66
|\ | | | | | | | | Fixes: #5159 Reviewed-by: Sage Weil <sage@inktank.com>
| * PG: ping tphandle during omap loop as wellSamuel Just2013-05-232-0/+8
| | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com>
| * PG: reset timeout in _scan_list for each object, read chunkSamuel Just2013-05-231-0/+2
| | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com>
| * OSD,PG: pass tphandle down to _scan_listSamuel Just2013-05-233-33/+56
| | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com>
* | rgw: iterate usage entries from correct entryYehuda Sadeh2013-05-231-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: #5152 When iterating through usage entries, and when user id was provided, we started at the user's first entry and not from the entry indexed by the request start time. This commit fixes the issue. Backport: bobtail Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com> (cherry picked from commit 8b3a04dec8be13559716667d4b16cde9e9543feb)
* | sysvinit: fix enumeration of local daemons when specifying type onlySage Weil2013-05-222-21/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | - prepend $local to the $allconf list at the top - remove $local special case for all case - fix the type prefix checks to explicitly check for prefixes Fugly bash, but works! Backport: cuttlefish, bobtail Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Dan Mick <dan.mick@inktank.com> (cherry picked from commit c80c6a032c8112eab4f80a01ea18e1fa2c7aa6ed)
* | sysvinit: fix osd weight calculation on remote hostsSage Weil2013-05-221-8/+9
| | | | | | | | | | | | | | | | | | We need to do df on the remote host, not locally. Simlarly, the ceph command uses the osd key, which exists remotely; run it there. Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit d81d0ea5c442699570bd93a90bea0d97a288a1e9)
* | sysvinit: use known hostname $host instead of (incorrectly) recalculatingSage Weil2013-05-221-1/+1
| | | | | | | | | | | | | | | | | | We would need to do hostname -s on the remote node, not the local one. But we already have $host; use it! Reported-by: Xiaoxi Chen <xiaoxi.chen@intel.com> Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit caa15a34cb5d918c0c8b052cd012ec8a12fca150)
* | mon: be a bit more verbose about osd mark down eventsSage Weil2013-05-221-0/+2
| | | | | | | | | | | | | | Put these in the cluster log; they are interesting. Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit 87767fb1fb9a52d11b11f0b641cebbd9998f089e)
* | PG: subset_last_update must be at least log.tailSamuel Just2013-05-221-1/+1
| | | | | | | | | | | | | | | | Fixes: 5020 Backport: bobtail, cuttlefish Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: David Zafman <david.zafman@inktank.com> (cherry picked from commit 72bf5f4813c273210b5ced7f7793bc1bf813690c)
* | FileJournal: adjust write_pos prior to unlocking write_lockSamuel Just2013-05-221-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In committed_thru, we use write_pos to reset the header.start value in cases where seq is past the end of our journalq. It is therefore important that the journalq be updated atomically with write_pos (that is, under the write_lock). The call to align_bl() is moved into do_write in order to ensure that write_pos is adjusted correctly prior to write_bl(). Also, we adjust pos at the end of write_bl() such that pos \in [get_top(), header.max_size) after write_bl(). Fixes: #5020 Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com> (cherry picked from commit eaf3abf3f9a7b13b81736aa558c9084a8f07fdbe)
* | mon: implement --extract-monmap <filename>Sage Weil2013-05-211-3/+15
| | | | | | | | | | | | | | | | This will make for a simpler process for http://ceph.com/docs/master/rados/operations/add-or-rm-mons/#removing-monitors-from-an-unhealthy-cluster Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit c0268e27497a4d8228ef54da9d4ca12f3ac1f1bf)
* | librbd: make image creation defaults configurableJosh Durgin2013-05-215-8/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Programs using older versions of the image creation functions can't set newer parameters like image format and fancier striping. Setting these options lets them use all the new functionality without being patched and recompiled to use e.g. rbd_create3(). This is particularly useful for things like qemu-img, which does not know how to create format 2 images yet. Refs: #5067 backport: cuttlefish, bobtail Signed-off-by: Josh Durgin <josh.durgin@inktank.com> (cherry picked from commit aacc9adc4e9ca90bbe73ac153cc754a3a5b2c0a1)
* | rbd.py: fix stripe_unit() and stripe_count()Josh Durgin2013-05-211-4/+10
| | | | | | | | | | | | | | | | | | These matched older versions of the functions, but would segfault using the current versions. backport: cuttlefish, bobtail Signed-off-by: Josh Durgin <josh.durgin@inktank.com> (cherry picked from commit 53ee6f965e8f06c7256848210ad3c4f89d0cb5a0)
* | cls_rbd: make sure stripe_unit is not larger than object sizeJosh Durgin2013-05-212-1/+10
| | | | | | | | | | | | | | | | Test a few other cases too. backport: cuttlefish, bobtail Signed-off-by: Josh Durgin <josh.durgin@inktank.com> (cherry picked from commit 810306a2a76eec1c232fd28ec9c351e827fa3031)
* | rgw: protect ops log socket formatterYehuda Sadeh2013-05-212-1/+4
| | | | | | | | | | | | | | | | | | Fixes: #4905 Ops log (through the unix domain socket) uses a formatter, which wasn't protected. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> (cherry picked from commit d48f1edb07a4d8727ac956f70e663c1b4e33e1dd)
* | Makefle: force char to be signedSage Weil2013-05-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On an armv7l build, we see errors like warning: rgw/rgw_common.cc:626:16: comparison is always false due to limited range of data type [-Wtype-limits] from code char c1 = hex_to_num(*src++); ... if (c1 < 0) Force char to be signed (regardless of any weird architecture's default) to avoid risk of this leading to misbehavior. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Dan Mick <dan.mick@inktank.com> (cherry picked from commit 769a16d6674122f3b537f03e17514ad974bf2a2f)
* | debian: stop sysvinit on ceph.prermSage Weil2013-05-201-0/+1
| | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit 2f193fb931ed09d921e6fa5a985ab87aa4874589)
* | ceph df: fix si units for 'global' statsMike Kelly2013-05-201-3/+3
| | | | | | | | | | | | | | si_t expects bytes, but it was being given kilobytes. Signed-off-by: Mike Kelly <pioto@pioto.org> (cherry picked from commit 0c2b738d8d07994fee4c73dd076ac9364a64bdb2)
* | udev: install disk/by-partuuid rulesSage Weil2013-05-164-0/+37
| | | | | | | | | | | | | | | | | | | | | | Wheezy's udev (175-7.2) has broken rules for the /dev/disk/by-partuuid/ symlinks that ceph-disk relies on. Install parallel rules that work. On new udev, this is harmless; old older udev, this will make life better. Fixes: #4865 Backport: cuttlefish Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit d8d7113c35b59902902d487738888567e3a6b933)
* | debian: make radosgw require matching version of librados2Sage Weil2013-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | ...indirectly via ceph-common. We get bad behavior when they diverge, I think because of libcommon.la being linked both statically and dynamically. Fixes: #4997 Backport: cuttlefish, bobtail Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Gary Lowell <gary.lowell@inktank.com> (cherry picked from commit 604c83ff18f9a40c4f44bc8483ef22ff41efc8ad)
* | mon: fix validatation of mds ids in mon commandsSage Weil2013-05-142-15/+41
| | | | | | | | | | | | Fixes: #4996 Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit 5c305d63043762027323052b4bb3ae3063665c6f)
* | v0.61.2v0.61.2Gary Lowell2013-05-132-1/+7
| |
* | mon: Monitor: tolerate GV duplicates during conversionJoao Eduardo Luis2013-05-132-3/+36
| | | | | | | | | | | | | | Fixes: #4974 Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com> (cherry picked from commit ba05b16ee2b6e25141f2ab88265a1cf92dcd493c)
* | config_opts: default mon_debug_dump_transactions to 'false'Dan Mick2013-05-101-1/+1
| | | | | | | | | | | | | | otherwise, it chews mon log space at an alarming rate. Fixes: #5024 Signed-off-by: Dan Mick <dan.mick@inktank.com>
* | v0.61.1v0.61.1Gary Lowell2013-05-082-1/+7
| |
* | mon: dump MonitorDBStore transactions to fileSamuel Just2013-05-082-3/+33
| | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com> (cherry picked from commit 797089ef082b99910eebfd9454c03d1f027c93bb)
* | osd: optionally enable leveldb loggingSage Weil2013-05-082-0/+2
| | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit 0b4c5c1a3349670d11cc3c4fb3c4b3c1a80b2502)
* | mon: allow leveldb loggingSage Weil2013-05-084-0/+10
| | | | | | | | | | | | | | 'mon leveldb log = filename' Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit c1d5f815546b731e10bfcb81cbcd48b7d432e9c4)
* | debian/control: squeeze requres cryptsetup packageGary Lowell2013-05-081-1/+1
| | | | | | | | | | | | | | | | | | Squeeze requires the cryptsetup package which has been renamed cryptsetup-bin in later versions. Allow either package to satisfy the dependency. Signed-off-by: Gary Lowell <gary.lowell@inktank.com> (cherry picked from commit 83bbae415de16f708ca1cb24861ddbb0bd514a7f)
* | osd: don't assert if get_omap_iterator() returns NULLYehuda Sadeh2013-05-081-1/+4
| | | | | | | | | | | | | | | | | | Fixes: #4949 This can happen if the object does not exist and it's a write operation. Just return -ENOENT. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> (cherry picked from commit 36ec6f9bce63641f4fc2e4ab04d03d3ec1638ea0)
* | ceph-create-keys: gracefully handle no data from admin socketSage Weil2013-05-081-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Old ceph-mon (prior to 393c9372f82ef37fc6497dd46fc453507a463d42) would return an empty string and success if the command was not registered yet. Gracefully handle that case by retrying. If we still fail to parse, exit entirely with EINVAL. Fixes: #4952 Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Dan Mick <dan.mick@intank.com> (cherry picked from commit e2528ae42c455c522154c9f68b5032a3362fca8e)
* | init-ceph: fix osd_data location when checking df utilizationSage Weil2013-05-081-2/+2
| | | | | | | | | | | | | | | | | | | | Do not assume default osd data location. Fixes: #4951 Backport: cuttlefish, bobtail Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Gary Lowelll <gary.lowell@inktank.com> (cherry picked from commit f2a54cc9c98a9f31aef049c74ea932b2d9000d3c)
* | OSD: handle stray snap collections from upgrade bugSamuel Just2013-05-081-2/+23
| | | | | | | | | | | | | | | | | | | | | | Previously, we failed to clear snap_collections, which causes split to spawn a bunch of snap collections. In load_pgs, we now clear any such snap collections and then snap_collections field on the PG itself. Related: #4927 Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com> (cherry picked from commit 8e89db89cb36a217fd97cbc1f24fd643b62400dc)
* | PG: clear snap_collections on upgradeSamuel Just2013-05-081-0/+1
| | | | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com> (cherry picked from commit 252d71a81ef4536830a74897c84a7015ae6ec9fe)
* | OSD: snap collections can be ignored on splitSamuel Just2013-05-081-15/+0
| | | | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com> (cherry picked from commit 438d9aa152e546b2008ec355b481df71aa1c51a5)
* | ceph: return error code when failing to get result from admin socketSage Weil2013-05-081-0/+1
| | | | | | | | | | | | | | | | | | Make sure we return a non-zero result code when we fail to read something from the admin socket. Backport: cuttlefish, bobtail Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit 393c9372f82ef37fc6497dd46fc453507a463d42)
* | v0.61v0.61Gary Lowell2013-05-062-1/+7
|/
* os/: default to dio for non-block journalsSamuel Just2013-05-065-7/+15
| | | | | | Workaround: #4910 Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* ceph-disk: use separate lock files for prepare, activateSage Weil2013-05-061-7/+8
| | | | | | | | | | | | | | Use a separate lock file for prepare and activate to avoid deadlock. This didn't seem to trigger on all machines, but in many cases, the prepare process would take the file lock and later trigger a udev event and the activate would then block on the same lock, either when we explicitly call 'udevadm settle --timeout=10' or when partprobe does it on our behalf (without a timeout!). Avoid this by using separate locks for prepare and activate. We only care if multiple activates race; it is okay for a prepare to be in progress and for an activate to be kicked off. Signed-off-by: Sage Weil <sage@inktank.com>
* ceph-test.install: add ceph-monstore-tool and ceph-osdomap-toolDanny Al-Gaaf2013-05-061-0/+2
| | | | Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* ceph.spec.in: remove twice listed ceph-coverageDanny Al-Gaaf2013-05-061-1/+0
| | | | Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* ceph.spec: add some files to cephDanny Al-Gaaf2013-05-061-0/+2
| | | | | | | Add installed, but not packaged files to ceph-test (ceph-monstore-tool, ceph-osdomap-tool) rpm file section. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* mon: fix init sequence when not daemonizingSage Weil2013-05-031-2/+2
| | | | | | | | | We made the common_init_finish and chdir conditional on daemonize in commit 2e0dd5ae6c8751e33d456b2b06c1204b63db959a, breaking init (asok at least) when -f is specified (as with upstart). Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com>