Commit Graph

36482 Commits

Author SHA1 Message Date
John Spray 680b2e09ad Merge pull request #2751 from dachary/wip-warnings
client: fix signed/unsigned compilation warnings

Reviewed-by: John Spray <john.spray@redhat.com>
2014-10-20 09:42:37 +01:00
Loic Dachary 64d977b947 client: fix signed/unsigned compilation warnings
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-19 09:04:02 -07:00
Loic Dachary 4fc12b66d7 Merge pull request #2744 from ceph/wip-9794
mon: MDSMonitor: wait for osdmon to be writable when requesting proposal

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
2014-10-18 08:43:40 -07:00
Loic Dachary e5fc8f7f22 Merge pull request #2746 from ceph/wip-adamcrume
osdc: Fix compiler warning

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Loic Dachary <loic-201408@dachary.org>
2014-10-17 15:13:28 -07:00
Adam Crume cb290a117a osdc: Fix compiler warning
Was getting:

./osdc/ObjectCacher.h:169:51: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       uint64_t overlap_start = MAX(start, ex.start);
                                                   ^
./osdc/ObjectCacher.h:170:59: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       uint64_t overlap_end = MIN(end, ex.start + ex.length);
                                                           ^

Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-10-17 12:09:44 -07:00
Joao Eduardo Luis 2ae1cba595 mon: MDSMonitor: wait for osdmon to be writable when requesting proposal
Otherwise we may end up requesting the osdmon to propose while it is
mid-proposal.  We can't simply return EAGAIN to the user either because
then we would have to expect the user to be able to successfully race
with the whole cluster in finding a window in which 'mds fs new' command
would succeed -- which is not a realistic expectation.  Having the
command to osdmon()->wait_for_writable() guarantees that the command
will be added to a queue and that we will, eventually, tend to it.

Fixes: #9794

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2014-10-17 19:08:20 +01:00
Joao Eduardo Luis 0dd473cbad mon: MDSMonitor: have management_command() returning int instead of bool
We can more easily differentiate between errors we get out of this
function, which makes the code a bit more versatile and readable.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2014-10-17 18:59:51 +01:00
Joao Eduardo Luis 91b2a2b69b mon: MDSMonitor: don't return -EINVAL if function is bool
Returning -EINVAL on a function that expects bool and the error code to
be in a variable 'r' can only achieve one thing: if this path is ever
touched, instead of returning an error as it was supposed to, we're
returning 'true' with 'r = 0' and, for no apparent reason, the user will
think everything went smoothly but with no new fs created.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2014-10-17 18:01:05 +01:00
Joao Eduardo Luis 1d1ae413e9 mon: MDSMonitor: check all conditions are met *before* osdmon proposal
We should not allow ourselves to request the osdmon to propose before we
know for sure that we meet the required conditions to go through with
our own state change.  Even if we still can't guarantee that our
proposal is going to be committed, we shouldn't just change the osdmon's
state just because we can.  This way, at least, we make sure that our
checks hold up before doing anything with side-effects.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2014-10-17 17:43:33 +01:00
Joao Eduardo Luis 07b7f10105 mon: MDSMonitor: return if fs exists on 'fs new'
We were just setting return code to -EINVAL, while allowing the logic to
continue regardless.  If we are to return error, then we should abort
the operation as well and let the user know it went wrong instead of
continuing as if nothing had happened.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2014-10-17 17:37:03 +01:00
Loic Dachary 66cffd72f5 Merge pull request #2736 from dachary/wip-backfill-documentation
doc: updates on Backfill Reservation

Reviewed-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2014-10-17 09:02:10 -07:00
Sage Weil 6fa686c8c4 Merge pull request #2743 from ceph/wip-mds-coverity
mds: fix null dereference

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-17 08:16:18 -07:00
Sage Weil 1334be7484 Merge pull request #2738 from majianpeng/fix1
Fix1 compile warning

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-17 08:11:45 -07:00
Yan, Zheng 2c064137d3 mds: fix null dereference
Server::handle_client_file_setlock() should return after calling
reply_request()

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2014-10-17 22:09:22 +08:00
Jianpeng Ma bb9add6cdc test: fix compile warning in bufferlist.cc
test/bufferlist.cc: In member function ‘virtual void
Buffer_constructors_Test::TestBody()’:
test/bufferlist.cc:154:36: warning: ignoring return value of ‘int
system(const char*)’, declared with attribute warn_unused_result
[-Wunused-result]
     ::system("echo ABC > testfile");
                                    ^
test/bufferlist.cc: In member function ‘virtual void
TestRawPipe::SetUp()’:
test/bufferlist.cc:182:36: warning: ignoring return value of ‘int
system(const char*)’, declared with attribute warn_unused_result
[-Wunused-result]
     ::system("echo ABC > testfile");
                                    ^
test/bufferlist.cc: In member function ‘virtual void
BufferList_read_file_Test::TestBody()’:
test/bufferlist.cc:1768:53: warning: ignoring return value of ‘int
system(const char*)’, declared with attribute warn_unused_result
[-Wunused-result]
   ::system("echo ABC > testfile ; chmod 0 testfile");
                                                     ^
test/bufferlist.cc:1770:32: warning: ignoring return value of ‘int
system(const char*)’, declared with attribute warn_unused_result
[-Wunused-result]
   ::system("chmod +r testfile");
                                ^
test/bufferlist.cc: In member function ‘virtual void
BufferList_read_fd_Test::TestBody()’:
test/bufferlist.cc:1781:34: warning: ignoring return value of ‘int
system(const char*)’, declared with attribute warn_unused_result
[-Wunused-result]
   ::system("echo ABC > testfile");

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2014-10-17 14:04:40 +08:00
Jianpeng Ma a49255f34c librbd: fix compile warning in librbd/internal.cc.
librbd/internal.cc: In function 'void
librbd::readahead(librbd::ImageCtx*, const std::vector<std::pair<long
unsigned int, long unsigned int> >&, const md_config_t*)':
librbd/internal.cc:3150:38: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
       ictx->total_bytes_read > conf->rbd_readahead_disable_after_bytes;
                                      ^

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2014-10-17 13:19:59 +08:00
Loic Dachary 69b5c72cbe doc: updates on Backfill Reservation
The logic was changed by:

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-16 18:36:11 -07:00
Josh Durgin a9f302da08 Merge remote-tracking branch 'origin/wip-rbd-readahead'
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>

Conflicts:
	src/client/Fh.h
2014-10-16 14:33:42 -07:00
Josh Durgin 0bb51db92f Merge pull request #2588 from xinxinsh/wip-9595
Fix #9595

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-10-16 13:15:33 -07:00
Gregory Farnum ca44f503cc 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>
2014-10-16 06:57:34 -07:00
Loic Dachary 8e7fb9056e 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>
2014-10-15 20:22:02 -07:00
Loic Dachary 42e5c40a42 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>
2014-10-15 20:15:29 -07:00
Loic Dachary 4606af7901 mon: unit tests for osd crush rename-bucket
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-15 17:22:49 -07:00
Loic Dachary aa675604c9 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>
2014-10-15 17:22:12 -07:00
Loic Dachary 29d13d41c5 crush: unit tests for CrushWrapper rename item/bucket methods
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-15 17:13:59 -07:00
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
xinxin shu f8107102bf add unittest for Striper::get_num_objects
Signed-off-by: xinxin shu <xinxin.shu@intel.com>
2014-10-16 08:09:52 +08: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
xinxin shu 7b66ee4928 when non-default striping is used, internal methods can operate on extra objects
Fixes: #9595

Signed-off-by: xinxin shu <xinxin.shu@intel.com>
2014-10-16 07:58:41 +08:00
Sage Weil bf8fe2e3d0 Merge pull request #2712 from lpabon/bug-8766
Update vstart to setup users for s3-tests
2014-10-15 15:18:48 -07:00
Sage Weil 308fa15396 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>
2014-10-15 15:16:00 -07:00
Loic Dachary 3741aab39e auth: unit tests for auid display
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-15 13:25:17 -07:00
Loic Dachary fcc36922ed 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>
2014-10-15 11:31:51 -07:00
Loic Dachary fa2ff3334b 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>
2014-10-15 11:07:19 -07:00
Loic Dachary 659306df29 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>
2014-10-15 06:50:50 -07:00
VRan Liu 2cbebc305c doc: correct command of `config push`
Signed-off-by: VRan Liu <gliuwr@gmail.com>
2014-10-15 17:15:56 +08:00
Yan, Zheng ac92c455a9 qa/workunits/fs/misc: Add a workunit for file lock interruption
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2014-10-15 12:46:31 +08:00
Yan, Zheng b0e6e85aa0 mds: fix neighbor lock check
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2014-10-15 12:05:01 +08: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 675392335c mds: reply -EOPNOTSUPP for unknown lock type
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2014-10-14 22:03:34 +08: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