Commit Graph

24604 Commits

Author SHA1 Message Date
Sage Weil
3975774d4d mds: flush log when we hit xlock during path traversal
This ensures we don't stall out waiting for a lock state to change.

This fixes ~4-5 second stalls easily reproducible and visible with
ceph-fuse and 'dbench 1'.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:36:56 -07:00
Sage Weil
e47d490684 client: instantiate MetaSession for opening connections
The previous kludge where a waiting_for_session key indicated that we
had an open in progress was... kludgey.

Introduce some helpers to do the session creation/open.

Move the waiting list to be a session member, and clean up associated
code.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:36:56 -07:00
Sage Weil
5f2efe62f3 client: pass around MetaSession* instead of int mds
This is mostly just shuffling argument types around.  In a few cases we
now assert that the session actually exists; these would have also been
problematic before when we call get_inst() on bad addrs or something, or
silently ignored bugs.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:36:15 -07:00
Sage Weil
cee87865fe client: check for mds state before sending messages
This fixes some callers, not all.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:36:14 -07:00
Sage Weil
1779d394cd mon: increase max_global_id before we hit the wall
Bump the max before we run out of IDs to allocate.  This avoids a stall in
authentication every N new clients.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Luis <joao.luis@inktank.com>
2013-03-13 15:39:29 -07:00
Sage Weil
cb7cb4a8d6 Merge branch 'next' 2013-03-13 15:39:01 -07:00
Sage Weil
4637752db6 mon: simplify assign_global_id()
Simplify the logic a bit so it is easier to follow.

Small behavior change: we will successfully allocate and return a gid that
== the max when we can't bump it.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 15:38:48 -07:00
Joao Eduardo Luis
436e5be950 mon: AuthMonitor: don't return global_id right away if we're increasing it
This only happens on the Leader and leads to duplicate global_ids.

Fixes: #4285

Signed-off-by: Joao Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-13 15:38:43 -07:00
Joao Eduardo Luis
b99367bfb2 mon: Paxos: only finish a queued proposal if there's actually *any*
When proposing an older value learned during recovery, we don't create
a queued proposal -- we go straight through Paxos.  Therefore, when
finishing a proposal, we must be sure that we have a proposal in the queue
before dereferencing it, otherwise we will segfault.

Fixes: #4250

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-03-13 15:03:00 -07:00
Sage Weil
7710ee23d7 auth: assert if auth_debug = true and secret_id == 0
Hunting #4282.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 13:41:23 -07:00
John Wilkins
6802f2793b doc: Added libvirt config comments for discard granularity.
fixes: #4395

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-03-13 10:57:23 -07:00
Yehuda Sadeh
88725316dd rgw: set up curl with CURL_NOSIGNAL
Fixes: #4425
Backport: bobtail
Apparently, libcurl needs that in order to be thread safe. Side
effect is that if libcurl is not compiled with c-ares support,
domain name lookups are not going to time out.
Issue affected keystone.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-03-13 10:45:07 -07:00
John Wilkins
af3b16349a doc: Fixed syntax error.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-03-12 17:50:26 -07:00
John Wilkins
be6f7ce68f doc: Added tcp and bind settings and cleaned up syntax a bit.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-03-12 17:44:10 -07:00
John Wilkins
77ecdc7260 doc: Setting should use network not single IP.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-03-12 15:43:33 -07:00
John Wilkins
669d2ba552 doc: Fixed usage and added note for copying keyring to client. Added hyperlinks.
fixes: #4373

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-03-12 14:39:46 -07:00
John Wilkins
7f66ebe9a5 doc: Addressed confusion with version numbering.
fixes: #4411

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-03-12 14:25:44 -07:00
John Wilkins
4df44bb1bb doc: Added troubleshooting entry for single OSD and single replica.
fixes: #3327

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-03-12 14:15:51 -07:00
David Zafman
9464b5e965 Merge remote-tracking branch 'origin/wip-fix-librados-headers' 2013-03-12 12:03:43 -07:00
Gary Lowell
a5156fb74c Merge pull request #97 from Elbandi/master
Fix FTBFS

Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
2013-03-12 11:15:00 -07:00
David Zafman
36c672dcb2 Fix typo in ceph usage output
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-03-12 11:07:54 -07:00
Sage Weil
6e2b33b460 Merge pull request #103 from dalgaaf/wip-da-fix-c_str
mon/Monitor.h: return string instead of 'char *' from get_state_name()

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-12 11:00:08 -07:00
Danny Al-Gaaf
60639ab67e mon/Monitor.h: return string instead of 'char *' from get_state_name()
Return a string instead of 'char *' to avoid usage of std::string:c_str()
to return a 'char *' from get_state_name().

Returning result of c_str() from a function is dangerous since the
result gets (may) invalid after the related string object gets
destroyed or out of scope (which is the case with return). So you may
end up with garbage in this case.

Related warning from cppcheck:
 [src/mon/Monitor.h:172]: (error) Dangerous usage of c_str(). The value
 returned by c_str() is invalid after this call.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 18:21:40 +01:00
Sage Weil
34f198487f Merge pull request #102 from dalgaaf/wip-da-sca-style-4-v2
Fixes for more cppcheck issues (v2 of #101)

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-12 09:57:44 -07:00
Danny Al-Gaaf
72c62269f0 client/hadoop/CephFSInterface.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:45 +01:00
Danny Al-Gaaf
5ad24601ff cls/rgw/cls_rgw.cc: prefer prefix --operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:44 +01:00
Danny Al-Gaaf
7a310854f2 client/Inode.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:44 +01:00
Danny Al-Gaaf
822c67ef84 SyntheticClient.h: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:44 +01:00
Danny Al-Gaaf
0f48638ee4 CephxKeyServer.h: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:44 +01:00
Danny Al-Gaaf
b1437a8bf9 auth/Auth.h: prefer prefix ++operator for non-primitive types
Prefer prefix ++operator for non-primitive types like iterators for
performance reasons. Prefix ++/-- operators avoid creating a temporary
copy.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:44 +01:00
Danny Al-Gaaf
64dca11e4a tools/rest_bench.cc: remove unused variable
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:44 +01:00
Danny Al-Gaaf
9b51c25fa9 test/test_filejournal.cc: use %u to format unsigned in sprintf()
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:44 +01:00
Danny Al-Gaaf
5e882db521 test/system/st_rados_list_objects.cc: remove not needed statement
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:44 +01:00
Danny Al-Gaaf
ae15b2fcaa test/osd/RadosModel.h: remove unused variables
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:44 +01:00
Danny Al-Gaaf
faab0e849a test/osd/Object.cc: catch exception by reference
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:43 +01:00
Danny Al-Gaaf
4762faccb7 test/omap_bench.cc: remove unused variables
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:43 +01:00
Danny Al-Gaaf
b77454c61d test_mon_workloadgen.cc: remove unused variables
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:43 +01:00
Danny Al-Gaaf
3cb9b35644 test/librados/aio.cc: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:43 +01:00
Danny Al-Gaaf
a6bd6581c3 test/encoding/ceph_dencoder.cc: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:43 +01:00
Danny Al-Gaaf
8dc0a3292d bench/dumb_backend.h: remove never executed delete statement
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:43 +01:00
Danny Al-Gaaf
3072902c00 test_object_map.cc: use %u to format unsigned in snprintf()
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:43 +01:00
Danny Al-Gaaf
a19a2a14d4 test_keyvaluedb_iterators.cc: remove unused variable
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:43 +01:00
Danny Al-Gaaf
08bf10b99b rgw/rgw_xml.cc: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:42 +01:00
Danny Al-Gaaf
03e0308f3e rgw/rgw_user.cc: remove unused variables
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:42 +01:00
Danny Al-Gaaf
69cb92e37d rgw/rgw_rest_usage.cc: remove unused variables
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:42 +01:00
Danny Al-Gaaf
38942059d4 rgw/rgw_rest_s3.cc: remove unused variables
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:42 +01:00
Danny Al-Gaaf
f8a9fec87f rgw/rgw_rados.cc: perform initialization of prefix in initialization list
Perform initialization of IntentLogNameFilter:prefix in initialization list
instead of constructor body.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:42 +01:00
Danny Al-Gaaf
a37d71dcdf rgw/rgw_rados.cc: remove unused variables
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:42 +01:00
Danny Al-Gaaf
c6becc6b58 rgw/rgw_rados.cc: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-12 16:59:42 +01:00
Joe Buck
579d4ad77d testing: update wordcount to new code layout.
Signed-off-by: Joe Buck <jbbuck@gmail.com>
2013-03-12 01:23:35 -07:00