]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agomds: mark_down old sessions using con
Sage Weil [Wed, 13 Mar 2013 01:31:23 +0000 (18:31 -0700)]
mds: mark_down old sessions using con

Use the Connection ref to mark old client sessions down.  This is cleaner.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-4390-b'
Sage Weil [Wed, 13 Mar 2013 23:37:29 +0000 (16:37 -0700)]
Merge branch 'wip-4390-b'

Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoclient: fix kick_flushing_caps() args
Sage Weil [Wed, 13 Mar 2013 23:09:45 +0000 (16:09 -0700)]
client: fix kick_flushing_caps() args

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: clean up useless MetaSession lookups
Sage Weil [Wed, 13 Mar 2013 23:08:50 +0000 (16:08 -0700)]
client: clean up useless MetaSession lookups

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: fix trim_caps() args
Sage Weil [Wed, 13 Mar 2013 23:08:42 +0000 (16:08 -0700)]
client: fix trim_caps() args

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: fix wake_inode_waiters() arg
Sage Weil [Wed, 13 Mar 2013 23:07:47 +0000 (16:07 -0700)]
client: fix wake_inode_waiters() arg

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: validate/lookup mds session in each message handler
Sage Weil [Wed, 13 Mar 2013 23:06:02 +0000 (16:06 -0700)]
client: validate/lookup mds session in each message handler

For every message handler, look up the MetaSession by int mds and verify
that the Connection* matches properly.  If so, proceed; otherwise, discard
the message.

In the future, we probably want to link the MetaSession to the Connection's
priv field, but that can come later.

Clean up a bunch of submethods that take int mds while we're here.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: fix remaining s->inst users to use s->con
Sage Weil [Wed, 13 Mar 2013 22:55:15 +0000 (15:55 -0700)]
client: fix remaining s->inst users to use s->con

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: remove unused MetaSession::was_stale
Sage Weil [Wed, 13 Mar 2013 20:24:37 +0000 (13:24 -0700)]
client: remove unused MetaSession::was_stale

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: only signal session waiters on open and close
Sage Weil [Wed, 13 Mar 2013 20:21:34 +0000 (13:21 -0700)]
client: only signal session waiters on open and close

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: use Connection* in MetaSession instead of the inst/addr
Sage Weil [Fri, 8 Mar 2013 21:47:03 +0000 (13:47 -0800)]
client: use Connection* in MetaSession instead of the inst/addr

This moves us to a cleaner API, and makes the session lifetime explicit
and clean.  Yay!

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: use session->inst where possible
Sage Weil [Fri, 8 Mar 2013 21:42:58 +0000 (13:42 -0800)]
client: use session->inst where possible

Removing remaining lookups up the mds inst in the MDSMap.  Instead, use
the MetaSession inst field.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: drop unused release_lease()
Sage Weil [Fri, 8 Mar 2013 21:41:15 +0000 (13:41 -0800)]
client: drop unused release_lease()

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: pass session to send_reconnect and resend_unsafe_requests
Sage Weil [Fri, 8 Mar 2013 21:32:51 +0000 (13:32 -0800)]
client: pass session to send_reconnect and resend_unsafe_requests

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: switch kick_requests and send_request to take a session *
Sage Weil [Fri, 8 Mar 2013 21:17:52 +0000 (13:17 -0800)]
client: switch kick_requests and send_request to take a session *

More cleanup!

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: handle ESTALE redirection in make_request(), not reply handler
Sage Weil [Fri, 8 Mar 2013 21:17:23 +0000 (13:17 -0800)]
client: handle ESTALE redirection in make_request(), not reply handler

Resending the request in the reply handler is a bit fugly and throws a
small wrench into moving to a MetaSession*-based approach.  Check for
the case(s) where we *do* return ESTALE explicitly and fall through.
Otherwise, kick the caller and let them retry.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: fix up _closed_mds_session
Sage Weil [Fri, 8 Mar 2013 21:05:22 +0000 (13:05 -0800)]
client: fix up _closed_mds_session

Drop useless arg.  Simplify callers.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: use helper for _close_mds_session()
Sage Weil [Fri, 8 Mar 2013 21:01:56 +0000 (13:01 -0800)]
client: use helper for _close_mds_session()

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomds: flush log when we hit xlock during path traversal
Sage Weil [Fri, 8 Mar 2013 20:57:58 +0000 (12:57 -0800)]
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>
12 years agoclient: instantiate MetaSession for opening connections
Sage Weil [Fri, 8 Mar 2013 20:56:54 +0000 (12:56 -0800)]
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>
12 years agoclient: pass around MetaSession* instead of int mds
Sage Weil [Fri, 8 Mar 2013 20:09:03 +0000 (12:09 -0800)]
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>
12 years agoclient: check for mds state before sending messages
Sage Weil [Fri, 8 Mar 2013 18:54:14 +0000 (10:54 -0800)]
client: check for mds state before sending messages

This fixes some callers, not all.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: increase max_global_id before we hit the wall
Sage Weil [Wed, 13 Mar 2013 20:13:12 +0000 (13:13 -0700)]
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>
12 years agoMerge branch 'next'
Sage Weil [Wed, 13 Mar 2013 22:39:01 +0000 (15:39 -0700)]
Merge branch 'next'

12 years agomon: simplify assign_global_id()
Sage Weil [Wed, 13 Mar 2013 20:11:42 +0000 (13:11 -0700)]
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>
12 years agomon: AuthMonitor: don't return global_id right away if we're increasing it
Joao Eduardo Luis [Mon, 11 Mar 2013 23:06:19 +0000 (23:06 +0000)]
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>
12 years agomon: Paxos: only finish a queued proposal if there's actually *any*
Joao Eduardo Luis [Tue, 12 Mar 2013 12:37:01 +0000 (12:37 +0000)]
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>
12 years agoauth: assert if auth_debug = true and secret_id == 0
Sage Weil [Wed, 13 Mar 2013 20:40:47 +0000 (13:40 -0700)]
auth: assert if auth_debug = true and secret_id == 0

Hunting #4282.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: Added libvirt config comments for discard granularity.
John Wilkins [Wed, 13 Mar 2013 17:57:23 +0000 (10:57 -0700)]
doc: Added libvirt config comments for discard granularity.

fixes: #4395

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agorgw: set up curl with CURL_NOSIGNAL
Yehuda Sadeh [Tue, 12 Mar 2013 19:56:01 +0000 (12:56 -0700)]
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>
12 years agodoc: Fixed syntax error.
John Wilkins [Wed, 13 Mar 2013 00:50:26 +0000 (17:50 -0700)]
doc: Fixed syntax error.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added tcp and bind settings and cleaned up syntax a bit.
John Wilkins [Wed, 13 Mar 2013 00:44:10 +0000 (17:44 -0700)]
doc: Added tcp and bind settings and cleaned up syntax a bit.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Setting should use network not single IP.
John Wilkins [Tue, 12 Mar 2013 22:43:33 +0000 (15:43 -0700)]
doc: Setting should use network not single IP.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Fixed usage and added note for copying keyring to client. Added hyperlinks.
John Wilkins [Tue, 12 Mar 2013 21:39:46 +0000 (14:39 -0700)]
doc: Fixed usage and added note for copying keyring to client. Added hyperlinks.

fixes: #4373

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Addressed confusion with version numbering.
John Wilkins [Tue, 12 Mar 2013 21:25:44 +0000 (14:25 -0700)]
doc: Addressed confusion with version numbering.

fixes: #4411

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added troubleshooting entry for single OSD and single replica.
John Wilkins [Tue, 12 Mar 2013 21:15:51 +0000 (14:15 -0700)]
doc: Added troubleshooting entry for single OSD and single replica.

fixes: #3327

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoMerge remote-tracking branch 'origin/wip-fix-librados-headers'
David Zafman [Tue, 12 Mar 2013 19:03:43 +0000 (12:03 -0700)]
Merge remote-tracking branch 'origin/wip-fix-librados-headers'

12 years agoMerge pull request #97 from Elbandi/master
Gary Lowell [Tue, 12 Mar 2013 18:15:00 +0000 (11:15 -0700)]
Merge pull request #97 from Elbandi/master

Fix FTBFS

Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
12 years agoFix typo in ceph usage output
David Zafman [Tue, 12 Mar 2013 18:07:54 +0000 (11:07 -0700)]
Fix typo in ceph usage output

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoMerge pull request #103 from dalgaaf/wip-da-fix-c_str
Sage Weil [Tue, 12 Mar 2013 18:00:08 +0000 (11:00 -0700)]
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>
12 years agomon/Monitor.h: return string instead of 'char *' from get_state_name() 103/head
Danny Al-Gaaf [Tue, 12 Mar 2013 17:21:40 +0000 (18:21 +0100)]
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>
12 years agoMerge pull request #102 from dalgaaf/wip-da-sca-style-4-v2
Sage Weil [Tue, 12 Mar 2013 16:57:44 +0000 (09:57 -0700)]
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>
12 years agoclient/hadoop/CephFSInterface.cc: prefer prefix ++operator for iterators 102/head
Danny Al-Gaaf [Tue, 12 Mar 2013 15:01:13 +0000 (16:01 +0100)]
client/hadoop/CephFSInterface.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agocls/rgw/cls_rgw.cc: prefer prefix --operator for iterators
Danny Al-Gaaf [Tue, 12 Mar 2013 14:59:29 +0000 (15:59 +0100)]
cls/rgw/cls_rgw.cc: prefer prefix --operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoclient/Inode.cc: prefer prefix ++operator for iterators
Danny Al-Gaaf [Tue, 12 Mar 2013 14:43:30 +0000 (15:43 +0100)]
client/Inode.cc: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoSyntheticClient.h: prefer prefix ++operator for iterators
Danny Al-Gaaf [Tue, 12 Mar 2013 14:36:14 +0000 (15:36 +0100)]
SyntheticClient.h: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoCephxKeyServer.h: prefer prefix ++operator for iterators
Danny Al-Gaaf [Tue, 12 Mar 2013 14:25:52 +0000 (15:25 +0100)]
CephxKeyServer.h: prefer prefix ++operator for iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoauth/Auth.h: prefer prefix ++operator for non-primitive types
Danny Al-Gaaf [Tue, 12 Mar 2013 14:18:01 +0000 (15:18 +0100)]
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>
12 years agotools/rest_bench.cc: remove unused variable
Danny Al-Gaaf [Tue, 12 Mar 2013 11:47:22 +0000 (12:47 +0100)]
tools/rest_bench.cc: remove unused variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/test_filejournal.cc: use %u to format unsigned in sprintf()
Danny Al-Gaaf [Tue, 12 Mar 2013 11:28:53 +0000 (12:28 +0100)]
test/test_filejournal.cc: use %u to format unsigned in sprintf()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/system/st_rados_list_objects.cc: remove not needed statement
Danny Al-Gaaf [Tue, 12 Mar 2013 11:25:28 +0000 (12:25 +0100)]
test/system/st_rados_list_objects.cc: remove not needed statement

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/osd/RadosModel.h: remove unused variables
Danny Al-Gaaf [Tue, 12 Mar 2013 11:17:30 +0000 (12:17 +0100)]
test/osd/RadosModel.h: remove unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/osd/Object.cc: catch exception by reference
Danny Al-Gaaf [Tue, 12 Mar 2013 11:15:44 +0000 (12:15 +0100)]
test/osd/Object.cc: catch exception by reference

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/omap_bench.cc: remove unused variables
Danny Al-Gaaf [Tue, 12 Mar 2013 11:12:03 +0000 (12:12 +0100)]
test/omap_bench.cc: remove unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest_mon_workloadgen.cc: remove unused variables
Danny Al-Gaaf [Tue, 12 Mar 2013 10:53:59 +0000 (11:53 +0100)]
test_mon_workloadgen.cc: remove unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/librados/aio.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Tue, 12 Mar 2013 10:40:41 +0000 (11:40 +0100)]
test/librados/aio.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest/encoding/ceph_dencoder.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Tue, 12 Mar 2013 10:04:24 +0000 (11:04 +0100)]
test/encoding/ceph_dencoder.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agobench/dumb_backend.h: remove never executed delete statement
Danny Al-Gaaf [Tue, 12 Mar 2013 10:00:32 +0000 (11:00 +0100)]
bench/dumb_backend.h: remove never executed delete statement

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest_object_map.cc: use %u to format unsigned in snprintf()
Danny Al-Gaaf [Tue, 12 Mar 2013 09:51:46 +0000 (10:51 +0100)]
test_object_map.cc: use %u to format unsigned in snprintf()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest_keyvaluedb_iterators.cc: remove unused variable
Danny Al-Gaaf [Tue, 12 Mar 2013 09:39:16 +0000 (10:39 +0100)]
test_keyvaluedb_iterators.cc: remove unused variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_xml.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Tue, 12 Mar 2013 09:36:53 +0000 (10:36 +0100)]
rgw/rgw_xml.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_user.cc: remove unused variables
Danny Al-Gaaf [Tue, 12 Mar 2013 09:33:26 +0000 (10:33 +0100)]
rgw/rgw_user.cc: remove unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_rest_usage.cc: remove unused variables
Danny Al-Gaaf [Tue, 12 Mar 2013 09:30:33 +0000 (10:30 +0100)]
rgw/rgw_rest_usage.cc: remove unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_rest_s3.cc: remove unused variables
Danny Al-Gaaf [Tue, 12 Mar 2013 09:29:48 +0000 (10:29 +0100)]
rgw/rgw_rest_s3.cc: remove unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_rados.cc: perform initialization of prefix in initialization list
Danny Al-Gaaf [Tue, 12 Mar 2013 09:18:32 +0000 (10:18 +0100)]
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>
12 years agorgw/rgw_rados.cc: remove unused variables
Danny Al-Gaaf [Tue, 12 Mar 2013 09:16:45 +0000 (10:16 +0100)]
rgw/rgw_rados.cc: remove unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_rados.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Tue, 12 Mar 2013 09:01:07 +0000 (10:01 +0100)]
rgw/rgw_rados.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotesting: update wordcount to new code layout.
Joe Buck [Tue, 12 Mar 2013 07:04:23 +0000 (00:04 -0700)]
testing: update wordcount to new code layout.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
12 years agotesting: fix hadoop-internal-tests
Joe Buck [Tue, 12 Mar 2013 05:19:24 +0000 (22:19 -0700)]
testing: fix hadoop-internal-tests

The hadoop-internal-tests workunit needs
to be updated in light of our moving to
using stock Hadoop with our hadoop-cephfs
jars.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
12 years agoceph-disk-activate: rely on default/configured keyring path
Sage Weil [Tue, 12 Mar 2013 04:15:11 +0000 (21:15 -0700)]
ceph-disk-activate: rely on default/configured keyring path

No reason to override the default or configured value here.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph-disk-activate: don't override default or configured osd journal path
Sage Weil [Tue, 12 Mar 2013 04:14:53 +0000 (21:14 -0700)]
ceph-disk-activate: don't override default or configured osd journal path

There is no reason not to rely on the default or obey any configured
value here.

Fixes: #4031
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'next'
Josh Durgin [Mon, 11 Mar 2013 23:59:05 +0000 (16:59 -0700)]
Merge branch 'next'

12 years agoMerge branch 'wip-rbd-flatten-cache' into next
Josh Durgin [Mon, 11 Mar 2013 23:56:35 +0000 (16:56 -0700)]
Merge branch 'wip-rbd-flatten-cache' into next

Reviewed-by: Sage Weil <sage.weil@inktank.com>
12 years agodebian: stop ceph-mds before uninstalling ceph-mds
Sage Weil [Tue, 12 Mar 2013 00:09:37 +0000 (17:09 -0700)]
debian: stop ceph-mds before uninstalling ceph-mds

Fixes: #4384
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Mon, 11 Mar 2013 23:57:00 +0000 (16:57 -0700)]
Merge remote-tracking branch 'gh/next'

12 years agolog: drop default 'log max recent' from 100k -> 10k
Sage Weil [Mon, 11 Mar 2013 23:25:16 +0000 (16:25 -0700)]
log: drop default 'log max recent' from 100k -> 10k

Use less memory.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: invalidate cache when flattening
Josh Durgin [Sat, 9 Mar 2013 02:57:24 +0000 (18:57 -0800)]
librbd: invalidate cache when flattening

The cache stores which objects don't exist. Flatten bypasses the cache
when doing its copyups, so when it is done the -ENOENT from the cache
is treated as zeroes instead of 'need to read from parent'.

Clients that have the image open need to forgot about the cached
non-existent objects as well. Do this during ictx_refresh, while the
parent_lock is held exclusively so no new reads from the parent can
happen until the updated parent metadata is visible, so no new reads
from the parent will occur.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: add a method to clear -ENOENT caching
Josh Durgin [Sat, 9 Mar 2013 01:53:31 +0000 (17:53 -0800)]
ObjectCacher: add a method to clear -ENOENT caching

Clear the exists and complete flags for any objects that have exists
set to false, and force any in-flight reads to retry if they get
-ENOENT instead of generating zeros.

This is useful for getting the cache into a consistent state for rbd
after an image has been flattened, since many objects which previously
did not exist and went up to the parent to retrieve data may now exist
in the child.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: keep track of outstanding reads on an object
Josh Durgin [Sat, 9 Mar 2013 01:49:27 +0000 (17:49 -0800)]
ObjectCacher: keep track of outstanding reads on an object

Reads always use C_ReadFinish as a callback (and they are the only
user of this callback). Keep an xlist of these for each object, so
they can remove themselves as they finish. To prevent racing requests
and with discard removing objects from the cache, clear the xlist in
the object destructor, so if the Object is still valid the set_item
will still be on the list.

Make the ObjectCacher constructor take an Object* instead of the pool
and object id, which are derived from the Object* anyway.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoceph: fix cli test
Sage Weil [Mon, 11 Mar 2013 21:54:50 +0000 (14:54 -0700)]
ceph: fix cli test

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoRevert "Use start-stop-daemon --chuid option to setuid to www-data."
Sage Weil [Mon, 11 Mar 2013 20:23:13 +0000 (13:23 -0700)]
Revert "Use start-stop-daemon --chuid option to setuid to www-data."

This reverts commit a99ed038ecaf170574ee75cd5ddb12f252f9bc26.

On second thought, this will require a bit more care to ensure that all
of the paths radosgw needs to read/write from have the correct permissions
in the packages and so forth.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-4135'
David Zafman [Mon, 11 Mar 2013 19:50:38 +0000 (12:50 -0700)]
Merge branch 'wip-4135'

Feature: #4135 - osd: noscrub, nodeepscrub osdmap flags

Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agomon: Paxos: increase trim tolerance from 3 to 30.
Joao Eduardo Luis [Mon, 11 Mar 2013 16:45:10 +0000 (16:45 +0000)]
mon: Paxos: increase trim tolerance from 3 to 30.

This increase only means that we'll keep more versions around before we
trim.  It doesn't change the number of versions we'll keep around after
trimming (that's still as much as 'paxos_max_join_drift', i.e. 10), nor
does it change the criteria used to consider a monitor as having drifted
(same rule applies, 'paxos_max_join_drift').

This change however will enable the leader to put off trimming for a longer
period of time, giving a better chance for a monitor to join the cluster.
See, after going through the probing phase, at which point a monitor may
only be, say, 5 versions off, the same monitor may end up getting into the
quorum only to find that in-between probing and finally triggering an
election some 6 versions might have come to existence.  Before this patch,
by then the state had been trimmed and the monitor would have to bootstrap
to perform a full store sync.  With this patch in place, the monitor would
be able to sync the remaining 11 versions.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon: Paxos: bootstrap leader if he has fallen behind upon reaching collect
Joao Eduardo Luis [Mon, 11 Mar 2013 16:25:35 +0000 (16:25 +0000)]
mon: Paxos: bootstrap leader if he has fallen behind upon reaching collect

Fixes: #4256
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoDocument scrubbing behavior
David Zafman [Mon, 11 Mar 2013 19:44:47 +0000 (12:44 -0700)]
Document scrubbing behavior

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoMerge pull request #100 from jaharkes/init
Sage Weil [Mon, 11 Mar 2013 19:00:52 +0000 (12:00 -0700)]
Merge pull request #100 from jaharkes/init

Fixes for RadosGW init script

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #99 from dalgaaf/wip-da-sca-style-3
Sage Weil [Mon, 11 Mar 2013 19:00:14 +0000 (12:00 -0700)]
Merge pull request #99 from dalgaaf/wip-da-sca-style-3

More smaller (style related) fixes

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #91 from Youscribe/defaultweight
Sage Weil [Mon, 11 Mar 2013 16:31:57 +0000 (09:31 -0700)]
Merge pull request #91 from Youscribe/defaultweight

Set weight of an osd based on df.

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoUse start-stop-daemon --chuid option to setuid to www-data. 100/head
Jan Harkes [Fri, 8 Mar 2013 21:40:06 +0000 (16:40 -0500)]
Use start-stop-daemon --chuid option to setuid to www-data.

Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
12 years agoFix radosgw actually reloading after rotating logs.
Jan Harkes [Fri, 8 Mar 2013 17:45:57 +0000 (12:45 -0500)]
Fix radosgw actually reloading after rotating logs.

The --signal argument to Debian's start-stop-daemon doesn't
make it send a signal, but defines which signal should be send
when --stop is specified.

Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
12 years agorgw/rgw_op.cc: remove unused variables 99/head
Danny Al-Gaaf [Mon, 11 Mar 2013 15:31:15 +0000 (16:31 +0100)]
rgw/rgw_op.cc: remove unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_op.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 15:28:02 +0000 (16:28 +0100)]
rgw/rgw_op.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_multi_del.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 15:25:49 +0000 (16:25 +0100)]
rgw/rgw_multi_del.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_multi.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 15:23:05 +0000 (16:23 +0100)]
rgw/rgw_multi.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_http_client.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 15:19:04 +0000 (16:19 +0100)]
rgw/rgw_http_client.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorados_sync.cc: fix typo in error msg
Danny Al-Gaaf [Mon, 11 Mar 2013 15:10:54 +0000 (16:10 +0100)]
rados_sync.cc: fix typo in error msg

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_common.cc: initialize has_acl_header in constructor with 'false'
Danny Al-Gaaf [Mon, 11 Mar 2013 15:08:00 +0000 (16:08 +0100)]
rgw/rgw_common.cc: initialize has_acl_header in constructor with 'false'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_admin.cc: remove some unused variables
Danny Al-Gaaf [Mon, 11 Mar 2013 15:00:16 +0000 (16:00 +0100)]
rgw/rgw_admin.cc: remove some unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_admin.cc: reduce scope of 'int ret'
Danny Al-Gaaf [Mon, 11 Mar 2013 14:56:28 +0000 (15:56 +0100)]
rgw/rgw_admin.cc: reduce scope of 'int ret'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_admin.cc: remove twice check for 'object'
Danny Al-Gaaf [Mon, 11 Mar 2013 14:52:34 +0000 (15:52 +0100)]
rgw/rgw_admin.cc: remove twice check for 'object'

Remove twice checked 'object'. Put checks in alphabetic order to make
double checks easier to catch.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>