]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
10 years agodoc: updates on Backfill Reservation 2736/head
Loic Dachary [Thu, 16 Oct 2014 23:23:17 +0000 (16:23 -0700)]
doc: updates on Backfill Reservation

The logic was changed by:

0985ae71bce32c4d9e0e9e9f68bed38eb3c26897
osd: prioritize backfill based on *how* degraded

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2628 from ceph/wip-client-flock
Gregory Farnum [Thu, 16 Oct 2014 13:57:34 +0000 (06:57 -0700)]
Merge pull request #2628 from ceph/wip-client-flock

Wip client flock

Add support for file locking to the userspace client, and improve blocked-lock cancellation so that it doesn't remove locks that succeeded when racing.

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agoMerge pull request #2732 from dachary/wip-9526-crush-rename-bucket
Loic Dachary [Thu, 16 Oct 2014 03:22:02 +0000 (20:22 -0700)]
Merge pull request #2732 from dachary/wip-9526-crush-rename-bucket

ceph osd crush rename-bucket srcname dstname

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2731 from dachary/wip-9790-display-auid
Loic Dachary [Thu, 16 Oct 2014 03:15:29 +0000 (20:15 -0700)]
Merge pull request #2731 from dachary/wip-9790-display-auid

auth: add display of auid to auth get / list when it is not the default

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agomon: unit tests for osd crush rename-bucket 2732/head
Loic Dachary [Thu, 16 Oct 2014 00:21:44 +0000 (17:21 -0700)]
mon: unit tests for osd crush rename-bucket

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agomon: add the osd crush rename-bucket command
Loic Dachary [Thu, 16 Oct 2014 00:14:53 +0000 (17:14 -0700)]
mon: add the osd crush rename-bucket command

The synopsis is:

 osd crush rename-bucket name1 name2

It is made idempotent by interpreting -EALREADY as returned by
CrushWrapper::rename_bucket return as success.

The crush_rename_bucket method first checks for errors with
CrushWrapper::can_rename_bucket if there is no pending crush so that it
can return early and avoid the creation of a pending crush map.

If renaming is possible, CrushWrapper::rename_bucket is called on the
pending crush map (and creates it indirectly if it does not already
exists).

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agocrush: unit tests for CrushWrapper rename item/bucket methods
Loic Dachary [Thu, 16 Oct 2014 00:11:46 +0000 (17:11 -0700)]
crush: unit tests for CrushWrapper rename item/bucket methods

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agocrush: add CrushWrapper::rename_bucket and can_rename_bucket
Loic Dachary [Thu, 16 Oct 2014 00:08:13 +0000 (17:08 -0700)]
crush: add CrushWrapper::rename_bucket and can_rename_bucket

Rename a bucket and return -ENOTDIR if trying to rename an item. The
behavior is otherwise the same as rename_item and can_rename_item.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agocrush: add CrushWrapper::rename_item and can_rename_item
Loic Dachary [Thu, 16 Oct 2014 00:06:12 +0000 (17:06 -0700)]
crush: add CrushWrapper::rename_item and can_rename_item

The can_rename_item is a const method checking if renaming an item could
succeed. If not it returns a unique -errno code and a human readable
message message.

Trying to rename a non existent item into an existent item returns
-EALREADY which can be treated as success if renaming is to be
idempotent.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agocrush: improve constness of CrushWrapper methods
Loic Dachary [Thu, 16 Oct 2014 00:02:58 +0000 (17:02 -0700)]
crush: improve constness of CrushWrapper methods

A number of CrushWrapper get methods or predicates were not const
because they need to maintain transparently the rmaps. Make the rmaps
mutable and update the constness of the methods to match what the caller
would expect.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2712 from lpabon/bug-8766
Sage Weil [Wed, 15 Oct 2014 22:18:48 +0000 (15:18 -0700)]
Merge pull request #2712 from lpabon/bug-8766

Update vstart to setup users for s3-tests

10 years agoMerge pull request #2705 from xinxinsh/master
Sage Weil [Wed, 15 Oct 2014 22:16:00 +0000 (15:16 -0700)]
Merge pull request #2705 from xinxinsh/master

return value of handle_message for MSG_OSD_SUBOP/MSG_OSD_SUBOPREPLY shou...

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoauth: unit tests for auid display 2731/head
Loic Dachary [Wed, 15 Oct 2014 20:15:34 +0000 (13:15 -0700)]
auth: unit tests for auid display

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoauth: add display auid to KeyServer::encode_secrets
Loic Dachary [Wed, 15 Oct 2014 18:30:32 +0000 (11:30 -0700)]
auth: add display auid to KeyServer::encode_secrets

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoauth: add display auid to KeyRing::encode_formatted
Loic Dachary [Wed, 15 Oct 2014 18:07:19 +0000 (11:07 -0700)]
auth: add display auid to KeyRing::encode_formatted

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2726 from CzBiX/wip-doc-radosgw-federated-config
Loic Dachary [Wed, 15 Oct 2014 13:50:50 +0000 (06:50 -0700)]
Merge pull request #2726 from CzBiX/wip-doc-radosgw-federated-config

doc: correct command of `config push`

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agodoc: correct command of `config push` 2726/head
VRan Liu [Wed, 15 Oct 2014 09:03:49 +0000 (17:03 +0800)]
doc: correct command of `config push`

Signed-off-by: VRan Liu <gliuwr@gmail.com>
10 years agoqa/workunits/fs/misc: Add a workunit for file lock interruption 2628/head
Yan, Zheng [Wed, 15 Oct 2014 04:00:58 +0000 (12:00 +0800)]
qa/workunits/fs/misc: Add a workunit for file lock interruption

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agomds: fix neighbor lock check
Yan, Zheng [Wed, 15 Oct 2014 04:03:46 +0000 (12:03 +0800)]
mds: fix neighbor lock check

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoMerge pull request #2721 from wyllys66/wip-8942
Sage Weil [Tue, 14 Oct 2014 21:49:43 +0000 (14:49 -0700)]
Merge pull request #2721 from wyllys66/wip-8942

librados: osd: Fixed JSON output for stray OSDs

Backport: giant, firefly
Reviewed-by: Sage Weil <sage@redhat.com>
10 years agodoc/dev/sepia: notes about sepia email list and irc channels
Sage Weil [Tue, 14 Oct 2014 21:40:17 +0000 (14:40 -0700)]
doc/dev/sepia: notes about sepia email list and irc channels

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agodoc/release-notes: v0.80.7
Sage Weil [Tue, 14 Oct 2014 21:40:03 +0000 (14:40 -0700)]
doc/release-notes: v0.80.7

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2704 from almightybeeij/master
Gregory Farnum [Tue, 14 Oct 2014 18:49:26 +0000 (11:49 -0700)]
Merge pull request #2704 from almightybeeij/master

libcephfs.h libcephfs.cc : Defined error codes for the mount function

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agodoc: update lab notes
Sage Weil [Tue, 14 Oct 2014 17:57:37 +0000 (10:57 -0700)]
doc: update lab notes

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2720 from ceph/wip-5977
Josh Durgin [Tue, 14 Oct 2014 17:29:24 +0000 (10:29 -0700)]
Merge pull request #2720 from ceph/wip-5977

librbdpy: Added missing method docstrings

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
10 years agolibrbdpy: Added missing method docstrings 2720/head
Jason Dillaman [Tue, 14 Oct 2014 15:09:09 +0000 (11:09 -0400)]
librbdpy: Added missing method docstrings

Several methods were missing docstrings, preventing the methods
from appearing in the generated documentation.  Ensured all methods
now have appropriate docstrings.

Fixes: 5977
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agomds: reply -EOPNOTSUPP for unknown lock type
Yan, Zheng [Tue, 14 Oct 2014 14:02:41 +0000 (22:02 +0800)]
mds: reply -EOPNOTSUPP for unknown lock type

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoMerge pull request #2718 from henrycc/wip-henrycc-inotable
Yan, Zheng [Tue, 14 Oct 2014 06:54:32 +0000 (14:54 +0800)]
Merge pull request #2718 from henrycc/wip-henrycc-inotable

mds: fix inotable initialization/reset

10 years agomds: fix inotable initialization/reset 2718/head
Henry C Chang [Tue, 14 Oct 2014 02:06:04 +0000 (10:06 +0800)]
mds: fix inotable initialization/reset

interval_set::insert takes arguments start and len, not end.

Signed-off-by: Henry C Chang <henry.cy.chang@gmail.com>
10 years agoMerge pull request #2714 from ceph/wip-9730
John Wilkins [Mon, 13 Oct 2014 15:46:08 +0000 (08:46 -0700)]
Merge pull request #2714 from ceph/wip-9730

doc: `ceph-deploy mon create-initial` doesn't take arguments

Reviewed-by: John Wilkins <jowilkin@redhat.com>
10 years agoMerge pull request #2706 from dachary/wip-9747-ceph-spec
Sage Weil [Mon, 13 Oct 2014 15:16:14 +0000 (08:16 -0700)]
Merge pull request #2706 from dachary/wip-9747-ceph-spec

rpm: 95-ceph-osd-alt.rules is not needed for centos7 / rhel7

Backport: giant, firefly
Reviewed-by: Sage Weil <sage@redhat.com>
10 years agodoc: remove node requirement from 'mon create-initial' 2714/head
Alfredo Deza [Mon, 13 Oct 2014 15:10:10 +0000 (11:10 -0400)]
doc: remove node requirement from 'mon create-initial'

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
10 years agodoc: remove whitespace
Alfredo Deza [Mon, 13 Oct 2014 15:09:38 +0000 (11:09 -0400)]
doc: remove whitespace

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
10 years agoUpdate vstart to setup users for s3-tests 2712/head
Luis Pabón [Wed, 8 Oct 2014 05:04:07 +0000 (01:04 -0400)]
Update vstart to setup users for s3-tests

vstart.sh now creates the users for the default configuration
for the s3-tests, available on https://github.com/ceph/s3-tests.

Also updated the documentation to show the correct RadosGW port.

Signed-off-by: Luis Pabón <lpabon@redhat.com>
10 years agoMerge pull request #2591 from majianpeng/fix2
Sage Weil [Mon, 13 Oct 2014 13:01:22 +0000 (06:01 -0700)]
Merge pull request #2591 from majianpeng/fix2

os/FileStore: using FIEMAP_FLAGS_SYNC instead of fsync() before call fiemap

Backport: giant, firefly
Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoclient: use finisher to abort MDS request
Yan, Zheng [Mon, 13 Oct 2014 03:34:18 +0000 (11:34 +0800)]
client: use finisher to abort MDS request

When a request is interrupted, libfuse first locks an internal mutex,
then calls the interrupt callback. libfuse need to lock the same mutex
when unregistering interrupt callback. We unregister interrupt callback
while client_lock is locked, so we can't acquiring the client_lock in
the interrupt callback.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoclient: use atomic variable to track reference of MetaRequeset
Yan, Zheng [Thu, 9 Oct 2014 05:16:18 +0000 (13:16 +0800)]
client: use atomic variable to track reference of MetaRequeset

this allow us to increase reference count of MetaRequest while not holding
the client_lock

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoclient: allow interrupting blocked file lock operation
Yan, Zheng [Mon, 13 Oct 2014 02:44:46 +0000 (10:44 +0800)]
client: allow interrupting blocked file lock operation

This commit introduce two new types of setfilelock request. Unlike
setfilelock (UNLOCK) request, these two new types of setfilelock request
do not drop locks that have alread been acquired, they only interrupt
blocked setfilelock request.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoclient: register callback for fuse interrupt
Yan, Zheng [Thu, 9 Oct 2014 01:42:08 +0000 (09:42 +0800)]
client: register callback for fuse interrupt

libfuse allows program to reigster a callback for interrupt. When a file
system operation is interrupted, the fuse kernel driver sends interupt
request to libfuse. libfuse calls the interrupt callback when receiving
interrupt request.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
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 agorpm: 95-ceph-osd-alt.rules is not needed for centos7 / rhel7 2706/head
Loic Dachary [Sat, 11 Oct 2014 16:20:36 +0000 (18:20 +0200)]
rpm: 95-ceph-osd-alt.rules is not needed for centos7 / rhel7

The || instead of && had it always installed. That was fixed in EPEL
already.

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agolibcephfs.h libcephfs.cc : Defined error codes for the mount function 2704/head
BJ Lougee [Sat, 11 Oct 2014 07:44:17 +0000 (02:44 -0500)]
libcephfs.h libcephfs.cc : Defined error codes for the mount function
Used new error codes from libcephfs.h to replace the magic numbers in the mount functon found in libcephfs.cc.

Signed-off-by: BJ Lougee <almightybeeij@gmail.com>
10 years agoMerge pull request #2701 from ceph/wip-9716
Josh Durgin [Sat, 11 Oct 2014 03:51:33 +0000 (20:51 -0700)]
Merge pull request #2701 from ceph/wip-9716

librados: Fix function prototypes in librados.h

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
10 years agoMerge pull request #2678 from ceph/wip-8983
Josh Durgin [Sat, 11 Oct 2014 03:41:27 +0000 (20:41 -0700)]
Merge pull request #2678 from ceph/wip-8983

rados: Parse command-line arguments strictly

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoreturn value of handle_message for MSG_OSD_SUBOP/MSG_OSD_SUBOPREPLY should be true 2705/head
xinxin shu [Sat, 11 Oct 2014 01:29:42 +0000 (09:29 +0800)]
return value of handle_message for MSG_OSD_SUBOP/MSG_OSD_SUBOPREPLY should be true

if the return value is true , it will skip unnecessary checks

Signed-off-by: xinxin shu <xinxin.shu@intel.com>
10 years agoMerge pull request #2683 from ceph/wip-7796
Sage Weil [Fri, 10 Oct 2014 23:56:11 +0000 (16:56 -0700)]
Merge pull request #2683 from ceph/wip-7796

rgw: set length for keystone token validation request

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agorados: Use strict_strtoll instead of strtoll 2678/head
Adam Crume [Fri, 10 Oct 2014 23:52:32 +0000 (16:52 -0700)]
rados: Use strict_strtoll instead of strtoll

Signed-off-by: Adam Crume <adamcrume@gmail.com>
10 years agoMerge pull request #2672 from ceph/wip-9513
Josh Durgin [Fri, 10 Oct 2014 22:06:33 +0000 (15:06 -0700)]
Merge pull request #2672 from ceph/wip-9513

Fix read performance regression in ObjectCacher

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
10 years agolibrados: Fix function prototypes in librados.h 2701/head
Adam Crume [Fri, 10 Oct 2014 21:08:32 +0000 (14:08 -0700)]
librados: Fix function prototypes in librados.h

Fixes: 9716
Signed-off-by: Adam Crume <adamcrume@gmail.com>
10 years agorados: Add tests for CLI strict parsing
Adam Crume [Fri, 10 Oct 2014 20:33:39 +0000 (13:33 -0700)]
rados: Add tests for CLI strict parsing

Fixes: 8983
Signed-off-by: Adam Crume <adamcrume@gmail.com>
10 years agotest: Fix rmpool in test_rados_tool.sh
Adam Crume [Fri, 10 Oct 2014 17:25:02 +0000 (10:25 -0700)]
test: Fix rmpool in test_rados_tool.sh

Signed-off-by: Adam Crume <adamcrume@gmail.com>
10 years agoMerge pull request #2675 from ceph/wip-coverity-20141003
Sage Weil [Fri, 10 Oct 2014 16:13:02 +0000 (09:13 -0700)]
Merge pull request #2675 from ceph/wip-coverity-20141003

Fix issues from SCA and Coverity

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoclient: add helper function that updates lock state
Yan, Zheng [Sat, 4 Oct 2014 01:14:44 +0000 (09:14 +0800)]
client: add helper function that updates lock state

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agofuse: enable fuse_multithreaded by default
Yan, Zheng [Thu, 2 Oct 2014 12:21:36 +0000 (20:21 +0800)]
fuse: enable fuse_multithreaded by default

GETFILELOCK MDS request may block for a long time, so we need to
use multithread event loop,

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoclient: posix file lock support
Yan, Zheng [Thu, 2 Oct 2014 11:07:41 +0000 (19:07 +0800)]
client: posix file lock support

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agocommon: link mds/flock.o to libcommon
Yan, Zheng [Thu, 2 Oct 2014 10:02:50 +0000 (18:02 +0800)]
common: link mds/flock.o to libcommon

later commit will use this code to track file locks held by cephfs
client.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoMerge pull request #2685 from hejiantao5/patch-1
Loic Dachary [Fri, 10 Oct 2014 12:56:27 +0000 (14:56 +0200)]
Merge pull request #2685 from hejiantao5/patch-1

Check the pointer before deleting

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2688 from leseb/fix-warning-message-img-format
Loic Dachary [Fri, 10 Oct 2014 12:50:35 +0000 (14:50 +0200)]
Merge pull request #2688 from leseb/fix-warning-message-img-format

Fix error message when stripping with format 1

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoFixed JSON output for stray OSDs 2721/head
Wyllys Ingersoll [Fri, 10 Oct 2014 12:27:56 +0000 (08:27 -0400)]
Fixed JSON output for stray OSDs

10 years agoFix error message when stripping with format 1 2688/head
Sébastien Han [Fri, 10 Oct 2014 12:14:22 +0000 (14:14 +0200)]
Fix error message when stripping with format 1

Since the option '--format' for specifying the rbd image format is
deprecated, we should recommend '--image-format' instead.

Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
10 years agoCheck pointer before deleting 2685/head
hejiantao5 [Fri, 10 Oct 2014 07:57:05 +0000 (15:57 +0800)]
Check pointer before deleting

Here I think should check the pointer, to avoid potential risk

Signed-off-by: Jiantao He <hejiantao5@gmail.com>
10 years agoceph_erasure_code_benchmark: fix parameter handling 2675/head
Danny Al-Gaaf [Thu, 9 Oct 2014 16:09:41 +0000 (18:09 +0200)]
ceph_erasure_code_benchmark: fix parameter handling

Make sure k and m paramter are valid to prevent crash. Fix typo.

Fix for the following CID and other possible invalid combinations
of k/m parameter:

CID 1219466 (#1 of 1): Division or modulo by zero (DIVIDE_BY_ZERO)
 divide_by_zero: In expression rand() % (k + m), modulo by expression
 k + m which may be zero has undefined behavior.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agoMerge pull request #2686 from dachary/wip-client-dout
John Spray [Fri, 10 Oct 2014 09:05:44 +0000 (10:05 +0100)]
Merge pull request #2686 from dachary/wip-client-dout

client: add missing dendl and s/dout/ldout/

Reviewed-by: John Spray <john.spray@redhat.com>
10 years agoclient: add missing dendl and s/dout/ldout/ 2686/head
Loic Dachary [Fri, 10 Oct 2014 08:43:44 +0000 (10:43 +0200)]
client: add missing dendl and s/dout/ldout/

Introduced in ce4436c9d4206ff4a4af7fdc16e571dcc77cd8b4

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2671 from ceph/wip-da-fix-make_check
Loic Dachary [Fri, 10 Oct 2014 05:57:19 +0000 (07:57 +0200)]
Merge pull request #2671 from ceph/wip-da-fix-make_check

Makefile.am: make sure everything was build before make check

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2669 from ceph/wip-9692
Loic Dachary [Fri, 10 Oct 2014 05:54:22 +0000 (07:54 +0200)]
Merge pull request #2669 from ceph/wip-9692

qa/workunits/fs/misc: fix syntax error

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2676 from ceph/wip-print-mode
Yan, Zheng [Fri, 10 Oct 2014 01:36:59 +0000 (09:36 +0800)]
Merge pull request #2676 from ceph/wip-print-mode

client: print out mode, uid, gid if they are changed

10 years agoqa/workunits/fs/misc: fix syntax error 2669/head
Yan, Zheng [Wed, 8 Oct 2014 12:38:33 +0000 (20:38 +0800)]
qa/workunits/fs/misc: fix syntax error

Signed-off-by: Yan, Zheng <zyan@redhat.com>
10 years agoMerge pull request #2677 from ceph/wip-mds-coverity
Yan, Zheng [Fri, 10 Oct 2014 01:16:58 +0000 (09:16 +0800)]
Merge pull request #2677 from ceph/wip-mds-coverity

Wip mds coverity

10 years agorgw: set length for keystone token validation request 2683/head
Yehuda Sadeh [Thu, 9 Oct 2014 17:20:27 +0000 (10:20 -0700)]
rgw: set length for keystone token validation request

Fixes: #7796
Backport: giany, firefly
Need to set content length to this request, as the server might not
handle a chunked request (even though we don't send anything).

Tested-by: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorados: Parse command-line arguments strictly
Adam Crume [Thu, 9 Oct 2014 21:04:34 +0000 (14:04 -0700)]
rados: Parse command-line arguments strictly

Many integers were parsed with functions that silently ignored junk at
the end of the string.  Extra characters now cause errors.

Fixes: 8983
Signed-off-by: Adam Crume <adamcrume@gmail.com>
10 years agomds: MDirUpdate: initialize discover count to 0 if we're not discovering 2677/head
Greg Farnum [Thu, 9 Oct 2014 17:41:45 +0000 (10:41 -0700)]
mds: MDirUpdate: initialize discover count to 0 if we're not discovering

Otherwise it's left uninitialized and could do who-knows-what!

CID 1244229:  Uninitialized scalar field  (UNINIT_CTOR)
/messages/MDirUpdate.h: 55 in MDirUpdate::MDirUpdate(mds_rank_t, dirfrag_t,
int, std::set<int, std::less<int>, std::allocator<int>> &, filepath &, bool)()

Signed-off-by: Greg Farnum <greg@inktank.com>
10 years agomds: MDSAuthCaps: init "read" param in default constructor
Greg Farnum [Thu, 9 Oct 2014 17:37:21 +0000 (10:37 -0700)]
mds: MDSAuthCaps: init "read" param in default constructor

CID 1244228:  Uninitialized scalar field  (UNINIT_CTOR)
/mds/MDSAuthCaps.h: 29 in MDSCapSpec::MDSCapSpec()()

Signed-off-by: Greg Farnum <greg@inktank.com>
10 years agoclient: print out mode, uid, gid if they are changed 2676/head
Greg Farnum [Thu, 9 Oct 2014 16:47:29 +0000 (09:47 -0700)]
client: print out mode, uid, gid if they are changed

These values can be printed by MClientRequest message output, but if
they're flushed out via cap updates we don't even get that. These
are important values that generally don't change often; so print
them out in debug logging.

Signed-off-by: Greg Farnum <greg@inktank.com>
10 years agotest_rgw_admin_log.cc: refactor to use calloc()
Danny Al-Gaaf [Thu, 9 Oct 2014 15:14:37 +0000 (17:14 +0200)]
test_rgw_admin_log.cc: refactor to use calloc()

Refactor code to use calloc() instead of malloc() to make
sure the char* TEST_BUCKET_OBJECT_SIZE memory is set to
zero before call put_bucket_obj().

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agotest_rgw_admin_log.cc: fix use-after-free
Danny Al-Gaaf [Thu, 9 Oct 2014 13:55:30 +0000 (15:55 +0200)]
test_rgw_admin_log.cc: fix use-after-free

Fix for:

CID 1054876 (#1 of 1): Use after free (USE_AFTER_FREE)
 pass_freed_arg: Passing freed pointer bucket_obj as an
 argument to put_bucket_obj

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agotest/librados/c_write_operations.cc: free ressources
Danny Al-Gaaf [Thu, 9 Oct 2014 13:29:45 +0000 (15:29 +0200)]
test/librados/c_write_operations.cc: free ressources

Release completion as soon as no longer needed.

Fix for:

CID 1219593 (#1 of 1): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable completion 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 #2511 from dachary/wip-catch-options-errors
Loic Dachary [Thu, 9 Oct 2014 07:41:38 +0000 (09:41 +0200)]
Merge pull request #2511 from dachary/wip-catch-options-errors

test,tools: catch option parsing exceptions

Reviewed-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@redhat.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 agoMerge pull request #2629 from dachary/wip-heap-profiler
Loic Dachary [Thu, 9 Oct 2014 06:17:12 +0000 (08:17 +0200)]
Merge pull request #2629 from dachary/wip-heap-profiler

perfglue: minors heap profiler updates and documentation

Reviewed-by: Jianpeng Ma <majianpeng@gmail.com>
10 years agorados_list_parallel.cc: cleanup before return from run()
Danny Al-Gaaf [Mon, 6 Oct 2014 10:43:59 +0000 (12:43 +0200)]
rados_list_parallel.cc: cleanup before return from run()

Fix for another case of:

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

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agotest/librbd/fsx.c: fix potential unterminated string handling
Danny Al-Gaaf [Mon, 6 Oct 2014 10:20:09 +0000 (12:20 +0200)]
test/librbd/fsx.c: fix potential unterminated string handling

In case of strncpy() make sure string is '\0' terminated. Before
usage of strcat() check if the destination has enough free space
to concat the char and to terminate the string to prevent illegal
memory access.

Fix for:

CID 1219459 (2 of 2): Buffer not null terminated (BUFFER_SIZE_WARNING)
 buffer_size_warning: Calling strncpy with a maximum size argument of
 1024 bytes on destination array goodfile of size 1024 bytes might
 leave the destination string unterminated.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agoErasureCodeIsa.cc: reduce scope of variables
Danny Al-Gaaf [Fri, 3 Oct 2014 16:16:56 +0000 (18:16 +0200)]
ErasureCodeIsa.cc: reduce scope of variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agoSyntheticClient.cc: reduce scope of variables
Danny Al-Gaaf [Fri, 3 Oct 2014 14:10:20 +0000 (16:10 +0200)]
SyntheticClient.cc: reduce scope of variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agomds/flock.cc: reduce scope of some variables
Danny Al-Gaaf [Thu, 2 Oct 2014 16:27:51 +0000 (18:27 +0200)]
mds/flock.cc: reduce scope of some variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agoosd/ReplicatedBackend.cc: prefer ++operator for non-primitive iterators
Danny Al-Gaaf [Thu, 2 Oct 2014 16:18:55 +0000 (18:18 +0200)]
osd/ReplicatedBackend.cc: prefer ++operator for non-primitive iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agoosd/OSDMap.cc: prefer ++operator for non-primitive iterators
Danny Al-Gaaf [Thu, 2 Oct 2014 16:17:15 +0000 (18:17 +0200)]
osd/OSDMap.cc: prefer ++operator for non-primitive iterators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agomount.ceph.c: ensure '\0' terminated string
Danny Al-Gaaf [Thu, 2 Oct 2014 08:48:25 +0000 (10:48 +0200)]
mount.ceph.c: ensure '\0' terminated string

Reserve last char in array for '\0' to ensure termination
of the string.

Fix for:

CID 1128383 (#1 of 1): Buffer not null terminated (BUFFER_SIZE_WARNING)
 buffer_size_warning: Calling strncpy with a maximum size argument
 of 1000 bytes on destination array secret of size 1000 bytes might
 leave the destination string unterminated.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agoMerge pull request #2586 from ceph/wip-mon-status
Sage Weil [Wed, 8 Oct 2014 19:39:01 +0000 (12:39 -0700)]
Merge pull request #2586 from ceph/wip-mon-status

mon: make health portion of ceph -s readable (multiple lines)

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
10 years agoMerge pull request #2673 from dachary/wip-ceph-erasure-code-corpus
Loic Dachary [Wed, 8 Oct 2014 19:26:11 +0000 (21:26 +0200)]
Merge pull request #2673 from dachary/wip-ceph-erasure-code-corpus

build: add ceph-erasure-code-corpus to gitmodule_mirrors

Reviewed-by: Sandon Van Ness <sandon@inktank.com>
10 years agobuild: add ceph-erasure-code-corpus to gitmodule_mirrors 2673/head
Loic Dachary [Wed, 8 Oct 2014 19:22:02 +0000 (21:22 +0200)]
build: add ceph-erasure-code-corpus to gitmodule_mirrors

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMakefile.am: make sure everything was build before make check 2671/head
Danny Al-Gaaf [Wed, 8 Oct 2014 18:19:07 +0000 (20:19 +0200)]
Makefile.am: make sure everything was build before make check

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agoMerge remote-tracking branch 'upstream/giant'
Samuel Just [Wed, 8 Oct 2014 18:18:13 +0000 (11:18 -0700)]
Merge remote-tracking branch 'upstream/giant'

10 years agoMerge pull request #2616 from guangyy/wip-giant-9614
Samuel Just [Wed, 8 Oct 2014 18:08:35 +0000 (11:08 -0700)]
Merge pull request #2616 from guangyy/wip-giant-9614

PG::actingset should be used when checking the number of acting OSDs for a given PG.

Backport: firefly
Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2663 from ceph/wip-9496
Samuel Just [Wed, 8 Oct 2014 18:07:06 +0000 (11:07 -0700)]
Merge pull request #2663 from ceph/wip-9496

mon: PGMonitor: populate scrub timestamps with 'now' on pg creation

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2650 from ceph/wip-9128
Samuel Just [Wed, 8 Oct 2014 18:04:42 +0000 (11:04 -0700)]
Merge pull request #2650 from ceph/wip-9128

Add reset_tp_timeout in long loop in add_source_info for suicide timeout

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2543 from ceph/wip-9419
Samuel Just [Wed, 8 Oct 2014 18:01:26 +0000 (11:01 -0700)]
Merge pull request #2543 from ceph/wip-9419

Wip 9419

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2670 from dachary/wip-9700-cephtool-mon-osd
John Spray [Wed, 8 Oct 2014 14:45:29 +0000 (15:45 +0100)]
Merge pull request #2670 from dachary/wip-9700-cephtool-mon-osd

qa: move mon_mds tests last

Reviewed-by: John Spray <john.spray@redhat.com>
10 years agoqa: move mon_mds tests last 2670/head
Loic Dachary [Wed, 8 Oct 2014 14:27:47 +0000 (16:27 +0200)]
qa: move mon_mds tests last

Assuming they are more likely than others to leave OSD/MON in an
unstable state that could have undefined side effects on the tests
following it. A cleaner solution would be to run them in a separate
script that is run on an independent cluster.

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
10 years agoMerge pull request #2569 from ceph/wip-9437
John Spray [Wed, 8 Oct 2014 14:28:01 +0000 (15:28 +0100)]
Merge pull request #2569 from ceph/wip-9437

Implement `tell` in MDS

Reviewed-by: Reviewed-by: Greg Farnum <greg@inktank.com>