summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* qa: workunits: mon: workunit to stress the monitor's capswip-5648Joao Eduardo Luis2013-08-021-0/+242
| | | | | | current state may not work. Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
* mon: AuthMonitor: change 'auth add' behaviourJoao Eduardo Luis2013-08-021-20/+101
| | | | | | | | | | | | | | | | | | | | 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>
* 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: 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>
* ceph_rest_api.py: reversed test for failed requestDan Mick2013-07-251-1/+1
| | | | | | | A failed request has a response code *outside* the range (200, 300], not within it. Signed-off-by: Dan Mick <dan.mick@inktank.com>
* rest/test.py: earlier versions of requests.py don't quote ' ' in paramsDan Mick2013-07-251-2/+2
| | | | | | | | requests 0.12.1 handles queryparams in the URL with embedded spaces; requests 0.8.2 does not. Avoid the issue by quoting the URL into expect(). Signed-off-by: Dan Mick <dan.mick@inktank.com>
* OSD: tolerate holes in stored mapsSamuel Just2013-07-254-8/+27
| | | | | | | | | | We may have holes in stored maps during init_splits_between and advance_pg. In either case, we should simply skip the missing maps. Fixes: #5677 Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* ceph_rest_api.py: return error in nonformatted modeDan Mick2013-07-251-0/+3
| | | | | | | | | When a nonformatted request is made, currently the only text in the response is the (probably empty) response buffer. Add the statusmsg as well, where the error is likely to be explained. This lets the http client get a clue what happened. Signed-off-by: Dan Mick <dan.mick@inktank.com>
* ceph_rest_api.py: actually remove the trailing / on baseurlDan Mick2013-07-251-1/+1
| | | | | | | Lurking bug since version 1... Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* mon/MonCap: match param for entity (not name)Sage Weil2013-07-251-2/+2
| | | | | Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Dan Mick <dan.mick@inktank.com>
* mon: translate caps=[k1,v1,k2,v2] into [caps_k1=v1, caps_k2=v2]Sage Weil2013-07-251-2/+14
| | | | | | | The command matching needs key/value pairs. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Dan Mick <dan.mick@inktank.com>
* mon/Paxos: share uncommitted value when leader is/was behindSage Weil2013-07-251-1/+1
| | | | | | | | | | | | | | | | | If the leader has and older lc than we do, and we are sharing states to bring them up to date, we still want to also share our uncommitted value. This particular case was broken by b26b7f6e, which was only contemplating the case where the leader was ahead of us or at the same point as us, but not the case where the leader was behind. Note that the call to share_state() a few lines up will bring them fully up to date, so after they receive and store_state() for this message they will be at the same lc as we are. Fixes: #5750 Backport: cuttlefish Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com> Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
* remove old push_to_kclient.plSage Weil2013-07-251-32/+0
| | | | Signed-off-by: Sage Weil <sage@inktank.com>
* ceph-disk: use new dumpling-style osd caps if we can, or fall back to ↵Alfredo Deza2013-07-251-17/+36
| | | | | | | old-style ones Signed-off-by: Alfredo Deza <alfredo@deza.pe> Reviewed-by: Sage Weil <sage@inktank.com>
* osd: Don't put functional code inside of an assertDavid Zafman2013-07-251-1/+2
| | | | | | | Fix assert in OSDService::get_map() Signed-off-by: David Zafman <david.zafman@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* ceph_argparse.py: wrong variable used if valid() fails for Ceph{Osd}NameDan Mick2013-07-251-2/+2
| | | | | | self.t isn't valid in the failure case; use t Signed-off-by: Dan Mick <dan.mick@inktank.com>
* Merge pull request #456 from dalgaaf/wip-da-CID-1Sage Weil2013-07-253-2/+19
|\ | | | | | | | | | | Fix CID issues Reviewed-by: Sage Weil <sage@inktank.com> Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
| * test_cls_statelog.cc: fix resource leak, delete 'rop' at end of functionDanny Al-Gaaf2013-07-221-0/+1
| | | | | | | | | | | | | | | | CID 1049213 (#3 of 3): 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>
| * test_cls_statelog.cc: fix resource leak, delete op at end of functionDanny Al-Gaaf2013-07-221-0/+1
| | | | | | | | | | | | | | | | CID 1049214 (#13 of 13): Resource leak (RESOURCE_LEAK) leaked_storage: Variable "op" going out of scope leaks the storage it points to. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * test_cls_statelog.cc: fix resource leak, delete rop at end of functionDanny Al-Gaaf2013-07-221-0/+1
| | | | | | | | | | | | | | | | CID 1049215 (#12 of 12): 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>
| * test_cls_version.cc: fix resource leak, delete before new()Danny Al-Gaaf2013-07-221-1/+10
| | | | | | | | | | | | | | | | | | | | | | Fix some more cases where resource wasn't deleted/freed before call new(). CID 1049216 (#1-9 of 9): Resource leak (RESOURCE_LEAK) overwrite_var: Overwriting "op" in "op = new_op()" leaks the storage that "op" points to. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * test_cls_version.cc: fix resource leak, delete before new()Danny Al-Gaaf2013-07-221-0/+1
| | | | | | | | | | | | | | | | CID 1049217 (#1 of 1): Resource leak (RESOURCE_LEAK) overwrite_var: Overwriting "op" in "op = new_op()" leaks the storage that "op" points to. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * test_cls_version.cc: fix another ressource leakDanny Al-Gaaf2013-07-221-0/+2
| | | | | | | | | | | | | | | | CID 1049219 (#17 of 17): Resource leak (RESOURCE_LEAK) leaked_storage: Variable "op" going out of scope leaks the storage it points to. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * test_cls_version.cc: fix ressource leakDanny Al-Gaaf2013-07-221-0/+2
| | | | | | | | | | | | | | | | CID 1049220 (#18 of 18): 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>
| * cls/rgw/cls_rgw.cc: init start_key_added with falseDanny Al-Gaaf2013-07-221-1/+1
| | | | | | | | | | | | | | | | | | Fix for coverity issue: CID 1049231 (#1 of 1): Uninitialized scalar variable (UNINIT) uninit_use: Using uninitialized value "start_key_added". Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* | Merge pull request #465 from dalgaaf/wip-da-CID-2Sage Weil2013-07-254-8/+10
|\ \ | | | | | | | | | | | | | | | Fix some more CID issues Reviewed-by: Sage Weil <sage@inktank.com> Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
| * | rgw/rgw_metadata.h: init cur_shard in LogListCtx with 0Danny Al-Gaaf2013-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | CID 1054868 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR) uninit_member: Non-static class member "cur_shard" is not initialized in this constructor nor in any functions that it calls. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * | rgw/rgw_metadata.cc: fix possible null dereferencingDanny Al-Gaaf2013-07-241-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CID 1054827 (#1 of 1): Dereference after null check (FORWARD_NULL) var_deref_model: Passing null pointer "objv_tracker->read_version" to function "obj_version::operator =(obj_version const &)", which dereferences it. Moved affected 2 cases into the block checking for objv_tracker Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * | os/ObjectStore.cc: don't fallthrough after OP_OMAP_RMKEYRANGEDanny Al-Gaaf2013-07-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | CID 1054829 (#1 of 1): Missing break in switch (MISSING_BREAK) unterminated_case: This case (value 37) is not terminated by a 'break' statement. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
| * | mon/Monitor.cc: init scrub_version with 0 in constructorDanny Al-Gaaf2013-07-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | CID 1019623 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR) uninit_member: Non-static class member "scrub_version" is not initialized in this constructor nor in any functions that it calls. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* | | config_opts.h: increase xfs,btrfs wbthrottle defaultsSamuel Just2013-07-254-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also increase fd limit defaults to accomodate the larger number of fds. Fixes: #5692 Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com> Reviewed-by: Mark Nelson <mark.nelson@inktank.com>
* | | FileStore::_collection_rename: fix global replay guardSamuel Just2013-07-251-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the replay is being replayed, we might have already performed the rename, skip it. Also, we must set the collection replay guard only after we have done the rename. Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* | | HashIndex: reset attr upon split or merge completionSamuel Just2013-07-251-13/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | A replay of an in progress merge or split might make our counts unreliable. Fixes: #5723 Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* | | test/filestore/store_test: add test for 5723Samuel Just2013-07-252-5/+77
| | | | | | | | | | | | | | | Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* | | Merge tag 'v0.67-rc2' into nextSage Weil2013-07-251-0/+6
|\ \ \ | | | | | | | | | | | | v0.67-rc2
| * | | v0.67-rc2v0.67-rc2Gary Lowell2013-07-241-0/+6
| | | |
* | | | ceph.spec.in, debian/control: python-ceph depends on python-flaskDan Mick2013-07-242-1/+2
|/ / / | | | | | | | | | Signed-off-by: Dan Mick <dan.mick@inktank.com>
* | | rest/test.py: cope with older requests.py versionsDan Mick2013-07-241-55/+56
| | | | | | | | | | | | | | | | | | | | | Older requests.py didn't have r.json (or r.json()); avoid by decoding the json myself Signed-off-by: Dan Mick <dan.mick@inktank.com>
* | | ceph-disk: use new get_dev_path helper for listSage Weil2013-07-241-4/+4
| | | | | | | | | | | | | | | | | | | | | Backport: cuttlefish Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Dan Mick <dan.mick@inktank.com> Tested-by: Olivier Bonvalet <ob.ceph@daevel.fr>
* | | ceph_rest_api.py: allow config section fallbackDan Mick2013-07-241-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | Try clientname, then 'client', then 'global Fixes: #5743 Signed-off-by: Dan Mick <dan.mick@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* | | global/signal_handler: poll on the control pipe, tooSage Weil2013-07-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | We also need to poll the control fd/pipe so that we restart the poll loop when new signal handlers are added. This was broken by commit 8e4a78f1. Fixes: #5742 Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
* | | Merge branch 'wip-cephtool-cleanup' into nextDan Mick2013-07-244-44/+32
|\ \ \ | | | | | | | | | | | | Reviewed-by: Sage Weil <sage@inktank.com>
| * | | ceph.in: remove dead codeDan Mick2013-07-241-11/+0
| | | | | | | | | | | | | | | | Signed-off-by: Dan Mick <dan.mick@inktank.com>
| * | | rest/test.py: osd lspools should be a 'GET'Dan Mick2013-07-241-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Dan Mick <dan.mick@inktank.com>
| * | | MonCommands.h: osd pool delete "rw" perms, osd pool set no longer expDan Mick2013-07-241-3/+2
| | | | | | | | | | | | | | | | Signed-off-by: Dan Mick <dan.mick@inktank.com>
| * | | ceph.in/ceph_argparse.py: move find_cmd_target() to ceph_argparse.pyDan Mick2013-07-242-28/+28
| |/ / | | | | | | | | | Signed-off-by: Dan Mick <dan.mick@inktank.com>
* | | mon/OSDMonitor: search for latest full osdmap if record version is missingSage Weil2013-07-241-0/+10
|/ / | | | | | | | | | | | | | | | | | | | | | | | | In 97462a3213e5e15812c79afc0f54d697b6c498b1 we tried to search for a recent full osdmap but were looking at the wrong key. If full_0 was present we could record that the latest full map was last_committed even though it wasn't present. This is fixed in 76cd7ac1c, but we need to compensate for when get_version_latest_full() gives us a back version number by repeating the search. Fixes: #5737 Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
* | test: test_store_tool: global init before using LevelDBStoreJoao Eduardo Luis2013-07-241-4/+22
| | | | | | | | | | | | | | Fixes a segfault Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
* | mon: OSDMonitor: fix a bug introduced on 97462a32Joao Eduardo Luis2013-07-241-1/+1
| | | | | | | | | | | | | | | | Fixes: #5737 Backport: cuttlefish Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>