summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* qa: workunits: mon: workunit to stress the monitor's capswip-5648-bJoao Eduardo Luis2013-08-021-0/+242
| | | | | | current state may not work. Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
* - wait for pending at teh beginning, so we don't get bad results fromSage Weil2013-08-021-57/+60
| | | | | | | pending request - move all the input parsing (args vs keyring) to the front - exists check is now simpler - pull key from new_inc explicitly.. no side-effects in an assert!!!!
* mon: AuthMonitor: change 'auth add' behaviourJoao Eduardo Luis2013-08-021-19/+98
| | | | | | | | | | | | | | | | | | | | | If an entity already existed, 'auth add' would smash its key and caps with whatever was on the supplied keyring file; if a keyring weren't specified, we would simply generate a new key and destroy all existing caps (unless caps were specified and happened to be different from the already in-place caps). This behaviour is obviously sketchy. With this patch we now enforce the following behaviour: - if the command reproduces the current state (same key, same caps), we return 0; else, - if entity exists and supplied key OR caps are different, return -EINVAL - if entity does not exist in current state, check if we are about to create it (by checking the pending state); if so, wait for the new state to be committed and re-handle the command then - else create a new entity. Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* mon: drop old _allowed_command()Sage Weil2013-08-022-42/+0
| | | | Signed-off-by: Sage Weil <sage@inktank.com>
* mon: services: no longer needed to enforce caps on a per-service basisJoao Eduardo Luis2013-08-027-31/+12
| | | | | | | We now perform all perm checks for commands on Monitor::handle_command(). Services no longer need to check them. Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
* mon: Monitor: purge old permission checking format on handle_command()Joao Eduardo Luis2013-08-021-57/+0
| | | | Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
* mon: translate caps lists to key/value mapSage Weil2013-08-021-0/+11
| | | | | | | Take original changes from ca8ac9502bdfce888decd4b53669ef57858afcf6 and apply them to this new all-powerful _allowed_command() helper. Signed-off-by: Sage Weil <sage@inktank.com>
* mon: Monitor: check caps considering command's requirementsJoao Eduardo Luis2013-08-022-0/+41
| | | | | | Fixes: #5648 Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
* Merge branch 'wip-5831' into nextYehuda Sadeh2013-08-017-108/+116
|\
| * rgw: only fetch cors info when neededYehuda Sadeh2013-08-017-109/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: #5831 This commit moves around the cors handling code. Beforehand we were unnecessarily reading the cors headers for every request whether that was needed or not. Moved that code to be only called when needed. While at it, cleaned up the layering a bit so that not to mix S3 specific code with the generic functionality (except for debugging). Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
| * rgw: don't read cors attrs if there's no bucket in operationYehuda Sadeh2013-08-011-20/+21
| | | | | | | | | | Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
* | Merge branch 'wip-5810' into nextYehuda Sadeh2013-08-013-6/+11
|\ \
| * | rgw: rename sync-type to update-typeYehuda Sadeh2013-08-011-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
| * | rgw: only check version if meta object existsYehuda Sadeh2013-08-012-5/+10
| |/ | | | | | | | | Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
* | Merge pull request #478 from dalgaaf/wip-da-spec-reqGary Lowell2013-08-011-0/+11
|\ \ | | | | | | | | | Fix BuildRequires in SPEC file Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
| * | ceph.spec.in: merge back JUnit handling from SUSE specDanny Al-Gaaf2013-08-011-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Merge back what we have in the (open)SUSE ceph spec file for JUnit. Add missing Requires and the package is named junit4 on some SUSE versions. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * | ceph.spec.in: move junit BuildRequires to the cephfs-java subpackageDanny Al-Gaaf2013-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | JUnit is only needed by cephfs-java. Move the BuildRequires to this subpackage. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * | ceph.spec.in: use snappy-devel only on RHEL derivativesDanny Al-Gaaf2013-08-011-0/+2
| | | | | | | | | | | | Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * | ceph.spec.in: add missing buildrequires for FedoraErik Logtenberg2013-08-011-0/+2
|/ / | | | | | | | | | | | | | | | | | | This patch adds two buildrequires to the ceph.spec file, that are needed to build the rpms under Fedora. Danny Al-Gaaf commented that the snappy-devel dependency should actually be added to the leveldb-devel package. I will try to get that fixed too, in the mean time, this patch does make sure Ceph builds on Fedora. Signed-off-by: Erik Logtenberg <erik@logtenberg.eu>
* | Merge branch 'wip-5815' into nextDan Mick2013-07-312-19/+36
|\ \ | | | | | | | | | Reviewed-by: Sage Weil <sage@inktank.com>
| * | mon/MDSMonitor: don't call all EINVALs "unrecognized command"Dan Mick2013-07-311-2/+2
| | | | | | | | | | | | | | | | | | Some of them are valid EINVALs (like mds setmap with the wrong epochnum) Signed-off-by: Dan Mick <dan.mick@inktank.com>
| * | rest/test.py: retry mds setmap in case epoch has changedDan Mick2013-07-311-9/+20
| | | | | | | | | | | | | | | | | | | | | Loop 10 times retrying mds dump/getmap/setmap. Fixes: #5815 Signed-off-by: Dan Mick <dan.mick@inktank.com>
| * | rest/test.py: expect_nofail() to allow examination of reasonDan Mick2013-07-311-8/+14
| | | | | | | | | | | | | | | | | | Also remove unused MyException Signed-off-by: Dan Mick <dan.mick@inktank.com>
* | | Merge branch 'wip-5784' into nextDavid Zafman2013-07-313-2/+15
|\ \ \ | |/ / |/| | | | | Reviewed-by: Samuel Just <sam.just@inktank.com>
| * | Verify that deleting op never in check_latest_map_ops mapDavid Zafman2013-07-311-0/+1
| | | | | | | | | | | | Signed-off-by: David Zafman <david.zafman@inktank.com>
| * | osdc: op left in check_lastest_map_opsDavid Zafman2013-07-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Call op_cancel_map_check before cancel_op() in send_linger() Fixes: #5784 Signed-off-by: David Zafman <david.zafman@inktank.com>
| * | osdc: Add asserts that client_lock is heldDavid Zafman2013-07-311-0/+3
| | | | | | | | | | | | | | | | | | Clarify locking by indicating that client_lock is held Signed-off-by: David Zafman <david.zafman@inktank.com>
| * | test: Fix valgrind found "Mismatched free() / delete / delete []"David Zafman2013-07-311-2/+2
| | | | | | | | | | | | | | | | | | Use delete[] in set_argv() so that valgrind runs clean Signed-off-by: David Zafman <david.zafman@inktank.com>
| * | qa: Add workunit that hangs for manual thrasher testingDavid Zafman2013-07-311-0/+8
| |/ | | | | | | Signed-off-by: David Zafman <david.zafman@inktank.com>
* | Merge tag 'v0.67-rc3' into nextSage Weil2013-07-311-0/+6
|\ \ | | | | | | | | | v0.67-rc3
| * | v0.67-rc3v0.67-rc3Gary Lowell2013-07-301-0/+6
| | |
* | | qa/workunits/cephtool/test_daemon.sh: sudoSage Weil2013-07-311-6/+6
| |/ |/| | | | | | | Fixes: #5814 Signed-off-by: Sage Weil <sage@inktank.com>
* | ceph: developer mode: set PATH, tooSage Weil2013-07-301-1/+2
| | | | | | | | | | | | | | Otherwise the call to ceph-conf may fail if it is not installed on the local machine. Signed-off-by: Sage Weil <sage@inktank.com>
* | cephtool/test.sh: add tests for mon daemon commandSage Weil2013-07-301-0/+27
| | | | | | | | | | | | | | [Also move into a separatate test script; validate result -sage] Signed-off-by: Dan Mick <dan.mick@inktank.com> Signed-off-by: Sage Weil <sage@inktank.com>
* | Make all AdminSocket commands use argparse/cmdmap.Dan Mick2013-07-3014-119/+159
| | | | | | | | | | | | | | | | | | | | | | | | Fixes regression in daemon commands with arguments; also resolves reported bug with existing daemon code for arguments with embedded spaces. Fixes: #5503 Fixes: #5800 Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* | rgw: fix set_buckets_enabled(), set_bucket_owner()Yehuda Sadeh2013-07-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: 5808 We cannot call get_bucket_instance_info() at that point, as the bucket structure wasn't initialized, so we don't have the bucket instance location information. Just calling get_bucket_info(). Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com>
* | Objecter: set c->session to NULL if acting is emptySamuel Just2013-07-301-0/+1
|/ | | | | | | | | | | | Otherwise, we might leave a session attached to the CommandOp for an down OSD. handle_osd_map will then delete the session for the down OSD. tick() will then attempt to follow the invalid pointer to find a connection over which to send a MPing. Fixes: #5798 Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* Merge remote-tracking branch 'gh/wip-mon' into nextSage Weil2013-07-304-18/+23
|\ | | | | | | Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
| * mon: allow others to sync from us across bootstrap callsSage Weil2013-07-292-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If someone is syncing from us and there is an election, they currently get reset and have to restart their sync. This can lead to situations where they can never finish, e.g., when the load from them syncing makes us time out commits and call elections. There is nothing that changes during bootstrap that would prevent a sync from proceeding. The only time we need to stop providing is when we ourselves decide to sync from someone else; modify that reset call to reset provider state. All other resets become requester resets. Signed-off-by: Sage Weil <sage@inktank.com>
| * mon: drop useless sync_reset() callsSage Weil2013-07-291-3/+0
| | | | | | | | | | | | These are both right before bootstrap(), which also resets. Signed-off-by: Sage Weil <sage@inktank.com>
| * mon/Paxos: be more vocal about calling electionsSage Weil2013-07-292-5/+5
| | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
* | mon: add missing state nameSage Weil2013-07-291-0/+1
| | | | | | | | Signed-off-by: Sage Weil <sage@inktank.com>
* | rgw: keep a region connection mapYehuda Sadeh2013-07-292-1/+23
| | | | | | | | | | | | | | | | | | | | Fixes: #5793 Beforehand all remote copies were going to the master region which was awfully wrong. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com>
* | rgw: cors subresource needs to be in canonical auth headerYehuda Sadeh2013-07-291-0/+1
| | | | | | | | | | | | | | | | | | | | Fixes: #5789 This was fixed before, however, might have been lost due to recent refactoring + merge. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com>
* | rgw: set bucket attrs are a bucket instance meta operationYehuda Sadeh2013-07-291-1/+5
| | | | | | | | | | | | | | | | | | | | | | Need to do the action through the bucket instance handler and not through the bucket handler, otherwise it's wrongly recorded (and wrongly replayed, ouch). Fixes: #5791 Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com>
* | rgw: track bucket instance oidYehuda Sadeh2013-07-292-4/+18
| | | | | | | | | | | | | | | | | | | | | | We now keep the bucket instance oid in rgw_bucket. The reason we need it is that the bucket might have been created before the entrypoint / bucket instance separation. Fixes: #5790 Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com>
* | rgw: read / write bucket attributes from bucket instanceYehuda Sadeh2013-07-293-9/+17
|/ | | | | | | | | and not from bucket entry point. Fixes: #5770 Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com>
* mon/PGMonitor: fix 'pg dump_[pools_]json'Sage Weil2013-07-291-2/+6
| | | | | | | | | | | | | Use the correct type for the dumpcontents arg. Fixes the dump_pools_json output and avoids these errors: 2013-07-29 13:09:14.089188 7fa0c5d21700 -1 0x7fa0c5d1e7a8 2013-07-29 13:09:16.306560 7fa0c5d21700 -1 bad boost::get: key dumpcontents is not type std::vector<std::string, std::allocator<std::string> > 2013-07-29 13:09:16.317104 7fa0c5d21700 -1 0x7fa0c5d1e7a8 2013-07-29 13:09:16.317136 7fa0c5d21700 -1 bad boost::get: key dumpcontents is not type std::vector<std::string, std::allocator<std::string> > Fixes: #5786 Signed-off-by: Sage Weil <sage@inktank.com>
* mon: fix xml element nameSage Weil2013-07-291-1/+1
| | | | | | Should be the type, not the name. Signed-off-by: Sage Weil <sage@inktank.com>
* check_new_interval must compare old acting with old osdmapLoic Dachary2013-07-292-2/+419
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When trying to establish if the old acting set is either empty or smaller than the min_size of the osdmap, pg_interval_t::check_new_interval compares with the min_size of the new osdmap. Since the goal is to try to determine if the previous interval may have been writeable, it should not enter the if when there were not enough osds in the acting set ( i.e. < min_size ). But it may enter it anyway if min_size was decremented in the new osdmap. A complete set of unit tests were added to cover the logic of check_new_interval. The parameters are prepared to describe a situation where the function returns false (i.e. no new interval). Each case is described in a separate bloc that introduces the minimal changes to demonstrate the intended test case. Because a number of cases have the same output while implementing a different logic, the debug output is parsed to differentiate between them. A test case demonstrating the problem ( check_new_interval must compare old acting with old osdmap ) is added, with a link to the bug number for future reference. The problem is fixed. The text of two debug messages are slightly changed to make the maintenance of the test that match them easier. http://tracker.ceph.com/issues/5780 refs #5780 Signed-off-by: Loic Dachary <loic@dachary.org> Reviewed-by: Sage Weil <sage@inktank.com> Reviewed-by: Samuel Just <sam.just@inktank.com>