Commit Graph

71547 Commits

Author SHA1 Message Date
Casey Bodley
82aea4722b Merge pull request #14299 from rzarzynski/wip-rgw-deduplicate-rgw_make_bucket_entry_name
rgw: deduplicate variants of rgw_make_bucket_entry_name().

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2017-04-26 11:38:13 -04:00
Casey Bodley
31576a001c Merge pull request #14552 from shashalu/fix-sync-status
rgw: add 'state==SyncState::IncrementalSync' condition when add item …

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2017-04-26 11:10:03 -04:00
Sage Weil
181329bb22 Merge pull request #14808 from ceph/wip-hdd-throttle-cost
common/config_opts: Set the HDD throttle cost to 1.5M

Reviewed-by: Sage Weil <sage@redhat.com>
2017-04-26 10:04:24 -05:00
Mark Nelson
34deef08a4 common/config_opts: Set the HDD throttle cost to 1.5M
Signed-off-by: Mark Nelson <mnelson@redhat.com>
2017-04-26 10:00:37 -05:00
Ilya Dryomov
9038074796 Merge pull request #14785 from idryomov/wip-krbd-exclusive-option
rbd: recognize exclusive option

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2017-04-26 16:25:31 +02:00
Sage Weil
a04b98e01f Merge pull request #14804 from hrchu/rgwAdmin-apiDoc-getUsageInfo
doc: rgw: Get user usage needs to specify user

Reviewed-by: Sage Weil <sage@redhat.com>
2017-04-26 08:48:56 -05:00
Sage Weil
7798fcbced ceph_test_rados_api_tier: tolerate ENOENT from 'pg scrub'
Signed-off-by: Sage Weil <sage@redhat.com>
2017-04-26 09:47:09 -04:00
Sage Weil
3608a00970 Merge pull request #14780 from liewegas/wip-osdmap-mempool
osd: put osdmap in mempool

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-04-26 08:33:05 -05:00
Ilya Dryomov
192f6ca079 qa/workunits/rbd: test exclusive map option
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2017-04-26 15:05:50 +02:00
Matt Benjamin
b584c7eb7c Merge pull request #14781 from theanalyst/rgw/cleanup/ldap_err_msg
rgw_ldap: log the ldap err in case of bind failure
2017-04-26 09:04:15 -04:00
Casey Bodley
f422d4f184 rgw: remove rgw_realm_reconfigure_delay
when the master zone is changed, this config variable was increasing the
window of time where the old master zone would continue to handle
requests to modify metadata. those changes would not be reflected by the
new metadata master zone, and would be lost to the cluster

it was an attempt to optimize for the unlikely case of multiple period
changes in a short period of time, but the logic in reload() handles this
case correctly as is

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-04-26 08:51:02 -04:00
Casey Bodley
721e3d6ee5 rgw: require --yes-i-really-mean-it to promote zone with stale metadata
if a zone is promoted to master before it has a chance to sync from the
previous master zone, any metadata entries after its sync position will
be lost

print an error if 'period commit' is trying to promote a zone that is
more than one period behind the current master, and only allow the
commit to proceed if the --yes-i-really-mean-it flag is provided

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-04-26 08:51:02 -04:00
Casey Bodley
bb49e2fbed rgw: period commit uses sync status markers
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-04-26 08:51:02 -04:00
Casey Bodley
a4bf014b86 rgw: use RGWShardCollectCR for RGWReadSyncStatusCoroutine
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-04-26 08:51:02 -04:00
Casey Bodley
0372df20be rgw: change metadata read_sync_status interface
makes the same change to read_sync_status() in RGWMetaSyncStatusManager,
needed to support multiple concurrent readers for the rest interface

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-04-26 08:51:02 -04:00
Casey Bodley
5d6e7fae93 test/rgw: sync status ignores shard markers from previous periods
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-04-26 08:51:02 -04:00
Casey Bodley
574ff5f5df rgw: store realm epoch with sync status markers
sync status markers can't be compared between periods, so we need to
record the current period's realm epoch with its markers. when the
rgw_meta_sync_info.realm_epoch is more recent than the marker's
realm_epoch, we must treat the marker as empty

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-04-26 08:51:02 -04:00
Casey Bodley
a898fb76a4 rgw: RGWBackoffControlCR only retries until success
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-04-26 08:51:01 -04:00
Casey Bodley
69be410d0e rgw: clean up RGWInitDataSyncStatusCoroutine
RGWInitDataSyncStatusCoroutine operates on a given rgw_data_sync_status
pointer, which saves us from having to read it back from rados

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-04-26 08:51:01 -04:00
Casey Bodley
7c23713b1a rgw: fix marker comparison to detect end of mdlog period
Fixes: http://tracker.ceph.com/issues/18639

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-04-26 08:51:01 -04:00
Casey Bodley
09c847ff79 rgw: add == and != operators for period history cursor
RGWMetaSyncCR was using operator== but it always returned true!

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-04-26 08:51:01 -04:00
Casey Bodley
aae4c183c3 Merge pull request #13067 from cbodley/wip-rgw-test-multi-periods
test/rgw: fixes for test_multi_period_incremental_sync()

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2017-04-26 08:50:00 -04:00
Kefu Chai
97a58fa69a mon/OSDMonitor: check get()'s return value instead of bl's length
instead of assuming how the bl is encoded, we'd better rely on the
return code of get().

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-04-26 20:17:47 +08:00
hrchu
e922a98daa doc: rgw: Get user usage needs to specify user
Signed-off-by: hrchu <petertc@gmail.com>
2017-04-26 10:47:58 +00:00
Kefu Chai
7ec86ca55e mgr/MgrPyModule: no need to keep pClass and pModule around
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-04-26 18:08:07 +08:00
Kefu Chai
67072d2261 mgr: pass python interpreter's path to embedded python
* also do prevent python from registering its own signal handler, it does
  not make sense in our embedded use case.
* pass python interpreter's path to embedded python before initializing
  it. python uses this path to look up the "site" modules, etc.

so it can use other interpreter if it is not intalled into $PATH,
otherwise the "python" in $PATH will always be used even the
PYTHON_EXECUTABLE in CMake's cache is pointing to another python
interpreter.

if one want to debug ceph-mgr with a customize build python, this would
be helpful.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-04-26 18:08:07 +08:00
Kefu Chai
6c2a5a2771 cmake: no need to link ceph-mgr against mds
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-04-26 18:05:02 +08:00
Kefu Chai
ff1c0e80dd Merge pull request #14796 from tchaikov/wip-init-ceph
init-ceph: should have a space before "]"

Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
2017-04-26 16:52:00 +08:00
Willem Jan Withagen
abcdb0768c common/config: Add /usr/local/etc/ceph to default paths
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2017-04-26 09:45:37 +02:00
Svyatoslav
9940efdb11 src/msg/async/AsyncConnect.cc: PVS-Studio: CWE-467 Use of sizeof() on a Pointer Type
Signed-off-by: Svyatoslav <razmyslov@viva64.com>
2017-04-26 10:24:14 +03:00
Kefu Chai
dbcd0ae916 init-ceph: should have a space before "]"
otherwise we will have

./bin/init-ceph: 269: [: missing ]

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-04-26 15:12:10 +08:00
hrchu
a1a0dcfa40 doc: rgw: Rewrite the key management
The create/remove key section in the doc is a bit confusing.
Rewrite it and give more examples.

Signed-off-by: hrchu <hrchu@cht.com.tw>
2017-04-26 14:55:32 +08:00
Mingxin Liu
77b0ff4677 PGMonitor: fix wrongly report "pg stuck in inactive"
Signed-off-by: Mingxin Liu <mingxin@xsky.com>
2017-04-26 12:29:34 +08:00
Kefu Chai
6f1037e22c msg/async: return right away in NetHandler::set_priority() if not supported
* SO_PRIORITY is linux specific, so no need to check __linux__
* early return if priority is less than 0 (maybe we should also return if
  it's higher than 6?), the less indent.
* store errno if fails to set SO_PRIORITY before printing log messages.
* guard the whole function with '#ifdef SO_PRIORITY' so on platforms
  where this option is not supported, this function will be a no-op.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-04-26 12:16:57 +08:00
Kefu Chai
b833ba71f1 Merge pull request #12460 from umullan/bucketunlink
doc: Correcting the remove bucket example and adding bucket link/unlink examples

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-04-26 11:57:16 +08:00
Uday Mullangi
c7fb3db372 doc: Correcting the bucket unlink example with correct syntax
Signed-off-by: Uday Mullangi <umullangi@walmartlabs.com>
2017-04-26 09:26:52 +05:30
Kefu Chai
f0f55a6f7d Merge pull request #14728 from dachary/wip-ceph-disk-lock
ceph-disk: implement prepare --no-locking

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-04-26 11:42:10 +08:00
wangzhengyong
079decf0ba test/librados/c_operations: add cmpext tests
Dispatch compare-and-read and compare-and-write compound requests, and
confirm expected behaviour under compare and miscompare conditions.

Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
Signed-off-by: David Disseldorp <ddiss@suse.de>
2017-04-26 09:11:37 +08:00
wangzhengyong
8245e822fe ceph_test_rados_api_aio: add cmpext tests
Write a buffer and compare it with a matching and non-matching buffer
via cmpext. Do this using rados_aio_cmpext(), ioctx.aio_cmpext() and
ioctx.aio_operate(op.cmpext())

Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
Signed-off-by: David Disseldorp <ddiss@suse.de>
2017-04-26 09:11:15 +08:00
wangzhengyong
0ccebc5c9b librados: add cmpext API
The compare-extent (cmpext) operation allows callers to compare existing
object contents with an arbitrary buffer. cmpext requests can be
compounded with read and write operations, allowing for atomic object
content updates. return 0 on success, negative error code
on failure, (-MAX_ERRNO - mismatch_off) on mismatch

This commit is based on Mike Christie's initial C++ API, with the
addition of AIO support and a C API. Response marshalling was also
reworked, so that the miscompare offset is unmarshalled transparently to
the caller.

Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
Signed-off-by: David Disseldorp <ddiss@suse.de>
2017-04-26 09:10:28 +08:00
wangzhengyong
351f78d7b9 ceph_test_rados_api_misc: add cmpext tests
Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
Signed-off-by: Mike Christie <mchristi@redhat.com>
[ddiss@suse.de: add rados_cmpext() test coverage]
Reviewed-by: David Disseldorp <ddiss@suse.de>
2017-04-26 09:09:32 +08:00
wangzhengyong
bfc334b537 ceph osd: add support for new op cmpext
This adds support for a new op cmpext. The request will read
extent.length bytes and compare them to extent.length bytes at
extent.offset on disk. return 0 on success, negative error code
on failure, (-MAX_ERRNO - mismatch_off) on mismatch

rbd will use this in a multi op request to implement the
SCSI COMPARE_AND_WRITE request which is used by VMware for
its atomic test and set request.

Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
Signed-off-by: Mike Christie <mchristi@redhat.com>
[ddiss@suse.de: ReplicatedPG -> PrimaryLogPG]
Reviewed-by: David Disseldorp <ddiss@suse.de>
2017-04-26 09:08:22 +08:00
Yuri Weinstein
024314e912 Merge pull request #14755 from cbodley/wip-msg-direct
core: introduce DirectMessenger

Reviewed-by: Greg Farnum gfarnum@redhat.com
Reviewed-by: Sage Weil sage@redhat.com
2017-04-25 16:52:11 -07:00
Sage Weil
64ae61a516 osd/OSDMap: put OSDMap[::Incremental] itself in mempool too
Signed-off-by: Sage Weil <sage@redhat.com>
2017-04-25 18:26:08 -04:00
Sage Weil
691bc44d59 Merge pull request #14783 from dachary/wip-crush-classe-test
test: use 7130 for crush-classes.sh

Reviewed-by: Dan Mick <dmick@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2017-04-25 16:56:11 -05:00
Sage Weil
7e2a286446 Merge pull request #14651 from tchaikov/wip-silent-boost-build
cmake: pass -d0 to b2 if not CMAKE_VERBOSE_MAKEFILE

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2017-04-25 16:53:58 -05:00
Sage Weil
d754fbcca4 Merge pull request #14731 from ceph/wip-bluestore-type
os/bluestore: use correct bound encode size for unused

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Igor Fedotov <ifedotov@mirantis.com>
2017-04-25 16:53:44 -05:00
Sage Weil
5af0944afa Merge pull request #14738 from liupan1111/wip-fix-initial
src/common: change last_work_queue to next_work_queue. 

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-04-25 16:53:23 -05:00
Sage Weil
4ba4567bd2 Merge pull request #14757 from dmick/wip-einval
common: Better handling for missing/inaccessible ceph.conf files

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
2017-04-25 16:52:46 -05:00
Sage Weil
fee612f16f Merge pull request #14764 from Liuchang0812/wip-strip-pglog-op-name
osd: strip pglog op name

Reviewed-by: Sage Weil <sage@redhat.com>
2017-04-25 16:52:28 -05:00