summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* rgw: fix certain return status cases in CORSwip-6078-dumplingYehuda Sadeh2013-09-042-12/+10
| | | | | | | Change return values in certain cases, reorder checks, etc. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
* rgw: add COPY method to be handled by CORSYehuda Sadeh2013-09-042-5/+11
| | | | | | Was missing this http method. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
* rgw: fix CORS rule checkYehuda Sadeh2013-09-041-0/+3
| | | | Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
* rgw: don't handle CORS if rule not found (is NULL)Yehuda Sadeh2013-09-041-1/+5
| | | | Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
* rgw: tie CORS header response to all relevant operationsYehuda Sadeh2013-09-045-57/+62
| | | | | | | Have the CORS responses on all relevant operations. Also add headers on failure cases. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
* rgw: add a generic CORS response handlingYehuda Sadeh2013-09-045-75/+138
| | | | Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
* rgw: OPTIONS request doesn't need to read object infoYehuda Sadeh2013-08-211-1/+1
| | | | | | | | This is a bucket-only operation, so we shouldn't look at the object. Object may not exist and we might respond with Not Exists response which is not what we want. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
* rgw: remove use of s->bucket_corsYehuda Sadeh2013-08-214-9/+12
| | | | | | | Some old code still tried to use s->bucket_cors, which was abandoned in a cleanup work. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
* v0.67.1v0.67.1Gary Lowell2013-08-162-1/+7
|
* ceph.in: --admin-daemon was not returning EINVAL on bad commandDan Mick2013-08-151-18/+19
| | | | | | | | Fix by restructuring code to hoist common code and have only one place where admin_socket is actually called. Signed-off-by: Dan Mick <dan.mick@inktank.com> (cherry picked from commit 266460e97ec9ef9711e9eaa4bd954f3188d8da69)
* mon: use str_join instead of std::copySage Weil2013-08-152-12/+4
| | | | | | | | The std::copy method leaves a trailing separator. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Dan Mick <dan.mick@inktank.com> (cherry picked from commit 35565ee64e41d7fddc7849c6006692c78227132c)
* config: fix stringification of config valuesSage Weil2013-08-151-4/+4
| | | | | | | | | | | The std::copy construct leaves a trailing separator character, which breaks parsing for booleans (among other things) and probably mangles everything else too. Backport: dumpling Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Samuel Just <sam.just@inktank.com> (cherry picked from commit fc23cfe3fe567b30413d8af0c614a32fec238939)
* common: add str_join helperSage Weil2013-08-151-1/+14
| | | | | | Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Dan Mick <dan.mick@inktank.com> (cherry picked from commit ce3a0944d9b47f7b178fe7775c9d105305b238e0)
* rados.py: fix Rados() unicode checkingJosh Durgin2013-08-142-1/+15
| | | | | | | | | Check new parameters and check that rados_id is not None again to catch the empty string. Signed-off-by: Josh Durgin <josh.durgin@inktank.com> Reviewed-by: Sage Weil <sage.weil@inktank.com> (cherry picked from commit 4422f21a6586467a63ce6841552d0f60aa849cf1)
* rados.py: fix Rados() backwards compatibilityJosh Durgin2013-08-142-2/+27
| | | | | | | | | | | | | | | | | Previously it had no name parameter, so the default will be used by old clients. However, if an old client set rados_id, a new check that both rados_id and name are set would result in an error. Fix this by only applying the default names after the check, and add tests of this behavior. This was introduced in 783b7ec847c7f987ac1814c9c41c91921cac4eba, so it does not affect cuttlefish. Fixes: #5970 Reported-by: Michael Morgan <mmorgan@dca.net> Signed-off-by: Josh Durgin <josh.durgin@inktank.com> Reviewed-by: Sage Weil <sage.weil@inktank.com> (cherry picked from commit 34da9cbc33205623cf64aee1989f53dfb2c5bddd)
* librados: fix async aio completion wakeupSage Weil2013-08-141-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-141-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)
* v0.67v0.67Gary Lowell2013-08-131-0/+6
|
* 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>
* ceph-disk: fix mount options passed to move_mountSage Weil2013-08-091-0/+6
| | | | | | | | | | Commit 6cbe0f021f62b3ebd5f68fcc01a12fde6f08cff5 added a mount_options but in certain cases it may be blank. Fill in with the defaults, just as we do in mount(). Backport: cuttlefish Reviewed-by: Dan Mick <dan.mick@inktank.com> Signed-off-by: Sage Weil <sage@inktank.com>
* config_opts.h: reduce osd_recovery_max_active and osd_recovery_max_single_startSamuel Just2013-08-091-2/+2
| | | | | Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: David Zafman <david.zafman@inktank.com>
* ceph: retry new-style mon command if we get EINVAL from the old-style commandSage Weil2013-08-091-15/+23
| | | | | | | | | | | | | | | We can race with a mon upgrade: - get command descriptions, get EINVAL - mons upgrade, new quorum - send old-style command - get EINVAL In this case, we should try one last time to get the command descriptions. Fixes: #5788 Reviewed-by: Dan Mick <dan.mick@inktank.com> Signed-off-by: Sage Weil <sage@inktank.com>
* common: pick_addresses: fix bug with observer class that triggered #5205Joao Eduardo Luis2013-08-091-7/+6
| | | | | | | | | | | | | | | | | The Observer class we defined to observe conf changes and thus avoid triggering #5205 (as fixed by eb86eebe1ba42f04b46f7c3e3419b83eb6fe7f9a), was returning always the same const static array, which would lead us to always populate the observer's list with an observer for 'public_addr'. This would of course become a problem when trying to obtain the observer for 'cluster_add' during md_config_t::set_val() -- thus triggering the same assert as initially reported on #5205. Backport: cuttlefish Fixes: #5205 Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com> Reviewed-by: Sage Weil <sage@inktank.com>
* rgw: return 423 Locked response when failing to lock objectYehuda Sadeh2013-08-094-0/+8
| | | | | | | | | | Fixes: #5882 Translate the EBUSY we get when trying to lock a shard / object to 423 Locked response. Beforehand it was just translated to the default 500. Reviewed-by: Sage Weil <sage@inktank.com> Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
* rgw: make RGWHTTPClient callback methods pure virtualYehuda Sadeh2013-08-092-3/+22
| | | | | | | | This will make it easier to catch interface changes, like the ones that triggered #5921. Reviewed-by: Sage Weil <sage@inktank.com> Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
* rgw: rename read_header() to receive_header() where neededYehuda Sadeh2013-08-091-2/+2
| | | | | | | The same as with #5921, fixing a missed interface change. Reviewed-by: Sage Weil <sage@inktank.com> Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
* rgw: rename data receive callbacks in swift token revocationYehuda Sadeh2013-08-091-2/+2
| | | | | | | | | | | | Fixes: #5921 As part of the work that was made for dumpling, the http client in-data callback was renamed in order to avoid confusion. However, we missed the rename in a couple of places, which this patch amend. Reported-by: Roald van Loon <roaldvanloon@gmail.com> Reviewed-by: Sage Weil <sage@inktank.com> Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
* RadosClient: shutdown monclient after dropping lockSamuel Just2013-08-081-1/+1
| | | | | | | | | Otherwise, the monclient shutdown may deadlock waiting on a context trying to take the RadosClient lock. Fixes: #5897 Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* buffer: change #include orderSage Weil2013-08-081-1/+2
| | | | | | | huangjun <hjwsm1989@gmail.com> reports that this fixes the compilation on CentOS5. Signed-off-by: Sage Weil <sage@inktank.com>
* make sure we are using the mount optionsAlfredo Deza2013-08-081-0/+4
| | | | | Signed-off-by: Alfredo Deza <alfredo@deza.pe> (cherry picked from commit 34831d0989d4bcec4920068b6ee09ab6b3234c91)
* Merge pull request #487 from ceph/wip-5746Sage Weil2013-08-081-3/+8
|\ | | | | | | | | ceph.in: Re-enable ceph interactive mode (missing its output). Reviewed-by: Sage Weil <sage@inktank.com>
| * ceph.in: Re-enable ceph interactive mode (missing its output).Dan Mick2013-08-081-3/+8
| | | | | | | | | | | | | | | | | | Also, loop on error. There's no reason to exit the interpreter loop on an error, and it's probably less annoying if we don't. Print the error, and any output, and continue. Fixes: #5746 Signed-off-by: Dan Mick <dan.mick@inktank.com>
* | Merge pull request #488 from dmick/wip-dmick-daemon-einvalSage Weil2013-08-081-2/+4
|\ \ | | | | | | | | | | | | Wip dmick daemon einval Reviewed-by: Sage Weil <sage@inktank.com>
| * | ceph.in: return EINVAL on daemon command errorDan Mick2013-08-081-2/+4
|/ / | | | | | | Signed-off-by: Dan Mick <dan.mick@inktank.com>
* | mon: fix 'osd crush rule rm ...' dup argSage Weil2013-08-081-2/+1
| | | | | | | | | | | | | | This was broken way back in 0d66c9ebbf626117c641c975a8682a0aaba588c4, but we were ignoring the dup until recently. t Signed-off-by: Sage Weil <sage@inktank.com>
* | qa/workunits/cephtool/test.sh: test set/unset of all osd flagsSage Weil2013-08-071-0/+8
| | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
* | mon/MonCommands: fix typo nobackfile -> nobackfillSage Weil2013-08-071-2/+2
| | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
* | Add back the mistakenly removed "ceph osd set noscrub/nodeep-scrub"Dan Mick2013-08-072-2/+10
| | | | | | | | | | | | Fixes: #5868 Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* | Merge branch 'wip-recovery-op-warn' into nextSamuel Just2013-08-069-50/+100
|\ \ | | | | | | | | | Reviewed-by: Sage Weil <sage@inktank.com>
| * | OSD: suspend timeout on process_peering_events pg lockSamuel Just2013-08-061-1/+1
| | | | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com>
| * | OSD: only start osd_recovery_max_single_start at onceSamuel Just2013-08-062-2/+4
| | | | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com>
| * | ReplicatedPG: ping tphandle between pushesSamuel Just2013-08-062-7/+11
| | | | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com>
| * | ReplicatedPG: ping TPHandle during scan_rangeSamuel Just2013-08-066-22/+56
| | | | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com>
| * | OSD: also suspend timeout while grabbing recovery_tp lockSamuel Just2013-08-062-5/+5
| | | | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com>
| * | OpRequest: don't warn as quickly for slow recovery opsSamuel Just2013-08-063-13/+23
| | | | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com>
* | | Merge pull request #476 from dalgaaf/wip-CID-1058791Yehuda Sadeh2013-08-061-1/+1
|\ \ \ | |/ / |/| | | | | | | | Fix CID 1058791 Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
| * | rgw_rados.cc: fix invalid iterator comparisonDanny Al-Gaaf2013-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The iterator should be compared against the end() function of the same iter() from region_conn_map. CID 1058791 (#1 of 1): Invalid iterator comparison (MISMATCHED_ITERATOR) mismatched_comparison: Comparing "iter" from "this->region_conn_map" to "this->zone_conn_map.end()" from "this->zone_conn_map". Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* | | mon, osd: Clean up "flush(stringstream)" continuedDan Mick2013-08-063-7/+7
| | | | | | | | | | | | | | | | | | Missing files in last commit; sorry! Signed-off-by: Dan Mick <dan.mick@inktank.com>
* | | mon, osd: Clean up "flush(stringstream); bl.append(stringstream.str())Dan Mick2013-08-068-17/+9
| |/ |/| | | | | | | | | | | | | Also: One redundant flush in AuthMonitor, two in PGMonitor, and a ds << that should have been conditional in Monitor. Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* | qa/workunits/cephtool/test.sh: add tests for 'pg dump ...'Sage Weil2013-08-051-0/+8
| | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>