Commit Graph

60860 Commits

Author SHA1 Message Date
Jason Dillaman
e519a454eb Merge pull request #12211 from leseb/doc-openstack
doc: update cinder key permissions for mitaka

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-12-08 21:15:28 -05:00
Sage Weil
8dca17c067 osd: default osd_scrub_during_recovery=false
This is a more friendly behavior.  Tell users in the release notes how to
get the old behavior.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-12-08 19:25:06 -06:00
Greg Farnum
ef1df97b5a osd: fix signed/unsigned comparison warning
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2016-12-08 15:50:24 -08:00
Sage Weil
69169cb2c7 Merge pull request #12367 from liewegas/wip-bluestore-sync-submit
os/bluestore: bluestore_sync_submit_transaction = false

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-12-08 15:07:01 -06:00
Sage Weil
3f6219ca96 Merge pull request #12356 from xiexingguo/xxg-wip-bluestore-commit-latency
os/bluestore: fix global commit latency

Reviewed-by: Sage Weil <sage@redhat.com>
2016-12-08 15:04:45 -06:00
Matt Benjamin
e4107337b3 Merge pull request #12381 from ly798/fix-rgw-crush-due-to-bad-cors
rgw: do not abort when accept a CORS request with short origin
2016-12-08 15:34:51 -05:00
Kefu Chai
aac1a3edd4 msg/async: set nonce before starting the workers
otherwise workers will respond with difference nonces to peers.
and remove nonce from Processor. as there is only one nonce for each
Messenger at a given time.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-12-09 03:03:27 +08:00
Kefu Chai
fe814e78b9 Merge pull request #12369 from tchaikov/wip-c99
cmake: compile C code with c99

Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
2016-12-09 01:16:20 +08:00
Loic Dachary
ecc36faa64 Merge pull request #12375 from liewegas/wip-msgr-eagain-loop
msg/simple/Pipe: avoid returning 0 on poll timeout

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2016-12-08 17:06:59 +01:00
jtlayton
07fd958b3c Merge pull request #12331 from ceph/wip-jlayton-suid
Have ceph clear setuid/setgid bits on chown
2016-12-08 09:35:56 -05:00
Sébastien Han
9af76d2626 doc: update cinder key permissions for mitaka
OpenStack Mitaka introduced the support of RBD snapshots while taking a
snapshot of a Nova instance. For this to work we need to grant write
access to the Glance pool to the Cinder key.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-08 15:21:21 +01:00
Jason Dillaman
92adebc105 Merge pull request #12388 from kylinstorage/wip-remove-librbd-unused-variable
librbd: remove unused local variable

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-12-08 08:56:25 -05:00
Kefu Chai
27f6b03239 Merge pull request #12383 from dachary/wip-18188-k-2-m-2
tests: erasure-code: add k=2, m=2 for isa & jerasure

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-12-08 21:19:21 +08:00
Pan Liu
45ceb389b6 rbd: --max_part and --nbds_max options for nbd map
Fixes: http://tracker.ceph.com/issues/18186
Signed-off-by: Pan Liu <pan.liu@istuary.com>
2016-12-08 20:03:30 +08:00
Loic Dachary
5d36740264 tests: erasure-code: add k=2, m=2 for isa & jerasure
Fixes: http://tracker.ceph.com/issues/18188

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-12-08 12:44:21 +01:00
Loic Dachary
efa1e54362 tests: fix erasure-code premature deallocation of cct
The setup function returns before the run function, the cct variable
must be a data member, not a local variable that gets de-allocated
before run() starts.

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-12-08 12:44:21 +01:00
Kefu Chai
7f5685e814 Merge pull request #12387 from tchaikov/wip-remove-unused-var
msg/async: remove unused member variable

Reviewed-by: Haomai Wang <haomai@xsky.com>
2016-12-08 17:54:59 +08:00
Mykola Golub
a2cfc17d25 rbd-mirror: fix sparse read optimization in image sync
Issue truncate or zero ops for the subtracted extents between the
diff and the sparse read.

Fixes: http://tracker.ceph.com/issues/18146
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-12-08 11:43:32 +02:00
Yunchuan Wen
985738bc2c librbd: remove unused local variable
Signed-off-by: Yunchuan Wen <yunchuan.wen@kylin-cloud.com>
2016-12-08 17:05:17 +08:00
Kefu Chai
f0e4b693b3 msg/async: remove unused member variable
PosixServerSocketImpl::sa is not referenced anywhere, so remove it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-12-08 16:46:31 +08:00
LiuYang
67d4d9e64b rgw: do not abort when accept a CORS request with short origin
Fixed: #18187

when accept a CROS request, the request http origin shorter than the bucket's corsrule
(eg. origin: http://s.com corsrule: <AllowedOrigin>*.verylongdomain.com</AllowedOrigin>).
the rgw_cors.cc::is_string_in_set() will have a wrong index, the radosrgw server will
abort.

$ curl http://test.localhost:8000/app.data -H "Origin:http://s.com"

 0> 2016-12-05 03:22:29.548138 7f6add05d700 -1 *** Caught signal (Aborted) **
 in thread 7f6add05d700 thread_name:civetweb-worker

 ceph version 11.0.2-2168-gd2f8fb4 (d2f8fb4a6b)
 1: (()+0x50720a) [0x7f6b147c420a]
 2: (()+0xf370) [0x7f6b09a33370]
 3: (gsignal()+0x37) [0x7f6b081ca1d7]
 4: (abort()+0x148) [0x7f6b081cb8c8]
 5: (__gnu_cxx::__verbose_terminate_handler()+0x165) [0x7f6b08ace9d5]
 6: (()+0x5e946) [0x7f6b08acc946]
 7: (()+0x5e973) [0x7f6b08acc973]
 8: (()+0x5eb93) [0x7f6b08accb93]
 9: (std::__throw_out_of_range(char const*)+0x77) 0x7f6b08b21a17]
 10: (()+0xbd97a) [0x7f6b08b2b97a]
 11: (()+0x449c1e) [0x7f6b14706c1e]
 12: (RGWCORSRule::is_origin_present(char const*)+0x48) [0x7f6b147073b8]
 13: (RGWCORSConfiguration::host_name_rule(char const*)+0x37) [0x7f6b147074e7]
 14: (RGWOp::generate_cors_headers(std::string&, std::string&, std::string&, std::string&, unsigned int*)+0xa3) [0x7f6b14593e63]
 15: (dump_access_control(req_state*, RGWOp*)+0x61) [0x7f6b14653f91]

Signed-off-by: LiuYang <yippeetry@gmail.com>
2016-12-08 14:52:03 +08:00
Kefu Chai
a488c5d8ea cmake: compile C code with c99
so the functions like snprintf() available in C99 are available without
defining _XOPEN_SOURCE. and "asm()" is used to inline assembly, so use
the GNU's extension instead of C99 standard.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-12-08 10:13:49 +08:00
Kefu Chai
dfa7de61b1 cmake: should detect c++11 before enabling it
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-12-08 10:13:41 +08:00
David Zafman
cde687ba50 test: Don't write to a poolid that this test might not have created
Signed-off-by: David Zafman <dzafman@redhat.com>
2016-12-07 17:27:01 -08:00
Sage Weil
96cf8a1b28 Merge pull request #12354 from umullan/correction
doc: correcting the object name
2016-12-07 18:31:54 -06:00
Sage Weil
6c3d015c68 msg/simple/Pipe: avoid returning 0 on poll timeout
If poll times out it will return 0 (no data to read on socket).  In
165e5abdbf we changed tcp_read_wait from
returning -1 to returning -errno, which means we return 0 instead of -1
in this case.

This makes tcp_read() get into an infinite loop by repeatedly trying to
read from the socket and getting EAGAIN.

Fix by explicitly checking for a 0 return from poll(2) and returning
EAGAIN in that case.

Fixes: http://tracker.ceph.com/issues/18184
Signed-off-by: Sage Weil <sage@redhat.com>
2016-12-07 18:25:55 -06:00
Samuel Just
fe456b80f4 ReplicatedPG::record_write_error: don't leak orig_reply on cancel
The submit_log_entries machinery depends on the destructor for the
functor cleaning up after itself to handle cancelation.  I could have
introduced a local intrusive_ptr and captured that instead, but this is
slightly less magic.

Fixes: http://tracker.ceph.com/issues/18180
Signed-off-by: Samuel Just <sjust@redhat.com>
2016-12-07 14:29:49 -08:00
Sage Weil
cd56396a8a Merge pull request #12347 from gregsfortytwo/wip-18157-fix
ceph-fuse: start up log on parent process before shutdown

Reviewed-by: Sage Weil <sage@redhat.com>
2016-12-07 15:59:57 -05:00
Jeff Layton
18d2499d6c client: drop setuid/setgid bits on ownership change
When we hold exclusive auth caps, then the client is responsible for
handling changes to the mode. Make sure we remove any setuid/setgid
bits on an ownership change.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2016-12-07 12:10:56 -05:00
Jeff Layton
6da7250088 mds: clear setuid/setgid bits on ownership changes
If we get a ownership change, POSIX mandates that you clear the
setuid and setgid bits unless you are "appropriately privileged", in
which case the OS is allowed to leave them intact.

Linux however always clears those bits, regardless of the process
privileges, as that makes it simpler to close some potential races.
Have ceph do the same.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2016-12-07 12:10:56 -05:00
Jeff Layton
3d7fa89803 test: add new testcase for clearing setuid/setgid bits on chown/chgrp
Signed-off-by: Jeff Layton <jlayton@redhat.com>
2016-12-07 12:10:45 -05:00
Jeff Layton
58345df35a test: remove improper casts from SetSize test
Signed-off-by: Jeff Layton <jlayton@redhat.com>
2016-12-07 12:09:09 -05:00
Mykola Golub
9b965f9d8c Merge pull request #12259 from liupan1111/wip-fix-nbd-max-part
rbd-nbd: support partition for rbd-nbd mapped raw block device

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2016-12-07 18:07:05 +02:00
Sage Weil
508e81eac9 os/bluestore: bluestore_sync_submit_transaction = false
Signed-off-by: Sage Weil <sage@redhat.com>
2016-12-07 10:37:28 -05:00
Kefu Chai
899e650fe4 Merge pull request #12359 from tchaikov/wip-cmake
cmake: detect keyutils if WITH_LIBCEPHFS OR WITH_RBD

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-12-07 23:09:33 +08:00
Jason Dillaman
2c70df978d qa/workunits/rbd: removed qemu-iotest case 077
The test case is not stable due to racing console output. This
results in spurious failures.

Fixes: http://tracker.ceph.com/issues/10773
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-12-07 09:59:39 -05:00
Sage Weil
26220f0608 mon/OSDMonitor: only show interesting flags in health warning
Also add PAUSEREC flag into the list.

Fixes: http://tracker.ceph.com/issues/18175
Signed-off-by: Sage Weil <sage@redhat.com>
2016-12-07 09:50:26 -05:00
Kefu Chai
329846a30b Merge pull request #12361 from dachary/wip-18030-pglog
tests: remove TestPGLog EXPECT_DEATH tests

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-12-07 22:42:58 +08:00
John Spray
aa0a0e2271 Merge pull request #12208 from ukernel/wip-18047
mds: don't access mdsmap from log submit thread

Reviewed-by: John Spray <john.spray@redhat.com>
2016-12-07 14:15:25 +00:00
John Spray
d6b991a396 Merge pull request #12077 from jcsp/wip-17954
mds: fix dropping events in standby replay

Reviewed-by: Yan, Zheng <zyan@redhat.com>
2016-12-07 14:13:52 +00:00
John Spray
4ed4224391 Merge pull request #12133 from jcsp/wip-16924
mds: don't maintain bloom filters in standby replay

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2016-12-07 14:12:53 +00:00
John Spray
4006cdebd8 Merge pull request #12360 from wido/docs-cephfs-datascan-workers
doc: Fix for worker arguments to cephfs-data-scan tool

Reviewed-by: John Spray <john.spray@redhat.com>
2016-12-07 12:50:53 +00:00
Loic Dachary
f1b457ff98 tests: remove TestPGLog EXPECT_DEATH tests
As per Sam Just advice, remove the EXPECT_DEATH tests to avoid
intermittent hang because they do not play well with threads.

Fixes: http://tracker.ceph.com/issues/18030

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-12-07 10:50:43 +01:00
Kefu Chai
8f4d3ce147 Merge pull request #12327 from iain-buclaw-sociomantic/pybind-validate-args
pybind/rados: Add @requires for all aio methods

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-12-07 16:55:31 +08:00
Wido den Hollander
82c2f840b6
doc: Fix for worker arguments to cephfs-data-scan tool
The docs were incorrect and these arguments should work.

Signed-off-by: Wido den Hollander <wido@42on.com>
2016-12-07 09:49:09 +01:00
Kefu Chai
321691d89a cmake: turn krbd into a static lib
* simplify the link dependencies.
* s/keyutils/${KEYUTILS_LIBRARIES}/

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-12-07 16:09:08 +08:00
Kefu Chai
b805505d25 cmake: find keyutils if rbd or libcephfs is enabled
* find_package(keyutils REQUIRED) if (WITH_LIBCEPHFS OR WITH_RBD)
  prior to this change, we detect keyutils if the building platform is not
  FreeBSD, we should instead check the WITH_* options, and let the
  maintainer to decided what is the best for his/her platform, and error
  out if the building host cannot fulfill the requirement to build the
  asserts.
* build krbd.cc if (WITH_RBD)

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-12-07 16:09:08 +08:00
xie xingguo
bf3f57afb7 os/bluestore: fix global commit latency
"start" is used to calculate the global bluestore commit latency
and hence shall not be updated at each internal state enter/exit.

Otherwise the l_bluestore_commit_lat counter won't reflect the
real commit latency precisely.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-12-07 15:37:10 +08:00
Uday Mullangi
5af460091c doc: correcting the object name
Signed-off-by: umullangi@walmartlabs.com
2016-12-07 11:47:20 +05:30
Xie Xingguo
66953e3224 Merge pull request #12350 from chanyoung/struct-OSDOp-typos
osd: fix typos in "struct OSDOp" comments

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-12-07 10:04:23 +08:00