Commit Graph

29921 Commits

Author SHA1 Message Date
Yan, Zheng
09a4c1bbe9 mds: remove superfluous warning of releasing lease
When receiving the lease release message, it's possible that the lease
has already expired and the corresponding dentry has been trimmed from
the cache.

Fixes #5871

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2013-11-26 14:56:30 +08:00
Dan Mick
c409e362c8 mon: osd dump should dump pool snaps as array, not object
Fixes: #6894
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-11-25 22:37:59 -08:00
Josh Durgin
1804e136da Merge pull request #835 from ceph/wip-6705
qa: workunits: mon: ping.py: test 'ceph ping'

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-11-25 18:03:02 -08:00
Josh Durgin
29ef3d4607 Merge branch 'wip-zero-copy-bufferlist-last'
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-11-25 17:12:03 -08:00
Josh Durgin
03d63c4b2d buffer: turn off zero-copy reads for now
Some users will need to be changed to handle getting the correct
length from bufferlist::read_fd.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-11-25 14:38:20 -08:00
Li Wang
784d1888a6 mds: Release resource before return
Close file before return.
Fix coverity issue: CID 1019571

Signed-off-by: Li Wang <liwang@ubuntukylin.com>
Reported-by: Xianxia Xiao <xianxiaxiao@ubuntukylin.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-11-25 13:57:40 -08:00
Li Wang
524f666e84 rbd: Release resource before return
Close file before return.
Fix coverity issue: CID 1019579

Signed-off-by: Li Wang <liwang@ubuntukylin.com>
Reported-by: Xianxia Xiao <xianxiaxiao@ubuntukylin.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-11-25 13:57:40 -08:00
David Zafman
d6c8830b28 Merge pull request #868 from ceph/wip-6896
osd: Remove bogus assert(active == acting.size())

Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-11-25 13:22:25 -08:00
David Zafman
66f51f82d4 osd: Remove bogus assert(active == acting.size())
We saw this assert because active is not correctly computed.
Remove assert and incorrectly computed active count.
We already use acting.size() to determine whether to set PG_STATE_DEGRADED.

Fixes: #6896

Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-11-25 13:20:49 -08:00
Sage Weil
5ccc2ecd30 SubmittingPatches: describe github pull-request process
Signed-off-by: Sage Weil <sage@inktank.com>
2013-11-25 09:24:19 -08:00
Bastian Blank
ab05580a68 Add missing stuff to clean target
Sweepup a few bits a pieces that get left behind by make clean.

Signed-off-by: James Page <james.page@ubuntu.com>
2013-11-25 16:20:10 +00:00
Bastian Blank
ae46c38c2d Correctly mark library modules
Mark RADOS class libraries as module so that they will be automatically
ignored when stripping binaries.

Signed-off-by: James Page <james.page@ubuntu.com>
2013-11-25 16:19:25 +00:00
Sage Weil
94ca1cc663 ceph-object-corpus: revert accidental revert
From 5df3024d78

Signed-off-by: Sage Weil <sage@inktank.com>
2013-11-25 08:10:13 -08:00
Sage Weil
fd1ec0fa90 Merge pull request #863 from ceph/wip-6804
rgw: lower some debug message

Reviewed-by: Sage Weil <sage@inktank.com>
2013-11-25 07:53:03 -08:00
Gregory Farnum
b089adb85a Merge pull request #861 from dachary/init-ceph
init: fix typo s/{$update_crush/${update_crush/
2013-11-24 22:07:35 -08:00
David Zafman
0b14c155a0 Merge pull request #832 from ceph/wip-flush-5855-review
Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
2013-11-22 17:09:54 -08:00
Josh Durgin
75d4a72086 buffer: enable tracking of calls to c_str()
Track buffer::ptr::c_str() to catch internal calls that use it, like
buffer::ptr::cmp(). buffer::list::c_str() will be captured by this as
well, since it will do a final buffer::ptr::c_str() and possibly
several more if it needs to rebuild into a single raw buffer.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-11-22 16:14:03 -08:00
Josh Durgin
445fb18390 buffer: try to do zero copy in read_fd
Leave the explicit read_fd_zero_copy around as well for testing.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-11-22 16:14:03 -08:00
Josh Durgin
be29b3471c buffer: attempt to size raw_pipe buffers
Make sure the requested length is below the maximum pipe size for now,
since we're only using one pipe and splicing once into and out of
it. The default max is 1MB on recent kernels, so this isn't such a
terrible limitation.

To get around this we could use multiple pipes, or keep both source and
destination fds open at the same time and call splice many times. This
is more usual usage for splice, but would require a lot more work to
restructure the filestore and messenger to handle it.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-11-22 16:14:03 -08:00
Josh Durgin
3f6fa05d72 buffer: add methods to read and write using zero copy
Create explicit methods for testing. Make buffer::list::write_fd() use
zero-copy if all the buffers support it.  Don't automatically handle
reads yet, since we need better detection of read length first.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-11-22 16:14:03 -08:00
Josh Durgin
5021b43e0a buffer: create raw pipe-based buffer
This uses a pipe to reference kernel memory so we can use splice(2) to
avoid extra data copies. Take an fd in the factory to create it, since
that's the only way to use it efficiently, which is its whole purpose.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-11-22 16:14:03 -08:00
Josh Durgin
eb94b8fd52 buffer: add an exception with an error code
This allows e.g. raw buffer constructors to provide more specific
information about what failed, as well as a useful error string
automatically.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-11-22 16:14:03 -08:00
Josh Durgin
30bc0e2791 safe_io: add functions for handling splice
Like the other functions, these don't handle non-blocking I/O.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-11-22 16:14:03 -08:00
Josh Durgin
b8518fea03 buffer: remove unused raw::length() method
This was accidentally introduced in
0c23a5624a

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-11-22 16:13:36 -08:00
Josh Durgin
ebb261f978 buffer: abstract raw data related methods
Create a virtual function that returns the raw data instead of
accessing it directly, so raw buffers backed by pipes can be used as
buffer::ptrs. Make raw::is_page_aligned() virtual so it will not need
to look at the raw data for a pipe-based buffer.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-11-22 16:13:36 -08:00
John Wilkins
740d406e37 doc: Clarified description on scrub load threshold.
fixes: #6735

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-11-22 15:49:16 -08:00
John Wilkins
8a3ed9be2f doc: Fixed instruction.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-11-22 15:48:25 -08:00
John Wilkins
e8ccb91fd3 Merge branch 'master' of https://github.com/ceph/ceph 2013-11-22 15:16:18 -08:00
John Wilkins
fc5789da01 doc: Added commentary to configure pg defaults. Clarified size commentary.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-11-22 15:15:41 -08:00
John Wilkins
dceaef439d doc: PG splitting added to docs.
fixes: #6727

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-11-22 15:14:46 -08:00
John Wilkins
d39676b164 doc: Took out "future" reference to namespaces.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-11-22 15:13:49 -08:00
John Wilkins
9a55d89250 doc: Clarification of terms.
fixes: #6749

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-11-22 12:59:40 -08:00
Yehuda Sadeh
b35fc1bc2e rgw: lower some debug message
Fixes: #6084
Backport: dumpling, emperor

Reported-by: Ron Allred <rallred@itrefined.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-11-22 07:08:29 -08:00
Yehuda Sadeh
561e7b0b28 rgw: initialize RGWUserAdminOpState::system_specified
Fixes: #6829
Backport: dumpling, emperor
We didn't init this member variable, which might cause that when
modifying user info that has this flag set the 'system' flag might
inadvertently reset.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-11-22 07:06:35 -08:00
Gregory Farnum
203065c076 Merge pull request #857 from ceph/wip-6796
mon: OSDMonitor: receive CephInt on 'osd pool set' instead on CephString

Reviewed-by: Greg Farnum <greg@inktank.com>
2013-11-21 18:56:49 -08:00
Joao Eduardo Luis
b2ee9352fc PendingReleaseNotes: mention 6796 and 'ceph osd pool set' behavior change
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-11-22 02:49:28 +00:00
Joao Eduardo Luis
7c6d43cf5b doc: rados: operations: pools: document 'osd pool set foo hashpspool'
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-11-22 02:49:27 +00:00
Joao Eduardo Luis
49d2fb7142 mon: OSDMonitor: don't crash if formatter is invalid during osd crush dump
Code would assume a formatter would always be defined. If a 'plain'
formatter or even an invalid formatter were to be supplied, the monitor
would crash and burn in poor style.

Fixes: 6820
Backport: emperor

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-11-22 02:49:20 +00:00
Joao Eduardo Luis
337195f046 mon: OSDMonitor: receive CephInt on 'osd pool set' instead on CephString
This partially reverts 2fe0d0d9 in order to allow Emperor monitors to
forward mon command messages to Dumpling monitors without breaking a
cluster.

The need for this patch became obvious after issue #6796 was triggered.
Basically, in a mixed cluster of Emperor/Dumpling monitors, if a client
happens to obtain the command descriptions from an Emperor monitor and
then issue an 'osd pool set' this can turn out in one of two ways:

1. client msg gets forwarded to an Emperor leader and everything's a-okay;
2. client msg gets forwarded to a Dumpling leader and the string fails to
be interpreted without the monitor noticing, thus leaving the monitor with
an uninitialized variable leading to trouble.

If 2 is triggered, a multitude of bad things can happen, such as thousands
of pg splits, due to a simple 'osd set pool foo pg_num 128' turning out
to be interpreted as 109120394 or some other random number.

This patch is such that we make sure the client sends an integer instead
of a string. We also make sure to interpret anything the client sends as
possibly being a string, or an integer.

Fixes: 6796
Backport: emperor

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-11-22 02:49:11 +00:00
Joao Eduardo Luis
7191bb2b24 mon: OSDMonitor: drop cmdval_get() for unused variable
We don't ever use any value as a float, so just drop obtaining it.  This
makes it easier to partially revert 2fe0d0d9 in an upcoming patch.

Backport: emperor

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-11-22 02:48:54 +00:00
Joao Eduardo Luis
50868a528d qa: workunits: mon: ping.py: test 'ceph ping'
Basic testing by forcing each monitor out of quorum at a time and making
sure they still reply to ping requests.

Fixes: #6705

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-11-22 01:43:06 +00:00
Loic Dachary
3502d4f4b9 init: fix typo s/{$update_crush/${update_crush/
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Reviewed-by: Loic Dachary <loic@dachary.org>
2013-11-21 18:51:06 +01:00
Josh Durgin
b493178f6c Merge branch 'next' 2013-11-20 18:38:59 -08:00
Josh Durgin
f753d56a9e test: use older names for module setup/teardown
setUp and tearDown require nosetests 0.11, but 0.10.4 is the latest on
centos. Rename to use the older aliases, which still work with newer
versions of nosetests as well.

Fixes: #6368
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-11-20 18:37:32 -08:00
John Wilkins
72bba1f31d doc: Added fixes to osd reporting section.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-11-20 14:28:18 -08:00
Dan Mick
a3f4148467 Merge pull request #854 from ceph/wip-osd-bench-size
osd: fix bench block size

Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-11-19 15:41:11 -08:00
David Zafman
86e4fd4f7a osd: Backfill peers should not be included in the acting set
Create actingbackfill in choose_acting()
Use first backfill target as previously
Add asserts to catch inappropriate use of actingbackfill
Use is_acting() in proc_replica_info() because this is before actingbackfill set
Remove backfill_targets from stray_set to prevent purge_strays from removing collection
Can't check is_replica() anymore for backfill operations since a backfill isn't
a replica due to acting set change.

fixes: #5855

Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-11-19 14:45:20 -08:00
David Zafman
19dbf7bc1e osd: Simple dout() fix
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-11-19 10:06:24 -08:00
Samuel Just
82e1e7e9be PG: remove unused Peering::flushed
This has been unused for quite some time!

Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-11-19 10:06:24 -08:00
Samuel Just
9ff0150963 PG: don't requeue waiting_for_active unless flushed and active
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-11-19 10:06:24 -08:00