This moves our version pointer up so that we don't re-log (by re-consuming)
log messages to /var/log/ceph/ceph.log on ceph-mon restart. OTOH, it means
we rewrite the summary of the last 50 messages, but we consider that to be
relatively cheap (and something we *always* did prior for bobtail and
earlier anyway).
Signed-off-by: Sage Weil <sage@inktank.com>
Set an interval to periodically write a full copy of the map that is lower
than the trim point (which is generally a very large number of commits).
Signed-off-by: Sage Weil <sage@inktank.com>
In order of interest/priority:
- our latest monmap version
- a backup monmap version created during sync start, if the store
appears to be in a post-aborted sync state
- a mkfs monmap version
If none of these are found, we should go ahead and try to build a
monmap from ceph.conf to join an existing cluster.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
If by fate we end up attempting a store sync after failing at
least one before, we might not have a monmap to read from the
store to backup. Therefore, in that case, we shall backup the
current monmap being used by the monitor.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Fixes: #4776
Backport: bobtail
Need to make sure that when copying an object into itself we don't
send the tail to the garbage collection.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Only set the STRIPINGV2 feature if the striping parameters are non-default.
Specifically, fix the case where the passed-in size and count are == 0.
Fixes: #4710
Signed-off-by: Sage Weil <sage@inktank.com>
Out of order journal entry writes using aio may cause entry
n+2 to be written prior to n. This does not indicate
corruption.
Fixes: #4736
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
If get or create keys returns permssion denied, exit
gracefully instead of retrying.
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Change local names to be clearer
Break real_log() into common function get_log()
Move infos_oid, biginfo_oid and log_oid to globals for general use
Feature: #4201 (osd: data loss: pg export/import/remove)
Signed-off-by: David Zafman <david.zafman@inktank.com>
Use cout instead of cerr for command errors
Use cerr for debug mode because stderr is avail
Output map_epoch in debug mode
Fix a message and only for debug mode
Signed-off-by: David Zafman <david.zafman@inktank.com>
With OSD sharing data and journal, the previous code created the
journal partiton from the end of the device. A uint32_t is
used in sgdisk to get the last sector, with large HD, uint32_t
is too small.
The journal partition will be created backwards from the
a sector in the midlle of the disk leaving space before
and after it. The data partition will use whichever of
these spaces is greater. The remaining will not be used.
This patch creates the journal partition from the start as a workaround.
Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
When starting we often loop over many daemon instances. Currently we stop
on the first error and do not try to start other daemons.
Instead, try them all, but return a failure if anything did not start.
Fixes: #2545
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
Call observers so that the logging infrastructure gets initailized and we
start logging. Otherwise, unless a default log setting has been modified,
we won't start logging until we daemonize, and we won't get the nice
version banner in the log file.
Unlike the previous attempt to fix this (a3091774), we do this after all
of the lockdep initialization has completed.
Signed-off-by: Sage Weil <sage@inktank.com>
This allows us to return the appropriate overall health status on
Monitor::get_health().
Fixes: 4574
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>