summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* rgw: fix authenticated users acl group checkbobtailYehuda Sadeh2013-10-151-1/+1
| | | | | | | | | | Fixes: #6553 Backport: bobtail, cuttlefish, dumpling Authenticated users group acl bit was not working correctly. Check to test whether user is anonymous was wrong. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> (cherry picked from commit bebbd6cb7b71697b34b8f27652cabdc40c97a33b)
* rgw: don't call list::size() in ObjectCacheYehuda Sadeh2013-09-192-2/+6
| | | | | | | | | Fixes: #6286 Use an external counter instead of calling list::size() Reviewed-by: Sage Weil <sage@inktank.com> Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> (cherry picked from commit 31e3a51e933429d286104fe077e98ea883437ad6)
* rgw: drain pending requests before completing writeYehuda Sadeh2013-09-111-4/+12
| | | | | | | | | | Fixes: #6268 When doing aio write of objects (either regular or multipart parts) we need to drain pending aio requests. Otherwise if gateway goes down then object might end up corrupted. Reviewed-by: Josh Durgin <josh.durgin@inktank.com> Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
* rgw: check object name after rebuilding it in S3 POSTYehuda Sadeh2013-09-041-0/+5
| | | | | | | | | | | | | | Fixes: #6088 Backport: bobtail, cuttlefish, dumpling When posting an object it is possible to provide a key name that refers to the original filename, however we need to verify that in the end we don't end up with an empty object name. Reviewed-by: Josh Durgin <josh.durgin@inktank.com> Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> (cherry picked from commit c8ec532fadc0df36e4b265fe20a2ff3e35319744)
* upstart: handle upper case in cluster name and idAlexandre Marangone2013-08-304-4/+4
| | | | | Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com> (cherry picked from commit 851619ab6645967e5d7659d9b0eea63d5c402b15)
* v0.56.7v0.56.7Gary Lowell2013-08-272-1/+7
|
* objecter: resend unfinished lingers when osdmap is no longer pausedJosh Durgin2013-08-211-2/+12
| | | | | | | | | | | | | | | | Plain Ops that haven't finished yet need to be resent if the osdmap transitions from full or paused to unpaused. If these Ops are triggered by LingerOps, they will be cancelled instead (since should_resend = false), but the LingerOps that triggered them will not be resent. Fix this by checking the registered flag for all linger ops, and resending any of them that aren't paused anymore. Fixes: #6070 Signed-off-by: Josh Durgin <josh.durgin@inktank.com> Reviewed-by: Sage Weil <sage.weil@inktank.com> (cherry picked from commit 38a0ca66a79af4b541e6322467ae3a8a4483cc72)
* librados: fix async aio completion wakeupSage Weil2013-08-181-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | For aio flush, we register a wait on the most recent write. The write completion code, however, was *only* waking the waiter if they were waiting on that write, without regard to previous writes (completed or not). For example, we might have 6 and 7 outstanding and wait on 7. If they finish in order all is well, but if 7 finishes first we do the flush completion early. Similarly, if we - start 6 - start 7 - finish 7 - flush; wait on 7 - finish 6 we can hang forever. Fix by doing any completions that are prior to the oldest pending write in the aio write completion handler. Refs: #5919 Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com> Tested-by: Oliver Francke <Oliver.Francke@filoo.de> (cherry picked from commit 16ed0b9af8bc08c7dabead1c1a7c1a22b1fb02fb)
* librados: fix locking for AioCompletionImpl refcountingJosh Durgin2013-08-181-5/+9
| | | | | | | | | | | | | | | | | | | Add an already-locked helper so that C_Aio{Safe,Complete} can increment the reference count when their caller holds the lock. C_AioCompleteAndSafe's caller is not holding the lock, so call regular get() to ensure no racing updates can occur. This eliminates all direct manipulations of AioCompletionImpl->ref, and makes the necessary locking clear. The only place C_AioCompleteAndSafe is used is in handling aio_flush_async(). This could cause a missing completion. Refs: #5919 Signed-off-by: Josh Durgin <josh.durgin@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com> Tested-by: Oliver Francke <Oliver.Francke@filoo.de> (cherry picked from commit 7a52e2ff5025754f3040eff3fc52d4893cafc389)
* rgw: fix multi deleteYehuda Sadeh2013-08-121-1/+1
| | | | | | | | | | | | | | | | Fixes: #5931 Backport: bobtail, cuttlefish Fix a bad check, where we compare the wrong field. Instead of comparing the ret code to 0, we compare the string value to 0 which generates implicit casting, hence the crash. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com> (cherry picked from commit f9f1c48ad799da2b4be0077bf9d61ae116da33d7) Conflicts: src/rgw/rgw_rest_s3.cc
* ceph-fuse: create finisher threads after fork()Sage Weil2013-06-241-24/+29
| | | | | | | | | | | | | The ObjectCacher and MonClient classes both instantiate Finisher threads. We need to make sure they are created *after* the fork(2) or else the process will fail to join() them on shutdown, and the threads will not exist while fuse is doing useful work. Put CephFuse on the heap and move all this initalization into the child block, and make sure errors are passed back to the parent. Fix-proposed-by: Alexandre Marangone <alexandre.maragone@inktank.com> Signed-off-by: Sage Weil <sage@inktank.com>
* debian: update postinst, prerm hooksSage Weil2013-06-216-4/+114
| | | | | | | | This syncs up the hooks with the latest master versions. In particular, do not blindly stop/restart daemons on package upgrade! Fixes: #5414 Signed-off-by: Sage Weil <sage@inktank.com>
* os/FileStore: use fdatasync(2) instead of sync_file_range(2)Sage Weil2013-06-191-8/+2
| | | | | | | | | This fixes data corruption on XFS. Backported from ffade3c85dfffa13a16edd9630a52d99eb8a413d. Fixes: #4976 Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Samuel Just <sam.just@inktank.com>
* chmod +x iogen.shSage Weil2013-06-171-0/+0
| | | | Signed-off-by: Sage Weil <sage@inktank.com>
* rgw: escape prefix correctly when listing objectsYehuda Sadeh2013-06-171-2/+6
| | | | | | | | | | | Fixes: #5362 When listing objects prefix needs to be escaped correctly (the same as with the marker). Otherwise listing objects with prefix that starts with underscore doesn't work. Backport: bobtail, cuttlefish Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com>
* rgw: translate object marker to raw formatYehuda Sadeh2013-06-171-12/+5
| | | | | | | | | Fixes: #4600 Object marker should be treated as an object, so that name is formatted correctly when getting the raw oid. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> (cherry picked from commit b083dece36a050ec15ac41a275aeef0ece1ac009)
* adding iogen.shtamil2013-06-131-0/+18
| | | | Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
* osd: do not include logbl in scrub mapSage Weil2013-06-073-14/+6
| | | | | | | | | | | | | | | This is a potentially use object/file, usually prefixed by a zeroed region on disk, that is not used by scrub at all. It dates back to f51348dc8bdd5071b7baaf3f0e4d2e0496618f08 (2008) and the original version of scrub. This *might* fix #4179. It is not a leak per se, but I observed 1GB scrub messages going over the write. Maybe the allocations are causing fragmentation, or the sub_op queues are growing. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Samuel Just <sam.just@inktank.com> (cherry picked from commit 0b036ecddbfd82e651666326d6f16b3c000ade18)
* rgw: handle deep uri resourcesYehuda Sadeh2013-06-071-0/+25
| | | | | | | | | | | | In case of deep uri resources (ones created beyond a single level of hierarchy, e.g. auth/v1.0) we want to create a new empty handlers for the path if no handlers exists. E.g., for auth/v1.0 we need to have a handler for 'auth', otherwise the default S3 handler will be used, which we don't want. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com> (cherry picked from commit ad3934e335399f7844e45fcfd17f7802800d2cb3)
* rgw: fix get_resource_mgr() to correctly identify resourceYehuda Sadeh2013-06-071-2/+2
| | | | | | | | | | | Fixes: #5262 The original test was not comparing the correct string, ended up with the effect of just checking the substring of the uri to match the resource. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com> (cherry picked from commit 8d55b87f95d59dbfcfd0799c4601ca37ebb025f5)
* PG: don't write out pg map epoch every handle_activate_mapSamuel Just2013-06-063-2/+18
| | | | | | | | | | | | | | | | | We don't actually need to write out the pg map epoch on every activate_map as long as: a) the osd does not trim past the oldest pg map persisted b) the pg does update the persisted map epoch from time to time. To that end, we now keep a reference to the last map persisted. The OSD already does not trim past the oldest live OSDMapRef. Second, handle_activate_map will trim if the difference between the current map and the last_persisted_map is large enough. Fixes: #4731 Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com>
* rgw: only append prefetched data if reading from headYehuda Sadeh2013-05-311-17/+17
| | | | | | | | | | | | Fixes: #5209 Backport: bobtail, cuttlefish If the head object wrongfully contains data, but according to the manifest we don't read from the head, we shouldn't copy the prefetched data. Also fix the length calculation for that data. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com> (cherry picked from commit c5fc52ae0fc851444226abd54a202af227d7cf17)
* rgw: don't copy object idtag when copying objectYehuda Sadeh2013-05-311-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> Reviewed-by: Greg Farnum <greg@inktank.com> (cherry picked from commit b1312f94edc016e604f1d05ccfe2c788677f51d1)
* 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)
* Merge remote-tracking branch 'upstream/wip_scrub_tphandle_bobtail' into bobtailSamuel 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)
* mon: be a bit more verbose about osd mark down eventsSage Weil2013-05-221-0/+1
| | | | | | | | Put these in the cluster log; they are interesting. This is a backport of 87767fb1fb9a52d11b11f0b641cebbd9998f089e. Signed-off-by: Sage Weil <sage@inktank.com>
* 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)
* librbd: make image creation defaults configurableJosh Durgin2013-05-165-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-161-0/+20
| | | | | | | | | 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-162-2/+12
| | | | | | | | Test a few other cases too. backport: cuttlefish, bobtail Signed-off-by: Josh Durgin <josh.durgin@inktank.com> (cherry picked from commit 810306a2a76eec1c232fd28ec9c351e827fa3031)
* mon: fix validatation of mds ids in mon commandsSage Weil2013-05-142-14/+40
| | | | | | | | | | Fixes: #4996 Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit 5c305d63043762027323052b4bb3ae3063665c6f) Conflicts: src/mon/MDSMonitor.cc
* v0.56.6v0.56.6Gary Lowell2013-05-032-1/+7
|
* ceph.spec.in: Fix platform dependeciesGary Lowell2013-05-031-5/+0
| | | | | | Picked up an incorrect dependency merging the rbd udev rules update. Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
* rgw: don't send tail to gc if copying object to itselfYehuda Sadeh2013-05-032-2/+6
| | | | | | | | | | | Fixes: #4776 Backport: bobtail Need to make sure that when copying an object into itself we don't send the tail to the garbage collection. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com> (cherry picked from commit de5d1da810732ee48f41e8be18257053d862301b)
* ceph_common.sh: re-sync get_name_list with masterSage Weil2013-05-031-9/+9
| | | | | | We backported various items but didn't catch all the changes! :( Signed-off-by: Sage Weil <sage@inktank.com>
* v0.56.5v0.56.5Gary Lowell2013-05-022-1/+7
|
* ceph.spec.in: fix udev rules.d files handlingDanny Al-Gaaf2013-05-021-2/+5
| | | | | | | | Move 50-rbd.rules into the ceph base package since the related ceph-rbdnamer binary is part of this package. Use correct install pattern. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* debian: only start/stop upstart jobs if upstart is presentSage Weil2013-05-024-3/+45
| | | | | | | | | | This avoids errors on non-upstart distros (like wheezy). Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit 030bf8aaa15837f898e453161eeaf1d52fc5779d) Conflicts: debian/ceph-mds.postinst
* debian: stop ceph-mds before uninstalling ceph-mdsSage Weil2013-05-021-0/+5
| | | | | | Fixes: #4384 Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit 9eb0d91b867ab980135d7c6ff6347d69d0a8a794)
* Makefile.am: Add -lpthread to fix build on newer ld in Raring RingtailDan Mick2013-05-011-4/+4
| | | | | | | | | Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com> (cherry picked from commit 98f532e8000af281fa03b24da9ad2fda81755270) Conflicts: src/Makefile.am
* Merge remote-tracking branch 'gh/bobtail-deploy' into bobtail-nextSage Weil2013-05-0117-1144/+2056
|\
| * Fix journal partition creationAlexandre Marangone2013-04-291-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With OSD sharing data and journal, the previous code created the journal partiton from the end of the device. A uint32_t is used in sgdisk to get the last sector, with large HD, uint32_t is too small. The journal partition will be created backwards from the a sector in the midlle of the disk leaving space before and after it. The data partition will use whichever of these spaces is greater. The remaining will not be used. This patch creates the journal partition from the start as a workaround. Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com> (cherry picked from commit 56619ab91732bd2eacbef388311954f4e0230a30)
| * ceph.spec.in: put ceph-disk-* et al in correct sbindirSage Weil2013-04-261-4/+4
| | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
| * debian: fix ceph.installSage Weil2013-04-261-4/+4
| | | | | | | | | | | | This got out of sync somewhere in cherry-picking all of these patches. Signed-off-by: Sage Weil <sage@inktank.com>
| * Makefile.am: install ceph-* python scripts to /usr/bin directlyDanny Al-Gaaf2013-04-261-2/+7
| | | | | | | | | | | | | | | | | | Install ceph-* scripts directly to $(prefix)$(sbindir) (which normaly would be /usr/sbin) instead of moving it around after installation in SPEC file or debian files. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de> (cherry picked from commit 4d16f38f48e276497190c8bc03abc55c40e18eed)