Instead of allowing services to directly use 'propose_pending()' on
other services, we instead add two new functions:
- request_proposal() to request 'this' service to propose its
pending value; and
- request_proposal(PaxosService *other) so that 'this' service
can request a proposal to 'other'
These functions should allow us to enforce a greater set of
constraints at time of a cross-proposal, either by making sure a
service will (e.g.) hold-off his own proposals until said proposal
is performed, or even that the other service will enforce a tighter
set of constraints that wouldn't otherwise be enforced by using
'propose_pending()' directly.
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>
This involves three pieces:
For intrusive_ptr type references, we use TrackedIntPtr instead. This
uses get_with_id and put_with_id to associate an id and backtrace with
each particular ref instance.
For refs taken via direct calls to get() and put(), get and put now
require a tag string. The PG tracks individual ref counts for each tag
as well as the total.
Finally, PGs register/unregister themselves on construction/destruction
with OSDService.
As a result, on shutdown, we can check for live pgs and determine where
the references are held.
This behavior is compiled out by default, but can be included with the
--enable-pgrefdebugging flag.
Signed-off-by: Samuel Just <sam.just@inktank.com>