]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
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 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 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 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 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 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>
10 years agocrypto: don't hash zero sized buffer
Yehuda Sadeh [Fri, 19 Sep 2014 03:51:02 +0000 (20:51 -0700)]
crypto: don't hash zero sized buffer

libnss returns an error and we assert in that case.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoinclude/util.h: prevent multiple inclusion of header
Joao Eduardo Luis [Thu, 18 Sep 2014 15:25:44 +0000 (16:25 +0100)]
include/util.h: prevent multiple inclusion of header

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
10 years agoMerge pull request #2517 from athanatos/wip-9326
Samuel Just [Fri, 19 Sep 2014 17:31:13 +0000 (10:31 -0700)]
Merge pull request #2517 from athanatos/wip-9326

DBObjectMap: restructure map_header_in_use locking

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2533 from dachary/wip-9538-format-plain
John Spray [Fri, 19 Sep 2014 15:59:01 +0000 (16:59 +0100)]
Merge pull request #2533 from dachary/wip-9538-format-plain

mon: osd find / metadata --format plain fallback

Reviewed-by: John Spray <john.spray@redhat.com>
10 years agoerasure-code: fix assert overflow 2534/head
Loic Dachary [Fri, 19 Sep 2014 14:13:53 +0000 (16:13 +0200)]
erasure-code: fix assert overflow

If the file size does not fit in 32 bits the (unsigned) cast will
overflow. Cast to uint64_t which is the type of the value returned by
get_total_chunk_size.

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agomon: osd find / metadata --format plain fallback 2533/head
Loic Dachary [Fri, 19 Sep 2014 13:28:36 +0000 (15:28 +0200)]
mon: osd find / metadata --format plain fallback

ceph --format plain osd find 1 (and metadata) are not implemented and
must fallback to the default (json-pretty).

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2505 from dachary/wip-8914-unlink-fdcache
Loic Dachary [Fri, 19 Sep 2014 11:43:09 +0000 (13:43 +0200)]
Merge pull request #2505 from dachary/wip-8914-unlink-fdcache

os: FileStore::lfn_unlink always clears FDCache

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2521 from athanatos/wip-9453
Sage Weil [Thu, 18 Sep 2014 19:55:49 +0000 (12:55 -0700)]
Merge pull request #2521 from athanatos/wip-9453

osd_types: fix pg_log_t tail dump

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2519 from athanatos/wip-9482
Sage Weil [Thu, 18 Sep 2014 19:55:09 +0000 (12:55 -0700)]
Merge pull request #2519 from athanatos/wip-9482

PG::find_best_info: let history.last_epoch_started provide a lower bound

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2520 from athanatos/wip-9497
Sage Weil [Thu, 18 Sep 2014 18:42:06 +0000 (11:42 -0700)]
Merge pull request #2520 from athanatos/wip-9497

PG::choose_acting: let the pg go down if acting is smaller than min_size

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2518 from athanatos/wip-9481
Sage Weil [Thu, 18 Sep 2014 18:02:04 +0000 (11:02 -0700)]
Merge pull request #2518 from athanatos/wip-9481

PGLog::claim_log_and_clear_rollback_info: fix rollback_info_trimmed_to

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2522 from athanatos/wip-8315
Sage Weil [Thu, 18 Sep 2014 18:00:45 +0000 (11:00 -0700)]
Merge pull request #2522 from athanatos/wip-8315

ReplicatedPG: cancel cb on blacklisted watcher

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agomds: fix not journaling client metadata
John Spray [Thu, 18 Sep 2014 09:29:06 +0000 (10:29 +0100)]
mds: fix not journaling client metadata

Previously the code was there for storing in
the SessionMap table, but not for the ESession
logevent.

Fixes: #9518
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 1395275e0f4d12631b1e4074598a7682810f00f9)

10 years agoMerge pull request #2498 from ceph/wip-objecter-cancel
John Spray [Wed, 17 Sep 2014 18:07:22 +0000 (19:07 +0100)]
Merge pull request #2498 from ceph/wip-objecter-cancel

osdc/Objecter: cancel timeout before clearing op->session

Reviewed-by: John Spray <john.spray@redhat.com>
10 years agoMerge pull request #2513 from ceph/wip-decode-dump
Gregory Farnum [Wed, 17 Sep 2014 17:15:03 +0000 (10:15 -0700)]
Merge pull request #2513 from ceph/wip-decode-dump

msg: dump messages we can' decode at a low devel level

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agomsg: hexdump bad messages at debug level 1 (not 30) 2513/head
Sage Weil [Wed, 17 Sep 2014 16:53:36 +0000 (09:53 -0700)]
msg: hexdump bad messages at debug level 1 (not 30)

These are rare, and when they do happen, we want to see them in the
logs.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomsg: hexdump messages we can't decode at configurable debug level
Sage Weil [Wed, 17 Sep 2014 16:52:54 +0000 (09:52 -0700)]
msg: hexdump messages we can't decode at configurable debug level

We had this hard-coded to 30.  Make it tunable.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2512 from dachary/wip-9490-crushtool-num-rep
John Spray [Wed, 17 Sep 2014 12:59:33 +0000 (13:59 +0100)]
Merge pull request #2512 from dachary/wip-9490-crushtool-num-rep

Revert "crushtool: safeguard for missing --num-rep when --test"

Reviewed-by: John Spray <john.spray@redhat.com>
10 years agoRevert "crushtool: safeguard for missing --num-rep when --test" 2512/head
Loic Dachary [Wed, 17 Sep 2014 12:56:10 +0000 (14:56 +0200)]
Revert "crushtool: safeguard for missing --num-rep when --test"

This reverts commit 10b8966c8da38f8ae5ac7dbb2e16a5e45e502ba3.

10 years agoMerge pull request #2496 from ceph/wip-9189
John Spray [Wed, 17 Sep 2014 12:47:27 +0000 (13:47 +0100)]
Merge pull request #2496 from ceph/wip-9189

#9375 and #9189 - add client metadata and improve health messages

Reviewed-by: Greg Farnum greg@inktank.com
10 years agomds: use new Session::human_name in health msgs 2496/head
John Spray [Wed, 10 Sep 2014 22:28:52 +0000 (23:28 +0100)]
mds: use new Session::human_name in health msgs

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: implement const SessionMap::get_session
John Spray [Wed, 10 Sep 2014 22:28:30 +0000 (23:28 +0100)]
mds: implement const SessionMap::get_session

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: generate friendly name for client sessions
John Spray [Wed, 10 Sep 2014 13:44:36 +0000 (14:44 +0100)]
mds: generate friendly name for client sessions

...from the client metadata, for use in health messages.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoceph_fuse: include mount point in client metadata
John Spray [Tue, 9 Sep 2014 16:12:02 +0000 (17:12 +0100)]
ceph_fuse: include mount point in client metadata

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoclient: send metadata in session open
John Spray [Mon, 8 Sep 2014 22:44:23 +0000 (23:44 +0100)]
client: send metadata in session open

Populated with hostname and entity_id by
default, with interface for outer layers
like ceph_fuse, libcephfs to inject their
own metadata.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoceph_fuse: refactor init to make mount_point accessible
John Spray [Mon, 8 Sep 2014 22:43:20 +0000 (23:43 +0100)]
ceph_fuse: refactor init to make mount_point accessible

...so that we can read out the mount point between init
and start() in order to feed it to Client before it connects
to the MDS.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: include client metadata in `session ls`
John Spray [Tue, 9 Sep 2014 15:43:15 +0000 (16:43 +0100)]
mds: include client metadata in `session ls`

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: store client metadata on Session
John Spray [Mon, 8 Sep 2014 22:40:34 +0000 (23:40 +0100)]
mds: store client metadata on Session

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomessages: add cephfs client metadata to MClientSession
John Spray [Mon, 8 Sep 2014 22:35:38 +0000 (23:35 +0100)]
messages: add cephfs client metadata to MClientSession

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: collapse numerous client warnings into one
John Spray [Mon, 8 Sep 2014 15:05:17 +0000 (16:05 +0100)]
mds: collapse numerous client warnings into one

...to avoid sending O(N_clients) sized beacons.

Fixes: #9375
Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoMerge pull request #2508 from dachary/wip-9490-crushtool-num-rep
Loic Dachary [Wed, 17 Sep 2014 07:06:44 +0000 (09:06 +0200)]
Merge pull request #2508 from dachary/wip-9490-crushtool-num-rep

crushtool: safeguard for missing --num-rep when --test

Reviewed-by: Johnu George <johnugeorge109@gmail.com>
10 years agoPGLog::claim_log_and_clear_rollback_info: fix rollback_info_trimmed_to 2518/head
Samuel Just [Mon, 15 Sep 2014 22:44:11 +0000 (15:44 -0700)]
PGLog::claim_log_and_clear_rollback_info: fix rollback_info_trimmed_to

We have been setting it to the old head value.  This is usually
harmless since the new head will virtually always be ahead of the
old head for claim_log_and_clear_rollback_info, but can cause trouble
in some edge cases.

Fixes: #9481
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agoPG::find_best_info: let history.last_epoch_started provide a lower bound 2519/head
Samuel Just [Mon, 15 Sep 2014 23:53:21 +0000 (16:53 -0700)]
PG::find_best_info: let history.last_epoch_started provide a lower bound

If we find a info.history.last_epoch_started above any
info.last_epoch_started, we must be missing updates and
min_last_update_acceptable should provisionally be max().

Fixes: #9482
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agoPG::choose_acting: let the pg go down if acting is smaller than min_size 2520/head
Samuel Just [Wed, 17 Sep 2014 03:36:51 +0000 (20:36 -0700)]
PG::choose_acting: let the pg go down if acting is smaller than min_size

Even if the backfill peer would bring us up to min_size, we can't go
active since build_prior will not consider the interval maybe_went_rw.

Fixes: #9497
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2507 from ceph/wip-9435
Gregory Farnum [Wed, 17 Sep 2014 00:37:26 +0000 (17:37 -0700)]
Merge pull request #2507 from ceph/wip-9435

#9435 - enforce rules for using EC/tiered pools with CephFS

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agomon: forbid tier changes when in use by FS 2507/head
John Spray [Tue, 16 Sep 2014 09:49:15 +0000 (10:49 +0100)]
mon: forbid tier changes when in use by FS

* Removing tiers from a base pool in use by CephFS is forbidden.
* Using CephFS pools as tiers is forbidden.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomon: prevent cache pools being used CephFS
John Spray [Mon, 15 Sep 2014 19:47:18 +0000 (20:47 +0100)]
mon: prevent cache pools being used CephFS

Fixes two things:
 * EC pools are now permissible if they have a cache overlay
 * Pools are not permissible if they are a cache tier.

Fixes: #9435
Signed-off-by: John Spray <john.spray@redhat.com>
10 years agocrushtool: safeguard for missing --num-rep when --test 2508/head
Loic Dachary [Tue, 16 Sep 2014 18:29:12 +0000 (20:29 +0200)]
crushtool: safeguard for missing --num-rep when --test

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2497 from ceph/wip-xfs-inode64
Loic Dachary [Tue, 16 Sep 2014 13:12:24 +0000 (15:12 +0200)]
Merge pull request #2497 from ceph/wip-xfs-inode64

ceph-disk: mount xfs with inode64 by default

Reviewed-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agomon: pool create must not always create a ruleset 2506/head
Loic Dachary [Tue, 16 Sep 2014 09:32:26 +0000 (11:32 +0200)]
mon: pool create must not always create a ruleset

The implicit creation of a ruleset when creating a pool is convenient
when nothing is specified. However, if the caller sets a ruleset name,
it should not implicitly create it but return ENOENT instead. Silently
creating a ruleset when there is a typo in the ruleset name is
confusing.

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agomon: add the get_crush_ruleset helper
Loic Dachary [Tue, 16 Sep 2014 09:27:54 +0000 (11:27 +0200)]
mon: add the get_crush_ruleset helper

By factoring a code snippet from prepare_pool_crush_ruleset with no
modification.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agotests: flush logs before grepping them
Loic Dachary [Sat, 6 Sep 2014 09:43:10 +0000 (11:43 +0200)]
tests: flush logs before grepping them

Otherwise the test races with the daemon writing the logs and can
sometime fail.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoos: FileStore::lfn_unlink always clears FDCache 2505/head
Loic Dachary [Wed, 3 Sep 2014 12:19:40 +0000 (14:19 +0200)]
os: FileStore::lfn_unlink always clears FDCache

Otherwise the FDCache will keep a file descriptor to a file that was
removed from the file system. This may create various type of errors
because the OSD checking the FDCache will assume the file that contains
information for an object exists although it does not. For instance in
the following:

      * rados put object file
      * rm file from the primary
      * repair the pg to which the object is mapped

if the FDCache is not cleared, repair will incorrectly pull a copy from
a replica and write it to the now unlinked file. Later on, it will
assume the file exists on the primary and only be partially correct :
the data can still be accessed via the file descriptor but any operation
using the path name will fail.

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agotests: set the failure domain to OSD by default
Loic Dachary [Wed, 3 Sep 2014 12:18:48 +0000 (14:18 +0200)]
tests: set the failure domain to OSD by default

So that tests do not need to do it to be able to use the default rbd
pool to store objects.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agotests: add get_osds() and get_pg() helpers
Loic Dachary [Wed, 3 Sep 2014 12:17:17 +0000 (14:17 +0200)]
tests: add get_osds() and get_pg() helpers

To get the ordered list of OSD to which an object is mapped and the name
of the corresponding PG.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2499 from ceph/wip-9219-giant
Sage Weil [Tue, 16 Sep 2014 00:40:28 +0000 (17:40 -0700)]
Merge pull request #2499 from ceph/wip-9219-giant

wip-9219: subscribe to the newest osdmap when reconnecting to a monitor

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoosd: subscribe to the newest osdmap when reconnecting to a monitor 2499/head
Greg Farnum [Tue, 16 Sep 2014 00:07:41 +0000 (17:07 -0700)]
osd: subscribe to the newest osdmap when reconnecting to a monitor

This is mostly relevant in testing clusters, but it ensures that an OSD
disconnecting from the monitor at the wrong time will still see any recent
map updates and prevent accidental loss of map injection into the OSD cluster.
Fixes: #9219
Signed-off-by: Greg Farnum <greg@inktank.com>
10 years agoosdc/Objecter: fix command op cancellation race 2498/head
Sage Weil [Mon, 15 Sep 2014 23:45:19 +0000 (16:45 -0700)]
osdc/Objecter: fix command op cancellation race

Cancel the command op timeout event before we clear out the op from the
session struct.  This isn't strictly necessary because command_op_cancel
will "gracefully" handle the case where the tid is no longer present, but
this avoids that noise and is cleaner.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoosdc/Objecter: cancel timeout before clearing op->session
Sage Weil [Mon, 15 Sep 2014 23:40:39 +0000 (16:40 -0700)]
osdc/Objecter: cancel timeout before clearing op->session

The C_CancelOp path assumes op->session != NULL.  Cancel that op before
we clear it.  This fixes a crash like

#0  pthread_rwlock_wrlock () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:39
#1  0x00007fc82690a4b1 in RWLock::get_write (this=0x18, lockdep=<optimized out>) at ./common/RWLock.h:88
#2  0x00007fc8268f4d79 in Objecter::op_cancel (this=0x1f61830, s=0x0, tid=0, r=-110) at osdc/Objecter.cc:1850
#3  0x00007fc8268ba449 in Context::complete (this=0x1f68c20, r=<optimized out>) at ./include/Context.h:64
#4  0x00007fc8269769aa in RWTimer::timer_thread (this=0x1f61950) at common/Timer.cc:268
#5  0x00007fc82697a85d in RWTimerThread::entry (this=<optimized out>) at common/Timer.cc:200
#6  0x00007fc82651ce9a in start_thread (arg=0x7fc7e3fff700) at pthread_create.c:308

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoceph-disk: mount xfs with inode64 by default 2497/head
Sage Weil [Mon, 15 Sep 2014 22:29:08 +0000 (15:29 -0700)]
ceph-disk: mount xfs with inode64 by default

We did this forever ago with mkcephfs, but ceph-disk didn't.  Note that for
modern XFS this option is obsolete, but for older kernels it was not the
default.

Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2492 from ceph/wip-9284
John Spray [Mon, 15 Sep 2014 22:23:46 +0000 (23:23 +0100)]
Merge pull request #2492 from ceph/wip-9284

#9284 - fix client RECALL handling and add health metrics

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agoMerge pull request #2476 from ceph/wip-9307
Sage Weil [Mon, 15 Sep 2014 22:19:07 +0000 (15:19 -0700)]
Merge pull request #2476 from ceph/wip-9307

rgw: push hash calculater deeper

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2493 from ceph/wip-rbd-objectcacher-hang
Josh Durgin [Mon, 15 Sep 2014 20:25:33 +0000 (13:25 -0700)]
Merge pull request #2493 from ceph/wip-rbd-objectcacher-hang

rbd: ObjectCacher reads can hang when reading sparse files

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>