Commit Graph

81050 Commits

Author SHA1 Message Date
Jason Dillaman
d490872f27
Merge pull request #18790 from amitkumar50/cov-rbd-6
rbd: null check before pool_name use

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-11-21 08:51:03 -05:00
amitkuma
55c25726c4 rbd: null check before pool_name use
Fixes the coverity issue:

CID 1394846 (#1 of 1): Dereference after null check (FORWARD_NULL)
15. var_deref_model: Passing null pointer pool_name to regex_match,
which dereferences it.

Signed-off-by: Amit Kumar <amitkuma@redhat.com>
2017-11-21 21:26:50 +05:30
Kefu Chai
d44334f317 qa/workunits: silence py warnings for ceph-disk tests
ceph-disk now prints "depreacted" warning message when it starts. but
the tests parses its stdout and stderr for a json string. so we need to
silence the warnings for the tests.

Fixes: http://tracker.ceph.com/issues/22154
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-21 21:49:48 +08:00
tangwenjun
d4f868ae7b os/bluestore: fix the allocate in bluefs
when bluefs succeed to reserve but failed to alloc in db space,

it will cause a assert, just because of the space fragmentation.

in this situation, it could not use slow device space,

and it would happen in stupid or avl allocator.

Signed-off-by: tangwenjun <tang.wenjun3@zte.com.cn>
2017-11-21 19:27:25 +08:00
Mykola Golub
f4b88b2c9d qa/workunits/rbd: wait for demote status is propagated
(before promoting the image on another cluster)

Signed-off-by: Mykola Golub <to.my.trociny@gmail.com>
2017-11-21 13:22:50 +02:00
Mykola Golub
d77f40d10b
Merge pull request #19045 from dillaman/wip-22200
rbd: disk usage on empty pool no longer returns an error message

Reviewed-by: Mykola Golub <to.my.trociny@gmail.com>
2017-11-21 12:48:34 +02:00
Nathan Cutler
3600cd7bfd tests: ceph-disk: ignore E722 in flake8 test
Very old, and very new, versions of flake8 treat E722 as an error:

flake8 runtests: commands[0] | flake8 --ignore=H105,H405,E127 ceph_disk tests
ceph_disk/main.py:1575:9: E722 do not use bare except'
ceph_disk/main.py:1582:9: E722 do not use bare except'
ceph_disk/main.py:3252:5: E722 do not use bare except'
ceph_disk/main.py:3288:21: E722 do not use bare except'
ceph_disk/main.py:3296:17: E722 do not use bare except'
ceph_disk/main.py:4358:5: E722 do not use bare except'
tests/test_main.py:26:1: E722 do not use bare except'
ERROR: InvocationError: '/opt/j/ws/mkck/src/ceph-disk/.tox/flake8/bin/flake8 --ignore=H105,H405,E127 ceph_disk tests'

Fixes: http://tracker.ceph.com/issues/22207
References: https://gitlab.com/pycqa/flake8/issues/361

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2017-11-21 11:48:13 +01:00
Kefu Chai
9b3f9cd253 cmake: BuildDPDK: use ${CMAKE_MAKE_PROGRAM} when appropriate
DPDK requires GNU Make. see
spdk/dpdk/doc/guides/freebsd_gsg/build_dpdk.rst. so, we should use the
configured make program to do the job.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-21 17:47:17 +08:00
Kefu Chai
416082c1ce mon/health_check: s/std::list/list/
so it's self-contained, and .cc files including it are not obliged to `using namespace std`.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-21 17:35:18 +08:00
Kefu Chai
f4b74125e4 osd: send health-checks to mgr
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-21 17:35:18 +08:00
Kefu Chai
7c3221fda1 cmake: BuildDPDK: use POSIX compliant syntax
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-21 17:06:50 +08:00
Kefu Chai
486515ae88 osd: remember is_primary when adding pending creating pgs
so mgr can avoid calculating the same PG from different OSDs.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-21 16:38:59 +08:00
Kefu Chai
721cff9a97 common/OpTracker: refactor check_ops_in_flight()
* add a function visit_ops_in_flight() so it accepts a std::function,
  which can be applied to all ops in flight. and is used to count
  slow ops. the # of slow ops will be sent to mgr.
* add a function with_slow_ops_in_flight(), so we can use it to
  implement command like "dump_slow_ops_in_flight". unlike the
  existing feature which dumps slow ops to clog periodically, it
  will dump the slow ops on demand. and backoff the warning
  interval only when the slow ops are dumped.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-21 16:38:59 +08:00
Kefu Chai
6fed1d21be mgr/MgrClient: send health_checks using MMgrReport
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-21 16:38:59 +08:00
Kefu Chai
98f76f8e7e bluestore/NVMEDevice: do not deference a dangled pointer
* pass coremask_arg to the working thread by value.
  after 81249ab9d, get_val<>() returns a temporary variables instead of a
  reference to the variant held by config. so calling string::c_str(), and
  passing the returned `const char*` to a thread is not advisable. instead
  we should pass a string by value. since spdk_env_init() will copy the
  settings passed in by opt. it's safe even to destruct the coremask_arg
  afterward.
* use ffsll() to find the LSB. it's not a bottleneck, but it's easier
  and simpler, and probably improves the readability.
* refactor the NVMEManager::try_get() method: to define the variables
  when they are used for the first time.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-21 15:18:53 +08:00
Patrick Donnelly
df43e415c6
Merge PR #18274 into master
* refs/pull/18274/head:
	mds: fold mds_revoke_cap_timeout into mds_session_timeout
	client: add new delegation testcases
	client: add delegation support for cephfs
	common: remove data_dir_option from common_preinit and global_pre_init

Reviewed-by: Gregory Farnum <gfarnum@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-11-20 21:48:19 -08:00
Bingyin Zhang
2f12f1e028 rgw: correct typo refity to refit
Signed-off-by: Bingyin Zhang <zhangbingyin@cloudin.cn>
2017-11-21 11:40:17 +08:00
Patrick Donnelly
1439337e94
client: anchor Inode while trimming caps
This prevents the Inode from being deleted until after cap trimming is
finished. In particular, this prevents remove_all_caps from being called which
screws up the traversal of caps in trim_caps.

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

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-11-20 16:52:10 -08:00
Gregory Farnum
ed5f565baa
Merge pull request #18710 from com6056/wip-doc-fix-cephfs-snap-dir
doc: Fixes the name of the CephFS snapshot directory.

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2017-11-20 16:46:44 -08:00
Yuri Weinstein
7664dce364
Merge pull request #10992 from zhangsw/fix-rgw-cache-bug
rgw: fix a bug in rgw cache in delete_system_obj and get_system_obj.

Reviewed-by: Matt Benjamin <mbenjami@redhat.com>
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
Reviewed-by: Amit Kumar <amitkuma@redhat.com>
2017-11-20 14:30:13 -08:00
Douglas Fuller
447b3d4852 mon/AuthMonitor: improve error message
Improve the error message for 'ceph fs authorize' where the
given entity exists but has different auth caps.

Fixes: http://tracker.ceph.com/issues/21765
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
2017-11-20 13:26:32 -05:00
Jason Dillaman
7da041bf36
Merge pull request #19011 from trociny/wip-mirror-missing-lock
rbd-mirror: missing lock when re-sending update_sync_point

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-11-20 13:22:36 -05:00
Jason Dillaman
d23172c02d
Merge pull request #19016 from trociny/wip-valgrind-unittest_rbd_mirror
test/rbd_mirror: fix valgrind warnings in unittest

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-11-20 13:16:23 -05:00
Casey Bodley
53898edd90
Merge pull request #18799 from ivancich/wip-remove-StreamObjData
rgw clean-up: remove unreferenced pure virtual class StreamObjData

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2017-11-20 13:02:23 -05:00
Patrick Donnelly
83df8af349
Merge PR #19022 into master
* refs/pull/19022/head:
	githubmap: Add oritwas

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-11-20 09:52:33 -08:00
Jason Dillaman
f4528122d6 rbd: disk usage on empty pool no longer returns an error message
Fixes: http://tracker.ceph.com/issues/22200
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-11-20 11:03:17 -05:00
Ilya Dryomov
07890592ff msg/simple/Pipe: resurrect support for !CEPH_FEATURE_MSG_AUTH
Revert CEPH_FEATURE_MSG_AUTH-related hunks of commit 7ba4d5324e
("msg/simple/Pipe: remove legacy feature case handle"), which
removed code that handled !CEPH_FEATURE_MSG_AUTH footers.  It's needed
for kernels prior to 3.19, where cephx signatures aren't supported.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2017-11-20 16:51:01 +01:00
Casey Bodley
a8ba8bc70d
Merge pull request #18987 from ivancich/wip-remove-sys-obj-get-state
rgw clean-up: remove unused var & func in RGWRados::SystemObject

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2017-11-20 10:48:01 -05:00
Ilya Dryomov
87b075dc58 msg/async/AsyncConnection: resurrect support for !CEPH_FEATURE_MSG_AUTH
Revert CEPH_FEATURE_MSG_AUTH-related hunks of commit 83f7e392a1
("msg/async/AsyncConnection: remove legacy feature case handle"), which
removed code that handled !CEPH_FEATURE_MSG_AUTH footers.  It's needed
for kernels prior to 3.19, where cephx signatures aren't supported.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2017-11-20 16:35:41 +01:00
John Spray
50412f7e9c
Merge pull request #18173 from gmayyyha/osd-status-21707
mgr: fix "osd status" command exception if OSD not in pgmap stats

Reviewed-by: John Spray <john.spray@redhat.com>
2017-11-20 15:35:09 +00:00
Kefu Chai
bcf12a6abd
Merge pull request #19024 from tchaikov/wip-21474
qa/tasks: prolong revive_osd() timeout to 6 min

Reviewed-by: Sage Weil <sage@redhat.com>
2017-11-20 22:54:27 +08:00
Casey Bodley
3149ba1d91
Merge pull request #18667 from Leeshine/wip-rgw-bug-21615
rgw: radosgw-admin zonegroup get and zone get return defaults when there is no realm

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
2017-11-20 09:15:04 -05:00
amitkuma
11a473de8f libceph: Avoiding divide by zero
Fixes the coverity issue:
CID 1405270 (#1 of 1): Division or modulo by zero (DIVIDE_BY_ZERO)
2. divide_by_zero: In function call ll_get_stripe_osd,
division by expression l.stripe_count which may be zero has
undefined behavior.

Signed-off-by: Amit Kumar <amitkuma@redhat.com>
2017-11-20 19:20:18 +05:30
amitkuma
0748d7c805 cleanup: Replacing MIN,MAX with std::min,std::max
Signed-off-by: Amit Kumar <amitkuma@redhat.com>
2017-11-20 18:27:49 +05:30
Orit Wasserman
92b82295b4
Merge pull request #18302 from joscollin/wip-update-radosgw-admin-usage
rgw: Various cleanups and options update in rgw_admin.cc
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
2017-11-20 12:36:51 +02:00
Orit Wasserman
aa271b5f82
Merge pull request #18979 from cfanz/dump-header-improve-wip
rgw: clean code with helper function dump_header_if_nonempty
Reviewed-by: Casey Bodley <cbodley@redhat.com>
2017-11-20 12:04:39 +02:00
Orit Wasserman
c0e44264cb
Merge pull request #18985 from theanalyst/wip-keystone-logging
rgw: keystone: bump up logging when error is received
Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2017-11-20 12:01:35 +02:00
Igor Fedotov
de65557c6f osd: make operations on ReplicatedBackend::in_progress_ops a bit more effective.
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
2017-11-20 11:36:24 +03:00
myoungwon oh
7353155582 osd: blocking read op if object is degraded
This commit prevents promote_object() if object need to be blocked

Signed-off-by: Myoungwon Oh <omwmw@sk.com>
2017-11-20 17:35:05 +09:00
Kefu Chai
89a48189ea cmake: only create sysctl file on linux
and check 64bit platform by using the sizeof(void*)

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-20 15:45:03 +08:00
Kefu Chai
67ad6a2a39
Merge pull request #18980 from shinobu-x/os_filestore_filestore_nit_cleanup
os/filestore/FileStore: Initialized by nullptr, NULL or 0 instead

Reviewed-by: Sage Weil <sage@redhat.com>
2017-11-20 14:44:58 +08:00
Kefu Chai
028ab3b28e
Merge pull request #18982 from neha-ojha/wip-const-cleanup
osd/PG: const cleanup for recoverable/readable predicates

Reviewed-by: Sage Weil <sage@redhat.com>
2017-11-20 14:44:23 +08:00
Kefu Chai
697fb151cd
Merge pull request #18934 from tchaikov/wip-option-return-by-ref
Revert "common/config: return const reference instead of a copy"

Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
2017-11-20 14:43:40 +08:00
Kefu Chai
46142513df
Merge pull request #18916 from tchaikov/wip-22113
osd: subscribe osdmaps if any pending pgs

Reviewed-by: Sage Weil <sage@redhat.com>
2017-11-20 14:42:25 +08:00
Kefu Chai
2e4d3557e7
Merge pull request #18816 from amitkumar50/cov-common-2
common: Check this->data.op_size before use

Reviewed-by: Sage Weil <sage@redhat.com>
2017-11-20 14:41:57 +08:00
Kefu Chai
cb7dc94fbe
Merge pull request #18810 from majianpeng/fix-21982
osdc/Objecter: record correctly value for l_osdc_op_send_bytes.

Reviewed-by: Sage Weil <sage@redhat.com>
2017-11-20 14:39:17 +08:00
Kefu Chai
cb3a5c25c9
Merge pull request #18777 from majianpeng/bluestore-collection-list
os/bluestore: optimize _collection_list.

Reviewed-by: Sage Weil <sage@redhat.com>
2017-11-20 14:38:51 +08:00
Kefu Chai
586da3da4f
Merge pull request #18544 from ddiss/pid_max
sysctl.d: set kernel.pid_max=4194304

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-11-20 14:37:08 +08:00
Kefu Chai
f70474607b
Merge pull request #18718 from shinobu-x/sk-ceph_osd
ceph_osd.cc: Drop legacy or redundant code

Reviewed-by: Sage Weil <sage@redhat.com>
2017-11-20 14:36:38 +08:00
Kefu Chai
749bbda075 qa/tasks: prolong revive_osd() timeout to 6 min
see also #17902

Fixes: http://tracker.ceph.com/issues/21474
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-20 13:40:59 +08:00