Greg Farnum [Fri, 1 Jun 2012 23:46:39 +0000 (16:46 -0700)]
msg: make clear_pipe work only on a given Pipe, rather than the current one.
This way old Pipes that have been replaced can't clear the new Pipe
out of a Connection's link.
We might attempt to instead sever the link between CLOSED Pipes and
their Connections more completely (eg, when the Connection gets a
new Pipe), but that will require more work to handle all the
cases, and this works for now.
Greg Farnum [Tue, 22 May 2012 01:01:51 +0000 (18:01 -0700)]
msgr: pass a Connection instead of a Pipe through submit_message.
This lets us maintain a user's existing Connections even if the underlying
Pipe object disappears (ie, it's lossy and they don't drop the Connection
object).
This is a little distressing for me because it's again emphasizing the
Connection over the Pipe, but that seems to be an ongoing process.
Maybe the next Messenger implementation will be able to do away with
the (fairly messy) distinction between them.
John Wilkins [Fri, 18 May 2012 20:54:51 +0000 (13:54 -0700)]
doc: misc updates
doc/architecture.rst - removed broken reference.
doc/config-cluster - cleanup and added chef
doc/install - Made generic to add Chef, OpenStack and libvert installs
doc/init - Created light start | stop and health section
doc/source - Removed $ from code examples. Trimmed paras to 80 char
doc/images - Added preliminary diagram for Chef.
doc/rec - Added reference to hardware. Added filesystem info.
Signed-off-by: John Wilkins <john.wilkins@dreamhost.com>
Sage Weil [Sun, 20 May 2012 22:32:19 +0000 (15:32 -0700)]
keys: new release key
New release key for signing packages. Signed by me (the old release key)
so that existing apt keyrings should be sufficient. New keyrings should
just add the new release key.
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>
Greg Farnum [Fri, 18 May 2012 17:55:58 +0000 (10:55 -0700)]
msgr: If the Connection has a bad Pipe*, replace it with a good one.
This is a little weak, since it doesn't fill in the Connection's data
when we initially create the new Pipe. But doing that would require
passing more state around that mucks up the interfaces a bit, so I
don't think it's worthwhile. This also makes it clear that this
set of functions is not responsible for doing things like reset
notifications -- those need to be handled through the normal channels
(I reviewed them and as best I can tell, they are.)
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>
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>
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>
Josh Durgin [Wed, 16 May 2012 19:41:27 +0000 (12:41 -0700)]
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)
Josh Durgin [Tue, 15 May 2012 22:21:50 +0000 (15:21 -0700)]
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.
Josh Durgin [Tue, 15 May 2012 17:58:59 +0000 (10:58 -0700)]
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.
Sage Weil [Wed, 16 May 2012 22:37:34 +0000 (15:37 -0700)]
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>
Josh Durgin [Wed, 16 May 2012 20:40:43 +0000 (13:40 -0700)]
ObjectCacher: only perfcount reads requested by the client
_readx is called again after each bh is read by C_RetryRead. This
resulted in the read being counted many times for the internal
caller that was just checking whether it was done yet.
Sage Weil [Tue, 15 May 2012 04:01:58 +0000 (21:01 -0700)]
monmap: use feature bits and single encode() method
Instead of selecting an encode method in the caller, use a normal features
argument to encode() and branch there.
Leave behavior of all callers untouched. We continue to assume, for
example, that all monitors have the same features, and that
'ceph mon getmap' should return the fully-featured encoding.
Josh Durgin [Mon, 14 May 2012 18:49:49 +0000 (11:49 -0700)]
Objecter: don't throttle resent linger ops
Throttling is intended to stop the caller from submitting too many
requests, not blocking requests that are being resent internally. This
prevents a deadlock when handling an osdmap - previously
handle_osd_map could block when resending linger ops due to the
throttling. This would stop the messenger's dispatch thread from
delivering any subsequest messages, so the throttle budget would never
be replenished.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 8 May 2012 23:30:26 +0000 (16:30 -0700)]
mon: use external keyring for mon->mon auth
- Feed our keyring into the auth methods.
- Do not fail to build a ticket for type MON when we don't have a cap; it
won't be in the auth database. Also, we don't have caps on the monitors
that are enfoced between each other.
Sage Weil [Tue, 15 May 2012 03:13:40 +0000 (20:13 -0700)]
mon: keep mon. secret in an external keyring
- Keep the mon. key in a separate keyring files, "keyring", in the mon
data dir.
- During init, if we don't find that file, copy the key from the keyserver
database.
- During mkfs, put the mon. key in that file, and remove it from the seed
file that primes the auth database.
This will allow admins to change the mon. key without bringing the cluster
online and doing something wonky.