Commit Graph

26695 Commits

Author SHA1 Message Date
Sage Weil
02599c43b4 ceph-fuse: fix uninitialized variable
There is a delete call in the out_mc_start_failed path.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-13 18:13:34 -07:00
Sage Weil
99bd5c8f7b librados: add missing #include
librados/librados.cc: In function 'int rados_mon_command_target(void*, const char*, const char**, size_t, const char*, size_t, char**, size_t*, char**, size_t*)':
error: librados/librados.cc:1877: 'LONG_MAX' was not declared in this scope
error: librados/librados.cc:1877: 'LONG_MIN' was not declared in this scope

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-13 17:38:02 -07:00
Sage Weil
93505bb3c7 librados: wait for osdmap for commands that need it
In commit 7e1cf87b51 we stopped waiting for
the osdmap on start because the Objecter will normally wait, but for some
commands we assume the osdmap is recent(ish).

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-06-13 16:39:30 -07:00
Sage Weil
95aa2e8d07 Merge branch 'wip-objecter' into next
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-06-13 16:15:44 -07:00
Sage Weil
2bda9db1c2 osdc/Objecter: dump command ops
Dump command_ops along with everything else.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-13 16:01:31 -07:00
Sage Weil
6e73d999af osdc/Objecter: ping osds for which we have pending commands
As with ops and linger_ops, this ensures we detect connection resets.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-13 15:57:57 -07:00
Dan Mick
e4f9dce7a5 ceph.in: refuse 'ceph <type> tell' commands; suggest 'ceph tell <type>'
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-06-13 15:56:52 -07:00
Dan Mick
a6876ad7d9 ceph.in: argparsing cleanup: suppress --completion, add help
Options -v, --verbose, --concise didn't have helpstrings
Option --completion doesn't quite work yet, and should be hidden anyway

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-13 15:30:38 -07:00
Sage Weil
68a91995ba osdc/Objecter: kick command ops on osd con resets
Resend osd/pg commands on the OSDSession, just as we do with other request
types.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-13 15:16:20 -07:00
Sage Weil
db7d12103a osdc/Objecter: add perfcounters for commands
This matches the other counters we maintain for other kinds of ops.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-13 15:16:19 -07:00
Sage Weil
9a7ed0b3f8 mon: fix idempotency of 'osd crush add'
If we add an item that already exists in particular position, we should
update instead of inserting it; the CrushWrapper methods are not
idempotent.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-13 14:42:05 -07:00
Sage Weil
7e1cf87b51 librados: do not wait for osdmap on start
If we abort while waiting, we incorrect clean up (we switch the state value
incorrectly, and also fail to clean up the initialized objecter).

Intead, skip this wait.. it's useless!

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-06-13 14:42:03 -07:00
Sage Weil
35ea1639aa mon/MonmapMonitor: remove unused label
mon/MonmapMonitor.cc: In member function 'bool MonmapMonitor::preprocess_command(MMonCommand*)':
mon/MonmapMonitor.cc:273:2: warning: label 'out' defined but not used [-Wunused-label]

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-13 11:27:49 -07:00
Sage Weil
987f175fb8 mon/MonCap: bootstrap-* need to subscribe to osdmap, monmap
Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-13 11:27:23 -07:00
Sage Weil
3abd2d8bc9 Merge branch 'wip-tell' into next
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-06-13 09:27:15 -07:00
Sage Weil
6160e50342 mon: remove support for 'mon tell ...' and 'osd tell ...'
It doesn't work.  The commands the ceph cli sends are vector<string>, and
the mon expects json.

Leave the MDS on in place since ceph-mds still takes strings.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-13 09:26:52 -07:00
Sage Weil
8adf88a2d5 ceph: add support for 'tell mon.X ...'
Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-13 09:26:52 -07:00
Sage Weil
420e02e818 librados: new rados_mon_command_target to talk to a specific monitor
Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-13 09:26:44 -07:00
Dan Mick
5fa45f4ec3 Update README dependency lists
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-12 22:26:19 -07:00
Dan Mick
f86b4e7a48 ceph-disk: extra dash in error message
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-12 22:22:42 -07:00
Dan Mick
ff280b6236 Clean up CrushWrapper methods that take string: no c_str() necessary
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-06-12 21:56:17 -07:00
Dan Mick
c618cf937b OSDMonitor: osd id when id already exists needs to come to stdout too
Found by qa/workunits/mon/osd.sh

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-06-12 21:56:17 -07:00
Dan Mick
a3767010a8 ceph, mon/OSDMonitor: fix up osd crush commands for <osd.N> or <N>
The new parsing code had been trying to allow flexibility for the
'old form' commands (where id could be different from N in osd.N),
but also accept 'new form' commands.  The new rule is that where
there's an OSD specified in the osd crush command, it is of type
CephOsdName, which can be an id *or* 'osd.<id>', but not both.

Pass CephOsdName as int64_t 'id' for convenience in mon code

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-06-12 21:56:16 -07:00
Sage Weil
d1b83ff411 mon/MonClient: send commands to a specific monitor
This implementation is limited: we direct our command by reopening
a session with the specific monitor.  If there is more than one of these
queued we will fail to reach either.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-12 21:44:29 -07:00
Sage Weil
d0e6575919 ceph: implement 'ceph tell osd.* ...'
Send the command to each target.  Do this in series, for now.  Error out if
any one fails.

Later, we should do them in parallel.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-12 21:44:29 -07:00
Sage Weil
8808ca57c6 osdc/Objecter: fix handling for osd_command dne/down cases
Generalize the map check machinery that the pool dne check uses to also
get the latest map for OSD down/dne checks.  This is better semantics, but
more important fixes the more immediate bug of returning the error code
to the caller from the osd_command -> _submit_command (that is ignored by
pretty much any caller) and then never triggering the callback.

Fixes: #5331
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-06-12 18:13:12 -07:00
Sage Weil
11d5c7a23b ceph: only use readline when in interactive mode
A mere

  import readline

line is dumping this to stdout on CentOS 6.3:

  00000000  1b 5b 3f 31 30 33 34 68  .[?1034h

That confuses non-terminals that read from stdout, so only import when we
are in the interactive mode.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-06-12 17:13:39 -07:00
Sage Weil
862148d5fb mon: fix read of format_version out of leveldb
The get_version(string, string) is the wrong method; it combines the two
args into a key that is nested inside prefix (so it's prefix/a/b), but we
want perfix/format_version.  Add a method to grab an int for this
particular combo and use that.

This fixes an infinite loop when we actually trigger this code.

Bug introduced by f43c974571.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-06-12 17:13:14 -07:00
Gary Lowell
35ac835fc8 Merge branch 'next' 2013-06-12 15:00:05 -07:00
Sage Weil
b3b0f035b0 ceph: filter out empty lines from osdids()
Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-12 14:54:10 -07:00
Sage Weil
edba986314 ceph: accept osd.* as a valid name
This will be used for 'ceph tell osd.* ...'

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-12 14:53:56 -07:00
Dan Mick
e5184ea950 ceph: make life easier on developers by handling in-tree runs
If <path-to-ceph> contains pybind and .libs:
- prepend <path-to-ceph>/pybind to PYTHONPATH
- append <path-to-ceph>/.libs to LD_LIBRARY_PATH if not already there
  and exec self so it takes effect

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-06-12 14:05:34 -07:00
Sage Weil
701943a278 qa/workunits/cephtool/test.sh: look for 'ceph log' via -w, not in log file
'ceph-conf ...' doesn't give you final/default values, only what is in the
conf file.  Use -w output to test this instead.

Fixes: #5327
Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-12 14:00:24 -07:00
Sage Weil
b70f5658c4 ceph: flush stdout on watch print
Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-12 14:00:04 -07:00
Sage Weil
b89b6ceeb0 Merge pull request #357 from atwardowski/patch-1
Usage log and ops log are disabled by defaults since 0.56
2013-06-12 13:50:15 -07:00
atwardowski
299f6a6609 Usage log and ops log are disabled by defaults since 0.56
http://ceph.com/docs/next/release-notes/#v0-56-bobtail
2013-06-12 17:48:44 -03:00
Sage Weil
de1723834c mon: fix 'pg dump_stuck' stuckops type
It's a list.

Fixes: #5332
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-06-12 13:39:30 -07:00
Sage Weil
b284e25fe7 Merge remote-tracking branch 'gh/wip_5238'
Reviewed-by: Sage Weil <sage@inktank.com>
2013-06-12 13:31:22 -07:00
Sage Weil
afa16b4817 qa: multiple_rsync.sh: more output
Trying to track down this failure:

2013-06-12T06:11:13.430 INFO:teuthology.task.workunit.client.0.err:+ rsync -auv --exclude local/ /usr/ usr.2
2013-06-12T06:11:13.430 INFO:teuthology.task.workunit.client.0.err:+ tee a
2013-06-12T06:11:13.527 INFO:teuthology.task.workunit.client.0.out:sending incremental file list
2013-06-12T06:11:46.206 INFO:teuthology.task.workunit.client.0.out:
2013-06-12T06:11:46.208 INFO:teuthology.task.workunit.client.0.out:sent 1689627 bytes  received 8302 bytes  50684.45 bytes/sec
2013-06-12T06:11:46.208 INFO:teuthology.task.workunit.client.0.out:total size is 3274130495  speedup is 1928.31
2013-06-12T06:11:46.209 INFO:teuthology.task.workunit.client.0.err:+ wc -l a
2013-06-12T06:11:46.209 INFO:teuthology.task.workunit.client.0.err:+ grep 4
2013-06-12T06:11:46.211 INFO:teuthology.task.workunit:Stopping misc on client.0...

...and am perplexed!

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-12 13:26:03 -07:00
Gary Lowell
42e06c12db v0.64 2013-06-12 09:54:06 -07:00
Dan Mick
68b5fa9b61 ceph-fuse: older libfuses don't support FUSE_IOCTL_COMPAT
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-06-12 09:43:12 -07:00
Peter Wienemann
1577e203f0 ceph-create-keys: Make sure directories for admin and bootstrap keys exist
Signed-off-by: Peter Wienemann <wienemann@physik.uni-bonn.de>
2013-06-12 08:40:25 -07:00
Samuel Just
256afa072d store_test: create_collection prior to split
Fixes: #5310
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
2013-06-11 16:45:17 -07:00
Sage Weil
1a9415a015 mon: adjust trim defaults
User testing has shown that smaller values yield better results; see #4917.
Jim's testing has had good results with even more aggressive trimming, but I
would like to do more validation yet before changing defaults.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-11 16:30:41 -07:00
John Wilkins
5f0007e6a9 doc: Reworked the landing page.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-06-11 15:32:23 -07:00
John Wilkins
dc6cadc34a doc: Added a hostname resolution section for local host execution.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-06-11 14:46:35 -07:00
John Wilkins
f6c51b486d doc: Added some tips and re-organized to simplify the process.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-06-11 14:46:12 -07:00
Sage Weil
9b012e234a client: set issue_seq (not seq) in cap release
We regularly have been observing a stall where the MDS is blocked waiting
for a cap revocation (Ls, in our case) and never gets a reply.  We finally
tracked down the sequence:

 - mds issues cap seq 1 to client
 - mds does revocation (seq 2)
 - client replies
 - much time goes by
 - client trims inode from cache, sends release with seq == 2
 - mds ignores release because its issue_seq is 1
 - mds later tries to revoke other caps
 - client discards message because it doesn't have the inode in cache

The problem is simply that we are using seq instead of issue_seq in the
cap release message.  Note that the other release call site in
encode_inode_release() is correct.  That one is much more commonly
triggered by short tests, as compared to this case where the inode needs to
get pushed out of the client cache.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-06-11 13:56:45 -07:00
John Wilkins
c7fb7a3f46 doc: Added some Java S3 API troubleshooting entries.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-06-11 12:12:46 -07:00
John Wilkins
6c557d569d doc: Added install ceph-common instruction.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-06-11 12:11:51 -07:00