summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* rgw: swift, in create bucket set location_constraintswip-5664Yehuda Sadeh2013-07-221-0/+2
| | | | | | | For swift we're setting the location constraint to be the current region we're in when creating a bucket. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
* rgw: translate swift request to s3 when forwardingYehuda Sadeh2013-07-227-5/+24
| | | | | | | | | | | | | When forwarding a swift request to a different region, we need to use the effective uri, and not just send the one we got since we use S3 authentication for the forwarded requests. This is achieved through a new using 'effective_uri' param on the request info (which in swift ponts to the plain bucket/object uri without the swift/v1 prefix(. Also, rename the old req_state::effective_uri to relative_uri in order to prevent confusion. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
* ceph.spec.in: Obsolete ceph-libsGary Lowell2013-07-221-0/+3
| | | | | Signed-off-by: Gary Lowell <gary.lowell@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* Merge remote-tracking branch 'gh/wip-mon-caps' into nextSage Weil2013-07-223-6/+70
|\ | | | | | | Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
| * qa/workunits/mon/caps.sh: clean up users; renameSage Weil2013-07-191-0/+5
| | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
| * mon/MonCap: simplify rwx match logicSage Weil2013-07-192-5/+14
| | | | | | | | | | | | Make this a positive check instead of double negative. Signed-off-by: Sage Weil <sage@inktank.com>
| * mon: fix command caps checkSage Weil2013-07-191-1/+1
| | | | | | | | | | | | | | We must require something or else the caps check is going to pass in a degenerate sense. Use X for commands. Signed-off-by: Sage Weil <sage@inktank.com>
| * qa: workunits: mon: test mon caps permissionsJoao Eduardo Luis2013-07-191-0/+50
| | | | | | | | | | | | | | set env var TEST_EXIT_ON_ERROR=0 to obtain all errors instead of exiting with return 1 on first error found. Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
* | Merge pull request #453 from dalgaaf/wip-da-SCA-cppcheck-7Sage Weil2013-07-2116-97/+97
|\ \ | | | | | | | | | | | | Fix SCA and CID issues Reviewed-by: Sage Weil <sage@inktank.com>
| * | cls_replica_log_types.h: pass const std::list<> by referenceDanny Al-Gaaf2013-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass const std::list<> parameter by refrence to cls_replica_log_progress_marker(). From cppcheck: [src/cls/replica_log/cls_replica_log_types.h:64]: (performance) Function parameter 'b' should be passed by reference. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * | mon/PGMonitor.cc: reduce scope of local 'num_slow_osds' variableDanny Al-Gaaf2013-07-201-1/+1
| | | | | | | | | | | | Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * | rgw/rgw_bucket.cc: use static_cast<>() instead of C-Style castDanny Al-Gaaf2013-07-201-4/+4
| | | | | | | | | | | | Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * | test_cls_version.cc: don't free object twice, free the right oneDanny Al-Gaaf2013-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Object 'librados::ObjectWriteOperation *op' is freed twice in the TEST test_version_inc_read. Free instead 'librados::ObjectReadOperation *rop' Related cppcheck warning: [src/test/cls_version/test_cls_version.cc:79]: (error) Memory pointed to by 'op' is freed twice. This should also fix: CID 1049247 (#1 of 1): Use after free (USE_AFTER_FREE) deref_arg: Calling "librados::ObjectWriteOperation::~ObjectWriteOperation()" dereferences freed pointer "op". (The dereference happens because this is a virtual function call.) CID 1049218 (#4 of 4): Resource leak (RESOURCE_LEAK) leaked_storage: Variable "rop" going out of scope leaks the storage it points to. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * | rgw/rgw_metadata.cc: use static_cast<>() instead of C-Style castDanny Al-Gaaf2013-07-201-6/+6
| | | | | | | | | | | | Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * | rgw: change RGWOp::name() to return string instead of char*Danny Al-Gaaf2013-07-2011-84/+84
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return 'const string' instead of 'const char *' from RGWOp::name() to avoid the usage of std::string:c_str() to return 'const char *' in some cases in rgw_rest_replica_log.h. Returning result of c_str() from a function is dangerous since the result gets (may) invalid after the related string object gets destroyed or out of scope (which is the case with return). So you may end up with garbage in this case. Related warning from cppcheck: [src/rgw/rgw_rest_replica_log.h:39]: (error) Dangerous usage of c_str(). The value returned by c_str() is invalid after this call. [src/rgw/rgw_rest_replica_log.h:59]: (error) Dangerous usage of c_str(). The value returned by c_str() is invalid after this call. [src/rgw/rgw_rest_replica_log.h:79]: (error) Dangerous usage of c_str(). The value returned by c_str() is invalid after this call This should also fix: CID 1049250 (#1 of 1): Wrapper object use after free (WRAPPER_ESCAPE) escape: The internal representation of "s" escapes, but is destroyed when it exits scope. CID 1049251 (#1 of 1): Wrapper object use after free (WRAPPER_ESCAPE) escape: The internal representation of "s" escapes, but is destroyed when it exits scope. CID 1049252 (#1 of 1): Wrapper object use after free (WRAPPER_ESCAPE) escape: The internal representation of "s" escapes, but is destroyed when it exits scope. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* | Merge pull request #451 from dalgaaf/wip-da-SCA-cppcheck-6-v2Sage Weil2013-07-217-24/+24
|\ \ | |/ |/| | | | | | | Fix some issues from SCA - v2 - against ceph:next Reviewed-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
| * rgw/rgw_rest_s3.cc: fix dereferencing after deallocationDanny Al-Gaaf2013-07-161-1/+2
| | | | | | | | Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * rgw/rgw_op.cc: reduce scope of local 'ret' integer variableDanny Al-Gaaf2013-07-161-2/+1
| | | | | | | | Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * rgw/rgw_rados.cc: use static_cast instead of C-Style castDanny Al-Gaaf2013-07-161-2/+2
| | | | | | | | Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * rgw/rgw_rest.cc: fix malloc memory leakDanny Al-Gaaf2013-07-161-1/+3
| | | | | | | | | | | | Free with malloc allocated memory in error case before return. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * rgw/rgw_bucket.cc: return result of function callsDanny Al-Gaaf2013-07-161-1/+1
| | | | | | | | | | | | | | | | Return the result of rgw_(un)link_bucket()/ from RGWBucketMetadataHandler::put() to signal errors correctly to the function caller. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * rgw_bucket.cc: don't return bool if return value is intDanny Al-Gaaf2013-07-161-2/+2
| | | | | | | | | | | | | | Fix minor style issue: if the function return value is an integer don't return bool values. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * rgw/rgw_bucket.cc: remove unused local variableDanny Al-Gaaf2013-07-161-1/+0
| | | | | | | | Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * rgw_admin.cc: fix same expression on both sides of '||'Danny Al-Gaaf2013-07-161-13/+12
| | | | | | | | | | | | | | | | Remove twice listed checks, get checks in alphabetical order, added comment above the checks to point out to keep it in alphabetical order to avoid double checks. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * cls_rgw_client.cc: reduce scope of local variableDanny Al-Gaaf2013-07-161-1/+1
| | | | | | | | Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* | Merge remote-tracking branch 'gh/wip-swift' into nextSage Weil2013-07-193-75/+33
|\ \ | | | | | | | | | Reviewed-by: Greg Farnum <greg@inktank.com>
| * | mon/PaxosService: update on_active() docs to clarify calling rulesSage Weil2013-07-191-2/+3
| | | | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
| * | mon/OSDMonitor: discard failure waiters, info on shutdownSage Weil2013-07-192-11/+17
| | | | | | | | | | | | | | | | | | | | | This would prevent a leak, if we didn't assert before that in the failure_reporter_t dtor. Signed-off-by: Sage Weil <sage@inktank.com>
| * | mon: OSDMonitor: only thrash and propose if we are the leaderSage Weil2013-07-191-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'thrash_map' is only set if we are the leader, so we would thrash and propose the pending value if we are the leader. However, we should keep the 'is_leader()' check not only for clarity's sake (an unfamiliar reader may cry OMGBUG, prompting to a patch much like this), but also because we may lose a subsequent election and become a peon instead, while still holding a 'thrash_map' value > 0 -- and we really don't want to propose while being a peon. [This is a rebased version of 5eac38797d9eb5a59fcff1d81571cff7a2f10e66, complete with the typo fix in d656aed599ee754646e16386ce5a4ab0117f2d6e.] Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
| * | mon/OSDMonitor: do not wait for readable in send_latest()Sage Weil2013-07-192-59/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | send_latest() checks for readable and, if untrue, will wait before sending out the latest OSDMap. This is completely unnecessary; I think it is a hold-over from when we have independent paxos states. An audit of all callers confirms that everyone would be happy with whatever is committed, even if we are in the process of committing an even newer version. Effectively, everyone waits *above* this layer in the usual PaxosService traps for whether we are readable or not. This means that waiting_for_map and send_to_waiting() go away entirely, which is nice. This addresses, among other things: send_to_waiting() is called from update_from_paxos(), which can be called when we are not readable due to the paxos commit/finish timing changes in f1ce8d7c955a24 and c711203c0d4b. If no subsequent update happens, those waiters never get their maps. Instead, we send them immediately--we know they are committed and old history is as good as future history. Fixes: #5643 Signed-off-by: Sage Weil <sage@inktank.com>
| * | Revert "mon/OSDMonitor: send_to_waiting() in on_active()"Sage Weil2013-07-191-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f06a124a7fa0717ef8c523408b31d814df57caca. On peons, on_active() is only called when we *first* become active after an election. Only on the leader is it called after each commit/update. This makes this change cause other problems (broken subscriptions on peons, in particular). We possibly should fix that, but there is also a simpler fix for the original problem we were trying to solve. Signed-off-by: Sage Weil <sage@inktank.com>
| * | Revert "mon: OSDMonitor: only thrash and propose if we are the leader"Sage Weil2013-07-191-8/+2
| | | | | | | | | | | | This reverts commit 5eac38797d9eb5a59fcff1d81571cff7a2f10e66.
| * | Revert "mon/OSDMonitor: fix typo"Sage Weil2013-07-191-1/+1
| | | | | | | | | | | | This reverts commit d656aed599ee754646e16386ce5a4ab0117f2d6e.
| * | mon: improve osdmap subscription debug outputSage Weil2013-07-191-0/+3
| | | | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
* | | ceph_rest_api.py: remove unused importsDan Mick2013-07-191-3/+0
| | | | | | | | | | | | | | | | | | Fixes: #5684 Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* | | ceph.in: better error message when daemon command returns nothingDan Mick2013-07-191-0/+2
|/ / | | | | | | | | | | Fixes: #5683 signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* | Merge remote-tracking branch 'gh/wip-stats' into nextSage Weil2013-07-193-24/+79
|\ \ | | | | | | | | | Reviewed-by: Samuel Just <sam.just@inktank.com>
| * | mon/PGMap: avoid negative pg stats when calculating ratesSage Weil2013-07-191-14/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | We periodically see strange values come out of the estimated cluster throughput and recovery rates. Pretty sure this is cause by feeding negative values into the rate arithmetic and then giving the si_t helpers mangled (sign-extended + bit shifted) values. Signed-off-by: Sage Weil <sage@inktank.com>
| * | mon/PGMap: use signed values for calculated ratesSage Weil2013-07-191-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | si_t (and friends) does not handle signed values, but at least we can give the Formatters unmangled values. This shouldn't happen (tm), but if it does this will make things a bit less confusing and makes the code a bit less fragile. Signed-off-by: Sage Weil <sage@inktank.com>
| * | osd: add floor() method to pg/osd stat structsSage Weil2013-07-191-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | We often want to maintain a nonnegative value. We generalize this to floors other than zero only because it makes the function call make intuitive sense; I don't think it is at all useful. Signed-off-by: Sage Weil <sage@inktank.com>
| * | osd: make pool_stat_t *log_size fields signedSage Weil2013-07-192-4/+4
| | | | | | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
* | | Merge branch 'wip-rgw-next-2' into nextGreg Farnum2013-07-1915-95/+158
|\ \ \ | | | | | | | | | | | | Reviewed-by: Greg Farnum <greg@inktank.com>
| * | | rgw: remove extra unused param from RGWRados::get_attr()Yehuda Sadeh2013-07-194-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | No user for the extra obj_version param. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
| * | | cls_rgw: quiet down verbose log messageYehuda Sadeh2013-07-191-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
| * | | rgw: replace logic that compares regionsYehuda Sadeh2013-07-193-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic was a bit broken. Basically, we want to make sure that region names are the same. However, if region name is not set then we need to check whether it's the master region. This can happen in upgrade cases where originally we didn't have a region name set. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
| * | | rgw-admin: link / unlink should report errorsYehuda Sadeh2013-07-191-2/+10
| | | | | | | | | | | | | | | | Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
| * | | rgw: fix time parsing in replica logYehuda Sadeh2013-07-191-6/+6
| | | | | | | | | | | | | | | | Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
| * | | rgw: bucket entry point object ver fixesYehuda Sadeh2013-07-1910-25/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Multiple fixes: - sync master, secondary entry point ver on creation - use correct entry point version when removing entry point - check correct version on bucket removal Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
| * | | rgw: remove s->objv_trackerYehuda Sadeh2013-07-192-18/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | was never initialized correctly anyway. It was only supposed to be used for buckets, but it was never initialized in that case. Using s->bucket_info.objv_tracker instead. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
| * | | rgw: forward delete bucket request to master after removalYehuda Sadeh2013-07-191-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can only forward the bucket removal to the master if it was successfully removed locally. The master region has no knowledge about whether the bucket can be removed or not, e.g., there are still objects in the bucket. If we send it to the master first, then it'll happily remove it even though it might fail in the end. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>