]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
10 years agoFileStore:Round offset of fiemap down aligned with CEPH_PAGE_SIZE. 2591/head
Jianpeng Ma [Mon, 13 Oct 2014 05:33:38 +0000 (13:33 +0800)]
FileStore:Round offset of fiemap down aligned with CEPH_PAGE_SIZE.

There is a bug on xfs about fiemap. If offset unsigned, the result of
fiemap will leak some data.
Kernel commit eedf32bfcace7d8e20cc66757d74fc68f3439ff7 fix this bug.
To avoid this bug on kernel which don't apply this commit, in ceph we
make the offset down aligned with CEPH_PAGE_SIZE.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
10 years agoos/FileStore: Because do_fiemap will do fsync, so don't do fsync()
Jianpeng Ma [Thu, 9 Oct 2014 07:16:33 +0000 (15:16 +0800)]
os/FileStore: Because do_fiemap will do fsync, so don't do fsync()
before calling do_fiemap.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
10 years agoos/FileStore: using FIEMAP_FLAGS_SYNC instead of fsync() before call
Jianpeng Ma [Mon, 29 Sep 2014 03:00:25 +0000 (11:00 +0800)]
os/FileStore: using FIEMAP_FLAGS_SYNC instead of fsync() before call
fiemap.

When call fiemap, it need sync the file. Now it used fsync() to achieve
this. But for fiemap, there is a flag FIEMAP_FLAGS_SYNC which do the
same thing like fsync().

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
10 years agoMerge pull request #2580 from cernceph/wip-scientific
Sage Weil [Sat, 27 Sep 2014 00:49:59 +0000 (17:49 -0700)]
Merge pull request #2580 from cernceph/wip-scientific

ceph-disk: add Scientific Linux as a Redhat clone

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2568 from johnugeorge/wip-9492-crush
Loic Dachary [Fri, 26 Sep 2014 22:25:48 +0000 (00:25 +0200)]
Merge pull request #2568 from johnugeorge/wip-9492-crush

Crush: Ensuring at most num-rep osds are selected for any rule

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoCrush: Ensuring at most num-rep osds are selected 2568/head
Johnu George [Wed, 24 Sep 2014 16:32:50 +0000 (09:32 -0700)]
Crush: Ensuring at most num-rep osds are selected

Crush temporary buffers are allocated as per replica size configured
by the user.When there are more final osds (to be selected as per
rule) than the replicas, buffer overlaps and it causes crash.Now, it
ensures that at most num-rep osds are selected even if more number of
osds are allowed by the rule.

Fixes: #9492
Signed-off-by: Johnu George <johnugeo@cisco.com>
10 years agoceph-disk: add Scientific Linux as a Redhat clone 2580/head
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>
10 years agoMerge pull request #2572 from ceph/wip-9562
John Spray [Fri, 26 Sep 2014 10:57:53 +0000 (11:57 +0100)]
Merge pull request #2572 from ceph/wip-9562

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

Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Yan, Zheng <ukernel@gmail.com>
10 years agoMerge pull request #2575 from ceph/wip-zafman-cleanup 2566/head
Sage Weil [Fri, 26 Sep 2014 00:02:19 +0000 (17:02 -0700)]
Merge pull request #2575 from ceph/wip-zafman-cleanup

osd: Remove unused PG functions queue_notify(), queue_info(), queue_log(...

Reviewed-by: Loic Dachary <loic@dachary.org>
10 years agoMerge pull request #2524 from ceph/wip-5768
Josh Durgin [Thu, 25 Sep 2014 22:19:43 +0000 (15:19 -0700)]
Merge pull request #2524 from ceph/wip-5768

rbd-fuse: Fix memory leak in enumerate_images

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
10 years agodoc/release-notes: v0.67.11
Sage Weil [Thu, 25 Sep 2014 14:17:56 +0000 (07:17 -0700)]
doc/release-notes: v0.67.11

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2571 from dachary/wip-9579-isa-documentation
Loic Dachary [Thu, 25 Sep 2014 13:37:54 +0000 (15:37 +0200)]
Merge pull request #2571 from dachary/wip-9579-isa-documentation

documentation: erasure-code plugin isa does not require k/m

Reviewed-by: Andreas Peters <andreas.joachim.peters@cern.ch>
10 years agoosdc/Filer: drop probe/purge locks before calling objecter 2572/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>
10 years agodocumentation: erasure-code plugin isa does not require k/m 2571/head
Loic Dachary [Thu, 25 Sep 2014 09:56:32 +0000 (11:56 +0200)]
documentation: erasure-code plugin isa does not require k/m

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoosd: Remove unused PG functions queue_notify(), queue_info(), queue_log() 2575/head
David Zafman [Fri, 19 Sep 2014 22:12:55 +0000 (15:12 -0700)]
osd: Remove unused PG functions queue_notify(), queue_info(), queue_log()

Signed-off-by: David Zafman <dzafman@redhat.com>
10 years agoMerge remote-tracking branch 'origin/giant'
Josh Durgin [Wed, 24 Sep 2014 22:27:02 +0000 (15:27 -0700)]
Merge remote-tracking branch 'origin/giant'

10 years agoMerge pull request #2567 from dachary/wip-6697-strncmp-vs-memcmp
Sage Weil [Wed, 24 Sep 2014 14:30:37 +0000 (07:30 -0700)]
Merge pull request #2567 from dachary/wip-6697-strncmp-vs-memcmp

tests: use memcmp to compare binary buffers

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agotests: use memcmp to compare binary buffers 2567/head
Loic Dachary [Wed, 24 Sep 2014 14:00:08 +0000 (16:00 +0200)]
tests: use memcmp to compare binary buffers

instead of strncmp because it will stop at the first \0

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
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 remote-tracking branch 'origin/giant'
John Spray [Wed, 24 Sep 2014 10:40:52 +0000 (11:40 +0100)]
Merge remote-tracking branch 'origin/giant'

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 #2414 from dachary/wip-cephtool-test
Loic Dachary [Tue, 23 Sep 2014 17:01:35 +0000 (19:01 +0200)]
Merge pull request #2414 from dachary/wip-cephtool-test

tests: make qa/workunits/cephtool/test.sh more robust

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
10 years agoMerge pull request #2417 from dachary/wip-placement-group
John Wilkins [Tue, 23 Sep 2014 16:30:01 +0000 (09:30 -0700)]
Merge pull request #2417 from dachary/wip-placement-group

doc: revise placement group number guide.

Reviewed-by: John Wilkins <jowilkin@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 agodocumentation: revise placement group number guide 2417/head
Loic Dachary [Sun, 7 Sep 2014 19:41:57 +0000 (21:41 +0200)]
documentation: revise placement group number guide

When a cluster has few OSDs (less than 50) propose a preselection of
values: as long as the number of placement groups is not too small nor
too large, it won't make much of a difference anyway.

Users of small clusters tend to blindly apply the (OSD*100)/(pool size)
formula and worry about chosing a wrong value because they do not
understand the tradeoffs. The preselection will hopefully save them from
this uncertainty.

Add an explanation of how placement groups relate to OSDs, CRUSH and
pools to help understand the tradeoffs. Explain the
tradeoffs (durability, distribution and resource usages) with examples.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Reviewed-by: Gerben Meijer <infernix@gmail.com>
Reviewed-by: Laurent Guerby <laurent@guerby.net>
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 #2547 from wkennington/master
Loic Dachary [Sun, 21 Sep 2014 11:22:08 +0000 (13:22 +0200)]
Merge pull request #2547 from wkennington/master

Cleanup boost optionals for boost 1.56

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoosd: Cleanup boost optionals 2547/head
William A. Kennington III [Sun, 21 Sep 2014 05:52:31 +0000 (22:52 -0700)]
osd: Cleanup boost optionals

Signed-off-by: William A. Kennington III <william@wkennington.com>
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 #2431 from ceph/wip-6613
Yan, Zheng [Sat, 20 Sep 2014 03:51:36 +0000 (11:51 +0800)]
Merge pull request #2431 from ceph/wip-6613

Wip 9178

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 #2529 from dachary/wip-doc-troubleshooting
Sage Weil [Fri, 19 Sep 2014 21:40:47 +0000 (14:40 -0700)]
Merge pull request #2529 from dachary/wip-doc-troubleshooting

documentation: fix bugous osd stop/start example

10 years agoMerge pull request #2532 from dachary/wip-doc-tiering
Sage Weil [Fri, 19 Sep 2014 21:40:24 +0000 (14:40 -0700)]
Merge pull request #2532 from dachary/wip-doc-tiering

documentation: tiering typo

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 'gh/wip-9301'
Sage Weil [Fri, 19 Sep 2014 21:27:19 +0000 (14:27 -0700)]
Merge remote-tracking branch 'gh/wip-9301'

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
10 years agorbd: Use a rolling average to compute RBD write throughput
Jason Dillaman [Sun, 7 Sep 2014 04:50:55 +0000 (00:50 -0400)]
rbd: Use a rolling average to compute RBD write throughput

Replace the cumulative average with a rolling average
to better expose variations within IOS/sec and bytes/sec.

Fixes: #9374
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.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 #2537 from ceph/wip-coverity-20140919
Sage Weil [Fri, 19 Sep 2014 18:34:30 +0000 (11:34 -0700)]
Merge pull request #2537 from ceph/wip-coverity-20140919

Various fixes for Coverity issues

Reviewed-by: Sage Weil <sage@redhat.com>
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 #2526 from ceph/wip-6228
Sage Weil [Fri, 19 Sep 2014 16:47:21 +0000 (09:47 -0700)]
Merge pull request #2526 from ceph/wip-6228

common: Add cctid meta variable

Backport: giant, firefly
Reviewed-by: Sage Weil <sage@redhat.com>
10 years agorgw_main.cc: add missing virtual destructor for RGWRequest 2537/head
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>
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>
10 years agocommon/buffer.cc: catch exception by reference
Danny Al-Gaaf [Fri, 19 Sep 2014 09:47:43 +0000 (11:47 +0200)]
common/buffer.cc: catch exception by reference

CID 1135926 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
pass_by_value: Catching an exception object of size 264 bytes by value.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agotest/kv_store_bench.cc: fix coverity REVERSE_INULL
Danny Al-Gaaf [Thu, 18 Sep 2014 11:28:47 +0000 (13:28 +0200)]
test/kv_store_bench.cc: fix coverity REVERSE_INULL

CID 1021214 (#1 of 1): Dereference before null check (REVERSE_INULL)
 check_after_deref: Null-checking cb_args suggests that it may be
 null, but it has already been dereferenced on all paths leading to
 the check.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agotest/libradosstriper/striping.cc: remove dead initialization
Danny Al-Gaaf [Thu, 18 Sep 2014 09:39:18 +0000 (11:39 +0200)]
test/libradosstriper/striping.cc: remove dead initialization

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
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>
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>
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>
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>
10 years agotest/librados/aio.cc: close resource leak
Danny Al-Gaaf [Tue, 16 Sep 2014 12:51:30 +0000 (14:51 +0200)]
test/librados/aio.cc: close resource leak

Release my_completion4.

CID 1219581 (#1 of 1): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable my_completion4 going out of scope leaks
 the storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
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 agoMerge pull request #2536 from dachary/wip-doc-reweight
Loic Dachary [Fri, 19 Sep 2014 15:30:02 +0000 (17:30 +0200)]
Merge pull request #2536 from dachary/wip-doc-reweight

documentation: explain ceph osd reweight vs crush weight

Reviewed-by: Laurent Guerby <laurent@guerby.net>
10 years agodocumentation: explain ceph osd reweight vs crush weight 2536/head
Loic Dachary [Fri, 19 Sep 2014 15:19:41 +0000 (17:19 +0200)]
documentation: explain ceph osd reweight vs crush weight

Using the wording from Gregory Farnum at
http://lists.ceph.com/pipermail/ceph-users-ceph.com/2014-June/040961.html

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
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 agodocumentation: tiering typo 2532/head
Loic Dachary [Fri, 19 Sep 2014 13:05:27 +0000 (15:05 +0200)]
documentation: tiering typo

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 agotests: check osd health in cephtool/test.sh 2414/head
Loic Dachary [Sat, 6 Sep 2014 17:52:21 +0000 (19:52 +0200)]
tests: check osd health in cephtool/test.sh

Add a trivial osd health test at the beginning of each group of
tests. When facing an intermittent failure, it is difficult to diagnose
if the cluster appears to be missing an OSD but there is no indication
as to when the OSDs were last up.

The tests are now only run after all OSDs are up.

These checks can be disabled with --no-sanity-check to allow running
some tests that have less requirements than running all the tests.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agotests: qa/workunits/cephtool/test.sh ! and -e
Loic Dachary [Sat, 6 Sep 2014 16:58:08 +0000 (18:58 +0200)]
tests: qa/workunits/cephtool/test.sh ! and -e

From the bash man page:

   set -e exit immediately ... The shell does not exit ... if the
   command's return value is being inverted with !

Add an explicit exit 1 where appropriate.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agodocumentation: fix bugous osd stop/start example 2529/head
Loic Dachary [Fri, 19 Sep 2014 08:28:55 +0000 (10:28 +0200)]
documentation: fix bugous osd stop/start example

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agocommon: Add cctid meta variable 2526/head
Adam Crume [Thu, 18 Sep 2014 23:57:27 +0000 (16:57 -0700)]
common: Add cctid meta variable

Fixes: #6228
Signed-off-by: Adam Crume <adamcrume@gmail.com>
10 years agoMerge pull request #2514 from ceph/wip-acl-test
Gregory Farnum [Thu, 18 Sep 2014 22:01:15 +0000 (15:01 -0700)]
Merge pull request #2514 from ceph/wip-acl-test

qa/workunits/fs/misc: Add a workunit for ACL

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agomon: re-bootstrap if we get probed by a mon that is way ahead
Sage Weil [Thu, 18 Sep 2014 21:23:36 +0000 (14:23 -0700)]
mon: re-bootstrap if we get probed by a mon that is way ahead

During bootstrap we verify that our paxos commits overlap with the other
mons we will form a quorum with.  If they do not, we do a sync.

However, it is possible we pass those checks, then fail to join a quorum
before the quorum moves ahead in time such that we no longer overlap.
Currently nothing kicks up back into a probing state to discover we need
to sync... we will just keep trying to call or join an election instead.

Fix this by jumping back to bootstrap if we get a probe that is ahead of
us.  Only do this from non probe or sync states as these will be common;
it is only the active and electing states that matter (and probably just
electing!).

Fixes: #9301
Backport: giant, firefly
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon/Paxos: fix off-by-one in last_ vs first_committed check
Sage Weil [Thu, 18 Sep 2014 21:11:24 +0000 (14:11 -0700)]
mon/Paxos: fix off-by-one in last_ vs first_committed check

peon last_committed + 1 == leader first_committed is okay.  Note that the
other check (where I clean up whitespace) gets this correct.

Fixes: #9301 (partly)
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agorbd-fuse: Fix memory leak in enumerate_images 2524/head
Adam Crume [Thu, 18 Sep 2014 21:03:26 +0000 (14:03 -0700)]
rbd-fuse: Fix memory leak in enumerate_images

Fixes: #5768
Signed-off-by: Adam Crume <adamcrume@gmail.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>