Commit Graph

69211 Commits

Author SHA1 Message Date
Kefu Chai
4cf28de4c9 qa/tasks/workunit: use the suite repo for cloning workunit
as "workunits" reside in ceph/qa/workunits, it's more intuitive to
respect suite-repo option when cloning workunits.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-02-24 16:47:47 +08:00
Kefu Chai
cd0e53830e script/sepia_bt.sh: get sha1,release from t.log if it's not in core
* sometimes, the coredump comes from python, so we should get the sha1 and
  release in a different and more fragile way.
* also, the distro of Centos7 comes from python is "Centos Linux", so we
  should normalize its distro name and distro version.
* add "-v" option to be more chatty.
* normalize the $prog if $prog is */python*
* fix the pkg_path if the distro is centos7

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-02-24 11:15:30 +08:00
Jie Wang
11c0d64e99 BitAllocator: delete useless codes
Signed-off-by: Jie Wang <jie.wang@kylin-cloud.com>
2017-02-24 01:31:46 +00:00
Gui Hecheng
f42f6cf66a test/librbd: skip expect object request send when skip_partial_discard on
With skip_partial_discard on, there may be no object request send calls,
because they are skipped.

Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
2017-02-24 09:31:14 +08:00
Jason Dillaman
38405b81dc Merge pull request #13312 from trociny/wip-18783
rbd-mirror: InstanceWatcher watch/notify stub for leader/follower RPC

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-02-23 20:20:03 -05:00
Gregory Farnum
8827efa284 Merge pull request #13616 from liewegas/wip-primary-temp
mon/OSDMonitor: remove trivial PGMap dependency for 'osd primary-temp' command

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2017-02-23 15:08:19 -08:00
Yuri Weinstein
bba8c3ca15 Merge pull request #13611 from zmc/wip-rgw-openstack
qa/suites/rgw: Add openstack volume configuration

Reviewed-by: Yuri Weinstein <yweins@redhat.com>
2017-02-23 14:56:50 -08:00
Sage Weil
ff12ba2402 mon/OSDMonitor: remove trivial PGMap dependency for 'osd primary-temp' command
Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-23 16:50:27 -05:00
Matt Benjamin
eb1cd3b30c rgw_file: ensure valid_s3_object_name for directories, too
The logic in RGWLibFS::mkdir() validated bucket names, but not
object names (though RGWLibFS::create() did so).

The negative side effect of this was not creating illegal objects
(we won't), but in a) failing with -EIO and b) more importantly,
not removing up the proposed object from FHCache, which produced a
boost assert when recycled.

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

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2017-02-23 16:02:07 -05:00
Matt Benjamin
73368cc14c Merge pull request #13607 from linuxbox2/wip-parentref
rgw: wip parentref
2017-02-23 13:00:42 -05:00
Zack Cerza
8af4c35f95 qa/suites/rgw: Add openstack volume configuration
Without this, OSDs will fail to create on instances whose root fs isn't
xfs.

Signed-off-by: Zack Cerza <zack@redhat.com>
2017-02-23 10:14:05 -07:00
Kefu Chai
69afc52492 Merge pull request #13480 from wido/srpm
make-srpm: Pass first parameter to make-dist for building SRPM

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-02-24 00:56:04 +08:00
Gui Hecheng
dc9892b118 librbd: adopt override for writesame related header files
Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
2017-02-24 00:18:35 +08:00
Gui Hecheng
6d024c5dae librbd: make writesame get all zeros with rbd_skip_partial_discard on
Now writesame tends to do a discard on all zero buffer, but
if rbd_skip_partial_discard is turned on, discard will not do any
zeroing work on partial discard, so we read random data while expecting
all zeros.
To fix it, we introduce the ImageCtx::skip_partial_discard and
pass an extra parameter to discard. Writesame will always pass false
and other discards will pass the ImageCtx::skip_partial_discard
which is set by the rbd_skip_partial_discard option.

Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
2017-02-24 00:16:46 +08:00
Sage Weil
9076e695fb osd: remove copy-get-classic
This hasn't been used since well before hammer.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-23 11:15:43 -05:00
Matt Benjamin
70ef7d45e0 rgw_file: return of RGWFileHandle::FLAG_EXACT_MATCH
Allow callers of rgw_lookup() on objects attested in an
rgw_readdir() callback the ability to bypass exact match in
RGWLibFS::stat_leaf() case 2, but restore exact match enforcement
for general lookups.

This preserves required common_prefix namespace behavior, but
prevents clients from eerily permitting things like "cd sara0" via
partial name match on "sara01."

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

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2017-02-23 10:55:51 -05:00
Sage Weil
8ff8f0fa0b Merge pull request #13595 from tchaikov/wip-enable-bluestore-ceph-dencoder
ceph-dencoder: enable bluestore types

Reviewed-by: Sage Weil <sage@redhat.com>
2017-02-23 09:31:58 -06:00
Sage Weil
bbd9f0f0b2 osdc/Objecter: _calc_target on all ops so that we notice splits
We need to make sure we update the mapping and get an accurate actual_pgid
value by recalcuating the mapping on every map change.  Otherwise, we may
not notice a split (and subsequent actual_pgid change) and resend the same
op with a stale spg_t.  To fix this,

- _calc_target on need_resend
- update target regardless of current con

Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-23 10:29:42 -05:00
Sage Weil
71f5309fe7 osdc/Objecter: refactor pool dne check to make op->session optional
Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-23 10:29:42 -05:00
Sage Weil
57dfcb62c1 osdc/Objecter: track latest epoch in op_target_t
Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-23 10:29:42 -05:00
Sage Weil
fce285a5ff osd: warn on ops directed to the wrong pg_t
Check whether the request hobj maps to the current pg_t.  If we have the
osd_debug_misdirected_ops setting enabled (as teuthology does), assert out
as well so that the error is easy to spot.  This catches bugs in the
Objecter (especially the new code that explicitly names the spg_t for the
request).

Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-23 10:29:42 -05:00
Sage Weil
930dc603e7 vstart.sh: osd debug misdirected ops = true
Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-23 10:29:42 -05:00
Matt Benjamin
dea8d1ee37 rgw_file: rgw_lookup: don't ref for "/" or ".."
These refs won't be returned by nfs-ganesha, and are sufficiently
magical that other consumers should be persuaded to understand
their specialness.

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

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2017-02-23 10:27:35 -05:00
Sage Weil
292306cdfb Merge pull request #13569 from athanatos/wip-17831-18583-18809-18927
ReplicatedBackend: don't queue Context outside of ObjectStore with obc

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2017-02-23 09:22:02 -06:00
Sage Weil
5b12163ed6 Merge pull request #13470 from wangzhengyong/master
os/bluestore/BitAllocator: fix bug of checking required blocks

Reviewed-by: Sage Weil <sage@redhat.com>
2017-02-23 09:04:01 -06:00
Sage Weil
7c44095e04 Merge pull request #13516 from wjwithagen/wip-wjw-test-onjectstore
test/ceph-test-objectstore: Don't always include BlueStore code

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-02-23 09:02:54 -06:00
Sage Weil
b1ea854d11 Merge pull request #13521 from dachary/wip-crush-uniform
crush: allow uniform buckets with no items

Reviewed-by: Sage Weil <sage@redhat.com>
2017-02-23 09:01:30 -06:00
Sage Weil
638594d579 Merge pull request #13540 from liewegas/wip-debug-osd
osd: debug con in ms_handle_connect

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-02-23 09:01:01 -06:00
Sage Weil
780ca8e38a Merge pull request #13565 from liewegas/wip-fix-pool-race-test
ceph_test_rados_api_misc: avoid livelock from PoolCreationRace

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2017-02-23 09:00:35 -06:00
Mykola Golub
215f2984bd rbd-mirror A/A: InstanceWatcher watch/notify stub for leader/follower RPC
Fixes: http://tracker.ceph.com/issues/18783
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2017-02-23 13:12:00 +01:00
Mykola Golub
385c2e4d11 librbd: add ManagedLock destroy method (useful for mock tests)
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2017-02-23 12:57:19 +01:00
Mykola Golub
c9afb1d459 cls/rbd: methods to track rbd-mirror instances
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2017-02-23 12:57:19 +01:00
Sarit Zubakov
1e5c2fc459 msg/async/rdma: Fix broken compilation
Resposible commit is: eb0f624

issue:985021

Change-Id: I5b4afc537a9351dd18f5ea08bf4d72a1b03a8635
Signed-off-by: Sarit Zubakov <saritz@mellanox.com>
2017-02-23 11:31:53 +02:00
Mykola Golub
7a8e718585 Merge pull request #13568 from dillaman/wip-18990
rbd-mirror: deleting a snapshot during sync can result in read errors

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2017-02-23 11:28:27 +02:00
Gui Hecheng
3550fe4f21 test/librbd: add writesame test for fsx
Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
2017-02-23 17:25:35 +08:00
Gui Hecheng
39fea5e5d0 test/librbd: add tests for rbd writesame
Based on pr: https://github.com/ceph/ceph/pull/10019.

Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
Signed-off-by: Mingxin Liu <mingxin@xsky.com>
2017-02-23 17:25:32 +08:00
Gui Hecheng
6bd1d7ec34 test/librbd: handle writesame op in test_mock_Replay
Based on pr: https://github.com/ceph/ceph/pull/10019.

Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
Signed-off-by: Mingxin Liu <mingxin@xsky.com>
2017-02-23 17:25:30 +08:00
Gui Hecheng
f6cc953900 test/librbd: handle writesame op in librados_test_stub, required
Based on pr: https://github.com/ceph/ceph/pull/10019.

Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
Signed-off-by: Mingxin Liu <mingxin@xsky.com>
2017-02-23 17:25:27 +08:00
Gui Hecheng
ca737d0678 librbd: handle perfcounter for writesame separately
Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
2017-02-23 17:25:24 +08:00
Gui Hecheng
3fe9ab5140 librbd: writesame do discard on an all-zero buffer
Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
2017-02-23 17:25:22 +08:00
Gui Hecheng
4014bae7bf librbd: implement writesame API
Based on pr: https://github.com/ceph/ceph/pull/10019.
This drops the original writesame2 api.

Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
Signed-off-by: Mingxin Liu <mingxin@xsky.com>
2017-02-23 17:25:19 +08:00
Gui Hecheng
969200a30c librbd: handle writesame request in AioImageRequestWQ
Based on pr: https://github.com/ceph/ceph/pull/10019.

Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
Signed-off-by: Mingxin Liu <mingxin@xsky.com>
2017-02-23 17:25:17 +08:00
Gui Hecheng
ffd8ffb956 librbd: add writesame AioImageRequest
Based on pr: https://github.com/ceph/ceph/pull/10019.

Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
Signed-off-by: Mingxin Liu <mingxin@xsky.com>
2017-02-23 17:25:14 +08:00
Gui Hecheng
b71335b94a librbd/journal: handle writesame event
Based on pr: https://github.com/ceph/ceph/pull/10019.

Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
Signed-off-by: Mingxin Liu <mingxin@xsky.com>
2017-02-23 17:25:10 +08:00
Gui Hecheng
b96529ef33 librbd: add writesame AioObjectRequest
Based on pr: https://github.com/ceph/ceph/pull/10019.

Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
Signed-off-by: Mingxin Liu <mingxin@xsky.com>
2017-02-23 17:25:07 +08:00
Yan, Zheng
64a0e1401f ceph_fuse: fix daemonization when pid file is non-empty
During daemonizing ceph-fuse, both the parent and child processes call
global_init_postfork_start(). global_init_postfork_start() calls
pidfile_write(). If pid file is non-empty, one pidfile_write() call
fails because it can't lock the pid file.

The fix is only child process calls global_init_postfork_start()

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-02-23 15:28:20 +08:00
Loic Dachary
d6d2e72dac Revert "Revert "ceph-disk: change get_dmcrypt_key test to support different cluster name""
This reverts commit d3409d4562 which
reverted 1c74747360. Although in the same
pull request, 1c74747360 was a fix for
d98d4dbc27. The two should have been
squashed but they were not.

When reverting the pull request I reverted all the commits in the pull
request but I did it in the wrong order and the fix became the
problem. Luckily the outcome is a noop instead of a bug, reason why
it was undetected by the tests.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2017-02-23 07:58:12 +01:00
Kefu Chai
a3b8e0aa0a ceph-dencoder: s/WITH_LIBAIO/HAVE_LIBAIO/
* s/WITH_LIBAIO/HAVE_LIBAIO/: as HAVE_LIBAIO is used to detect if libaio
  is installed and is exposed in the acconfig.h.
* do not test bluestore_blob_t with ceph-dencoder, as it repurposes the
  "feature" parameter for struct_v.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-02-23 14:54:16 +08:00
Jie Wang
2badfbac98 BitMapAllocator: rm unused variable
Signed-off-by: Jie Wang <jie.wang@kylin-cloud.com>
2017-02-23 06:09:12 +00:00
Kefu Chai
a7c1d3b9d8 os/bluestore: fix bluestore_blob_t::generate_test_instances()
add extends before marking unused ranges, otherwise add_unused()
asserts if (offset + len < blob_len)
this method is supposed to be used by ceph-dencoder, but
bluestore_blob_t's codec is quite different. we are not testing its
encoding in ceph-dencoder at this moment.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-02-23 12:17:46 +08:00