Commit Graph

27559 Commits

Author SHA1 Message Date
David Zafman
f67e437b03 Merge branch 'wip-5371-next' into next
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-07-12 14:25:33 -07:00
David Zafman
5dd1d4b142 test: idempotent filestore test failure
Remove obsolete use of collection_move()
Allow operations to be skipped if random selections don't make sense
Track total number of possible objects in m_num_objects
BUG: do_remove() was calling _do_touch() instead of _do_remove()
For ops that require an object, select from among existing objects in collection
Initialize m_num_objects unique objects across collections

touch: don't create an object that already exists in another collection
remove: Use remove_obj() to clear object from m_objects to have accurate tracking
clone/clone_range(): Select 2 existing objects in the collection
add: Skip operation if selected target object name exists in target collection
move: Removed this buggy operation that is only present for upgrades

Fixes: #5371
Fixes: #5240

Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-07-12 14:21:21 -07:00
David Zafman
c70216a237 Revert "test_filestore_idempotent: use obj name from source coll add"
This reverts commit 0bc731ea93.
2013-07-12 14:18:11 -07:00
David Zafman
0a3c902c16 Revert "test_filestore_idempotent: make newly created objects globally unique"
This reverts commit cdf5785c5e.
2013-07-12 14:17:55 -07:00
Sage Weil
eccbdaa8a7 ceph-object-corpus: added cuttlefish objects
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 13:33:55 -07:00
Yehuda Sadeh
97efc72d1b rgw: fix a typo
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-12 13:31:17 -07:00
Sage Weil
e390f44b4a Merge remote-tracking branch 'gh/wip-corpus' into next
Rgw bits Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-12 13:06:35 -07:00
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
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