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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>