Commit Graph

24664 Commits

Author SHA1 Message Date
Samuel Just
78db663ec7 osd_internals/snaps.rst: update description to reflect SnapMapper
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-13 19:45:08 -07:00
Samuel Just
ba449ce031 osd_internals/snaps.rst: add a description of snaps and trimming
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-13 18:48:24 -07:00
Samuel Just
be95af7bf8 PG::read_log: fix assert, split may introduce holes in the log
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-13 18:48:24 -07:00
Samuel Just
1a8c1701cc OSD: add debugging to start_split and complete_split
Signed-off-by: Samuel Just <sam.just@inktank.com>
2013-03-13 18:48:24 -07:00
Samuel Just
de22b186c4 PG: check_recovery_sources must happen even if not active
missing_loc/missing_loc_sources also must be cleaned up
if a peer goes down during peering:

1) pg is in GetInfo, acting is [3,1]
2) we find object A on osd [0] in GetInfo
3) 0 goes down, no new peering interval since it is neither up nor
acting, but peer_missing[0] is removed.
4) pg goes active and try to pull A from 0 since missing_loc did not get
cleaned up.

Backport: bobtail
Fixes: #4371
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-03-13 18:14:43 -07:00
Samuel Just
7a434d10da FileStore: fix reversed collection_empty return value
Backport: bobtail
Fixes: #4380
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-03-13 18:14:43 -07:00
Samuel Just
ce4432adc6 HashIndex: _collection_list_partial must tolerate NULL next
Backport: bobtail
Fixes: #4379
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-03-13 18:14:43 -07:00
Samuel Just
e4bf1bcab1 OSD: lock not needed in ~DeletingState()
No further refs to the object can remain at this point.
Furthermore, the callbacks might lock mutexes of their
own.

Backport: bobtail
Fixes: #4378
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-03-13 18:14:43 -07:00
Samuel Just
32bf131e01 ReplicatedPG: don't leak reservation on removal
Fixes: 4431
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-03-13 18:14:43 -07:00
Sage Weil
22f51f02e2 Merge remote-tracking branch 'dalgaaf/wip-da-performance'
Conflicts:
	src/client/Client.cc

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-13 16:46:47 -07:00
Sage Weil
8b71337144 Merge branch 'wip-mds-con'
Reviewed-by: Greg Farnum <greg@inktank.com>
Tested-by: Noah Watkins <jayhawk@cs.ucsc.edu>
2013-03-13 16:38:38 -07:00
Sage Weil
8123a1fd55 mds: log session resets more cleanly
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:38:28 -07:00
Sage Weil
311704f36d mds: use session con ref to mark down killing session
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:38:28 -07:00
Sage Weil
dcda366947 mds: mark con for closed session disposable
If there is a fault while delivering the message, close the con.  This will
clean up the Session state from memory.  If the client doesn't get the
CLOSED message, they will reconnect (from their perspective, it is still
a lossless connection) and get a remote_reset event telling them that the
session is gone.  The client code already handles this case properly.

Note that way back in 4ac45200f1 we removed
this because the client would reuse the same connection when it reopened
the session.  Now the client never does that; it will mark_down the con
as soon as it is closed and open a new one for a new session... which means
the MDS will get a remote_reset and close out the old session.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:38:28 -07:00
Sage Weil
5c9186cb29 mds: useless cleanup
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:38:28 -07:00
Sage Weil
2b55470dea 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>
2013-03-13 16:38:28 -07:00
Sage Weil
f67596a447 Merge branch 'wip-4390-b'
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-03-13 16:37:29 -07:00
Sage Weil
ca89cf5277 client: fix kick_flushing_caps() args
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:36:58 -07:00
Sage Weil
e35d19ba37 client: clean up useless MetaSession lookups
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:36:58 -07:00
Sage Weil
e6f04db573 client: fix trim_caps() args
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:36:58 -07:00
Sage Weil
ca5d68a2c3 client: fix wake_inode_waiters() arg
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:36:58 -07:00
Sage Weil
bc2a2eb910 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>
2013-03-13 16:36:58 -07:00
Sage Weil
ced92b0992 client: fix remaining s->inst users to use s->con
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:36:57 -07:00
Sage Weil
1ab8ff9b66 client: remove unused MetaSession::was_stale
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:36:57 -07:00
Sage Weil
6d1040ba08 client: only signal session waiters on open and close
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:36:57 -07:00
Sage Weil
f8272c0e60 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>
2013-03-13 16:36:57 -07:00
Sage Weil
dea707bf9f 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>
2013-03-13 16:36:57 -07:00
Sage Weil
41f8b6103b client: drop unused release_lease()
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:36:57 -07:00
Sage Weil
6fca300d56 client: pass session to send_reconnect and resend_unsafe_requests
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:36:57 -07:00
Sage Weil
90b301467c client: switch kick_requests and send_request to take a session *
More cleanup!

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:36:56 -07:00
Sage Weil
6d0b7c83fd 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>
2013-03-13 16:36:56 -07:00
Sage Weil
80e81ec4d2 client: fix up _closed_mds_session
Drop useless arg.  Simplify callers.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:36:56 -07:00
Sage Weil
72d11844d9 client: use helper for _close_mds_session()
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-13 16:36:56 -07:00
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
Danny Al-Gaaf
8659b7e043 libcephfs_jni.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-13 19:09:39 +01:00
Danny Al-Gaaf
bc77af7e1c dupstore.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-13 19:08:19 +01:00
Danny Al-Gaaf
f6b4f3e000 crushtool.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-13 19:07:45 +01:00
Danny Al-Gaaf
c4810a5b8b libcephfs_jni.cc: fix indention
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-13 19:06:56 +01: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
Danny Al-Gaaf
4056552c90 src/crush/CrushTester.{cc,h}: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-13 18:40:44 +01:00