Commit Graph

26694 Commits

Author SHA1 Message Date
Josh Durgin
6dd7d46900 rados.py: correct some C types
trunc was getting size_t instead of uint64_t, leading to bad results
in 32-bit environments. Explicitly cast to the desired type
everywhere, so it's clear the correct type is being used.

Fixes: #5233
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-06-04 13:23:39 -07:00
Dan Mick
6f8b53a0eb ceph: cleanup: accept --conf *and* -c; suppress stderr if no outs
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-04 13:13:15 -07:00
Dan Mick
24a270a1ae librados, rados.py: add rados_create2/init2
librados clients, particularly the ceph tool, need to be able
to specify a full 'name'; rados_create enforced 'client.<param>'
with no workaround.  New interface.  Python Rados().__init__ selects
appropriate create function depending on whether name or id is
supplied.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-04 13:13:02 -07:00
Dan Mick
ee0913c2e6 Merge remote-tracking branch 'origin/master' into wip-ceph-cli
Conflicts:
	src/mon/OSDMonitor.cc
	src/osd/OSD.cc
	src/osd/ReplicatedPG.cc
2013-06-04 13:12:08 -07:00
Sage Weil
85576dba13 Revert "mds: initialize rejoins_pending"
This reverts commit 05a57bdd12.

Supplanted by d7fb9b173a.
2013-06-04 13:08:37 -07:00
Yan, Zheng
0c4ca2ae56 mds: allow purging "dirty parent" stray inode
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2013-06-04 13:08:24 -07:00
Yan, Zheng
d7fb9b173a mds: initialize some member variables of MDCache
I added some member variables to class MDCache, but forget to
initialize them.

Fixes: #5236
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2013-06-04 13:08:20 -07:00
Sage Weil
bbdefe3487 Merge remote-tracking branch 'gh/next' 2013-06-04 13:08:07 -07:00
athanatos
38d3c3cb53 Merge pull request #340 from dachary/wip-5213
PGLog::merge_old_entry unit tests

Reviewed-by: Sam Just <sam.just@inktank.com>
2013-06-04 12:39:29 -07:00
athanatos
8d948f6109 Merge pull request #327 from dachary/wip-pg_missing_t-tests
unit tests for pg_missing_t

Reviewed-by: Sam Just <sam.just@inktank.com>
2013-06-04 12:38:10 -07:00
Samuel Just
d605eafd17 OSD: add pgid and res_map to DeletingState
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-06-04 12:36:00 -07:00
Samuel Just
15a5e0990d OSD: make get_or_create_pg handle_pg_peering_evt
handle_pg_peering_evt() includes checking for splitting
and unlocking the pg.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-06-04 12:36:00 -07:00
Samuel Just
9655946535 OSD: remove created argument from get_or_create_pg()
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-06-04 12:36:00 -07:00
Sage Weil
64b3e833f6 Revert "mds: allow purging "dirty parent" stray inode"
This reverts commit b8f1cb9789.
2013-06-04 11:07:58 -07:00
Sage Weil
05a57bdd12 mds: initialize rejoins_pending
Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-04 11:07:33 -07:00
Sage Weil
c2169147f1 Revert "mds: initialize some member variables of MDCache"
This reverts commit 2d655bde8d.
2013-06-04 11:05:52 -07:00
Sage Weil
ce67c58db7 os/LevelDBStore: only remove logger if non-null
Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-04 10:42:13 -07:00
Samuel Just
cdf5785c5e test_filestore_idempotent: make newly created objects globally unique
The filestore requires hobjects to be globally unique.

Fixes: #5240
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-06-04 10:37:34 -07:00
Josh Durgin
713719a063 test_librbd: use correct type for varargs snap test
uint64_t is passed in, but int was extracted. This fails on 32-bit builds.

Fixes: #5220
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit 17029b270d)
2013-06-04 09:42:39 -07:00
Sage Weil
8bbd0370c4 Merge pull request #344 from ceph/wip-5220
Reviewed-by: Sage Weil <sage@inktank.com>
2013-06-04 09:38:23 -07:00
Loic Dachary
b70868e007 unit tests for PGLog::merge_old_entry
The tests covers 100% of the LOC of merge_old_entry. It is broken down
in 13 cases to enumerate all the situations it must address. Each case
is isolated in a independant code block where the conditions are
reproduced. For  instance:

    info.last_backfill = hobject_t();
    info.last_backfill.hash = 1;
    oe.soid.hash = 2;

creates the conditions where merge_log_entry is expected to silently
ignore entries containing an object that is greater than
last_backfill.

PGLogTest is derived from PGLog to get access to the protected members.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-06-04 13:43:20 +02:00
Sage Weil
21a1c4d39c mon: fix POOL_OP_AUID_CHANGE
Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-03 21:07:17 -07:00
Dan Mick
18f2f19473 test/librados: remove "set_auid" pool tests
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-03 21:07:17 -07:00
Dan Mick
51a887a24c Add ceph_test_rados_api_cmd to the ceph-test package
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-03 21:07:17 -07:00
Dan Mick
fbfdd51a4d ceph: backward-compatibility hack: blank line before JSON output
Many JSON commands (osd dump, et. al.) used to print a status
line first before the actual output; this has been fixed, but there
are scripts/tools/etc. that expect it.  A simple compatibility hack
is to output a blank line, which won't confuse properly-written
JSON parsers, but will allow the tools-with-workarounds to continue
to work.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-03 21:07:17 -07:00
Dan Mick
f6f4f8f7f3 librados cmd tests: mon_status comes to stdout, not stderr
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-03 21:07:17 -07:00
Dan Mick
6cec9ccc6b librados: fix unsigned vs. signed warning
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-03 21:07:16 -07:00
Dan Mick
5bd93b3a89 ceph: refactor help so it can be called after cluster connection
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-03 21:07:16 -07:00
Sage Weil
d4bfce7ca0 mon: better debugging of caps messages/values
Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-03 21:07:16 -07:00
Sage Weil
0bec7e139c mon/MonCap: fix setting of text in parse()
Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-03 21:07:16 -07:00
Sage Weil
5e90e6c87d mon/MonCap: set text in set_allow_all()
This will let the cap encode/decode to the same value.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-03 21:07:16 -07:00
Dan Mick
8c674800d2 ceph: various cleanups
- make base class valid() do useful work
 - remove valid from CephPoolname; pool need not exist for create
 - add --user as alias for --id
 - remove vestige of special --keyring handing
 - be sure childargs is an empty list rather than None
 - remove -- from childargs if present (to stop interpreting -- args)
 - handle connection timeout cleanly

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-03 21:07:16 -07:00
Dan Mick
a4b824cd81 PGMonitor: fix pg dump and dump_stuck
dump needed to default to format plain, not json
dump_stuck was not doing format = plain correctly (coredumping)

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-03 21:07:16 -07:00
Dan Mick
be1a512402 cmdparse, mon: add cmd_vartype_stringify for _allowed_command
cmd_vartype are not all strings, and need a type-variant function
to turn them into strings for authorization against caps.  Use
boost::apply_visitor to get this behavior.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-03 21:06:34 -07:00
Dan Mick
f1021c9b35 cmdparse: add handle_bad_get(), ceph:: qualifiers, cmdmap_t
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-03 21:05:12 -07:00
Yan, Zheng
b8f1cb9789 mds: allow purging "dirty parent" stray inode
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2013-06-03 20:53:09 -07:00
Yan, Zheng
2d655bde8d mds: initialize some member variables of MDCache
I added some member variables to class MDCache, but forget to
initialize them.

Fixes: #5236
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2013-06-03 20:52:01 -07:00
Josh Durgin
17029b270d test_librbd: use correct type for varargs snap test
uint64_t is passed in, but int was extracted. This fails on 32-bit builds.

Fixes: #5220
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-06-03 18:26:08 -07:00
Dan Mick
456f96f957 ceph: remove global declarations, declare verbose and cluster near top
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-03 17:30:58 -07:00
Dan Mick
df34cff767 ceph: use conf_parse_argv to deal with nonspecial Ceph args
This means parsing argv only once now, so pass arg lists to
new_style_command().  A little cleanup/commenting too.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-03 17:30:58 -07:00
Dan Mick
065b29cdd9 librados, rados.py: add conf_parse_argv_remainder()
New parsing function to extract any known arguments from a vector
and return any unknowns; useful for ceph CLI to allow librados
first dibs on arguments so it doesn't have to reproduce the
argument recognition

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-03 17:30:41 -07:00
Dan Mick
73a1b21692 ceph: make ceph -w output 'ceph status' first
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-03 17:30:41 -07:00
Sage Weil
dc73581a07 mon: include cluster fsid/uuid in status output
Implements: #5147
Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-03 17:30:41 -07:00
Sage Weil
74f5ea44a6 mon/MonCap: allow osd, mds to write to cluster log
Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-03 17:30:41 -07:00
Dan Mick
9809371855 ceph: move admin-daemon command before connect()
Allow admin-daemon commands to work even if we can't connect()

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-03 17:30:41 -07:00
Dan Mick
8dd3618315 ceph: finish changing bestsigs to bestcmds
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-03 17:30:41 -07:00
Dan Mick
b0469a14cf cephtool/test.sh: fix "expect failure"
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-03 17:30:41 -07:00
Dan Mick
22660bdecd MDSMonitor, cmdparse: increase resiliency of bad cmd_getval()
MDSMonitor: check for and handle bad maxmds get
cmdparse.h: Use gcc demangler to print bad boost::variant typenames,
add backtrace in case of bad boost::variant get

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-03 17:24:39 -07:00
Sage Weil
1cb7dbd94a messages/MClientCapRelease: fix string output
Use the vector size, not what is in the header, which is not yet filled in
for outgoing messages.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-03 13:45:01 -07:00
David Zafman
27f82ce3b4 ceph: Add missing usage "ceph osd blacklist ls"
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-06-03 12:23:03 -07:00