]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
10 years agomessages: provide an explicit COMPAT_VERSION in MMDSBeacon 2640/head
Greg Farnum [Fri, 3 Oct 2014 23:06:53 +0000 (16:06 -0700)]
messages: provide an explicit COMPAT_VERSION in MMDSBeacon

We weren't setting an explicit compat version and so the Message
was setting it to the head version, breaking communication with
older daemons.

Fixes: #9657
Signed-off-by: Greg Farnum <greg@inktank.com>
10 years agodebian/control: BuildDepend on lsb-release
Sage Weil [Fri, 3 Oct 2014 20:45:48 +0000 (13:45 -0700)]
debian/control: BuildDepend on lsb-release

debian/rules uses it to make lttng build conditional.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2635 from dachary/wip-9653-ceph-disk-bootstrap-osd-giant
Sage Weil [Fri, 3 Oct 2014 18:58:54 +0000 (11:58 -0700)]
Merge pull request #2635 from dachary/wip-9653-ceph-disk-bootstrap-osd-giant

ceph-disk: bootstrap-osd keyring ignores --statedir (giant)

10 years agoMerge pull request #2637 from dachary/wip-9245-test-mon-pending-giant
Sage Weil [Fri, 3 Oct 2014 18:24:44 +0000 (11:24 -0700)]
Merge pull request #2637 from dachary/wip-9245-test-mon-pending-giant

mon: obsolete osdmonitor_prepare_command (giant)

10 years agotests: remove tests requiring osdmonitor_prepare_command 2637/head
Loic Dachary [Fri, 3 Oct 2014 14:12:12 +0000 (16:12 +0200)]
tests: remove tests requiring osdmonitor_prepare_command

Although they have been useful, their maintenance and fragility caused
more trouble than their benefits.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
(cherry picked from commit 038de0031bc0892359201012dafb82ac1b1a4d0f)

10 years agomon: obsolete osdmonitor_prepare_command
Loic Dachary [Fri, 3 Oct 2014 14:10:30 +0000 (16:10 +0200)]
mon: obsolete osdmonitor_prepare_command

And the mon_advanced_debug_mode option that is only used in the context
of osdmonitor_prepare_command.

http://tracker.ceph.com/issues/9245 Fixes: #9245

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
(cherry picked from commit 2abc8f400f7db256c2a30f1d0886a593e6c194eb)

10 years agotest: minor case fix
Loic Dachary [Sat, 6 Sep 2014 14:06:12 +0000 (16:06 +0200)]
test: minor case fix

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
(cherry picked from commit 6f698374562de74806203c7b41072572b59bd256)

10 years agoceph-disk: bootstrap-osd keyring ignores --statedir 2635/head
Loic Dachary [Fri, 3 Oct 2014 12:08:57 +0000 (14:08 +0200)]
ceph-disk: bootstrap-osd keyring ignores --statedir

The STATEDIR variable is used to initialize the bootstrap-osd keyring
before it gets a chance to be overriden by --statedir. Replace it with
{statedir} so that it can be substituted after all options have been
parsed.

http://tracker.ceph.com/issues/9653 Fixes: #9653

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
(cherry picked from commit fa0bd06b4657e5b84e237b76033ac3d3478b6a1f)

10 years agoMerge pull request #2525 from ceph/wip-9487
Samuel Just [Wed, 1 Oct 2014 20:45:27 +0000 (13:45 -0700)]
Merge pull request #2525 from ceph/wip-9487

RFC: initialize purged_snaps on backfill

Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2620 from ceph/revert-2604-wip-9113
Sage Weil [Wed, 1 Oct 2014 20:23:21 +0000 (13:23 -0700)]
Merge pull request #2620 from ceph/revert-2604-wip-9113

Revert "ReplicatedPG: clean out completed trimmed objects as we go"

10 years agoRevert "ReplicatedPG: clean out completed trimmed objects as we go" 2620/head
Samuel Just [Wed, 1 Oct 2014 20:18:46 +0000 (13:18 -0700)]
Revert "ReplicatedPG: clean out completed trimmed objects as we go"

10 years agoceph.spec: fix typo
Sage Weil [Wed, 1 Oct 2014 19:33:38 +0000 (12:33 -0700)]
ceph.spec: fix typo

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2614 from ceph/wip-rpm-epoch
Sage Weil [Wed, 1 Oct 2014 19:23:44 +0000 (12:23 -0700)]
Merge pull request #2614 from ceph/wip-rpm-epoch

rpm: set epoch 1 to match fedora

Reviewed-by: Boris Ranto <branto@redhat.com>
10 years agoMerge branch 'wip-9013' into giant
Yehuda Sadeh [Wed, 1 Oct 2014 17:28:38 +0000 (10:28 -0700)]
Merge branch 'wip-9013' into giant

10 years agorgw: add civetweb as a default frontend 2381/head
Yehuda Sadeh [Tue, 2 Sep 2014 16:18:47 +0000 (09:18 -0700)]
rgw: add civetweb as a default frontend

Fixes: #9013
Originally the configurable was empty, now setting explicitly both
fastcgi and civetweb (on port 7480).

Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoceph.spec.: add epoch 2614/head
Sage Weil [Wed, 1 Oct 2014 13:02:02 +0000 (06:02 -0700)]
ceph.spec.: add epoch

This is done in fedora packaging.  Do it here too so that you can move
between upstream packages (from ceph.com) and fedora and other derivatives
will builds.

Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2615 from ceph/wip-fsls-json
Sage Weil [Wed, 1 Oct 2014 12:54:45 +0000 (05:54 -0700)]
Merge pull request #2615 from ceph/wip-fsls-json

mon: fix JSON `fs ls` output

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agomon: fix JSON `fs ls` output 2615/head
John Spray [Wed, 1 Oct 2014 11:08:00 +0000 (12:08 +0100)]
mon: fix JSON `fs ls` output

A missing list terminator was causing unparseable output.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoMerge pull request #2564 from ceph/wip-8587
Josh Durgin [Wed, 1 Oct 2014 00:24:02 +0000 (17:24 -0700)]
Merge pull request #2564 from ceph/wip-8587

rgw: subuser creation fixes

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
10 years agoMerge pull request #2613 from ceph/wip-8822
Sage Weil [Tue, 30 Sep 2014 21:45:27 +0000 (14:45 -0700)]
Merge pull request #2613 from ceph/wip-8822

osd: swap state spinlock for atomic_t

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoosd: swap state spinlock for atomic_t 2613/head
Sage Weil [Tue, 30 Sep 2014 18:56:30 +0000 (11:56 -0700)]
osd: swap state spinlock for atomic_t

We are hitting a strange issue with valgrind and pthread spinlocks. Avoid
the issue by using an atomic_t here (which is simpler anyway).

Avoids: #8822
Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2612 from ceph/wip-9562-backport
Gregory Farnum [Tue, 30 Sep 2014 17:49:05 +0000 (10:49 -0700)]
Merge pull request #2612 from ceph/wip-9562-backport

osdc/Filer: drop probe/purge locks before calling objecter

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agoosdc/Filer: drop probe/purge locks before calling objecter 2612/head
John Spray [Wed, 24 Sep 2014 13:19:32 +0000 (14:19 +0100)]
osdc/Filer: drop probe/purge locks before calling objecter

Fixes: #9562
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 8dc94a2d8ce3364c0d8d52f634e5fc967e43d819)

10 years agoLocker: accept ctime updates from clients without dirty write caps 2606/head
Greg Farnum [Mon, 29 Sep 2014 23:10:36 +0000 (16:10 -0700)]
Locker: accept ctime updates from clients without dirty write caps

The ctime changes any time the inode does. That can happen even without
the file itself having changed, so we'd better accept the update whenever
the auth caps have dirtied, without worrying about the file caps!

Fixes: #9514
Backport: firefly

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: John Spray <john.spray@redhat.com>
10 years agoMerge pull request #2556 from dachary/wip-9572-erasure-code-blaumroth
Loic Dachary [Mon, 29 Sep 2014 23:48:26 +0000 (01:48 +0200)]
Merge pull request #2556 from dachary/wip-9572-erasure-code-blaumroth

erasure-code: restore jerasure BlaumRoth default w

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2601 from ceph/wip-python-flask
Sage Weil [Mon, 29 Sep 2014 23:24:50 +0000 (16:24 -0700)]
Merge pull request #2601 from ceph/wip-python-flask

debian: python-flask is needed by ceph, not python-ceph

Reviewed-by: Loic Dachary <loic@dachary.org>
10 years agodebian: move ceph_rest_api.py into ceph 2601/head
Sage Weil [Mon, 29 Sep 2014 21:28:32 +0000 (14:28 -0700)]
debian: move ceph_rest_api.py into ceph

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoceph.spec.in: move ceph_rest_api.py into ceph
Sage Weil [Mon, 29 Sep 2014 21:24:01 +0000 (14:24 -0700)]
ceph.spec.in: move ceph_rest_api.py into ceph

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2602 from athanatos/wip-9574
Sage Weil [Mon, 29 Sep 2014 21:14:40 +0000 (14:14 -0700)]
Merge pull request #2602 from athanatos/wip-9574

PG: check full ratio again post-reservation

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2604 from athanatos/wip-9113
Sage Weil [Mon, 29 Sep 2014 21:02:15 +0000 (14:02 -0700)]
Merge pull request #2604 from athanatos/wip-9113

ReplicatedPG: clean out completed trimmed objects as we go

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2549 from ceph/wip-9545
Samuel Just [Mon, 29 Sep 2014 20:54:31 +0000 (13:54 -0700)]
Merge pull request #2549 from ceph/wip-9545

os/FileJournal: do not request sync while shutting down

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2550 from ceph/wip-8629
Samuel Just [Mon, 29 Sep 2014 20:52:21 +0000 (13:52 -0700)]
Merge pull request #2550 from ceph/wip-8629

osd: fix cache_evict vs make_writeable/finish_ctx snapdir bug #8629

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2510 from somnathr/wip-obj-delete-fix
Samuel Just [Mon, 29 Sep 2014 20:44:37 +0000 (13:44 -0700)]
Merge pull request #2510 from somnathr/wip-obj-delete-fix

FileStore: Race condition during object delete is fixed

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoceph.spec: fix python-flask dependency
Sage Weil [Mon, 29 Sep 2014 20:44:03 +0000 (13:44 -0700)]
ceph.spec: fix python-flask dependency

This is needed by ceph-rest-api, which is in ceph.rpm; it's not related to
python-ceph (except that ceph-rest-api happens to require that too).

Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agodebian: python-flask is needed by ceph, not python-ceph
Sage Weil [Mon, 29 Sep 2014 20:40:18 +0000 (13:40 -0700)]
debian: python-flask is needed by ceph, not python-ceph

It's used by ceph-rest-api which is in the 'ceph' (server) package.

Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2598 from ceph/wip-9582
Sage Weil [Mon, 29 Sep 2014 20:08:10 +0000 (13:08 -0700)]
Merge pull request #2598 from ceph/wip-9582

librados: fix other timeout segfault

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agoMerge pull request #2594 from dachary/wip-9620-test-mon-thrash
Sage Weil [Mon, 29 Sep 2014 15:18:36 +0000 (08:18 -0700)]
Merge pull request #2594 from dachary/wip-9620-test-mon-thrash

qa/workunits/cephtool/test.sh: fix thrash (ultimate)

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoqa/workunits/cephtool/test.sh: fix thrash (ultimate) 2594/head
Loic Dachary [Mon, 29 Sep 2014 11:47:06 +0000 (13:47 +0200)]
qa/workunits/cephtool/test.sh: fix thrash (ultimate)

Keep the osd trash test to ensure it is a valid command but make it a
noop by giving it a zero argument (meaning thrash 0 OSD maps).

Remove the loops that were added after the command in an attempt to wait
for the cluster to recover and not pollute the rest of the tests. Actual
testing of osd thrash would require a dedicated cluster because it the
side effects are random and it is unnecessarily difficult to ensure they
are finished.

http://tracker.ceph.com/issues/9620 Fixes: #9620

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoceph-disk: add Scientific Linux as a Redhat clone
Dan van der Ster [Fri, 26 Sep 2014 16:00:22 +0000 (18:00 +0200)]
ceph-disk: add Scientific Linux as a Redhat clone

Scientific Linux is a RHEL clone and needs to use partx.

Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
(cherry picked from commit 5ca7ea5b531f28b3c87161d53aee907d6957cfc2)

10 years agoMerge pull request #2531 from dachary/wip-9536-isa-alignment
Sage Weil [Thu, 25 Sep 2014 21:05:57 +0000 (14:05 -0700)]
Merge pull request #2531 from dachary/wip-9536-isa-alignment

erasure-code: isa plugin alignment fixes

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoosd: improve debug output for do_{notifies,queries,infos}
Sage Weil [Thu, 25 Sep 2014 20:51:46 +0000 (13:51 -0700)]
osd: improve debug output for do_{notifies,queries,infos}

Hunting #9389

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2540 from ceph/wip-giant-messenger-fixes
Sage Weil [Thu, 25 Sep 2014 20:01:38 +0000 (13:01 -0700)]
Merge pull request #2540 from ceph/wip-giant-messenger-fixes

giant messenger fixes

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoosdc/Objecter: only post_rx_buffer if no op timeout 2598/head
Sage Weil [Thu, 25 Sep 2014 19:34:11 +0000 (12:34 -0700)]
osdc/Objecter: only post_rx_buffer if no op timeout

If we post an rx buffer and there is a timeout, the revocation can happen
while the reader has consumed the buffers but before it has decoded and
constructed the message.  In particular, we calculate a crc32c over the
data portion of the message after we've taken the buffers and dropped the
lock.

Instead of fixing this race (for example, by reverifying rx_buffers under
the lock while calculating the crc.. bleh), just skip the rx buffer
optimization entirely when a timeout is present.

Note that this doesn't cover the op_cancel() paths, but none of those users
provide static buffers to read into.

Fixes: #9582
Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2574 from ceph/wip-msgr-shutdown
Sage Weil [Thu, 25 Sep 2014 16:26:18 +0000 (09:26 -0700)]
Merge pull request #2574 from ceph/wip-msgr-shutdown

msg: allow calling dtor immediately after ctor

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoerasure-code: test isa encode/decode with various object sizes 2531/head
Loic Dachary [Mon, 22 Sep 2014 12:16:32 +0000 (14:16 +0200)]
erasure-code: test isa encode/decode with various object sizes

Create an encode_decode() helper method to be called from the
encode_decode test function with various object size arguments. The
helper method is a copy/paste of the previous test that was using a
single object of a fixed size. The test is slightly adapted to
accommodate for different object sizes but the logic is not modified.

The object sizes being tested are chosen to be under the size of the
required size alignment or on multiple pages, size aligned or not.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: add test for isa chunk_size method
Loic Dachary [Mon, 22 Sep 2014 12:14:01 +0000 (14:14 +0200)]
erasure-code: add test for isa chunk_size method

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agomsg: allow calling dtor immediately after ctor 2574/head
John Spray [Thu, 25 Sep 2014 16:01:10 +0000 (17:01 +0100)]
msg: allow calling dtor immediately after ctor

Asserting on reaper_stop only made sense if the
messenger had ever been started: as it stood,
one couldn't create and destroy a messenger
without also starting and stopping it.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoerasure-code: isa encode tests adapted to per chunk alignment
Loic Dachary [Mon, 22 Sep 2014 12:11:07 +0000 (14:11 +0200)]
erasure-code: isa encode tests adapted to per chunk alignment

The encode tests use the alignment constraints. It has been changed to
be aligned on a per chunk basis instead of computing a more expensive
object alignement constraint. The test function is modified to take the
change into account but the logic is otherwise unmodified.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: isa test compare chunks with memcmp instead of strncmp
Loic Dachary [Mon, 22 Sep 2014 12:09:56 +0000 (14:09 +0200)]
erasure-code: isa test compare chunks with memcmp instead of strncmp

Because they may contain null characters.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: run isa tests via libtool and valgrind
Loic Dachary [Mon, 22 Sep 2014 12:08:48 +0000 (14:08 +0200)]
erasure-code: run isa tests via libtool and valgrind

Because running valgrind with no libtool does not test the binary but
the enclosing shell script.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: do not use typed tests for isa
Loic Dachary [Mon, 22 Sep 2014 12:08:07 +0000 (14:08 +0200)]
erasure-code: do not use typed tests for isa

Because there only is one type.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: isa uses per chunk alignment constraints
Loic Dachary [Mon, 22 Sep 2014 12:02:08 +0000 (14:02 +0200)]
erasure-code: isa uses per chunk alignment constraints

Copy code from the jerasure plugin to enforce alignment constraints per
chunk instead of using the total object size. It is simpler and reduces
the size of the chunks. See
https://github.com/ceph/ceph/commit/c7daaaf5e63d0bd1d444385e62611fe276f6ce29
for more information.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: [ISA] modify get_alignment function to imply a platform/compiler indepe...
Andreas Peters [Thu, 25 Sep 2014 14:48:47 +0000 (16:48 +0200)]
erasure-code: [ISA] modify get_alignment function to imply a platform/compiler independent alignment constraint of 32-byte aligned buffer addresses & length

10 years agoReplicatedPG: clean out completed trimmed objects as we go 2604/head
Samuel Just [Wed, 24 Sep 2014 20:55:47 +0000 (13:55 -0700)]
ReplicatedPG: clean out completed trimmed objects as we go

Also, explicitely maintain a max number of concurrently trimming
objects.

Fixes: 9113
Backport: dumpling, firefly, giant
Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2506 from dachary/wip-9304-unintended-implicit-ruleset
Loic Dachary [Wed, 24 Sep 2014 11:35:55 +0000 (13:35 +0200)]
Merge pull request #2506 from dachary/wip-9304-unintended-implicit-ruleset

erasure-code: pool create must not always create a ruleset

Reviewed-by: João Eduardo Luís <joao@redhat.com>
10 years agoReplicatedPG: don't move on to the next snap immediately 2525/head
Samuel Just [Tue, 23 Sep 2014 22:52:08 +0000 (15:52 -0700)]
ReplicatedPG: don't move on to the next snap immediately

If we have a bunch of trimmed snaps for which we have no
objects, we'll spin for a long time.  Instead, requeue.

Fixes: #9487
Backport: dumpling, firefly, giant
Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agoosd: initialize purged_snap on backfill start; restart backfill if change
Sage Weil [Tue, 23 Sep 2014 23:21:33 +0000 (16:21 -0700)]
osd: initialize purged_snap on backfill start; restart backfill if change

If we backfill a PG to a new OSD, we currently neglect to initialize
purged_snaps.  As a result, the first time the snaptrimmer runs it has to
churn through every deleted snap for all time, and to make matters worse
does so in one go with the PG lock held.  This leads to badness on any
cluster with a significant number of removed snaps that experiences
backfill.

Resolve this by initializing purged_snaps when we finish backfill.  The
backfill itself will clear out any stray snaps and ensure the object set
is in sync with purged_snaps.  Note that purged_snaps on the primary
that is driving backfill will not change during this period as the
snaptrimmer is not scheduled unless the PG is clean (which it won't be
during backfill).

If we by chance to interrupt backfill, go clean with other OSDs,
purge snaps, and then let this OSD rejoin, we will either restart
backfill (non-contiguous log) or the log will include the result of
the snap trim (the events that remove the trimmed snap).

Fixes: #9487
Backfill: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoPG: check full ratio again post-reservation 2602/head
Samuel Just [Tue, 23 Sep 2014 19:16:55 +0000 (12:16 -0700)]
PG: check full ratio again post-reservation

Otherwise, we might queue 30 pgs for backfill at 0.80 fullness
and then never check again filling the osd after pg 11.

Fixes: #9574
Backport: dumpling, firefly, giant
Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2561 from athanatos/wip-9293
Sage Weil [Tue, 23 Sep 2014 18:40:13 +0000 (11:40 -0700)]
Merge pull request #2561 from athanatos/wip-9293

Wip 9293

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2557 from ceph/wip-mon-fix-checks
Loic Dachary [Tue, 23 Sep 2014 15:59:02 +0000 (17:59 +0200)]
Merge pull request #2557 from ceph/wip-mon-fix-checks

ceph-mon: check fs stats just before preforking

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoceph-mon: check fs stats just before preforking 2557/head
Joao Eduardo Luis [Tue, 23 Sep 2014 13:02:55 +0000 (14:02 +0100)]
ceph-mon: check fs stats just before preforking

Otherwise statfs may fail if mkfs hasn't been run yet or if the monitor
data directory does not exist.  There are checks to account for the mon
data dir not existing and we should wait for them to clear before we go
ahead and check the fs stats.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agoMerge pull request #2551 from dachary/wip-9343-erasure-code-feature
Loic Dachary [Tue, 23 Sep 2014 11:37:27 +0000 (13:37 +0200)]
Merge pull request #2551 from dachary/wip-9343-erasure-code-feature

erasure code feature

Reviewed-by: João Eduardo Luís <joao@redhat.com>
10 years agoerasure-code: isa/lrc plugin feature 2551/head
Loic Dachary [Thu, 4 Sep 2014 15:37:45 +0000 (17:37 +0200)]
erasure-code: isa/lrc plugin feature

There are two new plugins (isa and lrc). When upgrading a cluster, there
must be a protection against the following scenario:

  * the mon are upgraded but not the osd
  * a new pool is created using plugin isa
  * the osd fail to load the isa plugin because they have not been
    upgraded

A feature bit is added : PLUGINS_V2. The monitor will only agree to
create an erasure code profile for the isa or lrc plugin if all OSDs
supports PLUGINS_V2. Once such an erasure code profile is stored in the
OSDMap, an OSD can only boot if it supports the PLUGINS_V2 feature,
which means it is able to load the isa and lrc plugins.

The monitors will only activate the PLUGINS_V2 feature if all monitors
in the quorum support it. It protects against the following scenario:

  * the leader is upgraded the peons are not upgraded
  * the leader creates a pool with plugin=lrc because all OSD have
    the PLUGINS_V2 feature
  * the leader goes down and a non upgraded peon becomes the leader
  * an old OSD tries to join the cluster
  * the new leader will let the OSD boot because it does not contain
    the logic that would excluded it
  * the old OSD will fail when required to load the plugin lrc

This is going to be needed each time new plugins are added, which is
impractical. A more generic plugin upgrade support should be added
instead, as described in http://tracker.ceph.com/issues/7291.

http://tracker.ceph.com/issues/9343 Refs: #9343

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoerasure-code: restore jerasure BlaumRoth default w 2556/head
Loic Dachary [Tue, 23 Sep 2014 09:11:59 +0000 (11:11 +0200)]
erasure-code: restore jerasure BlaumRoth default w

Changing from W=7 to W=6 by default for the BlaumRoth technique is
correct but introduces a regression. The content that was encoded with
the previous version cannot be read again. Although the prime(w+1)
constraint was not obeyed by W=7, the encoded content was useable and
should keep being readable.

The W=7 remains the default for backward compatibility and an exception
to the prime(w+1) check.

http://tracker.ceph.com/issues/9572 Fixes: #9572

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2538 from ceph/wip-mon-data-space-die
Sage Weil [Tue, 23 Sep 2014 02:16:18 +0000 (19:16 -0700)]
Merge pull request #2538 from ceph/wip-mon-data-space-die

mon: die if 'mon data' fs has critically low available disk space & fix logging issues

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agomon: Monitor: log RO commands on 'debug' level, RWX on 'info' 2538/head
Joao Eduardo Luis [Fri, 19 Sep 2014 17:04:37 +0000 (18:04 +0100)]
mon: Monitor: log RO commands on 'debug' level, RWX on 'info'

Fixes: #9455
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomon: Monitor: use MonCommand::requires_perm() when checking perms
Joao Eduardo Luis [Fri, 19 Sep 2014 17:04:03 +0000 (18:04 +0100)]
mon: Monitor: use MonCommand::requires_perm() when checking perms

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomon: Monitor.h: add 'requires_perm()' function to MonCommand struct
Joao Eduardo Luis [Fri, 19 Sep 2014 17:03:19 +0000 (18:03 +0100)]
mon: Monitor.h: add 'requires_perm()' function to MonCommand struct

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomon: Monitor: log RO admin socket commands on 'debug' level
Joao Eduardo Luis [Fri, 19 Sep 2014 16:32:51 +0000 (17:32 +0100)]
mon: Monitor: log RO admin socket commands on 'debug' level

Reduces the noise caused by read-only operations via the admin socket.
RW commands are still logged at 'info' level.

Fixes: #9455
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomon: LogMonitor: adjust debug messages output levels
Joao Eduardo Luis [Fri, 19 Sep 2014 16:32:07 +0000 (17:32 +0100)]
mon: LogMonitor: adjust debug messages output levels

Reduce the noise.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomon: LogMonitor: add debug message upon logging to a channel's file
Joao Eduardo Luis [Fri, 19 Sep 2014 16:30:59 +0000 (17:30 +0100)]
mon: LogMonitor: add debug message upon logging to a channel's file

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomon: LogMonitor: appropriately expand channel meta variables
Joao Eduardo Luis [Fri, 19 Sep 2014 16:24:49 +0000 (17:24 +0100)]
mon: LogMonitor: appropriately expand channel meta variables

We must only expand the log file's channel meta variables upon requiring
a channel's log file.  As we may have a 'default' channel that will
cover all channels, we must wait to expand channels as they come in and
do so if they haven't yet been expanded.  Expanding the 'log_file' in
place would have the unfortunate side effect of expanding, say,

default=/tmp/whatever.$channel.log

to

default=/tmp/whatever.default.log

which would not be what we wanted upon receiving a message that should
go into channel 'foo' -- assuming we specified no such channel in the
options, channel 'foo' should go into '/tmp/whatever.foo.log'.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agocommon: LogEntry: if channel is missing, default to "cluster"
Joao Eduardo Luis [Fri, 19 Sep 2014 16:16:49 +0000 (17:16 +0100)]
common: LogEntry: if channel is missing, default to "cluster"

Keeps backward compatibility when there are entities that do not know
what a channel is.  This way we ensure that those messages are logged as
they were expected to be before channels were introduced: to the cluster
log.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agoceph_mon: check available storage space for mon data dir on start
Joao Eduardo Luis [Thu, 18 Sep 2014 15:53:43 +0000 (16:53 +0100)]
ceph_mon: check available storage space for mon data dir on start

error out if available storage space is below 'mon data avail crit'

Fixes: #9502
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agomon: DataHealthService: use get_fs_stats() instead
Joao Eduardo Luis [Thu, 18 Sep 2014 15:52:34 +0000 (16:52 +0100)]
mon: DataHealthService: use get_fs_stats() instead

and relieve the DataStats struct from clutter by using
ceph_data_stats_t instead of multiple fields.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agocommon: util: add get_fs_stats() function
Joao Eduardo Luis [Thu, 18 Sep 2014 15:32:20 +0000 (16:32 +0100)]
common: util: add get_fs_stats() function

simplifies the task of obtaining available/used disk space, as well as
used available percentage.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
10 years agodocumentation: comment the CompatSet data members
Loic Dachary [Thu, 11 Sep 2014 10:09:57 +0000 (12:09 +0200)]
documentation: comment the CompatSet data members

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoosd/ReplicatedPG: do not clone or preserve snapdir on cache_evict 2550/head
Sage Weil [Sun, 21 Sep 2014 22:56:18 +0000 (15:56 -0700)]
osd/ReplicatedPG: do not clone or preserve snapdir on cache_evict

If we cache_evict a head in a cache pool, we need to prevent
make_writeable() from cloning the head and finish_ctx() from
preserving the snapdir object.

Fixes: #8629
Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoceph_test_rados_api_tier: add EvictSnap2 test case
Sage Weil [Sun, 21 Sep 2014 22:54:15 +0000 (15:54 -0700)]
ceph_test_rados_api_tier: add EvictSnap2 test case

Verify an evict doesn't create a snapdir object.  Reproduces #8629

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoos/FileJournal: do not request sync while shutting down 2549/head
Sage Weil [Sun, 21 Sep 2014 20:41:01 +0000 (13:41 -0700)]
os/FileJournal: do not request sync while shutting down

FileStore calls should_commit_now() to determine whether it should
loop and do a second sync (among other things).  During shutdown, this
can force us into a livelock: the journal is shutting down, but the
sync_entry loop never completes and repeatedly syncs because the
journal is full.  Since the journal is otherwise stopped, no expire
happens and we never become unfull, and we're stuck.

This seems to be triggered semi-reliably by the ceph_objectstore_tool
import function.

Fix by not requesting a sync while shutting down.

Fixes: #9545
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoReplicatedPG::on_removal: clear rollback info 2561/head
Samuel Just [Sun, 21 Sep 2014 17:19:43 +0000 (10:19 -0700)]
ReplicatedPG::on_removal: clear rollback info

Fixes: #9293
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agoRevert "PG::init: clear rollback info for backfill as well"
Samuel Just [Sun, 21 Sep 2014 17:10:02 +0000 (10:10 -0700)]
Revert "PG::init: clear rollback info for backfill as well"

Log here is already empty, need to rollback the log when we start
removal in on_removal().

This reverts commit 1e69ff2f3c7940d3969f5357b5aa1463015213e2.

10 years agoMerge pull request #2545 from dachary/wip-9547-python-rados-truncate
Loic Dachary [Sun, 21 Sep 2014 07:38:11 +0000 (09:38 +0200)]
Merge pull request #2545 from dachary/wip-9547-python-rados-truncate

python radio aio_read must not truncate on \000

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2546 from ceph/wip-log-msgs
Yan, Zheng [Sun, 21 Sep 2014 01:26:29 +0000 (09:26 +0800)]
Merge pull request #2546 from ceph/wip-log-msgs

mds: remove spurious logging

10 years agomds: remove spurious logging 2546/head
John Spray [Sat, 20 Sep 2014 23:55:06 +0000 (00:55 +0100)]
mds: remove spurious logging

This is from 4f3b8032d, it should not have been
included.  Harmless but noisy.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agotest: check python rados aio_read with buffers containing null 2545/head
Loic Dachary [Sat, 20 Sep 2014 10:41:30 +0000 (12:41 +0200)]
test: check python rados aio_read with buffers containing null

http://tracker.ceph.com/issues/9547 Refs: #9547

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agopybind: Fix aio_read handling of string buffer
Mohammad Salehe [Sun, 25 May 2014 06:12:11 +0000 (10:42 +0430)]
pybind: Fix aio_read handling of string buffer

Read data may contain \0, and buf.value interprerts them as string terminator.

Signed-off-by: Mohammad Salehe <salehe+dev@gmail.com>
10 years agoMerge pull request #2542 from ceph/wip-9539
Yan, Zheng [Fri, 19 Sep 2014 22:25:19 +0000 (06:25 +0800)]
Merge pull request #2542 from ceph/wip-9539

Filer: add lock to protect struct PurgeRange

10 years agoFiler: add lock to protect strcut PurgeRange 2542/head
Yan, Zheng [Fri, 19 Sep 2014 20:27:38 +0000 (04:27 +0800)]
Filer: add lock to protect strcut PurgeRange

Fix: #9539
Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoMerge pull request #2534 from dachary/wip-9537-erasure-code-assert
Sage Weil [Fri, 19 Sep 2014 21:40:05 +0000 (14:40 -0700)]
Merge pull request #2534 from dachary/wip-9537-erasure-code-assert

erasure-code: fix assert overflow

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge remote-tracking branch 'wonzhq/req-pending' into giant
Samuel Just [Fri, 19 Sep 2014 20:42:16 +0000 (13:42 -0700)]
Merge remote-tracking branch 'wonzhq/req-pending' into giant

10 years agoMerge remote-tracking branch 'somnathr/wip-optracker-optimization' into giant
Samuel Just [Fri, 19 Sep 2014 20:34:44 +0000 (13:34 -0700)]
Merge remote-tracking branch 'somnathr/wip-optracker-optimization' into giant

10 years agorgw_main.cc: add missing virtual destructor for RGWRequest
Danny Al-Gaaf [Fri, 19 Sep 2014 10:25:07 +0000 (12:25 +0200)]
rgw_main.cc: add missing virtual destructor for RGWRequest

CID 1160858 (#1 of 1): Non-virtual destructor (VIRTUAL_DTOR)
 nonvirtual_dtor: Class RGWLoadGenRequest has a destructor
 and a pointer to it is upcast to class RGWRequest which doesn't
 have a virtual destructor.

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

10 years agoos/GenericObjectMap.cc: pass big parameter by reference
Danny Al-Gaaf [Fri, 19 Sep 2014 10:06:49 +0000 (12:06 +0200)]
os/GenericObjectMap.cc: pass big parameter by reference

CID 1188142 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
 pass_by_value: Passing parameter header of type
 GenericObjectMap::_Header (size 176 bytes) by value.

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

10 years agomds/Beacon.*: fix UNINIT_CTOR cases
Danny Al-Gaaf [Wed, 17 Sep 2014 17:31:13 +0000 (19:31 +0200)]
mds/Beacon.*: fix UNINIT_CTOR cases

CID 1238905 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
 uninit_member: Non-static class member want_state is not initialized
  in this constructor nor in any functions that it calls.
 uninit_member: Non-static class member last_send 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 ff6148324ad0957f74e8b4b49c1a1e8df9fb94e4)

10 years agoErasureCodeLrc.h: fix UNINIT_CTOR
Danny Al-Gaaf [Wed, 17 Sep 2014 17:28:11 +0000 (19:28 +0200)]
ErasureCodeLrc.h: fix UNINIT_CTOR

Fix Coverity issue, preinit with 0:

uninit_member: Non-static class member chunk_count 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 ea02dc37dc92613d2d35b9572e72c3b9ab6bbb69)

10 years agoErasureCodeLrc.h: fix data_chunk_count UNINIT_CTOR
Danny Al-Gaaf [Wed, 17 Sep 2014 16:56:00 +0000 (18:56 +0200)]
ErasureCodeLrc.h: fix data_chunk_count UNINIT_CTOR

CID 1238903 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
 uninit_member: Non-static class member data_chunk_count 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 2bb35bba995af1983a81669711fda7855e1ce532)

10 years agoLogEntry.h: init LogEntry::seq with 0
Danny Al-Gaaf [Wed, 17 Sep 2014 07:35:15 +0000 (09:35 +0200)]
LogEntry.h: init LogEntry::seq with 0

CID 1238904 (#1 of 1): Uninitialized scalar variable (UNINIT)
 uninit_use_in_call: Using uninitialized value e.seq when calling
 log_to_syslog.

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

10 years agoMerge pull request #2539 from ceph/wip-9529
Sage Weil [Fri, 19 Sep 2014 18:13:48 +0000 (11:13 -0700)]
Merge pull request #2539 from ceph/wip-9529

Wip 9529

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agorgw: calculate hash after writing data 2539/head
Yehuda Sadeh [Fri, 19 Sep 2014 03:53:10 +0000 (20:53 -0700)]
rgw: calculate hash after writing data

Since data is written asynchronously, we should do the hash calculation
while it's pending.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>