Commit Graph

27952 Commits

Author SHA1 Message Date
Samuel Just
826478cfde dev/osd_internals,src/osd: add erasure_coding.rst and PGBackend.h
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-08-02 16:05:50 -07:00
Sage Weil
12c1f1157c ceph_test_rados: print version banner on startup
It is helpful when looking at qa run logs to see what version of the
tester is running.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-28 15:42:08 -07:00
Sage Weil
74c1bec2aa ceph-authtool: fix cli tests
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-28 15:29:49 -07:00
Sage Weil
7b683f7f6a test/system/*: parse CEPH_ARGS environment
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-28 15:27:57 -07:00
Sage Weil
be73215913 Merge pull request #474 from dalgaaf/wip-da-next-fix-help
Add missing commands to help/usage and manpage of ceph-authtool

Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-28 15:26:17 -07:00
Danny Al-Gaaf
347b5a2078 ceph-authtool.8: add missing commands to man page
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-28 23:39:09 +02:00
Danny Al-Gaaf
86b2632831 ceph_authtool.cc: update help/usage text
Added implemented but not listed commands to the help/usage text:
* -g  shortcut for --gen-key
* -a  shortcut for --add-key
* -u/--set-uid to set auid
* --gen-print-key
* --import-keyring

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-28 23:25:58 +02:00
Sage Weil
4b6c569a11 mon/DataHealthService: do not name xml key after mon
The name might be something like '0', which is illegal.  This should be
the *type*, not name.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-28 08:19:12 -07:00
Sage Weil
6881ab3b39 debian, rpm: make python-ceph depend on python-requests
For ceph-rest-api.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-27 17:32:49 -07:00
Sage Weil
b5250fdc70 Merge pull request #471 from dalgaaf/wip-da-fix-pylint
Cleanup minor issues from pylint

Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-27 07:33:21 -07:00
Danny Al-Gaaf
09ee092ffd pybind/rbd.py: remove unused import of 'pointer'
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-27 11:37:37 +02:00
Danny Al-Gaaf
246011807b cephfs.py: remove unused imports
Removed ctypes, c_uint64, c_ubyte, pointer, CFUNCTYPE since they
are not used in the code.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-27 11:37:34 +02:00
Danny Al-Gaaf
865d5e9255 rados.py: fix bad indentation
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-27 11:37:26 +02:00
Danny Al-Gaaf
6eadb870b4 ceph_argparse.py: add missing spaces after comma
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-27 11:36:35 +02:00
Danny Al-Gaaf
da4d23ec08 ceph_argparse.py: remove unnecessary semicolons
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-27 11:35:38 +02:00
Danny Al-Gaaf
a48b391fce ceph_rest_api.py: fix bad indentation
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-27 11:32:34 +02:00
Sage Weil
bd0e35f2e1 test/admin_socket: fix admin_socket unit tests
Command is now JSON!

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-26 22:28:40 -07:00
Sage Weil
94865368ca rgw: fix RGWFormatter_Plain
Needs dump_format_unqouted.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-26 22:14:47 -07:00
Sage Weil
535d8701b9 common/admin_socket: do not populate empty help strings
Hidden commands have no help string.  Make this consistent: the m_help
entry is always there, but may be empty.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-26 22:08:26 -07:00
Sage Weil
b4bde3cbc0 common/perf_counters: fix unit tests
The commands are now in json.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-26 21:47:34 -07:00
Sage Weil
2aa9afa5c5 common/perf_counters: fix missing decimal in time, quoting
We shouldn't quote integer or float values.  Also easier to use
dump_unsigned.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-26 21:47:33 -07:00
Sage Weil
a8c1a2a28b common/Formatter: add dump_format_unquoted()
Sometimes a savvy caller wants to format the output but doesn't want it
quoted.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-26 21:47:33 -07:00
Dan Mick
0041e9f8ff rados.py: missing parameter to make_ex()
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-26 21:38:12 -07:00
Dan Mick
8af47755af ceph-rest-api: clean up options/environment
ceph-rest-api:
* create app from wrapper by calling generate_app()
* pass args to generate_app() (early parsed in wrapper)
* parse -i/--id here as well
* set addr:port on returned app object
* handle only EnvironmentError exceptions; let others spew traceback
* turn off debug when running singlethreaded server

ceph_rest_api.py:
* put glob.* on app.ceph_* instead; pass around app in init code
* drop conf parsing (let librados do its job)

Documentation updated to match.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-26 21:38:12 -07:00
Sage Weil
629326aa92 qa/fs/.gitignore
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-26 21:06:14 -07:00
Sage Weil
803a1fdd08 ceph_test_admin_socket: fix unit test
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-26 21:06:06 -07:00
David Zafman
a419354120 message: Fix asserts that dont' trigger
Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-26 18:31:04 -07:00
Sage Weil
a9ca6234c8 librados: EINVAL on a negative osd id
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-26 17:26:48 -07:00
Dan Mick
3f93691bf3 ceph.in: make osdids() (and mon, mds) work on old mons
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-26 17:24:22 -07:00
Sage Weil
4b739005a5 osd: humor coverity
CID 1058392: Out-of-bounds access (OVERRUN_DYNAMIC) [select issue]

CID 1058391 (#1 of 1): Out-of-bounds access (OVERRUN)
32. alloc_strlen: Allocating insufficient memory for the terminating null of the string.

CID 1058390 (#1 of 1): Unchecked return value from library (CHECKED_RETURN)
13. check_return: Calling function "this->class_handler->open_all_classes()" without checking return value. It wraps a library function that may fail and return an error code. [show details]
    	14. unchecked_value: No check of the return value of "this->class_handler->open_all_classes()".

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-26 17:14:44 -07:00
Sage Weil
323bdaa257 mon/MonCap: mds needs to subscribe to the osdmap
Usually it can get it from the OSD, but it assumes the mon will also share
and doesn't behave when it does not.

Fixes: #5767
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-26 16:58:22 -07:00
Sage Weil
14a3e2ddce remove unused fiemap code
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-26 16:58:14 -07:00
Sage Weil
6faf8b680d PendingReleaseNotes: note on 'ceph tell <pgid> ...'
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-26 16:21:09 -07:00
Sage Weil
0757c60b66 Merge remote-tracking branch 'gh/wip-tell-unified' into next
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-26 16:12:19 -07:00
Dan Mick
aa00ace1d8 ceph_rest_api.py: cleanup, more docstrings, unused vars
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-26 16:11:12 -07:00
Dan Mick
d75b6ea1a4 ceph_argparse.py: make find_cmd_target handle tell <pgid>
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-26 16:11:12 -07:00
Dan Mick
8985e1c9e8 ceph_argparse, mon: make "tell <pgid>" work (duplicating "pg <pgid>")
It's a wad of special cases, but it implements "tell <pgid>" such that
it has the same effect as "pg <pgid>".

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-26 16:11:12 -07:00
Dan Mick
7b42deef38 ceph_rest_api.py: obtain and handle tell <osd-or-pgid> commands
Contact an OSD that's up to get a list of the commands, and use
them to add to the URL map.

Special treatment throughout for these commands:

* hack the help signature dump
* keep a 'flavor' per command to allow special handler() processing
* strip off 'tell/<target>' when constructing command
* allow multiple dicts with the same url
  (the parameters and get/put methods can change)
* because of above, method must be validated in handler()
* validate the given OSD
* calculate target for command (mon, osd, pg)

Unrelated: make method_dict into global METHOD_DICT

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-26 16:11:03 -07:00
Sage Weil
6ac8aed040 mon/PGMonitor: reset in-core PGMap if on-disk format changes
We might have a sequence like:

- start mon, load pgmap 100
- sync
 - including a format upgrade at say v 150
- refresh
 - see format_version==1, and try read pgmap:101 as new format

This simply clears our in-memory state if we see that the format has
changed.  That will make update_from_paxos reload the latest and prevent
it from walking through the old and useless inc updates.

Note: this does not affect the auth monitor because we unconditionally
load the latest map in update_from_paxos on upgrade.  Also, the upgrade
there wasn't a format change--just a translation of cap strings from the
old to new style.

Fixes: #5764
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-07-26 15:25:30 -07:00
Sage Weil
10959404b3 Merge pull request #470 from dalgaaf/wip-da-CID-3.v2
Fix several CID issues - v2

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-26 15:08:56 -07:00
Danny Al-Gaaf
de51aac8ac rgw/rgw_metadata.cc: delete md_log (RGWMetadataLog) in destructor
Call delete on md_log in the destructor.

CID 1054826 (#1 of 1): Resource leak in object (CTOR_DTOR_LEAK)
 1. alloc_new: Allocating memory by calling "new RGWMetadataLog(_cct, _store)".
 2. var_assign: Assigning: "this->md_log" = "new RGWMetadataLog(_cct, _store)".
 3. ctor_dtor_leak: The constructor allocates field "md_log" of
    "RGWMetadataManager" but the destructor and whatever functions it calls
    do not free it.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-26 23:56:10 +02:00
Danny Al-Gaaf
a45e296c04 rgw/rgw_rest_log.cc: free 'handle' to prevent memory leak
Call complete_list_entries() at end of RGWOp_MDLog_List::execute()
to free the 'handle'.

CID 1054834 (#1-2 of 2): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "handle" going out of scope leaks the
  storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-26 23:55:57 +02:00
Danny Al-Gaaf
94cefc7765 test_cls_log.cc: fix resource leak, delete 'rop'
Fixes for:

CID 1054838 (#14 of 14): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "rop" going out of scope leaks the
  storage it points to.

CID 1054836 (#5 of 5): 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>
2013-07-26 23:55:53 +02:00
Danny Al-Gaaf
87f8e8fe9c test_cls_log.cc: remove empty lines
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-26 23:55:49 +02:00
Danny Al-Gaaf
44f43ff8e9 test_cls_statelog.cc: fix memory leak, delete 'rop'
CID 1054840 (#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>
2013-07-26 23:55:44 +02:00
Danny Al-Gaaf
143b843ed1 test_cls_version.cc: close some memory leaks
Close some memory leaks caused by calling new() without
freeing the memory already assigned to 'rop'.

CID 1054848 (#1-6 of 6): Resource leak (RESOURCE_LEAK)
  overwrite_var: Overwriting "rop" in "rop = new_rop()"
  leaks the storage that "rop" points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-26 23:55:41 +02:00
Sage Weil
792280cf06 Merge pull request #467 from dalgaaf/wip-da-next-SCA-cppcheck-1
Fix typical smaller issues from SCA

Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-26 14:54:50 -07:00
Sage Weil
a90a2b42db upstart: stop ceph-create-keys when the monitor stops
This avoids lingering ceph-create-keys tasks.

Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-26 14:07:02 -07:00
Sage Weil
6f996223fb osd: make open classes on start optional
Some might want the old behavior.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-26 14:02:07 -07:00
Sage Weil
c24e652d8c osd: load all classes on startup
This avoid creating a wide window between when ceph-osd is started and
when a request arrives needing a class and it is loaded.  In particular,
upgrading the packages in that window may cause linkage errors (if the
class API has changed, for example).

Fixes: #5752
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-26 13:59:45 -07:00