]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agomailmap: Warren Usui is with Inktank
Loic Dachary [Fri, 21 Mar 2014 22:32:37 +0000 (23:32 +0100)]
mailmap: Warren Usui is with Inktank

Reviewed-by: Warren Usui <warren.usui@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1500 from ceph/wip-tid_t
Sage Weil [Thu, 20 Mar 2014 23:07:29 +0000 (16:07 -0700)]
Merge pull request #1500 from ceph/wip-tid_t

Change tid_t to ceph_tid_t to avoid conflicts with a popular type

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1465 from ceph/wip-s3pm-wusui
Sage Weil [Thu, 20 Mar 2014 23:05:48 +0000 (16:05 -0700)]
Merge pull request #1465 from ceph/wip-s3pm-wusui

Remove code duplication from s3 tests.

11 years agoMerge pull request #1511 from dachary/wip-exclamation
Sage Weil [Thu, 20 Mar 2014 23:04:59 +0000 (16:04 -0700)]
Merge pull request #1511 from dachary/wip-exclamation

tests: use ^ instead of ! as invalid char

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agotests: use ^ instead of ! as invalid char 1511/head
Loic Dachary [Thu, 20 Mar 2014 22:29:29 +0000 (23:29 +0100)]
tests: use ^ instead of ! as invalid char

Because !!! is incorrectly interpreted as an error by gitbuilder.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agodoc/release-notes: stop confusing sphinx
Sage Weil [Thu, 20 Mar 2014 21:42:59 +0000 (14:42 -0700)]
doc/release-notes: stop confusing sphinx

ERROR: /srv/autobuild-ceph/gitbuilder.git/build/doc/release-notes.rst:594: Unknown target name: "debug".

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1503 from dachary/wip-jerasure-submodules
Sage Weil [Thu, 20 Mar 2014 21:11:44 +0000 (14:11 -0700)]
Merge pull request #1503 from dachary/wip-jerasure-submodules

 erasure-code: add gf-complete / jerasure submodules

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge remote-tracking branch 'gh/firefly'
Sage Weil [Thu, 20 Mar 2014 17:42:26 +0000 (10:42 -0700)]
Merge remote-tracking branch 'gh/firefly'

11 years agoMerge pull request #1509 from guangyy/wip-folder-merge
Samuel Just [Thu, 20 Mar 2014 17:13:05 +0000 (10:13 -0700)]
Merge pull request #1509 from guangyy/wip-folder-merge

Make it possible for FileStore to be in a state which never do merge and keep it backward compatible

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #1506 from ceph/wip-7755
Sage Weil [Thu, 20 Mar 2014 16:24:26 +0000 (09:24 -0700)]
Merge pull request #1506 from ceph/wip-7755

PG::find_best_info: fix log_tail component

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1507 from ceph/wip-7733
Sage Weil [Thu, 20 Mar 2014 16:19:58 +0000 (09:19 -0700)]
Merge pull request #1507 from ceph/wip-7733

PG::start_peering_interval: always send_notify if !primary

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1508 from ceph/wip-7777
Sage Weil [Thu, 20 Mar 2014 16:19:10 +0000 (09:19 -0700)]
Merge pull request #1508 from ceph/wip-7777

ReplicatedPG::do_op: delay if snapdir is unreadable

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1312 from cernceph/master
Josh Durgin [Wed, 19 Mar 2014 18:00:58 +0000 (11:00 -0700)]
Merge pull request #1312 from cernceph/master

rados.py: add aio_remove

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge pull request #1504 from ceph/wip-7780
Josh Durgin [Wed, 19 Mar 2014 17:47:05 +0000 (10:47 -0700)]
Merge pull request #1504 from ceph/wip-7780

objecter: waive OSDMAP_FULL check for MDS

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge pull request #1476 from ceph/wip-scrub-lock
Samuel Just [Wed, 19 Mar 2014 17:46:32 +0000 (10:46 -0700)]
Merge pull request #1476 from ceph/wip-scrub-lock

osd: do not queue scrub for non-primary

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #1502 from ceph/wip-flush-journal-asok
Josh Durgin [Wed, 19 Mar 2014 17:40:47 +0000 (10:40 -0700)]
Merge pull request #1502 from ceph/wip-flush-journal-asok

wip-flush-journal-asok

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoobjecter: waive OSDMAP_FULL check for MDS 1504/head
John Spray [Wed, 19 Mar 2014 11:21:21 +0000 (11:21 +0000)]
objecter: waive OSDMAP_FULL check for MDS

The MDS expects to be able to perform writes to OSDs even
if the full ratio has been reached, in order to journal
file deletions to free space.

Fixes: #7780
Signed-off-by: John Spray <john.spray@inktank.com>
11 years agoqa: test_alloc_hint: flush journal before prodding the FS 1502/head
Ilya Dryomov [Tue, 18 Mar 2014 16:06:12 +0000 (18:06 +0200)]
qa: test_alloc_hint: flush journal before prodding the FS

OSDs that for some reason get behind on processing their op queue break
expect_alloc_hint_eq(), as it pokes the FS and not the journal.  Fix it
by flushing the journal before proceeding with anything else.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agoosd: add flush_journal admin socket command
Ilya Dryomov [Tue, 18 Mar 2014 16:06:12 +0000 (18:06 +0200)]
osd: add flush_journal admin socket command

Add flush_journal admin socket command to be able to flush journal to
the permanent store for online osds.  (For offline osds we already have
ceph-osd --flush-journal.)

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agoerasure-code: add gf-complete / jerasure submodules 1503/head
Loic Dachary [Wed, 19 Mar 2014 06:56:41 +0000 (07:56 +0100)]
erasure-code: add gf-complete / jerasure submodules

Instead of copying the files in the ceph repository, which is less
convenient.

When building the headers are ignored, even though they do
not exist. When creating the tarbal with make dist, it fails because
they cannot be found. I misread src/gf_int.h to be include/gf_int.h and
wrongfully thought the submodules were to blame. This is why they were
removed shortly after being added.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoerasure-code: remove copy of gf-complete / jerasure
Loic Dachary [Wed, 19 Mar 2014 06:38:41 +0000 (07:38 +0100)]
erasure-code: remove copy of gf-complete / jerasure

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1496 from ceph/wip-7708
Yan, Zheng [Wed, 19 Mar 2014 04:25:05 +0000 (12:25 +0800)]
Merge pull request #1496 from ceph/wip-7708

mds/Locker: fix null deref on cap import

11 years agoMerge pull request #1499 from ceph/wip-no-version
Sage Weil [Wed, 19 Mar 2014 04:03:01 +0000 (21:03 -0700)]
Merge pull request #1499 from ceph/wip-no-version

Add NO_VERSION to avoid rebuilding ceph_ver.h and relinking

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1498 from ceph/wip-limit-libkeyutils
Sage Weil [Wed, 19 Mar 2014 04:01:13 +0000 (21:01 -0700)]
Merge pull request #1498 from ceph/wip-limit-libkeyutils

Makefiles: remove libkeyutils from every binary except two

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoChange tid_t to ceph_tid_t to avoid conflicts with a popular type 1500/head
Dan Mick [Fri, 28 Feb 2014 01:29:28 +0000 (17:29 -0800)]
Change tid_t to ceph_tid_t to avoid conflicts with a popular type

Signed-off-by: Dan Mick <dan.mick@inktank.com>
11 years agoAdd NO_VERSION to avoid rebuilding ceph_ver.h and relinking 1499/head
Dan Mick [Thu, 13 Feb 2014 03:28:30 +0000 (19:28 -0800)]
Add NO_VERSION to avoid rebuilding ceph_ver.h and relinking

Signed-off-by: Dan Mick <dan.mick@inktank.com>
11 years agoMakefiles: remove libkeyutils from every binary except two 1498/head
Dan Mick [Thu, 6 Mar 2014 22:33:39 +0000 (14:33 -0800)]
Makefiles: remove libkeyutils from every binary except two

Only rbd and mount_ceph need secret.c, and only secret.c needs libkeyutils;
remove it from LIBCOMMON_DEPS so it's not a dependency for everything,
remove secret.c from libcommon.a, and add it to mount.ceph/rbd's sources;
add LIBKEYID_LIB to mount.ceph/rbd's LDADD.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
11 years agoMerge pull request #1497 from dachary/wip-jerasure
Loic Dachary [Tue, 18 Mar 2014 23:56:36 +0000 (00:56 +0100)]
Merge pull request #1497 from dachary/wip-jerasure

remove gf-complete / jerasure sub modules

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoremove gf-complete / jerasure sub modules 1497/head
Loic Dachary [Tue, 18 Mar 2014 23:12:43 +0000 (00:12 +0100)]
remove gf-complete / jerasure sub modules

and add the source files in the tree.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1494 from dachary/wip-gitmodule-mirrors
Sage Weil [Tue, 18 Mar 2014 22:59:26 +0000 (15:59 -0700)]
Merge pull request #1494 from dachary/wip-gitmodule-mirrors

build: add gf-complete/jerasure to gitmodule_mirrors

11 years agoReplicatedPG::do_op: delay if snapdir is unreadable 1508/head
Samuel Just [Tue, 18 Mar 2014 22:47:44 +0000 (15:47 -0700)]
ReplicatedPG::do_op: delay if snapdir is unreadable

Since all we really need on a snapdir is the context, we really only
need it to be !missing.  However, it might become !missing before it
becomes !unreadable.  That allows ops to end up in the
waiting_for_degraded queue before one in waiting_for_unreadable is
woken, which allows the ops to be reordered.  Rather than reintroduce an
extra waiting_for_missing queue, simply require !unreadable for snapdir
(which implies !misssing).

Fixes: #7777
Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #1125 from ceph/wip-mon-docs
João Eduardo Luís [Tue, 18 Mar 2014 22:26:34 +0000 (22:26 +0000)]
Merge pull request #1125 from ceph/wip-mon-docs

wip-mon-docs: Better explain required number of monitors & how to troubleshoot a monitor

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.org>
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 agobuild: add gf-complete/jerasure to gitmodule_mirrors 1494/head
Loic Dachary [Tue, 18 Mar 2014 21:04:13 +0000 (22:04 +0100)]
build: add gf-complete/jerasure to gitmodule_mirrors

Signed-off-by: Loic Dachary <loic@dachary.org>
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 agoPG::start_peering_interval: always send_notify if !primary 1507/head
Samuel Just [Tue, 18 Mar 2014 19:35:03 +0000 (12:35 -0700)]
PG::start_peering_interval: always send_notify if !primary

Otherwise, we might get into a situation where the primary
forgets about a stray pg.  This is simpler and does not
increase the number of notifies by much.

Fixes: #7733
Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoPG::find_best_info: fix log_tail component 1506/head
Samuel Just [Tue, 18 Mar 2014 19:09:05 +0000 (12:09 -0700)]
PG::find_best_info: fix log_tail component

The previous logic should have kept the current best info if it found a
replica which best could log-recover, but p couldn't.  However, the
continue in that loop advanced the inner loop instead of the outer loop
allowing the primary case to take over in cases where best had a longer
tail.  Instead, we will prefer the longer tail regardless of the other
infos to simplify the logic.

Fixes: #7755
Signed-off-by: Samuel Just <sam.just@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 #1490 from ceph/wip-6806
Sage Weil [Tue, 18 Mar 2014 17:49:28 +0000 (10:49 -0700)]
Merge pull request #1490 from ceph/wip-6806

mon: Properly handle errors from 'cmd_getval()' when needed

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agomon: OSDMonitor: don't rely on client-side validation for command arguments 1490/head
Joao Eduardo Luis [Fri, 22 Nov 2013 18:00:39 +0000 (18:00 +0000)]
mon: OSDMonitor: don't rely on client-side validation for command arguments

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: Monitor: handle invalid 'quorum' command argument
Joao Eduardo Luis [Fri, 22 Nov 2013 17:57:21 +0000 (17:57 +0000)]
mon: Monitor: handle invalid 'quorum' command argument

Don't rely on client side validation of possible command arguments.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: Properly handle errors from 'cmd_getval()' when needed
Joao Eduardo Luis [Fri, 22 Nov 2013 20:58:57 +0000 (20:58 +0000)]
mon: Properly handle errors from 'cmd_getval()' when needed

Not handling the error return from cmd_getval() may leave uninitialzied
values, which can cause issues, specially with non-string values.

Fixes: 6806
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
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>