Jos Collin [Sat, 24 Jun 2017 15:29:43 +0000 (20:59 +0530)]
test: Division by zero in Legacy::encode_n()
Fixes the Coverity Scan Report:
CID 1411820 (#1 of 1): Division or modulo by zero (DIVIDE_BY_ZERO)
9. divide_by_zero: In expression bl.length() * i / sum, division by expression sum which may be zero has undefined behavior.
Jos Collin [Sat, 24 Jun 2017 14:56:51 +0000 (20:26 +0530)]
mon: Division by zero in PGMapDigest::dump_pool_stats_full()
Fixes The Coverity Scan Report:
CID 1412577 (#1 of 1): Division or modulo by float zero (DIVIDE_BY_ZERO)
35. divide_by_zero: In expression (float)mk / k, division by expression k which may be zero has undefined behavior.
ceph-common-12.1.0+git.1498286248.2fcedc7b3d-1.1.x86_64.rpm: directories not
owned by a package:
- /usr/share/doc/packages/ceph
The %docdir directive is a way of flagging anything in that directory as being
documentation. It does not actually package the directory. And we don't need
it because we're not dumping a large number of files into this directory.
For more information, see the "Directory-related Directives" section of
http://ftp.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html
Greg Farnum [Wed, 31 May 2017 15:37:19 +0000 (08:37 -0700)]
qa: do not restrict valgrind runs to centos
This reverts 693bd238510e69569cc3461f84b04c8667bc11da, which was
added in response to http://tracker.ceph.com/issues/18126. But
we updated the Ubuntu packages in sepia so it should be good to go.
Ming Lin [Fri, 23 Jun 2017 17:28:19 +0000 (10:28 -0700)]
osd: unlock sdata_op_ordering_lock with sdata_lock hold to avoid missing wakeup signal
We are running mysql on top of rbd. sysbench qps occasionally drops to zero
with the INSERT benchmark.
Debug code captured >2s latency between PG::queue_op() and OSD::dequeue_op().
We finally found out that the latency came from below code in OSD::ShardedOpWQ::_process(),
"threadpool_empty_queue_max_wait" is 2s by default.
Normally, it should not sleep for 2s since the comming IO requests will wakeup it.
But there is a small timing window that it missed the wakeup signal actually.
For example,
T3: sdata_lock.Lock()
T4: sdata_lock.Lock()
"send wakeup signal"
sdata_lock.Unock()
// here the wakeup signal has no effect actually
// becuase it has not slept yet.
// then, it sleeps.
WaitInterval(2s)
This patch unlocks sdata_op_ordering_lock with sdata_lock hold in OSD::ShardedOpWQ::_process(),
then the timeline becomes,
Jos Collin [Fri, 23 Jun 2017 16:09:44 +0000 (21:39 +0530)]
tools/rbd_mirror: initialize Non-static class member m_do_resync in ImageReplayer
Fixes the Coverity Scan Report:
CID 1412614 (#2-1 of 2): Uninitialized scalar field (UNINIT_CTOR)
7. uninit_member: Non-static class member m_do_resync is not initialized in this constructor nor in any functions that it calls.
Yan, Zheng [Fri, 9 Jun 2017 07:37:22 +0000 (15:37 +0800)]
mds: avoid submitting log entry while adjusting subtree map
MDCache::eval_subtree_root() may tigger scatter-gather process, which
submits log entry. Submitting log entry while adjusting subtree map is
bad, because subtree map in intermediate state may get used/logged.
Yan, Zheng [Tue, 6 Jun 2017 07:43:28 +0000 (15:43 +0800)]
mds: create subtree root immediately after directory tree becomes frozen
When a directory tree become frozen, its WAIT_FROZEN contexts are
executed asynchronously. Before Migrator::export_frozen() set export
bounds, MDCache::try_subtree_merge_at() can merge newly imported
subtree into the frozen directory tree. This causes problem if there
are auth pins in newly imported subtree.
The fix is creating subtree root immediately after directory tree
becomes frozen. The new subtree root has dir_auth 'me, me', so it's
not meregeable.
Fixes 2 problems:
- Do not test Bluestore on FreeBSD, since that does not work (yet)
And all erasure code overwrite tests are executed on BlueStore OSDs
Erasure code overwrites are unsafe on Filestore, see:
http://docs.ceph.com/docs/master/rados/operations/erasure-code/#erasure-coding-with-overwrites
- the JQ expression errors out with:
(version 1.5-1-g940132e-dirty)
====
jq: error (at :232): Cannot iterate over null (null)
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib64/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
====
Adding a ? to the jq expression allows to proceed on null blocks.
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
Kefu Chai [Wed, 21 Jun 2017 06:25:01 +0000 (14:25 +0800)]
crypto: allow PK11 module to load even if it's already initialized
there is chance that other pieces of application loads PK11 module
already and does not finalize it before calling common_init_finish().
also, upon fork, PK11 module resets its entire status including `nsc_init`,
by which PK11 module tell if it is initialized or not. so the behavior
of NSS_InitContext() could be different before and after fork. that's
another reason to ignore CKR_CRYPTOKI_ALREADY_INITIALIZED error (see
NSS_GetError()).
Matt Benjamin [Wed, 21 Jun 2017 21:20:40 +0000 (17:20 -0400)]
rgw_file: avoid a recursive lane lock in LRU drain
While highly unlikely in normal fs operations, draining an
entire filesystem could induce a recursion on object delete/unref,
when provoked by cohort_lru::drain().
Adjusted to use intrusive slist rather than std:vector<T*>
after review.
Found running librgw_file_nfsns unit test.
Fixes: http://tracker.ceph.com/issues/20374 Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Orit Wasserman [Thu, 22 Jun 2017 08:00:26 +0000 (11:00 +0300)]
Merge pull request #15753 from pritha-srivastava/wip-rgw-s3tests-conf
rgw: Changes for s3test config file, to add user under a tenant. Reviewed-by: Casey Bodely <cbodley@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com>
xie xingguo [Thu, 22 Jun 2017 02:30:55 +0000 (10:30 +0800)]
os/bluestore: non-atomic min_alloc_size_order
This is not necessary because we now write min_alloc_size into disk
during mkfs.
There are two acaccompanying changes too:
(1) don't call _set_alloc_sizes() during mkfs() any more, which is
not necessary.
(2) don't update min_alloc_size during _set_alloc_sizes(), we instead
update min_alloc_size_order each time we successfully read min_alloc_size
from disk.
Kefu Chai [Thu, 22 Jun 2017 04:16:52 +0000 (12:16 +0800)]
qa/workunits/rbd: do not test --export-format unless supported
in 55edd81, test for `--export-format` was added to exercise this
option. but this option is only supported on luminous, so we need to
check if it's avaialble before using it.