Commit Graph

27672 Commits

Author SHA1 Message Date
Dan Mick
0d66c9ebbf MonCommands.h: use new validation for crush names (CephString goodchars)
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 21:42:38 -07:00
Dan Mick
741757a3c3 ceph_argparse.py: allow valid char RE arg to CephString
Change badchars to goodchars (no one was using badchars); allow
goodchars to be a RE character class of valid characters for the
param.  First use: crush item names.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 21:42:38 -07:00
Dan Mick
089dfe8e9e ceph_argparse: ignore prefix mismatches, but quit if non-prefix
I don't know what I was thinking; this was always the right validation
algorithm, and I broke it trying to simplify.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 21:42:30 -07:00
Dan Mick
da4c749ad3 ceph_argparse.py: validate's 3rd arg is not verbose, it's partial
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 21:20:18 -07:00
Dan Mick
b5659b5e7f Merge branch 'wip-wsgi' into next
* wip-wsgi:
  ceph-rest-api: separate into module and front-end for WSGI deploy
  ceph-rest-api: make main program be "shell" around WSGI guts

  Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-12 16:38:28 -07:00
Dan Mick
cc10988850 ceph-rest-api: separate into module and front-end for WSGI deploy
To deploy ceph-rest-api within a WSGI server (apache/mod_wsgi,
nginx/uwsgi, etc.), there needs to be an importable (.py) module
that performs all init/config when imported.  ceph-rest-api was
close, but it needs to be named properly, and there's no argument
passing, so it needs to get args from a fixed file or the env.

Separate most of ceph-rest-api into pybind/ceph_rest_api.py, and make
its arguments come from the environment, and init errors be
ImportError exceptions.  Recase ceph-rest-api as a thin layer that
does the usual setup and arg parsing, and then sets args into the
environment and imports ceph_rest_api.py, catching exceptions and
reporting errors.  This allows standalone execution as usual.
ceph-rest-api grabs a few module globals (addr/port and the flask.app)
to use after it imports.

Accept cluster name, and do the ceph.conf search using cluster name
in the appropriate places in the searched-for files.

Also ceph_rest_api.py gets a little cleanup (fewer global variables,
cleaner conf file search algorithm, better error reporting on conf
load)

Also: doc updates, packaging updates to include ceph_rest_api.py

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 16:37:32 -07:00
Sage Weil
495ee108db msg/Pipe: fix RECONNECT_SEQ behavior
Calling handle_ack() here has no effect because we have already
spliced sent messages back into our out queue.  Instead, pull them out
of there and discard.  Add a few assertions along the way.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-07-12 16:21:24 -07:00
Sage Weil
48a2959867 mon: make ancestor arg for 'osd crush rm|remove <name>' optional
It was there for unlink, but not rm or remove.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 15:51:24 -07:00
Sage Weil
c0845a9799 mon: AuthMonitor: don't try to auth import a null buffer
Hangs result if 'ceph auth import' is attempted without -i.
Check for this case and return error status.  Also,
update auth import help to more-clearly indicate that "input"
means "-i <file>".

Fixes: #4599
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-12 15:50:49 -07:00
Sage Weil
60a19e7412 PendingReleaseNotes: ceph -s --format=json output change
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-12 15:50:42 -07:00
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
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