Commit Graph

24494 Commits

Author SHA1 Message Date
Andras Elso
0dd956cb02 debian: Fix FTBFS because depend on old libboost-dev
Signed-off-by: Andras Elso <elso.andras@gmail.com>
2013-03-10 01:18:16 +01:00
Sage Weil
494f968aaf Merge remote-tracking branch 'gh/next' 2013-03-08 18:38:32 -08:00
Dan Mick
c7aa897ce0 ceph_common.sh: add warning if 'host' contains dots
This is a common error and there's no reason the script can't
at least tell you it's a really bad idea.  One might argue it
could even successfully proactively truncate the host parameter
at the first dot, but that's a little controlling, perhaps.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-08 17:10:11 -08:00
Dan Mick
4fe52a7ff4 Revert "Update conf.py"
This reverts commit 7008992062.
Apparently github's edit lets you commit directly to the repo.
Oops.
2013-03-08 15:46:34 -08:00
Dan Mick
7008992062 Update conf.py 2013-03-08 15:44:28 -08:00
Sage Weil
2c40124bcb Merge pull request #96 from concubidated/master
Fix output of command 'ceph osd tree --format=json'

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-08 13:49:04 -08:00
John Wilkins
cdb4ae3e06 doc: Added a new network configuration reference document.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-03-08 13:45:04 -08:00
Concubidated
9bcba944c6 Fix output of 'ceph osd tree --format=json'
Signed-off-by: Tyler Brekke <tyler.brekke@inktank.com>
2013-03-08 13:44:39 -08:00
John Wilkins
3854d3ed27 doc: Added network settings. Reorganized index.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-03-08 13:44:31 -08:00
John Wilkins
4c8c36c36b doc: Excised network settings.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-03-08 13:43:44 -08:00
John Wilkins
da706c15d8 doc: Format edits. Excised much of network discussion. Added reference to network guide.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2013-03-08 13:43:12 -08:00
Samuel Just
31a110c5d0 Merge branch 'wip-osd-map' into next
Fixes: 4369
Backport: bobtail
Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-03-08 12:45:41 -08:00
Sage Weil
881e9d850c osd: mark down connections from old peers
Close out any connection with an old peer.  This avoids a race like:

- peer marked down
- we get map, mark down the con
- they reconnect and try to send us some stuff
- we share our map to tell them they are old and dead, but leave the con
  open
...
- peer marks itself up a few times, eventually reuses the same port
- sends messages on their fresh con
- we discard because of our old con

This could cause a tight reconnect loop, but it is better than wrong
behavior.

Other possible fixes:
 - make addr nonce truly unique (augment pid in nonce)
 - make a smarter 'disposable' msgr state (bleh)

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-08 12:40:36 -08:00
Sage Weil
ba7e815a18 osd/PG: rename require_same_or_newer_map -> is_same_or_newer_map
This avoids confusion with the OSD method of the same name, and better
matches what the function tests (and does not do).

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-08 12:40:36 -08:00
Sage Weil
7a9107d1b8 mon/Paxos: make old clock skew message more/less suggestive
There is a separate clock skew check now, and more often than not this
suggests laggy messages, and not necessarily skew.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-08 10:43:21 -08:00
Yehuda Sadeh
2535e04fce Merge pull request #92 from jaharkes/content_length
Properly format Content-Length: header on 32-bit systems.

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-03-08 09:45:44 -08:00
Jan Harkes
416b962c85 Properly format Content-Length: header on 32-bit systems.
- Promote len argument in dump_content_length to uint64_t.
- Make sure there is sufficient scratch space to format string.
- Use PRIu64 macro for formatting.

Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
2013-03-08 12:28:54 -05:00
Yehuda Sadeh
4384e59ad0 rgw: set attrs on various list bucket xml results (swift)
Fixes: #4247
The list buckets operation was missing some attrs on the different
xml result entities. This fixes it.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-03-08 08:31:42 -08:00
Yehuda Sadeh
7cb6ee2807 formatter: add the ability to dump attrs in xml entities
xml entities may have attrs assigned to them. Add the ability
to set them. A usage example:

formatter->open_array_section_with_attrs("container",
     FormatterAttrs("name", "foo", NULL));

This will generate the following xml entity:
<container name="foo">

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-03-08 08:31:37 -08:00
Yehuda Sadeh
6669e73fa5 rgw: don't iterate through all objects when in namespace
Fixes: #4363
Backport: argonaut, bobtail
When listing objects in namespace don't iterate through all the
objects, only go though the ones that starts with the namespace
prefix

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-03-08 06:55:03 -08:00
Yehuda Sadeh
108063c98f Merge pull request #93 from jaharkes/range_requests
Avoid sending a success response when an error occurs.

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-03-08 06:47:00 -08:00
David Zafman
38e55dc574 Merge branch 'wip-2733' 2013-03-07 20:02:04 -08:00
David Zafman
3b260f3dbd Add filestore_replica_fadvise config option default true
Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
2013-03-07 20:00:13 -08:00
David Zafman
f52ec6decd osd: fadvise replica data don't use
Add transaction flag indicating if op is at a replica
After write has been sync'ed use posix_fadvise() to clear kernel cache

Feature: #2733

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
2013-03-07 19:36:07 -08:00
Jan Harkes
08d5a283df Avoid sending a success response when an error occurs.
Functions called from RGWGetObj_ObjStore_S3::send_response_data may
change the value of the non-local variable 'ret'. But the response
relies on a local 'req_state' which copies ret at the start of the
function.

Right now none of the called functions actually changes ret so the
problem doesn't trigger, but to avoid future breakage it is safer
to not rely on the (early) copy of the ret variable.

Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
2013-03-07 22:29:39 -05:00
David Zafman
edd0a1c69f Fix FileStore to notice if filestore_flusher config is changed
Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-07 17:59:31 -08:00
Sage Weil
de62a79589 Merge branch 'wip-traceless'
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-03-07 17:52:26 -08:00
Sage Weil
eb9b5f074f client: move annoying traceless handling into verify_reply_trace()
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 17:51:57 -08:00
Sage Weil
3f1b7fd590 client: debug async cache invalidation
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 17:51:57 -08:00
Sage Weil
3a7233bc8b mds: pass created_ino back to client on replayed requests
After an MDS restart, the client will resend uncommitted requests.  Use the
information we now have in the session_info_t to pass the created ino
back via the extra_bl payload in the reply.

Fixes: #4034
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 17:51:57 -08:00
Sage Weil
0bcf2ac081 mds: track created inos with completed request ids in session info
Along with each session completed request (tid), also track the created
ino (if any).  This will be used to pass back to the client when they
replay requests in the next patch.

Do not bother making this a backward compatible encoding.  The only
benefit is to allow ceph-mds code to run and then old mds code to run
after it.  Given all of the other incompat changes we *just* made, this
is highly unlikely and not worth the code clutter.  If we had spanned
more releases or a stable release the story would be different.

While we are here, inline the second add_completed_request() method variant
since there is only a single caller and having it overloaded somewhat
obscures what is going on.  This also avoids a duplicate lookup in the
session map in the have_session() check and then in the (old) helper.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 17:51:56 -08:00
Sage Weil
977a1cb257 client: debug created ino
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:42:47 -08:00
Sage Weil
974dc84f6e client: unlink old_dentry on traceless rename reply
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:42:44 -08:00
Sage Weil
bc92b40617 client: force lookup on traceless reply
Call _do_lookup directly so that we avoid hitting the cache

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:09:46 -08:00
Sage Weil
0d501f6121 client: make _do_lookup take a const string
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:09:46 -08:00
Sage Weil
31127548bd mds: do not do traceless reply for open O_TRUNC requests
Even though these are "may_write" and may be a mutation, the MDS should not
fake out a traceless reply.  In a real failure, it looks like:

 - mds process request (mutation)
 - mds fails
 - client resends request
 - mds notes that it is O_TRUNC, and already committed, and proceeds with
   a regular open

And that is all fine.

But, that means that if we are trying to simulate this behavior without a
failure, then we should never do a traceless reply on an O_TRUNC request,
because the client will never see such a reply--it'll get a full open
request response instead.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:09:46 -08:00
Sage Weil
98a383be2e client: handle fh cleanup in ll_create() failure path
Release the fh if we fail the permissions check.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:09:46 -08:00
Sage Weil
d87035c0c4 client: root can write to any file
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:09:45 -08:00
Sage Weil
613c8f1edf client: clear I_COMPLETE on traceless reply for dentry request
If a request is against a dentry, and we get a traceless reply, clear
the directory I_COMPLETE flag on the parent directory because we can no
longer trust that our cache is complete.

It is possible we could do something a bit more intelligent here, but it
is not trivial because of racing requests, and traceless replies are
rare, so it's not worth the effort.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:09:45 -08:00
Sage Weil
80e122f5e8 client: pass ptarget from link, create, mkdir, symlink, setattr
Use the new make_request functionality to ensure that we properly handle
the re-lookup/getattr when we get a traceless reply back from the MDS.

Note that we have to do this on setattr() because ll_getattr() expects to
return the updated inode metadata to the caller.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 16:09:45 -08:00
Sage Weil
29abaf66ad client: handle traceless replies from make_request()
Modify the generic make_request wrapper to retry lookups or getattrs on
requests when the ptarget pointer is specified but there is no trace in
the reply.

Refactor the _create() method to use this, effectively moving all of the
extra_bl code processing into make_request where it is generically
useful.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 15:22:21 -08:00
Sage Weil
1e2864a020 osd: increate default pg log size from 1000 -> 3000
This reduces the probability that we will fail to detect a dup op.  See
#4368.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 10:31:27 -08:00
Sage Weil
e19b8f5fb0 Merge remote-tracking branch 'gh/wip-log-max' into next
Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-07 09:29:44 -08:00
Sage Weil
a714c16656 vstart.sh: osd debug op order = true
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-07 09:28:17 -08:00
Josh Durgin
e6caf69cf4 config: note which options are overridden by common_preinit()
Defaults for these differ based on the context in which they're used.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-06 17:49:57 -08:00
Josh Durgin
7c208d2f8e common: reduce default in-memory logs for non-daemons
The default of 100000 can result in hundreds of MBs of extra memory
used. This was most obvious when using librbd with caching enabled,
since there was a dout(0) accidentally left in the ObjectCacher.

refs: #4352
backport: bobtail
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-06 17:47:28 -08:00
Sage Weil
a58eec90ca init-ceph: fix run dir
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-06 17:09:58 -08:00
Sage Weil
de2c5b3fb7 osd: add ctor for clone_info
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 439d0e334d)
2013-03-06 15:13:16 -08:00
David Zafman
e1e2d5d217 Missed adding rados_types.hpp to package
Caused by 3bd48cbbad
feature 4207 implementation

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
2013-03-06 14:40:29 -08:00
Josh Durgin
cb3ee33532 ObjectCacher: fix debug log level in split
Level 0 should never be used for this kind of debugging.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-03-06 12:32:43 -08:00