]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agomds/Locker: fix null deref on cap import 1496/head
Sage Weil [Tue, 18 Mar 2014 21:54:26 +0000 (14:54 -0700)]
mds/Locker: fix null deref on cap import

The session Connection* may be NULL.

Fixes: #7708
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agodoc/dev/cache-pool: describe the tiering agent
Sage Weil [Tue, 18 Mar 2014 20:09:29 +0000 (13:09 -0700)]
doc/dev/cache-pool: describe the tiering agent

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1491 from dachary/wip-submodules
Alfredo Deza [Tue, 18 Mar 2014 18:07:09 +0000 (14:07 -0400)]
Merge pull request #1491 from dachary/wip-submodules

erasure-code: jerasure and gf-complete moved to ceph namespace

Reviewed-by: Alfredo Deza <alfredo.deza@inktank.com>
11 years agoerasure-code: jerasure and gf-complete moved to ceph namespace 1491/head
Loic Dachary [Tue, 18 Mar 2014 17:54:26 +0000 (18:54 +0100)]
erasure-code: jerasure and gf-complete moved to ceph namespace

for maintenance purposes

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1489 from dachary/wip-7757
Loic Dachary [Tue, 18 Mar 2014 14:47:11 +0000 (15:47 +0100)]
Merge pull request #1489 from dachary/wip-7757

erasure-code: disable SSE extensions

Reviewed-by: Christophe Courtaut <christophe.courtaut@gmail.com>
11 years agoerasure-code: disable SSE extensions 1489/head
Loic Dachary [Tue, 18 Mar 2014 10:05:36 +0000 (11:05 +0100)]
erasure-code: disable SSE extensions

Until jerasure-2 / gf-complete is able to detect them at runtime.

http://tracker.ceph.com/issues/7757 refs #7757

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1488 from dachary/wip-jerasure-2
Loic Dachary [Tue, 18 Mar 2014 14:45:49 +0000 (15:45 +0100)]
Merge pull request #1488 from dachary/wip-jerasure-2

erasure-code: update jerasure v2 submodule

Reviewed-by: Christophe Courtaut <christophe.courtaut@gmail.com>
11 years agoerasure-code: update gf-complete v1 submodule 1488/head
Loic Dachary [Tue, 18 Mar 2014 09:27:20 +0000 (10:27 +0100)]
erasure-code: update gf-complete v1 submodule

Point to https://bitbucket.org/dachary/gf-complete/branch/v1 which
aggregates the pending pull requests required by Ceph while they are
reviewed.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoerasure-code: update jerasure v2 submodule
Loic Dachary [Tue, 18 Mar 2014 08:50:20 +0000 (09:50 +0100)]
erasure-code: update jerasure v2 submodule

to include the latest compilation warning fixes.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1384 from dachary/wip-7599
Sage Weil [Tue, 18 Mar 2014 03:52:57 +0000 (20:52 -0700)]
Merge pull request #1384 from dachary/wip-7599

upgrade jerasure to version 2

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1486 from ceph/wip-cli-err
Sage Weil [Tue, 18 Mar 2014 03:51:00 +0000 (20:51 -0700)]
Merge pull request #1486 from ceph/wip-cli-err

ceph.in: Better error on bad arg to 'tell'

Reviewed-by: Dan Mick <dan.mick@inktank.com>
11 years agoMerge pull request #1479 from ceph/wip-rados-outfile
Sage Weil [Tue, 18 Mar 2014 01:41:18 +0000 (18:41 -0700)]
Merge pull request #1479 from ceph/wip-rados-outfile

tools/rados: Allow binary file output of omap data

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1480 from ceph/wip-remotebit-dump
Sage Weil [Tue, 18 Mar 2014 01:39:48 +0000 (18:39 -0700)]
Merge pull request #1480 from ceph/wip-remotebit-dump

mds: Fix remotebit::dump for less common types

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1477 from dachary/wip-erasure-code-profiles
Sage Weil [Mon, 17 Mar 2014 23:26:53 +0000 (16:26 -0700)]
Merge pull request #1477 from dachary/wip-erasure-code-profiles

replace properties with erasure code profiles

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agodoc: update the erasure-code dev documentation 1477/head
Loic Dachary [Sun, 16 Mar 2014 16:39:51 +0000 (17:39 +0100)]
doc: update the erasure-code dev documentation

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoosd,mon: use profile instead of properties
Loic Dachary [Sun, 16 Mar 2014 16:00:25 +0000 (17:00 +0100)]
osd,mon: use profile instead of properties

The qa and functional tests are adapted to the new command prototype
requiring a profile instead of a list of properties. When possible the
implicit ruleset creation is used to simplify the test setup.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: add osd crush create-erasure functional tests
Loic Dachary [Sun, 16 Mar 2014 15:54:40 +0000 (16:54 +0100)]
mon: add osd crush create-erasure functional tests

Cleanup the TEST_crush_rule_all function from redundant leftovers.
Explicitly test crush rule rm instead of implicitly.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoosd: create the erasure-code ruleset in OSDMap::build_simple
Loic Dachary [Sun, 16 Mar 2014 15:49:51 +0000 (16:49 +0100)]
osd: create the erasure-code ruleset in OSDMap::build_simple

Using the "default" profile, add the matching erasure-code ruleset.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoosd: create erasure_code_profile in OSDMap::build_simple
Loic Dachary [Sun, 16 Mar 2014 15:47:46 +0000 (16:47 +0100)]
osd: create erasure_code_profile in OSDMap::build_simple

The "default" erasure_code_profile is set by OSDMap::build_simple using
the osd_pool_default_erasure_code_profile default configuration option.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: set the profile and ruleset defaults early
Loic Dachary [Sun, 16 Mar 2014 20:11:56 +0000 (21:11 +0100)]
mon: set the profile and ruleset defaults early

The poolstr is removed from the prepare_pool_crush_ruleset prototype
because it no longer decides for the default ruleset, if it is not
omitted by the caller of osd pool create.

If no profile
  profile = default
If no ruleset and profile is default
  ruleset = erasure-code
If no ruleset and profile is not default
  ruleset = the name of the pool

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: add crush ruleset name to osd pool create
Loic Dachary [Sun, 16 Mar 2014 15:24:58 +0000 (16:24 +0100)]
mon: add crush ruleset name to osd pool create

The ruleset to be used for the new erasure coded pool was expected in
the properties, under the name crush_ruleset. It does not belong to the
erasure code profile and needs to be added to the prototype explicitly.

The crush ruleset name is added to the prototype of the prepare_new_pool
and prepare_pool_crush_ruleset methods.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoosd: use erasure code profile when building the PGBackend
Loic Dachary [Sun, 16 Mar 2014 15:13:17 +0000 (16:13 +0100)]
osd: use erasure code profile when building the PGBackend

The PGBackend::build_pg_backend() prototype is modified to add an
OSDMapRef which is used to get the profile stored in the pg_pool_t
and pass it to the erasure code plugin.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: OSDMonitor use erasure_code_profile instead of properties
Loic Dachary [Mon, 17 Mar 2014 21:47:03 +0000 (22:47 +0100)]
mon: OSDMonitor use erasure_code_profile instead of properties

The prepare_pool_properties is replaced with the
parse_erasure_code_profile method which looks up the same content from
OSDMap::erasure_code_profiles instead of the argument vector.

The type and name substitution is applied in OSDMonitor and the
MonCommand prototypes for osd pool create and osd create-erasure are
updated.

The behavior is not modified.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoosd: obsolete pg_pool_t properties with erasure_code_profile
Loic Dachary [Sun, 16 Mar 2014 12:27:51 +0000 (13:27 +0100)]
osd: obsolete pg_pool_t properties with erasure_code_profile

The generic map properties is only used for erasure code and should be
specialized. It is obsoleted by a string that can be looked up in
OSDMap::erasure_code_profiles to retrieve the key/value pairs that will
be interpreted by the erasure code plugin.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: add the erasure-code-profile {set,get,rm,ls} MonCommand
Loic Dachary [Sun, 16 Mar 2014 12:00:50 +0000 (13:00 +0100)]
mon: add the erasure-code-profile {set,get,rm,ls} MonCommand

"erasure-code-profile set" parses the key=value pairs given in argument
and stores them in OSDMap::erasure_code_profiles. The
"erasure-code-profile get" supports plain text display if the Formatter
is not set (or invalid).

  erasure-code-profile set myprofile a=b c=d

is stored as

  OSDMap::erasure_code_profile["myprofile"] = {"a":"b", "c":"d"}

"erasure-code-profile ls" displays a list of the profile names from
OSDMap::erasure_code_profiles

"erasure-code-profile rm" removes a profile, if it exists. Displays a
message and succeeds if it does not exist.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon/Paxos: commit only after entire quorum acks
Sage Weil [Mon, 17 Mar 2014 23:21:17 +0000 (16:21 -0700)]
mon/Paxos: commit only after entire quorum acks

If a subset of the quorum accepts the proposal and we commit, we will start
sharing the new state.  However, the mon that didn't yet reply with the
accept may still be sharing the old and stale value.

The simplest way to prevent this is not to commit until the entire quorum
replies.  In the general case, there are no failures and this is just fine.
In the failure case, we will call a new election and have a smaller quorum
of (live) nodes and will recommit the same value.

A more performant solution would be to have a separate message invalidate
the old state and commit once we have all invalidations and a majority of
accepts.  This will lower latency a bit in the non-failure case, but not
change the failure case significantly.  Later!

Fixes: #7736
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoMerge remote-tracking branch 'gh/firefly'
Sage Weil [Mon, 17 Mar 2014 23:19:07 +0000 (16:19 -0700)]
Merge remote-tracking branch 'gh/firefly'

11 years agoMerge pull request #1487 from ceph/wip-7738
Samuel Just [Mon, 17 Mar 2014 23:03:49 +0000 (16:03 -0700)]
Merge pull request #1487 from ceph/wip-7738

os/FileJournal: return errors on make_writeable() if reopen fails

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoos/FileJournal: return errors on make_writeable() if reopen fails 1487/head
Sage Weil [Mon, 17 Mar 2014 22:37:44 +0000 (15:37 -0700)]
os/FileJournal: return errors on make_writeable() if reopen fails

This is why #7738 is resulting in a crash instead of an error.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoAdd file to store mirror location of module's.
Sandon Van Ness [Mon, 17 Mar 2014 19:15:32 +0000 (12:15 -0700)]
Add file to store mirror location of module's.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
11 years agoMerge pull request #1481 from ceph/wip-tmap2omap-warn
Sage Weil [Mon, 17 Mar 2014 16:49:54 +0000 (09:49 -0700)]
Merge pull request #1481 from ceph/wip-tmap2omap-warn

mds: avoid spurious TMAP2OMAP warning

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoceph.in: Better error on bad arg to 'tell' 1486/head
John Spray [Mon, 17 Mar 2014 16:17:05 +0000 (16:17 +0000)]
ceph.in: Better error on bad arg to 'tell'

Previously would get a rather enigmatic error:
  UnboundLocalError: local variable 'ret' referenced before assignment

Now give something sensible:
  ceph_argparse.ArgumentValid: Bad target type 'mds'

Also update a couple of the other catch-all exception handlers
so that they will let the (nicer) ArgumentError exception through
for humans to see instead of munging them into RuntimeErrors.

Signed-off-by: John Spray <john.spray@inktank.com>
11 years agomon: functional tests teardown must be run on error
Loic Dachary [Mon, 17 Mar 2014 15:44:14 +0000 (16:44 +0100)]
mon: functional tests teardown must be run on error

otherwise daemons will keep running and interfere with tests happening
afterwards.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: add helper to selection functions implementing tests
Loic Dachary [Sun, 16 Mar 2014 15:16:26 +0000 (16:16 +0100)]
mon: add helper to selection functions implementing tests

The call_TEST_functions will lookup SHARE_MON_TEST_* shell functions and
run them after creating a mon. Each is expected to clean up and avoid
interferences. It will also lookup TEST_* shell functions and include them
in setup/teardown to provide them with a clean environment.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoosd: OSDMap::erasure_code_profile accessors
Loic Dachary [Sun, 16 Mar 2014 11:44:55 +0000 (12:44 +0100)]
osd: OSDMap::erasure_code_profile accessors

For both the incremental and the OSDMap fields.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoosd: add OSDMap::erasure_code_profile
Loic Dachary [Sun, 16 Mar 2014 11:40:24 +0000 (12:40 +0100)]
osd: add OSDMap::erasure_code_profile

A map of key=value properties to be interpreted by the erasure code
plugins. For instance profile["default"] = { "k": 2, "m": 1 }

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomds: avoid spurious TMAP2OMAP warning 1481/head
John Spray [Mon, 17 Mar 2014 14:48:59 +0000 (14:48 +0000)]
mds: avoid spurious TMAP2OMAP warning

The message "one or more OSDs do not support TMAP2OMAP" was printed
incorrectly when zero OSDs were up (and therefore the feature was
absent).  Don't issue this prompt until at least one OSD is up.

Signed-off-by: John Spray <john.spray@inktank.com>
11 years agoMerge pull request #1482 from ceph/wip-7611
Sage Weil [Mon, 17 Mar 2014 15:17:53 +0000 (08:17 -0700)]
Merge pull request #1482 from ceph/wip-7611

ceph.in: do not allow using 'tell' with interactive mode

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoceph.in: do not allow using 'tell' with interactive mode 1482/head
Joao Eduardo Luis [Mon, 17 Mar 2014 14:37:09 +0000 (14:37 +0000)]
ceph.in: do not allow using 'tell' with interactive mode

This avoids a lot of hassle when dealing with to whom tell each command
on interactive mode, and even more so if multiple targets are specified.

As so, 'tell' commands should be used while on interactive mode instead.

Backport: dumpling,emperor

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomds: Fix remotebit::dump for less common types 1480/head
John Spray [Fri, 14 Mar 2014 19:55:51 +0000 (19:55 +0000)]
mds: Fix remotebit::dump for less common types

This was hitting an assertion when used on anything
other than a regular/symlink/dir.  Now covers
all types.

Signed-off-by: John Spray <john.spray@inktank.com>
11 years agotools/rados: Allow binary file output of omap data 1479/head
John Spray [Mon, 17 Mar 2014 11:11:16 +0000 (11:11 +0000)]
tools/rados: Allow binary file output of omap data

Extends getomapval and getompaheader to take an output
file argument the same way 'get' does.  Removes misleading
'-o' line from usage(), there doesn't appear to be any
such
option.

Signed-off-by: John Spray <john.spray@inktank.com>
11 years agoerasure-code: make libcommon include liberasure-code
Loic Dachary [Sun, 16 Mar 2014 11:25:39 +0000 (12:25 +0100)]
erasure-code: make libcommon include liberasure-code

So that it can be used in OSDMap which is part of libcommon.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoerasure-code: add ostream to factory()
Loic Dachary [Sun, 16 Mar 2014 11:22:02 +0000 (12:22 +0100)]
erasure-code: add ostream to factory()

Modify calls to ErasureCodePlugin::factory() to provide the new
ostream argument.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoerasure-code: remove dependency to the global context
Loic Dachary [Sun, 16 Mar 2014 11:14:30 +0000 (12:14 +0100)]
erasure-code: remove dependency to the global context

Instead of relying on derr to display error messages, add them to an
ostream parameter given in argument to load() and factory(). The erasure
code convenience library no longer depends on the global context that is
indirectly referenced by debug.h

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agocommon,erasure-code,mon: s/erasure-code-//
Loic Dachary [Sun, 16 Mar 2014 11:09:51 +0000 (12:09 +0100)]
common,erasure-code,mon: s/erasure-code-//

The parameters to erasure code do not need to be prefixed with the
erasure-code- string. There only are erasure-code parameters and the
prefix was originaly intended to desambiguate the erasure-code
properties, assuming that the properties map could be used for other
purposes.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon,osd,erasure-code: update copyright notices
Loic Dachary [Sun, 16 Mar 2014 11:03:10 +0000 (12:03 +0100)]
mon,osd,erasure-code: update copyright notices

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: tests for pool create erasure implicit ruleset creation
Loic Dachary [Mon, 3 Mar 2014 14:40:13 +0000 (15:40 +0100)]
mon: tests for pool create erasure implicit ruleset creation

* Remove the tests checking that a missing or wrong crush_ruleset
  parameters triggered an error.
* Add a test checking that a ruleset with the same name as the pool is
  created implicitly when no crush_ruleset is specified.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: pool create erasure implicit ruleset creation
Loic Dachary [Mon, 3 Mar 2014 14:25:21 +0000 (15:25 +0100)]
mon: pool create erasure implicit ruleset creation

If the crush_ruleset parameter is missing, set it to the pool name.

If the crush_ruleset parameter is set to a name that does not match any
of the existing rulesets, create one using the pool creation parameters.

If the ruleset exists and is in the pending map or if the ruleset was
just created (meaning it exists in the pending map), the
prepare_pool_crush_ruleset method returns EAGAIN so that the pool
creation message is retried after the pending map is proposed.

If the ruleset exists, it is used to initialize the newly created pool,
as before.

http://tracker.ceph.com/issues/7571 fixes #7571

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: add pool name to prepare_pool_crush_ruleset
Loic Dachary [Mon, 3 Mar 2014 14:18:34 +0000 (15:18 +0100)]
mon: add pool name to prepare_pool_crush_ruleset

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: create-erasure uses crush_ruleset_create_erasure
Loic Dachary [Mon, 3 Mar 2014 14:12:53 +0000 (15:12 +0100)]
mon: create-erasure uses crush_ruleset_create_erasure

Create the ruleset and branch depending on the result:

* If it succeeds, wait
* If it already exists and is pending (-EALREADY), wait
* If it already exists (-EEXIST), return immediately
* If it fails for other reasons, return immediately

Add an informative message when it succeeds.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: crush_ruleset_create_erasure s/_map//
Loic Dachary [Mon, 3 Mar 2014 14:12:22 +0000 (15:12 +0100)]
mon: crush_ruleset_create_erasure s/_map//

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: crush_ruleset_create_erasure indent
Loic Dachary [Mon, 3 Mar 2014 14:03:52 +0000 (15:03 +0100)]
mon: crush_ruleset_create_erasure indent

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: crush_ruleset_create_erasure s/rule/err/
Loic Dachary [Mon, 3 Mar 2014 13:55:16 +0000 (14:55 +0100)]
mon: crush_ruleset_create_erasure s/rule/err/

Avoid using rule instead of ruleset to help clarify the
terminology. Using err instead is also clearer in the context.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: crush_ruleset_create_erasure set ruleset
Loic Dachary [Mon, 3 Mar 2014 13:52:20 +0000 (14:52 +0100)]
mon: crush_ruleset_create_erasure set ruleset

Use get_rule_id() instead of rule_exists() to test the existence of a
ruleset and preserve the ruleset.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: crush_ruleset_create_erasure error codes
Loic Dachary [Mon, 3 Mar 2014 13:46:48 +0000 (14:46 +0100)]
mon: crush_ruleset_create_erasure error codes

Replace goto reply with error return and meaningfull error codes.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: crush_ruleset_create_erasure reduce verbosity
Loic Dachary [Mon, 3 Mar 2014 13:43:01 +0000 (14:43 +0100)]
mon: crush_ruleset_create_erasure reduce verbosity

Only add error message to the stream, not informative messages because
they depend on the caller context.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: create crush_ruleset_create_erasure helper
Loic Dachary [Mon, 3 Mar 2014 13:36:50 +0000 (14:36 +0100)]
mon: create crush_ruleset_create_erasure helper

Move the code bloc verbatim, from "osd crush rule create-erasure" to the
new crush_ruleset_create_erasure() method helper. This step helps
separate the code changes from the code moving around unmodified.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1462 from ceph/wip-cache-last-epoch-clean
Sage Weil [Sun, 16 Mar 2014 19:57:58 +0000 (12:57 -0700)]
Merge pull request #1462 from ceph/wip-cache-last-epoch-clean

mon: fix caching for min_last_epoch_clean

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #1474 from ceph/wip-7740
Sage Weil [Sun, 16 Mar 2014 19:12:29 +0000 (12:12 -0700)]
Merge pull request #1474 from ceph/wip-7740

OSD::handle_pg_query: on dne pg, send lb=hobject_t() if deleting

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1473 from ceph/wip-7719
Sage Weil [Sun, 16 Mar 2014 16:37:05 +0000 (09:37 -0700)]
Merge pull request #1473 from ceph/wip-7719

PG: clear want_pg_temp in clear_primary_state only if primary

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1471 from ceph/wip-7684
Sage Weil [Sun, 16 Mar 2014 04:47:10 +0000 (21:47 -0700)]
Merge pull request #1471 from ceph/wip-7684

client: force getattr when inline data is missing

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoclient: force getattr when inline data is missing 1471/head
Yan, Zheng [Sun, 16 Mar 2014 04:38:55 +0000 (12:38 +0800)]
client: force getattr when inline data is missing

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agoMerge pull request #1467 from ceph/wip-7684
Sage Weil [Sun, 16 Mar 2014 02:39:36 +0000 (19:39 -0700)]
Merge pull request #1467 from ceph/wip-7684

Wip 7684

http://pulpito.ceph.com/sage-2014-03-15_09:12:44-fs-wip-7684-testing-basic-plana

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoOSD::handle_pg_query: on dne pg, send lb=hobject_t() if deleting 1474/head
Samuel Just [Sun, 16 Mar 2014 00:58:35 +0000 (17:58 -0700)]
OSD::handle_pg_query: on dne pg, send lb=hobject_t() if deleting

We will set lb=hobject_t() if we resurrect the pg.  In that case,
we need to have sent that to the primary before hand.  If we
finish the removal before the pg is recreated, we'll just end
up backfilling it, which is ok since the pg doesn't exist anyway.

Fixes: #7740
Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #1469 from ceph/wip-7718
Sage Weil [Sat, 15 Mar 2014 22:30:40 +0000 (15:30 -0700)]
Merge pull request #1469 from ceph/wip-7718

PG::issue_repop: only adjust peer_info last_updates if not temp

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1468 from ceph/wip-7732
Sage Weil [Sat, 15 Mar 2014 22:29:22 +0000 (15:29 -0700)]
Merge pull request #1468 from ceph/wip-7732

PG::build_might_have_unfound: check pg_whomai, not osd whoami

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1470 from ceph/wip-7712
Samuel Just [Sat, 15 Mar 2014 20:16:16 +0000 (13:16 -0700)]
Merge pull request #1470 from ceph/wip-7712

osd/ReplicatedPG: fix enqueue_front race

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agomds: include inline data in lock messages 1467/head
Yan, Zheng [Sat, 15 Mar 2014 12:38:13 +0000 (20:38 +0800)]
mds: include inline data in lock messages

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: fix corner case of pushing inline data
Yan, Zheng [Sat, 15 Mar 2014 12:37:37 +0000 (20:37 +0800)]
mds: fix corner case of pushing inline data

Following sequence of events can happen.
 - Client releases an inode, queues cap release message.
 - A 'lookup' reply brings the same inode back, but the reply doesn't
   contain inline data because MDS didn't receive the cap release
   message and thought client already has up-to-data inline data.

The fix is trigger a getattr if client finds inline_version is zero.
The getattr mask is set to CEPH_STAT_CAP_INLINE_DATA, so that MDS knows
client does not have inline data.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agoPG::build_might_have_unfound: check pg_whomai, not osd whoami 1468/head
Samuel Just [Sat, 15 Mar 2014 01:00:05 +0000 (18:00 -0700)]
PG::build_might_have_unfound: check pg_whomai, not osd whoami

Otherwise, we might skip (2,0) when we are (2,1).

Fixes: #7732
Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoosd/ReplicatedPG: fix enqueue_front race 1470/head
Sage Weil [Fri, 14 Mar 2014 23:32:48 +0000 (16:32 -0700)]
osd/ReplicatedPG: fix enqueue_front race

When requeuing and item at the front, we need to shuffle the items in
pg_for_processing if there is an entry for this PG there.  If so, we need
to hold the qlock for the duration of the requeue of the shuffled item
back into the primary queue in order to avoid reshuffling items.  For
example, consider the queue has

 A B C D

 - dequeue1 gets (pg, A), puts A in the processing list
 - dequeue1 tries to lock pg, blocks
 - enqueue_front on X takes qlock, swaps it for A, drops qlock
 - dequeue2 gets (pg, B), puts B in the processing list
 - enqueue_front pushes X back into the original list

 so we have processing: X B  queue: A C D

 - dequeue* get X, then B, then A C D

If we whole qlock for the duration of the enqueue_front, we avoid dequeu2
from sneaking in an shuffling B into the processing list before we have
crammed A back onto the front of the list.

This may have caused #7712.

Backport: emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge branch 'master' of https://github.com/ceph/ceph
John Wilkins [Fri, 14 Mar 2014 22:53:10 +0000 (15:53 -0700)]
Merge branch 'master' of https://github.com/ceph/ceph

11 years agorados.py: Fixed docstring syntax warnings.
John Wilkins [Fri, 14 Mar 2014 22:52:28 +0000 (15:52 -0700)]
rados.py: Fixed docstring syntax warnings.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Fixed release notes syntax warnings.
John Wilkins [Fri, 14 Mar 2014 22:46:16 +0000 (15:46 -0700)]
doc: Fixed release notes syntax warnings.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agodoc: Fixed hyperlink.
John Wilkins [Fri, 14 Mar 2014 22:45:51 +0000 (15:45 -0700)]
doc: Fixed hyperlink.

Fixes: #7558
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agoMerge pull request #1463 from ceph/wip-7698
David Zafman [Fri, 14 Mar 2014 22:26:43 +0000 (15:26 -0700)]
Merge pull request #1463 from ceph/wip-7698

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agotest: Add ceph_filestore_dump.sh to test ceph_filestore_dump 1455/head 1463/head
David Zafman [Fri, 14 Mar 2014 19:22:02 +0000 (12:22 -0700)]
test: Add ceph_filestore_dump.sh to test ceph_filestore_dump

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agotools: Fix ceph_filestore_dump to fully operate on EC pools
David Zafman [Wed, 12 Mar 2014 22:31:50 +0000 (15:31 -0700)]
tools: Fix ceph_filestore_dump to fully operate on EC pools

Add spg_t and ghobject_t handling

Fixes: #7698
Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agotools: Cleanups in ceph_filestore_dump
David Zafman [Thu, 13 Mar 2014 06:41:33 +0000 (23:41 -0700)]
tools: Cleanups in ceph_filestore_dump

Fix usage output of ceph_filestore_dump
Add missing error checking
Output full object name
Improve message consistency
Fix program exit value

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoPG::issue_repop: only adjust peer_info last_updates if not temp 1469/head
Samuel Just [Fri, 14 Mar 2014 21:48:31 +0000 (14:48 -0700)]
PG::issue_repop: only adjust peer_info last_updates if not temp

Temp object repops have version eversion_t() since they don't
actually send log entries.  Updating the last_updates here
caused the peer info last_updates to be incorrect until the
next non-temp repop.

Fixes: #7718
Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoRGWListBucketMultiparts: init max_uploads/default_max with 0
Danny Al-Gaaf [Wed, 12 Mar 2014 21:56:44 +0000 (22:56 +0100)]
RGWListBucketMultiparts: init max_uploads/default_max with 0

CID 717377 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
 2. uninit_member: Non-static class member "max_uploads" is not initialized
    in this constructor nor in any functions that it calls.
 4. uninit_member: Non-static class member "default_max" is not initialized
    in this constructor nor in any functions that it calls.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit b23a141d54ffb39958aba9da7f87544674fa0e50)

11 years agomon/OSDMonitor: fix fall-thru case
Sage Weil [Fri, 14 Mar 2014 20:23:01 +0000 (13:23 -0700)]
mon/OSDMonitor: fix fall-thru case

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge remote-tracking branch 'gh/firefly'
Sage Weil [Fri, 14 Mar 2014 20:21:51 +0000 (13:21 -0700)]
Merge remote-tracking branch 'gh/firefly'

11 years agomon/PGMap: only recalculate min_last_epoch_clean if incremental touches old min 1462/head
Sage Weil [Sat, 22 Feb 2014 17:35:27 +0000 (09:35 -0800)]
mon/PGMap: only recalculate min_last_epoch_clean if incremental touches old min

If the Incremental updates a value that used to equal the old min, we may
have raised it and need to recalculate it at the end.  Otherwise, we can
avoid recalculating at all!

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomon/PGMap: cache min_last_epoch_clean
Sage Weil [Sat, 22 Feb 2014 17:32:08 +0000 (09:32 -0800)]
mon/PGMap: cache min_last_epoch_clean

We call this a lot.  Only recalculate when we decode or when we apply
an incremental.

Adjust unit test accordingly.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agounittest_mon_pgmap: fix warnings
Sage Weil [Fri, 14 Mar 2014 19:47:59 +0000 (12:47 -0700)]
unittest_mon_pgmap: fix warnings

In file included from test/mon/PGMap.cc:15:0:
../src/gtest/include/gtest/gtest.h: In function ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = int, T2 = unsigned int]’:
../src/gtest/include/gtest/gtest.h:1300:30: instantiated from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = int, T2 = unsigned int, bool lhs_is_null_literal = false]’
test/mon/PGMap.cc:33:257: instantiated from here
warning: ../src/gtest/include/gtest/gtest.h:1263:3: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agounittest_ceph_argparse: fix warnings
Sage Weil [Fri, 14 Mar 2014 19:46:57 +0000 (12:46 -0700)]
unittest_ceph_argparse: fix warnings

In file included from test/ceph_argparse.cc:17:0:
../src/gtest/include/gtest/gtest.h: In function ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = int, T2 = long unsigned int]’:
../src/gtest/include/gtest/gtest.h:1333:30: instantiated from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = int, T2 = long unsigned int]’
test/ceph_argparse.cc:344:207: instantiated from here
warning: ../src/gtest/include/gtest/gtest.h:1263:3: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agotools/: make filenames consistent
Sage Weil [Fri, 14 Mar 2014 20:15:22 +0000 (13:15 -0700)]
tools/: make filenames consistent

_ for source files, - for (shippable) build targets.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge remote-tracking branch 'gh/wip-coverity-20140312'
Sage Weil [Fri, 14 Mar 2014 20:11:23 +0000 (13:11 -0700)]
Merge remote-tracking branch 'gh/wip-coverity-20140312'

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoPG: clear want_pg_temp in clear_primary_state only if primary 1472/head 1473/head
Samuel Just [Fri, 14 Mar 2014 20:09:30 +0000 (13:09 -0700)]
PG: clear want_pg_temp in clear_primary_state only if primary

Clearing it in that way in on_shutdown() can cause a stray
shard to clobber the want_pg_temp value created by the primary
shard on the same osd.  Thus, instead only clear it if we are
the primary.

Fixes: #7719
Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge remote-tracking branch 'gh/wip-coverity-20140409'
Sage Weil [Fri, 14 Mar 2014 20:04:21 +0000 (13:04 -0700)]
Merge remote-tracking branch 'gh/wip-coverity-20140409'

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge remote-tracking branch 'gh/wip-da-SCA-firefly-20140304'
Sage Weil [Fri, 14 Mar 2014 18:42:30 +0000 (11:42 -0700)]
Merge remote-tracking branch 'gh/wip-da-SCA-firefly-20140304'

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1454 from ceph/wip-7709
Sage Weil [Fri, 14 Mar 2014 18:36:02 +0000 (11:36 -0700)]
Merge pull request #1454 from ceph/wip-7709

osd/ReplicatedPG: release op locks on on commit+applied

Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoMerge pull request #1459 from ceph/wip-7696
Sage Weil [Fri, 14 Mar 2014 18:28:50 +0000 (11:28 -0700)]
Merge pull request #1459 from ceph/wip-7696

Wip 7696

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agodoc/release-notes: note that radosgw's should be upgraded together
Sage Weil [Fri, 14 Mar 2014 18:16:58 +0000 (11:16 -0700)]
doc/release-notes: note that radosgw's should be upgraded together

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1461 from ceph/wip-7692
Sage Weil [Fri, 14 Mar 2014 18:05:49 +0000 (11:05 -0700)]
Merge pull request #1461 from ceph/wip-7692

mon: on timecheck on monmap 0

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agoMerge pull request #1460 from ceph/wip-warning
Sage Weil [Fri, 14 Mar 2014 18:03:49 +0000 (11:03 -0700)]
Merge pull request #1460 from ceph/wip-warning

PGLog: remove unused variable

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agomon: only do timecheck with known monmap 1461/head
Sage Weil [Fri, 14 Mar 2014 18:02:30 +0000 (11:02 -0700)]
mon: only do timecheck with known monmap

If we are still on monmap epoch 0, our mon ranks cannot yet be trusted
since there is not yet a shared source of truth from paxos.  If we do
timechecks, the code gets confused about the ranks in e.g. the
timecheck_waiting map.

Fixes: #7692
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph-mon: be a bit more verbose on error
Sage Weil [Fri, 14 Mar 2014 18:00:36 +0000 (11:00 -0700)]
ceph-mon: be a bit more verbose on error

Motivated by #7489

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoPG::activate: handle peer contigious with primary, but not auth_log 1459/head
Samuel Just [Fri, 14 Mar 2014 01:16:19 +0000 (18:16 -0700)]
PG::activate: handle peer contigious with primary, but not auth_log

The added case covers a situation where a replica is not contiguous with
the auth_log, but is contiguous with the primary.  Reshuffling the
active set to handle this would be tricky, so instead we just go ahead
and backfill it anyway.  This is probably preferrable in any case since
the replica in question would have to be significantly behind.

Fixes: #7696
Signed-off-by: Samuel Just <sam.just@inktank.com>