Commit Graph

36920 Commits

Author SHA1 Message Date
Jianpeng Ma
3103c8a4db ObjectStore: Fix a error comment.
Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2014-11-05 05:14:38 -08:00
Jianpeng Ma
a1aa70f2f2 ObjectStore: Don't use largest_data_off to calc data_align.
If largest_data_off % CEPH_PAGE_SIZE != 0, the get_data_aligment return
a erro value. This make the FileJouranl::align_bl to memcopy much data.

Tested-by: Sage Weil <sage@redhat.com>
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2014-11-05 05:14:14 -08:00
Jianpeng Ma
8ba504dee8 buffer: Add _memcopy_count to track total count of memcopy by rebuild/rebuild_page_aligned/c_str.
Using thie filed, we know the payload of
rebuild/rebuild_page_aligned/c_str and tune performance accroding.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2014-11-05 05:12:22 -08:00
Sage Weil
3d45a68d0a mds: fix log_client config
This broke when channels were refactored.  Set and update log_client
config using generic helpers.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-11-05 01:06:02 -08:00
Sage Weil
7dc2ca826e osd: configure log_client properly
This broke when the channel refactor happened--we weren't configuring
the LogClient settings at all.  Fix it by using the generic helpers to
make this reasonably painless.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-11-05 01:06:02 -08:00
Sage Weil
da6a8a36e2 mon: move log config parsing into LogClient.h helper
Signed-off-by: Sage Weil <sage@redhat.com>
2014-11-05 01:06:02 -08:00
Sage Weil
0fd54a7e4a move Monitor::update_log_client to LogChannel::update_config
None of this is specific to the monitor.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-11-05 01:06:02 -08:00
Sage Weil
4561aff746 move get_conf_str_map_helper to str_map.h (from Monitor.h)
Signed-off-by: Sage Weil <sage@redhat.com>
2014-11-05 01:06:02 -08:00
Sage Weil
84fec864ca osd: add 'cluster_log [type] [message ...]' tell command
Useful for debugging.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-11-05 01:06:02 -08:00
Sage Weil
4f40975013 commong/LogEntry: string_to_clog_type
Signed-off-by: Sage Weil <sage@redhat.com>
2014-11-05 01:06:02 -08:00
Xinze Chi
705a1e3c18 osd: cache pool: delete dead code in ReplicatedPG::agent_choose_mode
Signed-off-by: Xinze Chi <xmdxcxz@gmail.com>
2014-11-05 08:24:36 +00:00
Yehuda Sadeh
fe7bf06366 rgw: RGWRados::get_obj() returns wrong len if len == 0
Fixes: #9877
We only updated if len was > 0, should update it if r >= 0. This was the
culprit for issue #9877.
Backport: giant, firefly

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2014-11-04 22:05:03 -08:00
Sage Weil
e7fb00392e Merge pull request #2856 from XinzeChi/master
osd: cache pool: flush object ignoring cache min flush age when cache pool is full

Backport: giant, firefly
Reviewed-by: Sage Weil <sage@redhat.com>
2014-11-04 14:59:10 -08:00
Xinze Chi
f4ee9496ed osd: cache pool: flush object ignoring cache min flush age when cache pool is full
Signed-off-by: Xinze Chi <xmdxcxz@gmail.com>
2014-11-05 01:00:01 +00:00
John Wilkins
6da9405155 doc: Edited Key/Value store config reference.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-11-04 12:02:47 -08:00
John Wilkins
03be944cdc doc: Added Key/Value store config reference to index.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-11-04 12:02:28 -08:00
John Wilkins
25ca92d7ff Merge pull request #2854 from ceph/wip-doc-openstack-juno
doc: Update for OpenStack Juno.

New users working with Nova (Juno) noted that libvirt settings are now under a [libvirt] section, and truncate the leading libvirt_. Made subsections for Havana and Icehouse, added a new subsection for Juno.
2014-11-03 15:08:11 -08:00
John Wilkins
72fc262a09 doc: Update for OpenStack Juno.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2014-11-03 14:04:33 -08:00
Sage Weil
7ef72e9310 Merge pull request #2849 from ceph/wip-buffer
RFC: buffer: implement list::get_contiguous

Reviewed-by: Haomai Wang <haomaiwang@gmail.com>
2014-11-02 15:17:38 -08:00
Ding Dinghua
e0166a23c2 osdc/Objecter: Fix a bug of dead looping in Objecter::handle_osd_map
If current map epoch is less than oldest epoch, current map epoch
should step up to oldest epoch.

Fixes: #9986
Signed-off-by: Ding Dinghua <dingdinghua85@gmail.com>
2014-11-02 14:52:16 -08:00
Ding Dinghua
31c584c8ba osdc/Objecter: e shouldn't be zero in Objecter::handle_osd_map
Signed-off-by: Ding Dinghua <dingdinghua85@gmail.com>
2014-11-02 14:52:16 -08:00
Sage Weil
093c5f0cab mon/PGMap and PGMonitor: update last_epoch_clean cache from new osd keys
We were only invalidating the cached value from apply_incremental, which
is no longer called on modern clusters.

Fix this by storing the update epoch in the key as well (it is not part
of osd_stat_t).

Backport: giant, firefly, dumpling(?)
Fixes: #9987
Signed-off-by: Sage Weil <sage@redhat.com>
2014-11-02 14:51:01 -08:00
Sage Weil
3fb731b722 mon/PGMap: invalidate cached min_last_epoch_clean from new-style pg keys
We were only invalidating the cache from the legacy apply_incremental(),
which is no longer called on modern clusters.

Fixes: #9987
Signed-off-by: Sage Weil <sage@redhat.com>
2014-11-02 14:50:47 -08:00
Sage Weil
8924158df8 JounralingObjectStore: journal->committed_thru after replay
It's possible that the osd stopped between when the filestore
op_seq file was updated and when the journal was trimmed.  In
that case, it's possible that on boot the journal might be
full, and yet not be trimmed because commit_start assumes
there is no work to do.  Calling committed_thru on the journal
ensures that the journal matches committed_seq.

Backport: giant firefly emperor dumpling
Fixes: #6756
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
2014-11-02 14:27:12 -08:00
Sage Weil
a554766338 buffer: implement list::get_contiguous
Return a pointer to a contiguous range of the bufferlist, rebuilding
into a contiguous region as needed.  For now, if we need to rebuild,
we just do the whole thing.  We can obviously optimize this later to
rebuild on the necessary region, but this is good enough for the
(presumably) common case where the needed region is already in fact
contiguous.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-31 21:29:42 -07:00
Sage Weil
4a9ad7dc2d osd/ReplicatedPG: fix compile error
From 1fef4c3d54.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-31 19:33:59 -07:00
Sage Weil
4d0bba8b22 Merge pull request #2816 from XinzeChi/master
Get the currently atime of the object in cache pool for eviction 

Backport: giant, firefly
Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-31 17:16:30 -07:00
Sage Weil
f30fddd07b Merge pull request #2796 from ceph/wip-rwtimer
common/Timer: kill RWTimer

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2014-10-31 10:55:01 -07:00
Sage Weil
1ef9e2f71a Merge pull request #2826 from wonzhq/evict-atime-nohitset
osd: tiering: calculate object age during eviction when there is no hit set

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-31 10:50:31 -07:00
Sage Weil
08d5945522 Merge pull request #2827 from thesues/fix-hang
Fix rados_shutdown hang forever when using radosstriper

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-31 10:17:24 -07:00
Gregory Farnum
ed2ff15c94 Merge pull request #2813 from ceph/wip-9894
client: fix I_COMPLETE_ORDERED checking

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2014-10-31 08:18:12 -07:00
Dongmao Zhang
75332450e3 Fix rados_shutdown hang forever when using radosstriper
Dear list,

I have met this when I was using radosstriper C API. My program is
roughly like this:

    rados_striper_aio_write
    rados_aio_flush
    rados_aio_wait_for_safe
    rados_aio_release
    rados_striper_destroy
    rados_ioctx_destroy
    rados_shutdown /Hangs here/

In most time, this works well, But the programm occasionally
hangs forever. Output of gstack:

Thread 1 (Thread 0x7fe0afba0760 (LWP 18509)):
0 0x000000330f20822d in pthread_join () from /lib64/libpthread.so.0
1 0x000000347566cea2 in Thread::join(void**) () from
/usr/lib64/librados.so.2
2 0x00000034755ac535 in librados::RadosClient::shutdown() () from
/usr/lib64/librados.so.2
3 0x0000003475592269 in rados_shutdown () from /usr/lib64/librados.so.2
4 0x0000000000402349 in main ()

Thread 4 (Thread 0x7fe0ab14d700 (LWP 18541)):
0 0x000000330f20e264 in __lll_lock_wait () from /lib64/libpthread.so.0
1 0x000000330f209508 in _L_lock_854 () from /lib64/libpthread.so.0
2 0x000000330f2093d7 in pthread_mutex_lock () from
/lib64/libpthread.so.0
3 0x0000003475633af1 in Mutex::Lock(bool) () from
/usr/lib64/librados.so.2
4 0x00000034755abd37 in librados::RadosClient::put() () from
/usr/lib64/librados.so.2
5 0x0000003475592501 in librados::Rados::shutdown() () from
/usr/lib64/librados.so.2
6 0x00007fe0afbba9f7 in
libradosstriper::RadosStriperImpl::CompletionData::~CompletionData() ()
from /usr/lib64/libradosstriper.so.1
7 0x00007fe0afbbaad9 in
libradosstriper::RadosStriperImpl::WriteCompletionData::~WriteCompletionData()
() from /usr/lib64/libradosstriper.so.1
8 0x00007fe0afbc1d75 in RefCountedObject::put() () from
/usr/lib64/libradosstriper.so.1
9 0x00007fe0afbc224d in
libradosstriper::MultiAioCompletionImpl::safe_request(long) () from
/usr/lib64/libradosstriper.so.1
10 0x00000034755c5ce8 in librados::C_AioSafe::finish(int) () from
/usr/lib64/librados.so.2
11 0x00000034755a0e89 in Context::complete(int) () from
/usr/lib64/librados.so.2
12 0x000000347564d4c8 in Finisher::finisher_thread_entry() () from
/usr/lib64/librados.so.2
13 0x000000330f2079d1 in start_thread () from /lib64/libpthread.so.0
14 0x000000330eae886d in clone () from /lib64/libc.so.6

It is obvious that librados::Rados::shutdown is not a thread-safe
function here. It will hang forever. The culprit of this is when
CompletionData is released, it will first notify
"rados_aio_wait_for_safe" to continue, and CompletionData will call
put() to release other data. But if the main thread(Thread 1 here) runs
fast enough, rados_striper_destroy will be executed before other
thread(Thread 4 here)'s releasing refcnf. In this situation, main thread
runs Rados::shutdown() while other thread runs Rados::shutdown() in the
same time.

My suggestion is to let RadosStriperImpl::aio_flush to block until all
the CompletionData has been released. This makes sure other thread will
never call rados_shutdown.
2014-10-31 10:52:20 +08:00
Gregory Farnum
2474f0ccfa Merge pull request #2843 from dachary/wip-9752-past-intervals
osd: past_interval display bug on acting

Reviewed-by: Greg Farnum <greg@inktank.com>
2014-10-30 18:33:15 -07:00
Loic Dachary
c5f8d6eded osd: past_interval display bug on acting
The acting array was incorrectly including the primary and up_primary.

http://tracker.ceph.com/issues/9752 Fixes: #9752

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-31 00:49:21 +01:00
Josh Durgin
c489aafed0 Merge pull request #2835 from leseb/doc-rbd-juno
doc: update RBD for Juno

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-10-30 13:22:06 -07:00
Sage Weil
936c74fdad Merge pull request #2831 from yuyuyu101/async-kqueue
AsyncMessenger: Add kqueue support
2014-10-30 11:35:43 -07:00
Josh Durgin
632c145563 Merge pull request #2839 from ceph/wip-9944
osdc/Objecter: fix null dref when pool dne

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-10-30 11:31:34 -07:00
Dan Mick
0778a4f243 Merge pull request #2811 from ceph/wip-vstart
init-ceph: make ./init-ceph behave from src dir on systemd
2014-10-30 11:19:01 -07:00
Sage Weil
50c2c7589a osdc/Objecter: fix null dref when pool dne
If the base pool does not exist, we need to avoid dereferencing pi.
This simplest fix is to return with POOL_DNE early and skip all of the
checks.

Note that there is one other small semantic change in this function: if
we are using the precalc_pgid then base_oloc pool has to match.  But
the list_objects() caller does that, so we're fine.

Backport: giant
Fixes: #9944
Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-30 10:56:36 -07:00
Sage Weil
0ba01583c5 Merge pull request #2837 from ceph/wip-9945
messages: fix COMPAT_VERSION on MClientSession

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-30 10:05:36 -07:00
John Spray
1eb9bcb1d3 messages: fix COMPAT_VERSION on MClientSession
This was incorrectly incremented to 2 by omission
of an explicit COMPAT_VERSION value.

Fixes: #9945

Signed-off-by: John Spray <john.spray@redhat.com>
2014-10-30 16:50:32 +00:00
Gregory Farnum
48c9f8c440 Merge pull request #2830 from ceph/wip-9800-giant
client: allow xattr caps in inject_release_failure

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2014-10-30 09:14:00 -07:00
Loic Dachary
51e189c1b0 Merge pull request #2834 from dachary/wip-warning
tests: fix signed/unsigned warning

Reviewed-by: Christophe Courtaut <christophe.courtaut@gmail.com>
2014-10-30 12:20:36 +01:00
Sébastien Han
c96fe592f2 doc: update RBD for Juno
This commit introduces some updates for the OpenStack Juno release. New
flags have been added, many trailing spaces were removed and a new
recommendation for Glance cache management has been added too.

Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
2014-10-30 11:59:14 +01:00
Sage Weil
56ee3b4157 doc/release-notes: it's 8MB, not 32MB
Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-29 22:54:26 -07:00
Sage Weil
f7431cc3c2 msg/Pipe: discard delay queue before incoming queue
Shutdown the delayed delivery before the incoming queue in case the
DelayedDelivery thread is busy queuing messages.

Fixes: #9910
Signed-off-by: Sage Weil <sage@redhat.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2014-10-29 14:45:54 -07:00
Sage Weil
e2e6f9739d v0.87
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJUUSwLAAoJEH6/3V0X7TFtsLMQAM0xPn3NFFOGMrZobs4ogB6Q
 kPCSf21cHdreExNpUcUDIgaH8Vff63yUKghkkSBYESI8IA0/tuJcClL98sWuWyyj
 aU1zEomjOMtKgb5cKdQSjX3ss2GYZgQGLWAeAawdIaNO1WaXXPjg/mVSdWL2tFAJ
 EkhPg3THS2Bvnm+B1g3QY9QZTU9EA3fm4Np/UjBxZToD6TL+GNXXIjYUSE11PTIB
 gfnWhpvhqK3DTFkjtKvlPTEiYRd60nnnbhYXI3Ry2bmrJIJ+lIzXUlFfjtuBRjc6
 ZQvwBPXuxbUvo3dfI5c75PKk8BCSdBtA5gZ8rrgpdcp8AC8pX/5DhuNamfgBMOug
 s+H5j07De9/FrVJ5JW8CkSQLyQt2HD2E8cNAa5me87kOv9DIWC1fMFmA/mGPlDCz
 NJhpl/z4BBfmB0AtCVvjqpeP7vJWV74rrnWUET7FTj/1xCY4EmX5CalCvbE1Q7e5
 1nA0RoZ8EPtP/VLfBzlglv7MPelrTsq1BaUzP5YtZ5XPVShCZCIc/lvJZz4tOFaU
 0PFA9GrHIGRn6WPzQGDLiyN6XE8W+t/fWEs6N7ToFrRsMpmxdgwWtERfXhGGBNVJ
 8HYrIlfOKLAsQ1HpOEyn9cMF1AW2gVAn6wdmyPuahmm83Z6XprhL6i3V+sdLyhRx
 LSzWJ+Dufn4+K4AA73mi
 =oz3o
 -----END PGP SIGNATURE-----

Merge tag 'v0.87'

v0.87
2014-10-29 13:50:24 -07:00
Sage Weil
675f1c7ece Merge pull request #2829 from ceph/wip-doc-fs-quickstart
doc: include 'fs new' stuff in cephfs quickstart
2014-10-29 13:08:52 -07:00
Josh Durgin
5a473a9ea6 Merge pull request #2828 from Vicente-Cheng/master
rbd: Fix the rbd export when image size more than 2G

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-10-29 12:16:08 -07:00
Jenkins
c51c8f9d80 0.87 2014-10-29 11:03:55 -07:00