Commit Graph

36431 Commits

Author SHA1 Message Date
Loic Dachary
30f3ac3fb6 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>
2014-10-15 17:13:59 -07:00
Loic Dachary
5e2a82675e 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>
2014-10-15 17:12:36 -07:00
Loic Dachary
236895eea6 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>
2014-10-15 17:02:58 -07:00
Sage Weil
6e22c37380 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>
2014-10-14 14:49:43 -07:00
Sage Weil
b61468deb7 doc/dev/sepia: notes about sepia email list and irc channels
Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-14 14:43:04 -07:00
Sage Weil
67051804d6 doc/release-notes: v0.80.7
Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-14 14:43:04 -07:00
Gregory Farnum
35b8f8b7ab 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>
2014-10-14 11:49:26 -07:00
Sage Weil
22637f43ba doc: update lab notes
Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-14 10:58:02 -07:00
Josh Durgin
2c5d436acb Merge pull request #2720 from ceph/wip-5977
librbdpy: Added missing method docstrings

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-10-14 10:29:24 -07:00
Jason Dillaman
7022679e2c 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>
2014-10-14 12:10:24 -04:00
Yan, Zheng
47249dee0e Merge pull request #2718 from henrycc/wip-henrycc-inotable
mds: fix inotable initialization/reset
2014-10-14 14:54:32 +08:00
Henry C Chang
c95bb59434 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>
2014-10-14 14:41:33 +08:00
John Wilkins
eb272454a5 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>
2014-10-13 08:46:08 -07:00
Sage Weil
eafdbfada4 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>
2014-10-13 08:16:14 -07:00
Alfredo Deza
b73fe1a146 doc: remove node requirement from 'mon create-initial'
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
2014-10-13 11:10:10 -04:00
Alfredo Deza
264f0fced5 doc: remove whitespace
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
2014-10-13 11:09:38 -04:00
Sage Weil
3f8fb85b34 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>
2014-10-13 06:01:22 -07:00
Jianpeng Ma
229a6dfe7d 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>
2014-10-13 13:33:38 +08:00
Loic Dachary
5ff4a850a0 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>
2014-10-11 18:20:36 +02:00
BJ Lougee
50987eca6c 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>
2014-10-11 02:44:30 -05:00
Josh Durgin
b933777bc7 Merge pull request #2701 from ceph/wip-9716
librados: Fix function prototypes in librados.h

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-10-10 20:51:33 -07:00
Josh Durgin
17f0132818 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>
2014-10-10 20:41:27 -07:00
Sage Weil
f011d72df5 Merge pull request #2683 from ceph/wip-7796
rgw: set length for keystone token validation request

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-10 16:56:11 -07:00
Adam Crume
d95567680c rados: Use strict_strtoll instead of strtoll
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-10-10 16:52:32 -07:00
Josh Durgin
74f8cf623a Merge pull request #2672 from ceph/wip-9513
Fix read performance regression in ObjectCacher

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-10-10 15:06:33 -07:00
Adam Crume
d98b75530b librados: Fix function prototypes in librados.h
Fixes: 9716
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-10-10 14:08:32 -07:00
Adam Crume
022bace0a9 rados: Add tests for CLI strict parsing
Fixes: 8983
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-10-10 13:33:39 -07:00
Adam Crume
26fe1801d4 test: Fix rmpool in test_rados_tool.sh
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-10-10 10:25:02 -07:00
Sage Weil
3e0e04ef95 Merge pull request #2675 from ceph/wip-coverity-20141003
Fix issues from SCA and Coverity

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-10 09:13:02 -07:00
Loic Dachary
740db2043c Merge pull request #2685 from hejiantao5/patch-1
Check the pointer before deleting

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
2014-10-10 14:56:27 +02:00
Loic Dachary
5c38bcbe53 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>
2014-10-10 14:50:35 +02:00
Wyllys Ingersoll
89ebcaa368 Fixed JSON output for stray OSDs 2014-10-10 08:27:56 -04:00
Sébastien Han
a8d597fca1 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>
2014-10-10 14:14:22 +02:00
hejiantao5
66afcd946c Check pointer before deleting
Here I think should check the pointer, to avoid potential risk

Signed-off-by: Jiantao He <hejiantao5@gmail.com>
2014-10-10 19:34:06 +08:00
Danny Al-Gaaf
2c7c03c56c 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>
2014-10-10 11:08:00 +02:00
John Spray
b2b285938e 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>
2014-10-10 10:05:44 +01:00
Loic Dachary
8021581850 client: add missing dendl and s/dout/ldout/
Introduced in ce4436c9d4

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-10 10:46:24 +02:00
Loic Dachary
98cb9a0cc9 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>
2014-10-10 07:57:19 +02:00
Loic Dachary
800b9314ad Merge pull request #2669 from ceph/wip-9692
qa/workunits/fs/misc: fix syntax error

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
2014-10-10 07:54:22 +02:00
Yan, Zheng
d12f704bb1 Merge pull request #2676 from ceph/wip-print-mode
client: print out mode, uid, gid if they are changed
2014-10-10 09:36:59 +08:00
Yan, Zheng
fa539b9c3f qa/workunits/fs/misc: fix syntax error
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2014-10-10 09:30:29 +08:00
Yan, Zheng
78be62f739 Merge pull request #2677 from ceph/wip-mds-coverity
Wip mds coverity
2014-10-10 09:16:58 +08:00
Yehuda Sadeh
3dd4ccad7f 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>
2014-10-09 15:51:55 -07:00
Adam Crume
3b9dcff775 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>
2014-10-09 14:04:34 -07:00
Greg Farnum
aa138eb869 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>
2014-10-09 10:43:21 -07:00
Greg Farnum
2a9ed93e26 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>
2014-10-09 10:42:58 -07:00
Greg Farnum
ce4436c9d4 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>
2014-10-09 09:47:29 -07:00
Danny Al-Gaaf
7cb2840e00 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>
2014-10-09 17:14:37 +02:00
Danny Al-Gaaf
c43c85fd79 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>
2014-10-09 15:55:30 +02:00
Danny Al-Gaaf
c60a17075d 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>
2014-10-09 15:31:52 +02:00