Commit Graph

19632 Commits

Author SHA1 Message Date
Sage Weil
7e6be86785 mon: discover peer names during probe
Fill in noname- entires in initial generate monmap (e.g., from mon_host)
with real peer names as we discover them.

This will make the upcoming initial quorum config check work by letting us
identify peers by name.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-18 16:21:38 -07:00
Sage Weil
52c284567d monclient: name resolved mon hosts noname-* too
This would allow you to do

  mon host = foo, bar, baz

or

  mon host = multiarecordhostname.foo.com

and have the generated monmap tag monitors as noname-, so that the ceph-mon
mkfs will identify itself as one of them and initialize itself
properly.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-05-18 16:21:37 -07:00
Sage Weil
2b5ee3e00d mon: include health in status
Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-18 15:07:29 -07:00
Sage Weil
7d6facc03d mon: move health check into helper function
Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-18 14:08:11 -07:00
Sage Weil
09978a8ab2 Merge remote-tracking branch 'gh/wip-mon-refactor'
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2012-05-18 13:54:05 -07:00
Joao Eduardo Luis
d599eded54 mon: fix a bug that was preventing us from subscribing to some log levels.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-05-18 12:07:45 -07:00
Joao Eduardo Luis
20df432473 mon: fix the priority filter.
When a given log level L was specified, we would reply with all the
messages of "level L and below"; for instance, for a 'log-error' we would
present all the messages of level 'error', 'warn', 'sec', 'info' and
'debug'.

We shouldn't be doing it that way, so we just inverted the filter
condition. Now we show only 'L and above'; i.e., for a log level of
'log-warn', show only 'log-warn' and 'log-error'.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-05-18 11:32:43 -07:00
Sage Weil
9fb3cd281d ceph-authtool: fix clitests
No more --bin option.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-18 10:59:52 -07:00
Sage Weil
4832c46eab ceph-authtool: fix usage
No more -b, --bin.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-18 10:59:28 -07:00
Sage Weil
b180ac25aa Merge branch 'wip-mon-keyring'
Reviewed-by: Greg Farnum <greg@inktank.com>
2012-05-17 20:29:42 -07:00
Sage Weil
9125e908a5 mon: monmap first from 'status' command
Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-17 20:23:34 -07:00
Sage Weil
9a1d757bc8 mon: only log map state changes from primary
We still get noise after elections, but only from the winner.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-17 20:23:34 -07:00
Sage Weil
78d0d0976b cephtool: aesthetic change to ceph -w output
* no seq
* name, not ip addr

Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-17 20:23:33 -07:00
Sage Weil
13a9a15248 mon: aesthetic changes to map change log entries
Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-17 20:23:33 -07:00
Sage Weil
6b76ac3a3c Makefile: drop MMonObserve*
Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-17 20:23:33 -07:00
Sage Weil
89316566b5 remove gceph
Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-17 20:23:33 -07:00
Sage Weil
a586bdf081 ceph.spec: don't package gceph
Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-17 20:23:33 -07:00
Sage Weil
f943f34b83 debian: don't package gceph
Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-17 20:23:33 -07:00
Joao Eduardo Luis
035bb125a7 src: get rid of the Observers throughout the code base.
This is a big patch that will remove all references to the observers
throughout the code, including a complete removal of the Observer-related
messages' source files.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-05-17 16:15:25 -07:00
Joao Eduardo Luis
841372494f cephtool: Slight rework and pub/sub log support.
We reworked the code a bit to accommodate the introduction for the log
monitor's publish/subscribe mechanisms. With this patch we no longer
depend on the observer's, and use instead the much broader approach of
subscribing to events. In our case, we will subscribe to log levels.
If the '-w'/'--watch' flag is defined, the tool will be subscribed to the
'log-info' level by default, unless one of the following flags are defined
(in which case the level will be changed accordingly): '--watch-debug',
'--watch-info', '--watch-sec', '--watch-warn' and '--watch-error'.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-05-17 16:15:25 -07:00
Joao Eduardo Luis
6fe96cb9fc mon: Add publish/subscribe capabilities to the log monitor and status cmd.
This patch allows us to stir away from the monitor's observer mechanism,
by using instead the already existing publish/subscribe mechanism.
We follow the log levels used by the log monitor, and will recognize any
one of the following subscriptions: 'log-error' (higher priority),
'log-warn', 'log-sec', 'log-info' and 'log-debug' (lowest priority).

Also, add a new 'status' command to the monitor, which may be invoked by
any client (such as the ceph tool), and which shall return the status of
the various cluster components (osdmap, pgmap, ...).

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-05-17 15:55:57 -07:00
Josh Durgin
572c756036 doc: fix sizes in librbd python examples
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-05-17 13:56:32 -07:00
Josh Durgin
a5dd387270 Merge remote branch 'origin/wip-misc'
Reviewed-by: Sage Weil <sage@inktank.com>
2012-05-17 13:06:45 -07:00
Josh Durgin
e7212714e9 doc: fix link to hardware recommendations section
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-05-17 12:57:50 -07:00
Josh Durgin
25e7889af6 doc: fix formatting and a couple config defaults
``ceph.conf`` needed spaces around it to be parsed correctly.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-05-17 12:57:41 -07:00
Tommi Virtanen
62db60bede FileJournal: Clarify log message on journal too small.
The OSDs tolerate a full journal, it will just result in a latency
spike. Make the error message say operation will continue, just
slower.

Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-05-17 09:54:02 -07:00
Josh Durgin
96426fa457 ReplicatedPG: fill in data_off in OSDOpReply
The assignment was accidentally made unreachable by
ff55d2f310

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-05-16 18:37:08 -07:00
Josh Durgin
04a75d29ed Merge branch 'next' 2012-05-16 17:43:54 -07:00
Josh Durgin
4277d4d337 Merge branch 'wip-oc-error-handling' into next
Reviewed-by: Sage Weil <sage@inktank.com>
2012-05-16 17:42:56 -07:00
Josh Durgin
1ec3245d11 config: improve comments for rbd caching options
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-05-16 17:02:55 -07:00
Josh Durgin
49c6ad44b4 librbd: check for cache flush errors
Return errors from flushing to the caller. Warn
if an error occurs during invalidation, but don't retry,
since the higher level handles these cases, namely:

* rollback (doing this with an image open is asking for trouble)
* shrink (doing this with writes in flight may create extra objects anyway)
* shutdown (qemu flushes before closing the device)

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-05-16 17:02:53 -07:00
Sage Weil
ef71d85eef Merge remote-tracking branch 'gh/wip-mon-encoding'
Reviewed-by: Greg Farnum <greg@inktank.com>
2012-05-16 16:55:04 -07:00
Sage Weil
f161c62322 Merge branch 'wip-upstart'
Reviewed-by: Tommi Virtanen <tv@inktank.com>
2012-05-16 16:53:45 -07:00
Sage Weil
5e3bc57e55 init-radosgw: skip sections without host= line
Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-16 16:37:40 -07:00
Sage Weil
eaea7aa9b2 keyring: drop binary encoder
Drop the keyring encode method, and binary encoder.

Don't just encode in plaintext because we assume we get the whole
bufferlist, and encoding something like list<KeyRing> would thus fail.

Fixes: #2435
Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-16 16:36:53 -07:00
Sage Weil
ec732816ef keyring: always encode in plaintext
Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-16 16:36:53 -07:00
Sage Weil
6d4e79ace2 mon: make 'auth get-key <name>' return key
Same as 'print-key'.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-16 16:36:53 -07:00
Sage Weil
86f24868e4 mon: 'auth list' is a read-only operation
Signed-off-by: Sage Weil <sage@newdream.net>
2012-05-16 16:36:52 -07:00
Sage Weil
c9b220ffb6 mon: 'auth get-or-create-key name capsys capval capsys2 capval2 ...'
Fixes: #2406
Signed-off-by: Sage Weil <sage@newdream.net>
2012-05-16 16:36:52 -07:00
Sage Weil
66e27375d8 auth: EntityName ==, != operators
Signed-off-by: Sage Weil <sage@newdream.net>
2012-05-16 16:36:52 -07:00
Sage Weil
d079018617 mon: make 'auth get <name>' dump plaintext keyring
This is friendlier.

Fixes: #2406
Signed-off-by: Sage Weil <sage@newdream.net>
2012-05-16 16:36:52 -07:00
Sage Weil
288635843a init-ceph: ignore sections without 'host' defined
This will make it easier for sysvinit and upstart to coexist.

We will break existing users who have a separate .conf for each node and
didn't add host lines.  We'll need to make note of that in the release
notes.

Fixes: #2404
Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-16 16:36:52 -07:00
Josh Durgin
23deb43baa ObjectCacher: handle write errors
If a write error occurs, mark the BufferHead dirty again, and
pass the return value to the completion. This makes flushing
return the write error, if one occurs, since the flush callback
is passed as the write callback.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-05-16 16:32:03 -07:00
Josh Durgin
59c6816542 ObjectCacher: propagate read errors to the caller
Previously the return value of a read operation was ignored.  Now a
read error sets the error field, and changes the BufferHead to a new
error state. Error state BufferHeads are treated as misses so they can
be retried when requested by a user of the ObjectCacher.  When _readx
is called again internally, they're treated as hits so the error can
be returned to the user.

The error value is ignored if the BufferHead is not in the error
state.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-05-16 16:31:35 -07:00
Sage Weil
24fddf2174 ceph-dencoder: add AuthMonitor::Incremental
Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-16 16:10:52 -07:00
Sage Weil
7f1485451a mon: use new encoder macros for AuthMonitor::Incremantal
Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-16 16:06:42 -07:00
Sage Weil
7aaccacff6 features: explicitly use CEPH_FEATURES_ALL instead of -1
Make it clear to readers what that -1 is all about.  Alex would be proud.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-16 16:04:19 -07:00
Sage Weil
515649558d mon: fix mon removal check
Only take our absence from the monmap to mean that we were removed if we
were ever a member in the first places.

This fixes the bootstrap case:

 - create temp_monmap with existing member(s) plus new guy
 - ceph-mon --mkfs --monmap temp_monmap --fsid ...
 - start ceph-mon

Basically, this is just using the seed monmap as a way to tell the new
daemon which ip:port to use.  Specifying mon addr, public network, or
public addr would also work.

Fixes: #2436
Signed-off-by: Sage Weil <sage@inktank.com>
2012-05-16 15:37:34 -07:00
Greg Farnum
48d97fe796 doc: add ioctx parameter to rbd pybind examples.
This parameter is required and was missing. And fix a typo
2012-05-16 13:43:12 -07:00
Josh Durgin
1109c13238 librados: avoid overflow in the return value of reads
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-05-16 13:40:51 -07:00