Commit Graph

27705 Commits

Author SHA1 Message Date
Sage Weil
a44854cd55 qa/workunits/cls: remove new rgw tests
These need extra arguments to connect to rgw...

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 12:43:25 -07:00
Sage Weil
b7c549db3e msgr: add 'ms die on old message' to help catch reconnect seq issues
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 11:38:40 -07:00
Sage Weil
9f5cae447b mon: structure 'ceph status' json output
Return the summary info in a structured for instead of just mimicing the
legacy plaintext format.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-07-12 11:36:18 -07:00
Sage Weil
2dcab51f58 mon: fix copy/paste error
From rebase/squash into 96c48835d1.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 11:34:22 -07:00
Sage Weil
e0baf6369c Merge branch 'wip-mon-fixes' into next
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-07-12 11:28:43 -07:00
Sage Weil
cf9d1e1a10 mon: clean up check_fsid() a bit
Use the uuid_d type instead of kludging string comparisons.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 11:28:18 -07:00
Sage Weil
2dc8688a3d mon: stash latest state when flagging force_sync
Store our latest state when we set the force_sync flag.  This is important
because we will clear the store the next time we start up and may not be
able to get a useful monmap at that point.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 11:28:18 -07:00
Sage Weil
96c48835d1 mon: factor out stashing latest monmap
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 11:28:09 -07:00
Sage Weil
0c83b5fec2 cls_rgw: add missing type tests
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 11:14:28 -07:00
Sage Weil
d0bee5d85c cls_refcount: add type tests
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 11:14:19 -07:00
Sage Weil
a04525bebf mon: fix sync_start doc
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 11:13:00 -07:00
Sage Weil
e019dd0497 mon: fix off-by-one: no need to reapply previous last_committed after sync
The old last_committed is already committed; don't reapply. This also fixes
the case where lc was 0 (i.e., we did get_cookie_recent from the beginning
of time).

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 11:12:59 -07:00
Sage Weil
e213b1bc25 mon: fix recent paxos sync from 0 when first_committed == 1
This is okay; allow it.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 11:12:59 -07:00
Sage Weil
b8fad05912 doc/dev: add corpus.rst
Structure of the corpus dir, how to add to it.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 10:36:47 -07:00
Sage Weil
8e83a3bea2 Merge remote-tracking branch 'gh/next' 2013-07-12 10:16:27 -07:00
Sage Weil
4a3241c5e3 osd: reenable pg_query_t test
This was disabled back in 4ce17cca2e924b2ef9565d5c345cd602bcc6dd98; not
sure why.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 09:48:39 -07:00
Sage Weil
8579d8073d mon: add encoding tests for newish MMonSync, MMonScrub
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 09:48:39 -07:00
Sage Weil
5139d0ce14 mds: add encoding test for inode_backtrace_t; note incompat in corpus
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 09:48:39 -07:00
Sage Weil
0800ea1c2e osd: add encoding tests for PushOp, PullOp, PushReplyOp
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 09:48:39 -07:00
Sage Weil
17c2995740 mon: add encoding tests for MonitorDBStore data types
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 09:48:39 -07:00
Sage Weil
afb814f571 ceph-object-corpus: new objects for almost-dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 09:48:38 -07:00
Sage Weil
3e4a29111e osd/OSDmap: fix OSDMap::Incremental::dump() for new pool names
The name is always present when pools are created, but not when they are
modified.  Also, a name may be present with a new_pools entry if the pool
is just renamed.  Separate it out completely in the dump.

Backport: cuttlefish, bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 09:48:38 -07:00
Sage Weil
f28aa7e12b Merge pull request #426 from dalgaaf/wip-da-SCA-cppcheck-5
Fix some typical SCA issues from cppcheck

Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-12 08:52:56 -07:00
Danny Al-Gaaf
6379f37d48 test_rgw_admin_meta.cc: prefer prefix ++operator for non-trivial iterator
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-12 14:40:39 +02:00
Danny Al-Gaaf
329e467b4a cls/rgw/cls_rgw.cc: use empty() instead of checking for size() == 0
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-12 14:39:33 +02:00
Danny Al-Gaaf
734c8245ee test_rgw_admin_log.cc: prefer prefix ++operator for non-trivial iterator
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-12 14:21:59 +02:00
Danny Al-Gaaf
88ba651591 test_rgw_admin_opstate.cc: prefer prefix ++operator for non-trivial iterator
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-12 14:18:46 +02:00
Danny Al-Gaaf
028f6437fe test_rgw_admin_meta.cc: prefer prefix ++operator for non-trivial iterator
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-12 14:15:55 +02:00
Danny Al-Gaaf
cccc09a491 rgw/rgw_rest_opstate.cc: prefer prefix ++operator for non-trivial iterator
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-12 12:10:24 +02:00
Danny Al-Gaaf
22e0dbbd0e rgw/rgw_rados.cc: use empty() instead of checking for size() > 0
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-12 12:08:52 +02:00
Danny Al-Gaaf
ea0fcfacb3 cmdparse.cc: catch exception by reference
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-12 12:06:55 +02:00
Dan Mick
1f8fe709b6 ceph-rest-api: Missing packaging (binary in .spec, manpage in both)
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-11 18:25:44 -07:00
Dan Mick
3d25f46112 ceph-rest-api: make main program be "shell" around WSGI guts
Move WSGI guts to pybind/ceph_rest_api.py for importability
into WSGI server frameworks.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-11 17:17:39 -07:00
Dan Mick
cb0f831834 ceph.in: output even a blank status line in compat mode
Fixes: #5594
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-11 16:30:38 -07:00
Sage Weil
93b3e63f43 msg/Message: use old footer for encoded message dump
This avoids the need for a conditional decoding check on ceph-dencoder,
and makes it match up with what encode_message() is doing.  The new(ish)
fields in the footer (the signature) is not useful for the object
corpus.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-11 11:42:02 -07:00
Babu Shanmugam
cf8f16d743 rgw: handle bucket removal by system user on master region
intra region bucket creation, deletion and copy object to and from remote regions validated

Signed-off-by: Babu Shanmugam <anbu@enovance.com>
Reviewed-by:Yehuda Sadeh <yehuda@inktank.com>
2013-07-11 09:21:00 -07:00
Dan Mick
5a6251c80d ceph-rest-api: connect to cluster with configured client name
Spotted by Noah Watkins

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-10 21:55:38 -07:00
Dan Mick
e4d063b082 ceph-rest-api manpage
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-10 20:58:51 -07:00
Dan Mick
07590ae865 cephtool/test.sh: sync status no longer supported
da0aff28ab removed 'ceph sync status';
test script needs to stop trying it

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-10 20:58:51 -07:00
Dan Mick
e66d011cc8 cephtool/test.sh cleanup
1) don't pass subshell to expect_false
2) osd pause/unpause don't take arguments (apply to all OSDs)

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-10 20:58:51 -07:00
Dan Mick
6cafb0e3e0 ceph-rest-api tests
Patterned after cephtool/test.sh, with some deeper validation of
output format and contents (because structured output is easier
to validate).

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-10 20:58:51 -07:00
Dan Mick
4cb0e06266 Add 'ceph-rest-api'
ceph-rest-api is a Python WSGI module for accessing the Ceph cluster.
It supports most of the commands supported by the ceph CLI,
appropriately translated to HTTP GET/PUT requests.  It is not a
truly RESTful interface.

Not supported at this moment: "tell", "pg <pgid>", and "daemon"
commands.

Configuration options are specified in ceph.conf, specified with
-c/--conf or obtained from $CEPH_CONF, /etc/ceph/ceph.conf,
~/.ceph/ceph.conf, or ./ceph.conf.

-n/--name specifies the client name, used for the cluster
authentication key and for the ceph.conf section name (default
is client.restapi).

        restapi keyring = <keyring file>
        restapi public addr = listenIP:port (default 0.0.0.0:5000)
        restapi base url = <base path> (default /api/v0.1)
        restapi log level = (error, warning, info, debug)
        restapi log file = (default /var/log/ceph/<clientname>.log)

Primitive human-level command discovery is supported; GET from
BASEURL (say, http://localhost:5000/api/v0.1) will show an HTML
table of all commands and arguments, method supported, and help strings.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-10 20:58:51 -07:00
Dan Mick
45dc57316a OSDMonitor: return failure for 'osd lost' without safety switch
If user doesn't supply --yes-i-really-mean-it, fail the operation

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-10 20:58:51 -07:00
Dan Mick
c87f55b5a8 CompatSet, MDSMap: formatted dumps must avoid numeric tags
Tags made of numbers only confuse XML parsers.  Avoid them.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-10 20:58:51 -07:00
Dan Mick
e75db7138f mon: OSDMonitor: formatter output on 'osd map'
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-10 20:58:51 -07:00
Dan Mick
17595f3414 mon: OSDMonitor: osd pool get: move to preproc, add formatted output
Move 'osd pool get' handling to preprocess_command()
It's a read operation; there's no need for it to be in prepare_command().
Also, add formatted output.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-07-10 20:58:51 -07:00
Dan Mick
a15d93276e mon: formatted output for 'fsid'
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-10 20:58:50 -07:00
Dan Mick
04fbc523cf mon: Monitor: 'health detail --format=json' should only output JSON
Fixes: #5526

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-07-10 20:58:50 -07:00
Dan Mick
300f42b876 mon: Monitor: support multiple formatters on some status functions
Commands such as 'mon_status', 'quorum_status', 'sync_status' and
'sync_force' didn't support other formatter besides json.  Regardless of
'--format=foo' being specified, they would always output in json.

This commit changes that behavior, allowing a format to be passed.  These
functions do not output in plain-text however.  Plain-text will default
to 'json' -- the reason: the information they provide are better outputted
in a structured fashion, and I was too lazy to come up with a plain-text
version that could be at least as good.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-10 20:58:42 -07:00
Sage Weil
c6d1dba63a test/encoding/import-genearted: fix
Dest dir was wrong, cp shortcut check was wrong.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-10 20:47:08 -07:00