Created mock classes to represent a few central librbd classes
and a basic gmock test fixture for future gmock-based unit tests.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This will facilitate the creation of unit test mocks to verify
non-librados actions. The templates (by default) will be flagged
as extern to avoid the translation unit bloat.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Neither RHEL and Fedora require a Group: line, so retain
only for SLE/openSUSE (and set the right value for these distros)
Signed-off-by: Nathan Cutler <ncutler@suse.com>
lttng and babeltrace are build dependencies for rbd-replay-prep. Make
sure the right package names are used. Enable for SLE12, as well as
for openSUSE 13.1 and higher.
Move the BuildRequires out of the ceph-test subpackage and into the
distro-conditional dependencies section.
Make ordering of BuildRequires a little more alphabetical.
http://tracker.ceph.com/issues/12360Fixes: #12360
Signed-off-by: Nathan Cutler <ncutler@suse.com>
sqme
SIGHUP (1) signal makes ceph services reopen its log files so we do not
need to call any init scripts magic, here.
Additionally, the old approach caused problems with rhel-based systems
since it found the service command and tried to reload ceph.service
instead of ceph.target.
This also caused problems with SELinux as processes with context
logrotate_t are not allowed to issue systemctl reload on a process.
This patch is also in sync with other logrotate postrotate scripts which
do exactly the same thing (send SIGHUP to the daemon).
Signed-off-by: Boris Ranto <branto@redhat.com>
cmd_vartype is a
boost::variant<std::string, bool, int64_t, double,
std::vector<std::string>>, so we can not get a
int8_t from it.
Fixes: #12922
Signed-off-by: Kefu Chai <kchai@redhat.com>
Since the TR1 tuple is already in use within the Ceph project,
this flag needs to be enabled to avoid gmock link errors within
gtest.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Use new OrderedThrottle class to ensure multiple AIO reads are
written to the export diff in-order.
Fixes: #12911
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
It is similar to the SimpleThrottle in usage but intercepts Context
callbacks to ensure they are completed in-order.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
CID 1322778 (#1 of 1): Pointer to local outside scope (RETURN_LOCAL)
1. escape_local_addr: Returning, through this->reqid, the address of stack variable _reqid.
2. return: Returning here.
Signed-off-by: Sage Weil <sage@redhat.com>
CID 1322784 (#1 of 1): Uninitialized scalar variable (UNINIT)
2. uninit_use_in_call: Using uninitialized value coll.removal_seq when calling coll_t. [show details]
Signed-off-by: Sage Weil <sage@redhat.com>
CID 1322828 (#1 of 1): Wrapper object use after free (WRAPPER_ESCAPE)
28. use_after_free: Using invalidated internal representation of local it.
CID 1322827 (#1 of 1): Wrapper object use after free (WRAPPER_ESCAPE)
25. use_after_free: Using invalidated internal representation of local it.
CID 1322826 (#1 of 1): Wrapper object use after free (WRAPPER_ESCAPE)
31. use_after_free: Using invalidated internal representation of local it.
CID 1322825 (#1 of 1): Wrapper object use after free (WRAPPER_ESCAPE)
31. use_after_free: Using invalidated internal representation of local it.
Signed-off-by: Sage Weil <sage@redhat.com>
It turns out, despite the HTTP spec declaring that header field names
should be case-insensitive, some clients treat them wrongly, and
consider "Content-type" to not match "Content-Type".
CyberDuck was one of those clients, now fixed upstream in
https://trac.cyberduck.io/ticket/8999
To reduce future occurances of this bug, fix the casing of the
Content-Type header, to strictly comply with the HTTP specification (be
strict about what you send, and generous about what you receive).
Fixes: #12939
Backport: infernalis, hammer, firefly
Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
ceph_erasure_code.cc and ceph_erasure_code_benchmark.cc failed to load
the plugins. It went unnoticed when
660ae5bcbb was reviewed because
* ceph_erasure_code_benchmark is not used in make check
* qa/workunits/erasure-code/encode-decode-non-regression.sh silently
interpreted the failure as the absence of SIMD variants
http://tracker.ceph.com/issues/12933Fixes: #12933
Signed-off-by: Loic Dachary <ldachary@redhat.com>