]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agoosd: Rename members and methods related to stat publish
David Zafman [Mon, 29 Apr 2013 21:36:18 +0000 (14:36 -0700)]
osd: Rename members and methods related to stat publish

pg_stats_lock to pg_stats_publish_lock
pg_stats_valid to pg_stats_publish_valid
pg_stats_stable to pg_stats_publish
update_stats() to publish_stats_to_osd()
clear_stats() to clear_publish_stats()

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoMerge pull request #249 from ceph/wip-cuttle-man
Sage Weil [Tue, 30 Apr 2013 00:09:37 +0000 (17:09 -0700)]
Merge pull request #249 from ceph/wip-cuttle-man

man page updates

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon: share extra probe peers with debug log, mon_status
Sage Weil [Mon, 29 Apr 2013 23:31:05 +0000 (16:31 -0700)]
mon: share extra probe peers with debug log, mon_status

This is useful when debugging initial quorum formation.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodebian: only start/stop upstart jobs if upstart is present
Sage Weil [Tue, 30 Apr 2013 00:01:55 +0000 (17:01 -0700)]
debian: only start/stop upstart jobs if upstart is present

This avoids errors on non-upstart distros (like wheezy).

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-up' into next
Sage Weil [Mon, 29 Apr 2013 23:57:13 +0000 (16:57 -0700)]
Merge remote-tracking branch 'gh/wip-up' into next

Reviewed-by: Sam Lang <sam.lang@inktank.com>
12 years agoMerge pull request #248 from ctrlaltdel/next
Sage Weil [Mon, 29 Apr 2013 23:46:52 +0000 (16:46 -0700)]
Merge pull request #248 from ctrlaltdel/next

Fix a README typo

12 years agoman: update remaining copyright notices 249/head
Josh Durgin [Mon, 29 Apr 2013 23:01:38 +0000 (16:01 -0700)]
man: update remaining copyright notices

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoman: refresh content from rst
Josh Durgin [Mon, 29 Apr 2013 23:01:03 +0000 (16:01 -0700)]
man: refresh content from rst

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge branch 'wip_4860' into next
Samuel Just [Mon, 29 Apr 2013 22:57:26 +0000 (15:57 -0700)]
Merge branch 'wip_4860' into next

Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
12 years agoPG,OSD: _remove_pg must remove pg keys
Samuel Just [Mon, 29 Apr 2013 16:07:19 +0000 (09:07 -0700)]
PG,OSD: _remove_pg must remove pg keys

Instead of doing this in OSD::_remove_pg, pass a transaction
to on_removal and do it in PG.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoOSD: no need to remove snapdirs on _remove_pg()
Samuel Just [Mon, 29 Apr 2013 16:03:12 +0000 (09:03 -0700)]
OSD: no need to remove snapdirs on _remove_pg()

The snapmapper patches removed snapdirs altogether.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agodoc: update rbd man page for new options
Josh Durgin [Mon, 29 Apr 2013 22:37:06 +0000 (15:37 -0700)]
doc: update rbd man page for new options

--no-progress and --allow-shrink were added recently.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agogitignore: add ceph_monstore_tool
Samuel Just [Mon, 29 Apr 2013 21:58:24 +0000 (14:58 -0700)]
gitignore: add ceph_monstore_tool

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoMakefile: fix java build warning
Sage Weil [Mon, 29 Apr 2013 21:50:31 +0000 (14:50 -0700)]
Makefile: fix java build warning

This is a workaround that makes the warning go away.  Not certain there
isn't something we should be changing...

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joe Buck <joe.buck@inktank.com>
12 years agoMerge branch 'wip-mon-pg' into next
Sage Weil [Mon, 29 Apr 2013 18:27:22 +0000 (11:27 -0700)]
Merge branch 'wip-mon-pg' into next

Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agomon: remap creating pgs on startup
Sage Weil [Mon, 29 Apr 2013 18:06:36 +0000 (11:06 -0700)]
mon: remap creating pgs on startup

After Monitor::init_paxos() has loaded all of the PaxosService state,
we should then map creating pgs to osds.  This ensures we do so after the
osdmap has been loaded and the pgs actually map somewhere meaningful.

Fixes: #4675
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: only map/send pg creations if osdmap is defined
Sage Weil [Mon, 29 Apr 2013 18:11:24 +0000 (11:11 -0700)]
mon: only map/send pg creations if osdmap is defined

This avoids calculating new pg creation mappings if the osdmap isn't
loaded yet, which currently happens when during Monitor::paxos_init()
on startup.  Assuming osdmap epoch is nonzero, it should always be
safe to do this (although possibly unnecessary).

More cleanup here is certainly possible, but this is one step toward fixing
the bad behavior for #4675.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: factor map_pg_creates() out of send_pg_creates()
Sage Weil [Sun, 7 Apr 2013 15:48:22 +0000 (08:48 -0700)]
mon: factor map_pg_creates() out of send_pg_creates()

Factor out the portion of the function that remaps creating pgs to osds
from the part that sends those pending creates out.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: make dup reply a louder error
Sage Weil [Mon, 29 Apr 2013 17:45:31 +0000 (10:45 -0700)]
client: make dup reply a louder error

If we get a dup reply something is probably wrong!  We should make sure
it appears more loudly in the log.  In particular, it can lead to out
of sync cap state; see #4853.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: fix session open vs mdsmap race with request kicking
Sage Weil [Mon, 29 Apr 2013 17:44:28 +0000 (10:44 -0700)]
client: fix session open vs mdsmap race with request kicking

A sequence like:

 - ceph-fuse starts, make_request on getattr
 - waits for mds to be active
 - tries to open a session
 - mds restarts, recovers
 - eventually gets session open reply
 - sends first getattr (even tho mds is in reconnect state)
 - gets mdsmap update that mds is now active
 - kicks request, resends getattr
 - get first reply
 - ignore second reply, caps get out of sync

The bug is that we send the first request when the MDS is still in
the reconnect state.  The fix is to loop in make_request so that we
ensure all conditions are satisfied before sending the request.  Any
time we wait, we loop, so that we know all conditions (still) pass if
we make it to the end.

Fixes: #4853
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip_4836' into next
Samuel Just [Mon, 29 Apr 2013 17:45:20 +0000 (10:45 -0700)]
Merge branch 'wip_4836' into next

Fixes: #4836
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoFix a README typo 248/head
Francois Deppierraz [Thu, 25 Apr 2013 19:10:41 +0000 (21:10 +0200)]
Fix a README typo

Signed-off-by: François Deppierraz <francois@ctrlaltdel.ch>
12 years agomon: Fix leak of context
Yan, Zheng [Sat, 27 Apr 2013 03:04:38 +0000 (11:04 +0800)]
mon: Fix leak of context

Use Context::complete() to finish context, it frees the context
after executing Context::finish().

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
12 years agodoc: Removed extra whitespace.
John Wilkins [Sun, 28 Apr 2013 22:01:44 +0000 (15:01 -0700)]
doc: Removed extra whitespace.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added rbd-fuse to TOC.
John Wilkins [Sun, 28 Apr 2013 22:01:12 +0000 (15:01 -0700)]
doc: Added rbd-fuse to TOC.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoAdded commentary and removed fourth column for now.
John Wilkins [Sun, 28 Apr 2013 22:00:51 +0000 (15:00 -0700)]
Added commentary and removed fourth column for now.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Removed. Redunant information now.
John Wilkins [Sun, 28 Apr 2013 22:00:10 +0000 (15:00 -0700)]
doc: Removed. Redunant information now.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added openssh-server mention, corrections, hyperlink fix.
John Wilkins [Sun, 28 Apr 2013 21:59:51 +0000 (14:59 -0700)]
doc: Added openssh-server mention, corrections, hyperlink fix.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added openssh-server mention.
John Wilkins [Sun, 28 Apr 2013 21:59:17 +0000 (14:59 -0700)]
doc: Added openssh-server mention.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added manpage link and hidden TOC.
John Wilkins [Sun, 28 Apr 2013 21:58:45 +0000 (14:58 -0700)]
doc: Added manpage link and hidden TOC.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Removed installed Chef. This is now in the ceph wiki.
John Wilkins [Sun, 28 Apr 2013 21:58:08 +0000 (14:58 -0700)]
doc: Removed installed Chef. This is now in the ceph wiki.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Removed text for include directive. Wasn't behaving the way I'd hoped.
John Wilkins [Sun, 28 Apr 2013 21:57:44 +0000 (14:57 -0700)]
doc: Removed text for include directive. Wasn't behaving the way I'd hoped.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added ceph-mds to CephFS toc.
John Wilkins [Sun, 28 Apr 2013 21:57:03 +0000 (14:57 -0700)]
doc: Added ceph-mds to CephFS toc.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Fix. ceph, not chef.
John Wilkins [Sun, 28 Apr 2013 05:28:42 +0000 (22:28 -0700)]
doc: Fix. ceph, not chef.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoceph-filestore-dump: fix warnings on i386 build
Sage Weil [Sun, 28 Apr 2013 00:59:24 +0000 (17:59 -0700)]
ceph-filestore-dump: fix warnings on i386 build

tools/ceph-filestore-dump.cc: In member function ‘int header::get_header()’:
warning: tools/ceph-filestore-dump.cc:454:19: comparison between signed and unsigned integer expressions [-Wsign-compare]
tools/ceph-filestore-dump.cc: In member function ‘int footer::get_footer()’:
warning: tools/ceph-filestore-dump.cc:471:19: comparison between signed and unsigned integer expressions [-Wsign-compare]
tools/ceph-filestore-dump.cc: In member function ‘int super_header::read_super()’:
warning: tools/ceph-filestore-dump.cc:697:30: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoOSDMonitor: when adding bucket, delay response if pending map has name
Samuel Just [Sat, 27 Apr 2013 00:16:53 +0000 (17:16 -0700)]
OSDMonitor: when adding bucket, delay response if pending map has name

Fixes: #4836
Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPaxosService: use get and put for version_t
Samuel Just [Fri, 26 Apr 2013 23:48:21 +0000 (16:48 -0700)]
PaxosService: use get and put for version_t

Otherwise, we just duplicate the logic for generating the version
key names.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agotools: add ceph_monstore_tool with getosdmap
Samuel Just [Fri, 26 Apr 2013 23:47:53 +0000 (16:47 -0700)]
tools: add ceph_monstore_tool with getosdmap

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoceph.spec.in: remove conditional checks on tcmalloc
Gary Lowell [Fri, 26 Apr 2013 09:22:03 +0000 (02:22 -0700)]
ceph.spec.in:  remove conditional checks on tcmalloc

tcmalloc is available on all supported platforms now.

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
12 years agodebian/rules: Fix tcmalloc breakage
Gary Lowell [Fri, 26 Apr 2013 08:53:08 +0000 (01:53 -0700)]
debian/rules:  Fix tcmalloc breakage

Since all currently supported platforms have tcmalloc
available and it is now the default, remove broken check code
that turns it off if the package is not listed in build-depends.

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
12 years agomon: cache osd epochs
Sage Weil [Fri, 26 Apr 2013 19:22:28 +0000 (12:22 -0700)]
mon: cache osd epochs

The monitor may get a series of messages from the OSD that prompt it to
send incremental maps (pg_temp updates, failures, probably more).  Avoid
sending the same incremental maps twice by keeping a cache of what epochs
we think the OSDs have.

This reduces monitor load, especially when the mon is a bit behind and is
getting a stream of delayed messages, and the work associated with sending
the inc maps prevents it from catching up.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agomonitor: assert out early if we get our own sync_start back
Greg Farnum [Fri, 26 Apr 2013 22:27:39 +0000 (15:27 -0700)]
monitor: assert out early if we get our own sync_start back

Signed-off-by: Greg Farnum <greg@inktank.com>
12 years agomon: update assert for looser requirements
Greg Farnum [Fri, 26 Apr 2013 22:09:50 +0000 (15:09 -0700)]
mon: update assert for looser requirements

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agodoc: Deleted old index. Generates warnings otherwise.
John Wilkins [Fri, 26 Apr 2013 21:07:55 +0000 (14:07 -0700)]
doc: Deleted old index. Generates warnings otherwise.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: General purpose pre-flight checklist.
John Wilkins [Fri, 26 Apr 2013 21:07:34 +0000 (14:07 -0700)]
doc: General purpose pre-flight checklist.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Modified Ceph deployment landing page.
John Wilkins [Fri, 26 Apr 2013 21:07:03 +0000 (14:07 -0700)]
doc: Modified Ceph deployment landing page.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added general pre-flight checklist for ceph-deploy.
John Wilkins [Fri, 26 Apr 2013 21:06:26 +0000 (14:06 -0700)]
doc: Added general pre-flight checklist for ceph-deploy.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Removed old ceph-deploy placeholder.
John Wilkins [Fri, 26 Apr 2013 21:06:04 +0000 (14:06 -0700)]
doc: Removed old ceph-deploy placeholder.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Removed Chef section. Now appears in new Ceph wiki.
John Wilkins [Fri, 26 Apr 2013 21:05:37 +0000 (14:05 -0700)]
doc: Removed Chef section. Now appears in new Ceph wiki.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added Key Management for ceph-deploy.
John Wilkins [Fri, 26 Apr 2013 21:05:06 +0000 (14:05 -0700)]
doc: Added Key Management for ceph-deploy.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added "Add/Remove Monitors" section for ceph-deploy.
John Wilkins [Fri, 26 Apr 2013 21:04:43 +0000 (14:04 -0700)]
doc: Added "Add/Remove Monitors" section for ceph-deploy.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added Create a Cluster section.
John Wilkins [Fri, 26 Apr 2013 21:04:16 +0000 (14:04 -0700)]
doc: Added Create a Cluster section.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added ceph-deploy package management (install | uninstall ) section.
John Wilkins [Fri, 26 Apr 2013 21:03:44 +0000 (14:03 -0700)]
doc: Added ceph-deploy package management (install | uninstall ) section.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added new quick start preamble and index.
John Wilkins [Fri, 26 Apr 2013 21:02:42 +0000 (14:02 -0700)]
doc: Added new quick start preamble and index.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added ceph-deploy preflight.
John Wilkins [Fri, 26 Apr 2013 21:01:46 +0000 (14:01 -0700)]
doc: Added ceph-deploy preflight.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added ceph-deploy quick start.
John Wilkins [Fri, 26 Apr 2013 21:01:20 +0000 (14:01 -0700)]
doc: Added ceph-deploy quick start.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoMerge branch 'wip-4822' into next
David Zafman [Fri, 26 Apr 2013 20:31:48 +0000 (13:31 -0700)]
Merge branch 'wip-4822' into next

Reviewed-by: Sam Just <sam.just@inktank.com>
12 years agomonitor: squash signed/unsigned comparison warning
Greg Farnum [Fri, 26 Apr 2013 19:37:03 +0000 (12:37 -0700)]
monitor: squash signed/unsigned comparison warning

This is a safe range to do comparisons against, and we compare
against the signed rank inside the loop.

Signed-off-by: Greg Farnum <greg@inktank.com>
12 years agomon: use brute force to find a sync provider if our first one fails
Greg Farnum [Fri, 26 Apr 2013 19:32:10 +0000 (12:32 -0700)]
mon: use brute force to find a sync provider if our first one fails

We try and select a random monitor first, but if that fails we should
make sure that nobody's available before asserting.

Fixes #4812

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-4760' into next
Yehuda Sadeh [Fri, 26 Apr 2013 19:33:03 +0000 (12:33 -0700)]
Merge branch 'wip-4760' into next

12 years agoMerge branch 'wip-mon-fwd' into next
Sage Weil [Fri, 26 Apr 2013 19:24:31 +0000 (12:24 -0700)]
Merge branch 'wip-mon-fwd' into next

Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agorgw: fix compilation for certain architectures
Yehuda Sadeh [Fri, 26 Apr 2013 16:41:39 +0000 (09:41 -0700)]
rgw: fix compilation for certain architectures

Casting.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: fix list buckets limit
Yehuda Sadeh [Fri, 26 Apr 2013 05:22:35 +0000 (22:22 -0700)]
rgw: fix list buckets limit

There was an issue when limit was being set, we didn't
break from the iterating loop if limit was reached. Also,
S3 does not enforce any limit, so keep that behavior.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: fix bucket listing when reaching limit
Yehuda Sadeh [Fri, 26 Apr 2013 05:11:27 +0000 (22:11 -0700)]
rgw: fix bucket listing when reaching limit

Bucket listing was broken when limit was set.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: swift list containers can return 204
Yehuda Sadeh [Fri, 26 Apr 2013 04:58:02 +0000 (21:58 -0700)]
rgw: swift list containers can return 204

In order to keep compatibility with swift, if a plain formatter
is being used, we should return 204 when there are no containers.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: fix plain formatter flush
Yehuda Sadeh [Fri, 26 Apr 2013 04:30:30 +0000 (21:30 -0700)]
rgw: fix plain formatter flush

The plain formatter flush needs to append eol if needed, and
not to clear the sections stack.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: fix bucket count when stating account
Yehuda Sadeh [Fri, 26 Apr 2013 04:28:55 +0000 (21:28 -0700)]
rgw: fix bucket count when stating account

We need to add up the num of buckets and not just set it
as we don't read the entire list of buckets in one operation.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorgw: trivial cleanups post code review
Yehuda Sadeh [Fri, 26 Apr 2013 02:23:12 +0000 (19:23 -0700)]
rgw: trivial cleanups post code review

Following code review of #4760.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoMakefile.am: Add -lpthread to fix build on newer ld in Raring Ringtail
Dan Mick [Thu, 25 Apr 2013 22:53:51 +0000 (15:53 -0700)]
Makefile.am: Add -lpthread to fix build on newer ld in Raring Ringtail

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon: mark PaxosServiceMessage forward fields deprecated
Sage Weil [Fri, 26 Apr 2013 17:32:38 +0000 (10:32 -0700)]
mon: mark PaxosServiceMessage forward fields deprecated

These are no longer used; we manage forward state explicitly via the
Monitor sessions instead.  Mark them deprecated so we don't accidentally
rely on them.  Also, fix the annoying "mon.-1" garbage debug output that
is confusing.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: fix double-forwarding check
Sage Weil [Fri, 26 Apr 2013 00:26:39 +0000 (17:26 -0700)]
mon: fix double-forwarding check

The PaxosServiceMessage fields are no longer filled in.  Use Session::proxy_con
instead.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: Fix logic in OSDMap::containing_subtree_is_down()
David Zafman [Thu, 25 Apr 2013 23:04:00 +0000 (16:04 -0700)]
osd: Fix logic in OSDMap::containing_subtree_is_down()

Check for up OSDs as we walk up the crushmap hierarchy

fixes: #4822

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agodebian/rules: use multiline search to look for Build-Depends
Dan Mick [Fri, 26 Apr 2013 07:04:13 +0000 (00:04 -0700)]
debian/rules: use multiline search to look for Build-Depends

When Build-Depends was split into multiple lines (in commit
8f5c665744e58d6d51a1e86de55c1399f51cc1c3), the grep for
libgoogle-perftools-dev broke.  Replace grep with perl for multiline
matching.

Fixes: #4818
Signed-off-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit 89692e099f20424a5effcefcd33df154ebc5de39)

12 years agoclient: re-fix cap releases
Sage Weil [Fri, 26 Apr 2013 17:12:37 +0000 (10:12 -0700)]
client: re-fix cap releases

Encode cap releases if NOT replay.  <facepalm>  Thanks, Greg!

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: don't embed cap releases in clientreplay
Sam Lang [Thu, 25 Apr 2013 23:52:06 +0000 (18:52 -0500)]
client: don't embed cap releases in clientreplay

If the client is sending replay requests, avoid sending embedded caps,
since the mds already has the client's caps from the reconnect.
This matches the behavior of the kernel client.

Fixes #4742.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agomon: do not forward other mon's requests to other mons
Sage Weil [Thu, 25 Apr 2013 23:47:15 +0000 (16:47 -0700)]
mon: do not forward other mon's requests to other mons

The request forwarding infrastructure is there for client requests.
However, we (ab)use it for mon's sending MLog messages: LogClient sends an
MLog message to itself, and that is either handled locally (if leader) or
forwarded to the leader.

If that races with an election, we were forwarding an MLog from another mon
to the leader.  This is not necessary; the original MLog sender will resend
the request on election_finish() to the latest leader.

The fix is to adjust forward_request_leader() to only forward messages from
a mon if that mon is itself.

This was reproduced while testing the fix for #4748.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoPG: clear want_acting when we leave Primary
Samuel Just [Thu, 25 Apr 2013 21:08:57 +0000 (14:08 -0700)]
PG: clear want_acting when we leave Primary

This is somewhat annoying actually.  Intuitively we want to
clear_primary_state when we leave primary, but when we restart
peering due to a change in prior set status, we can't afford
to forget most of our peering state.  want_acting, on the
other hand, should never persist across peering attempts.
In fact, in the future, want_acting should be pulled into
the Primary state structure.

Fixes: #3904
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
12 years agomon: get own entity_inst_t via messenger, not monmap
Sage Weil [Thu, 25 Apr 2013 22:18:42 +0000 (15:18 -0700)]
mon: get own entity_inst_t via messenger, not monmap

There are intervals during bootstrap(*) during which we are part of the
monmap, but our name (mon->name) does not match the monmap's.  This means
that calling monmap->get_inst(mon->name) is not a safe way to get our own
entity_inst_t.

Instead, use messenger->get_myinst().  This includes our addr (obviously)
and an up-to-date entity_name_t, too: in bootstrap we adjust the messenger
name at the same time as mon->rank, based on the contents of the monmap.

monmap->get_inst(mon->rank) would work too.

* During mkfs, the monmap may have noname-foo instead of the name if it was
  generated from the mon_host lines or dns or whatever by
  MonMap::build_initial().  This was the case for #4811.

Fixes: #4811
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoMerge pull request #239 from ceph/wip-4760
Sage Weil [Thu, 25 Apr 2013 20:11:59 +0000 (13:11 -0700)]
Merge pull request #239 from ceph/wip-4760

#4760

Second patch Reviewed-by: Sage Weil <sage@inktank.com>

12 years agoMerge pull request #246 from ceph/wip-4793
Sage Weil [Thu, 25 Apr 2013 18:52:30 +0000 (11:52 -0700)]
Merge pull request #246 from ceph/wip-4793

#4793

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoradosgw: receiving unexpected error code while accessing an non-existing object by... 245/head
Li Wang [Thu, 25 Apr 2013 15:36:56 +0000 (23:36 +0800)]
radosgw: receiving unexpected error code while accessing an non-existing object by authorized not-owner user

This patch fixes a bug in radosgw swift compatibility code,
that is, if a not-owner but authorized user access a non-existing
object in a container, he wiil receive unexpected error code,
to repeat this bug, do the following steps,

1 User1 creates a container, and grants the read/write permission to user2

curl -X PUT -i -k -H "X-Auth-Token: $user1_token" $url/$container
curl -X POST -i -k -H "X-Auth-Token: $user1_token" -H "X-Container-Read:
$user2" -H "X-Container-Write: $user2" $url/$container

2 User2 queries the object 'obj' in the newly created container
by using HEAD instruction, note the container currently is empty

curl -X HEAD -i -k -H "X-Auth-Token: $user2_token" $url/$container/obj

3 The response received by user2 is '401 Authorization Required',
rather than the expected '404 Not Found', the details are as follows,

HTTP/1.1 401 Authorization Required
Date: Tue, 16 Apr 2013 01:52:49 GMT
Server: Apache/2.2.22 (Ubuntu)
Accept-Ranges: bytes
Content-Length: 12
Vary: Accept-Encoding

Signed-off-by: Yunchuan Wen <yunchuanwen@ubuntukylin.com>
Signed-off-by: Li Wang <liwang@ubuntukylin.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoinit-ceph: use remote config when starting daemons on remote nodes (-a)
Sage Weil [Thu, 25 Apr 2013 18:13:33 +0000 (11:13 -0700)]
init-ceph: use remote config when starting daemons on remote nodes (-a)

If you use -a to start a remote daemon, assume the remote config is present
instead of pushing the local config.  This makes more sense and simplifies
things.

Note that this means that -a in concert with -c foo means that foo must
also be present on the remote node in the same path.  That, however, is a
use case that I don't particularly care about right now.  :)

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agoMerge branch 'wip-4748-b' into next
Sage Weil [Thu, 25 Apr 2013 17:21:11 +0000 (10:21 -0700)]
Merge branch 'wip-4748-b' into next

Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoMerge branch 'wip-4778' into next
David Zafman [Thu, 25 Apr 2013 00:33:00 +0000 (17:33 -0700)]
Merge branch 'wip-4778' into next

Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoscrub clears inconsistent flag set by deep scrub
David Zafman [Tue, 23 Apr 2013 00:06:52 +0000 (17:06 -0700)]
scrub clears inconsistent flag set by deep scrub

Add new num_deep_scrub_errors and num_shallow_scrub_errors to object_stat_sum_t
Show deep-scrub error count when outputing regular scrub errors
Set invalid size in case of a stat error which sets read_error
For now do deep-scrub after repair (see #4783)

fixes: #4778
Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoMerge pull request #242 from ceph/wip-objectcacher-enoent
Josh Durgin [Wed, 24 Apr 2013 23:20:59 +0000 (16:20 -0700)]
Merge pull request #242 from ceph/wip-objectcacher-enoent

Reviewed-by: Sage Weil <sage.weil@inktank.com>
12 years agoObjectCacher: remove all buffers from a non-existent object 242/head
Josh Durgin [Wed, 24 Apr 2013 22:06:50 +0000 (15:06 -0700)]
ObjectCacher: remove all buffers from a non-existent object

Once we're sure an object doesn't exist, we retry all the waiters in
order, and they return -ENOENT immediately. If there were a bunch of
BufferHeads waiting for data (rx state), they would be left behind
while the reads that triggered them were complete from the cache
user's perspective. These extra rx BufferHeads would pin the object in
the lru, so they wouldn't be removed by release_set(). This meant that
the assert during shutdown of the cache would be triggered.

To fix this, remove any BufferHeads in this state immediately when we
find out the object doesn't exist. Use the same condition as readx for
determining whether this is safe - if we got -ENOENT and all
BufferHeads for the object are clean or rx.

Fixes: #3664
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agomon: when electing, be sure acked leaders have new enough stores to lead 246/head
Greg Farnum [Wed, 24 Apr 2013 22:36:41 +0000 (15:36 -0700)]
mon: when electing, be sure acked leaders have new enough stores to lead

In general anybody participating in an election should be new enough to
lead thanks to the bootstrap process, but we've observed situations in
which a monitor is leader but gets so busy that it gets booted out
without noticing for a while, then processes the election messages
which were spawned, responds to them, and the other monitors kick those
up to a new election epoch. Then the old and behind monitor gets
elected as the new leader, which does bad things to our sync.

To deal with this, add the paxos first and last committed versions
to the MMonElection messages, and consider those values when deciding
whether to defer to a peer. Only defer to them if their newest value
is newer than our oldest, but also *do* defer to them if their oldest
value is newer than our newest even if we out-rank them otherwise.

Signed-off-by: Greg Farnum <greg@inktank.com>
12 years agomon: be more careful about making sure we're up-to-date on sync check
Greg Farnum [Wed, 24 Apr 2013 22:27:23 +0000 (15:27 -0700)]
mon: be more careful about making sure we're up-to-date on sync check

We were looking at our own paxos_max_join_drift and using that to
calculate whether we were new enough to join without syncing, but
if those numbers don't match across monitors they might have trimmed. Use
the number they provide us as their first version and compare to that
as well.

Signed-off-by: Greg Farnum <greg@inktank.com>
12 years agorgw: fix i386 compile error 239/head
Sage Weil [Wed, 24 Apr 2013 22:07:28 +0000 (15:07 -0700)]
rgw: fix i386 compile error

error: rgw/rgw_op.cc:665:63: no matching function for call to ‘min(uint64_t, size_t&)’

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoFileStore::_split_collection: src or dest may be removed on replay
Samuel Just [Wed, 24 Apr 2013 21:23:45 +0000 (14:23 -0700)]
FileStore::_split_collection: src or dest may be removed on replay

If the collection is subsequently removed, the _split_collection
might get replayed and find either src or dest removed.

Fixes: #4806
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agolibrados: fix calc_snap_set_diff interval calculation
Sage Weil [Wed, 24 Apr 2013 20:48:40 +0000 (13:48 -0700)]
librados: fix calc_snap_set_diff interval calculation

When calculating the [a,b] interval over which a given clone is valid, do
not assume that b == the clone id; that is *not* true when the original
end snap has been deleted/trimmed.

While we are here, make the code a bit cleaner to read.

Fixes: #4785
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoMerge remote-tracking branch 'upstream/wip_2476' into next
Samuel Just [Wed, 24 Apr 2013 21:03:38 +0000 (14:03 -0700)]
Merge remote-tracking branch 'upstream/wip_2476' into next

Fixes: #2476
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoPG: call check_recovery_sources in remove_down_peer_info
Samuel Just [Wed, 24 Apr 2013 19:20:17 +0000 (12:20 -0700)]
PG: call check_recovery_sources in remove_down_peer_info

If we transition out of peering due to affected
prior set, we won't trigger start_peering_interval
and check_recovery_sources won't get called.  This
will leave an entry in missing_loc_sources without
a matching missing set.  We always want to
check_recovery_sources with remove_down_peer_info.

Fixes: 4805
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon: send clients away while sychronizing
Sage Weil [Wed, 24 Apr 2013 19:26:37 +0000 (12:26 -0700)]
mon: send clients away while sychronizing

When we are out of quorum, we waitlist client messages or (eventually)
send them elsewhere.  If we are synchronizing, do the same.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomkcephfs: give mon. key 'allow *' mon caps
Sage Weil [Wed, 24 Apr 2013 17:13:40 +0000 (10:13 -0700)]
mkcephfs: give mon. key 'allow *' mon caps

This will ease the transition from mkcephfs to ceph-deploy by allowing
ceph-create-keys to use the mon. keyring file in $mon_data and get the
caps it needs.

Fixes: #4756
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoPendingReleaseNotes: note about rbd resize --allow-shrink
Josh Durgin [Wed, 24 Apr 2013 17:16:03 +0000 (10:16 -0700)]
PendingReleaseNotes: note about rbd resize --allow-shrink

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agorgw: list container only shows stats if needed
Yehuda Sadeh [Tue, 23 Apr 2013 19:31:31 +0000 (12:31 -0700)]
rgw: list container only shows stats if needed

Fixes: #4759
Add a new request param 'stats' for the swift list containers
request. If set to 'false' it disables stats retrieval, which
makes it go faster. Also, don't dump stats if format is plain,
as they're not going to be dumped.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agorbd: fix cli-integration tests for striping change
Sage Weil [Wed, 24 Apr 2013 15:35:15 +0000 (08:35 -0700)]
rbd: fix cli-integration tests for striping change

We don't set the striping feature when we are using backward-compatible
(default) striping now; fix the test accordingly.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years ago95-ceph-osd-alt.rules: Fix missing parent parameter
Gary Lowell [Wed, 24 Apr 2013 15:22:04 +0000 (08:22 -0700)]
95-ceph-osd-alt.rules:  Fix missing parent parameter

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>