Commit Graph

25522 Commits

Author SHA1 Message Date
Joao Eduardo Luis
fa77e1e732 mon: PaxosService: add request_proposal() to perform cross-proposals
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>
2013-04-22 23:20:26 +01:00
Joao Eduardo Luis
a634bb17e4 mon: PaxosService: is_writeable() depends on being ready to be written to
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-04-22 23:20:21 +01:00
Joao Eduardo Luis
98e23980f4 mon: PaxosService: is_readable/writeable() depending on is_active()
Instead of depending on individual conditions.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-04-22 23:20:18 +01:00
Joao Eduardo Luis
b29a5b151f mon: PaxosService: consider is_recovering() on is_writeable()
A service is never writeable while it's recovering.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-04-22 23:20:14 +01:00
Yehuda Sadeh
de5d1da810 rgw: don't send tail to gc if copying object to itself
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>
2013-04-22 13:44:19 -07:00
Josh Durgin
cec5282b2a Merge pull request #232 from ceph/wip-4710
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-04-22 13:36:38 -07:00
Sage Weil
70e1e47da0 Merge pull request #233 from ceph/wip-mon-idempotent
Wip mon idempotent

Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-04-22 12:58:08 -07:00
Sage Weil
85fd2ca20d mon: make 'osd pool rmsnap ...' idempotent
Signed-off-by: Sage Weil <sage@inktank.com>
2013-04-22 12:50:09 -07:00
Sage Weil
43d62c00c9 mon: make 'osd pool mksnap ...' idempotent
Signed-off-by: Sage Weil <sage@inktank.com>
2013-04-22 12:49:58 -07:00
Sage Weil
08e3ec116f mon: make 'osd blacklist rm ...' idempotent
Signed-off-by: Sage Weil <sage@inktank.com>
2013-04-22 12:48:49 -07:00
Sage Weil
5926ffa576 rbd: only set STRIPINGV2 feature when needed
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>
2013-04-22 12:41:49 -07:00
Sage Weil
5446218f7b rbd: fix feature display for --info
Only include the feature if it is set!

Backport: bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
2013-04-22 12:38:11 -07:00
Sage Weil
568101fa72 rbd: avoid clobbering return value with udevadm settle
Fixes: #4707
Signed-off-by: Sage Weil <sage@inktank.com>
2013-04-22 11:41:27 -07:00
Samuel Just
8db9d0a274 FileJournal: a valid entry after invalid entry =/=> corrupt
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>
2013-04-22 11:32:25 -07:00
Sylvain Munaut
9b953aa410 radosgw: Fix duplicate 'Content-Type' when using 'response-content-type'
Signed-off-by: Sylvain Munaut <s.munaut@whatever-company.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-04-22 09:14:10 -07:00
Gary Lowell
1a8b30eff1 ceph-create-keys: Don't wait if permission denied
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>
2013-04-21 22:08:49 -07:00
John Wilkins
1fa719d59e doc: Aesthetic improvements. Removed unnecessary graphic and overrode margin for h3 tag.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-04-20 11:10:51 -07:00
John Wilkins
3749ffe652 doc: Added a scenario to PG troubleshooting.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-04-20 11:08:08 -07:00
John Wilkins
cf915941be doc: Changed usage to "bucket-name". Description was okay.
fixes: #4102

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-04-20 11:06:44 -07:00
David Zafman
c4f8adca83 Merge branch 'wip-4201' into next
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-04-19 18:14:28 -07:00
David Zafman
870f47c7cb tools/ceph-filestore-dump: Implement remove, export and import
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>
2013-04-19 18:11:26 -07:00
Samuel Just
481c532ff3 Merge branch 'wip_4662_clean' into next
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-04-19 17:11:31 -07:00
Samuel Just
88d9ee1d01 ReplicatedPG::_finish_mark_all_unfound_lost: only requeue if !deleting
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-04-19 17:10:27 -07:00
Samuel Just
0e155550dd ReplicatedPG::_applied_recovered_object*: don't queue scrub if deleting
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-04-19 17:10:27 -07:00
Samuel Just
6ef0f162df PG: check for pg change in ~FlushState
Fixes: #4662
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-04-19 17:10:27 -07:00
Samuel Just
b8cb9d7e7b PG: bail if deleting in _finish_recovery
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-04-19 17:10:26 -07:00
Samuel Just
75cb55b4e2 AsyncReserver: delete context in cancel_reservation
Fixes: #4662
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-04-19 17:10:22 -07:00
David Zafman
d73b9fbe3e tools/ceph-filestore-dump: Error messages lost because stderr is closed
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>
2013-04-19 17:08:37 -07:00
David Zafman
37d2fe2c71 osd: Make clear_temp() public for use by remove
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-04-19 17:08:37 -07:00
David Zafman
460db08955 osd: Add flag to force version write in _write_info()
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-04-19 17:08:37 -07:00
David Zafman
da39f911e0 osd: Create static PG::_write_log() function
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-04-19 17:08:36 -07:00
Samuel Just
ad845e61b9 OSDMonitor: pg split is no longer experimental
Fixes: #4711
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-04-19 15:23:53 -07:00
Sage Weil
095dc4f6ba Merge pull request #228 from alram/next
Fix journal partition creation

Reviewed-by: Sage Weil <sage@inktank.com>
2013-04-19 15:16:41 -07:00
Alexandre Marangone
56619ab917 Fix journal partition creation
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>
2013-04-19 15:11:09 -07:00
Sage Weil
fe9d326099 rbd: fix qa tests to use --allow-shrink
Fixes: #4763
Signed-off-by: Sage Weil <sage@inktank.com>
2013-04-19 14:37:21 -07:00
Gregory Farnum
f114fdc40a Merge pull request #227 from ceph/wip-4574
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-04-19 14:28:18 -07:00
Sage Weil
d395aa521e init-ceph: do not stop start on first failure
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>
2013-04-19 13:05:43 -07:00
Joao Eduardo Luis
9a7d1f5197 mon: Monitor: fix timechecks get_health clobbering overall status
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-04-19 12:26:13 -07:00
Sage Weil
aa0d5f39d6 mon: fix health monitor calls
- unconditionally call get_health, regardless of formatter *
- return a meaningful health status code

Signed-off-by: Sage Weil <sage@inktank.com>
2013-04-19 12:16:11 -07:00
Sage Weil
be4807f5b8 global: call observers (and start logging) in global_init
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>
2013-04-19 12:03:43 -07:00
David Zafman
76505c28de osd: Create new static function PG::_write_info() for use by PG import
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-04-19 11:29:18 -07:00
David Zafman
52d8240adf osd: Add OSD::make_infos_oid() as common function to create oid
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-04-19 11:29:18 -07:00
David Zafman
5ffb3ef4c2 filestore, osd: Fixes to comform to programming guidelines
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-04-19 11:29:17 -07:00
Joao Eduardo Luis
fa89cfd2e4 mon: QuorumService: return health status on get_health()
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>
2013-04-19 19:26:51 +01:00
Samuel Just
78c9db88cd OpRequest: don't maintain history if the OSD is shutting down
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-04-19 11:06:04 -07:00
Samuel Just
1493e7dbfb osd/: optionally track every pg ref
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>
2013-04-19 11:05:58 -07:00
Samuel Just
66c007fb3b common/: add tracked_int_ptr.hpp
TrackedIntPtr acts like intrusive_ptr, but is able to
track a ref id.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-04-19 11:00:22 -07:00
Samuel Just
ec6f71bd02 ReplicatedPG: use the ReplicatedPGRef typedef
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-04-19 11:00:22 -07:00
Samuel Just
4090eff8a6 ReplicatedPG: use ReplicatedPGRef for C_PG_MarkUnfoundLost
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-04-19 11:00:22 -07:00
Samuel Just
f03ba5a298 ReplicatedPG: use ReplicatedPGRef for C_OSD_OpCommit
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-04-19 11:00:22 -07:00