Danny Al-Gaaf [Tue, 5 May 2015 12:38:04 +0000 (14:38 +0200)]
osd/ClassHandler.cc: fix STRING_OVERFLOW
CID 1058792 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW)
fixed_size_dest: You might overrun the 4097 byte fixed-size string
cname by copying &pde->d_name[8UL] - 1 without checking the length.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Tue, 5 May 2015 12:29:14 +0000 (14:29 +0200)]
test/librbd/fsx.cc: fix BUFFER_SIZE_WARNING
CID 1296375 (#1 of 1): Buffer not null terminated (BUFFER_SIZE_WARNING)
buffer_size_warning: Calling strncpy with a maximum size argument of
1024 bytes on destination array logfile of size 1024 bytes might leave
the destination string unterminated.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Mon, 4 May 2015 23:59:56 +0000 (01:59 +0200)]
tools/rados/rados.cc: restore ostream precision format
CID 717135 (#1 of 1): Not restoring ostream format (STREAM_FORMAT_STATE)
1. format_changed: precision changes the format state of std::cout for
category precision.
4. end_of_path: Changing format state of stream std::cout for category
precision without later restoring it.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Mon, 4 May 2015 23:54:06 +0000 (01:54 +0200)]
tools/rados/rados.cc: restore ostream precision format
CID 717134 (#1 of 1): Not restoring ostream format (STREAM_FORMAT_STATE)
4. format_changed: precision changes the format state of std::cout
for category precision.
26. end_of_path: Changing format state of stream std::cout for category
precision without later restoring it.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Mon, 4 May 2015 23:44:05 +0000 (01:44 +0200)]
tools/rados/rados.cc: restore ostream format
CID 717133 (#1 of 1): Not restoring ostream format (STREAM_FORMAT_STATE)
95. format_changed: fill changes the format state of std::cout for
category fill.
100. end_of_path: Changing format state of stream std::cout for
category fill without later restoring it.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Mon, 4 May 2015 17:59:30 +0000 (19:59 +0200)]
mds/MDS.cc: silence coverity DIV_BY_ZERO
Silence coverity: ls.empty() check should already imply that
ls.size() != 0.
CID 1295402 (#1 of 1): Division or modulo by zero (DIVIDE_BY_ZERO)
divide_by_zero: In expression rand() % ls.size(), modulo by
expression ls.size() which may be zero has undefined behavior.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Loic Dachary [Thu, 28 May 2015 23:34:45 +0000 (01:34 +0200)]
install-deps.sh: robust pip and wheel installation
The wheel and pip module must not only be installed in each wheelhouse
directory for tox to find. They must also be installed in the virtual
environment that populates the wheelhouse directory. Otherwise older pip
modules such as the one found by default on Ubuntu 12.04 will fail.
Python 2.7.3 on Ubuntu 12.04 also requires that distribute >= 0.7.3 is
installed although it is redundant with setuptools, otherwise it will
fail to run the wheel module.
Loic Dachary [Thu, 28 May 2015 08:35:51 +0000 (10:35 +0200)]
debian: ceph-dbg steals ceph-objectstore-tool from ceph-test-dbg
When ceph-objectstore-tool was moved from ceph-test to
ceph by 61cf5da0b51e2d9578c7b4bca85184317e30f4ca, the ceph package in
debian/control was updated accordingly, as recommended by
https://www.debian.org/doc/debian-policy/ch-relationships.html#s-replaces
The same must be done for the ceph-dbg package because
/usr/lib/debug/usr/bin/ceph-objectstore-too is no longer in
ceph-test-dbg.
Although the change was merged may 6th, 2015 8f23382064c189b657564d58c3f9d17720e891ed, teuthology jobs were not
always failing because packages were not systematically upgraded during
the installation. The missing dependencies that were responsible for
this upgrade problem were fixed by f898ec1e4e3472b0202280f09653a769fc62c8d3 on may 18th, 2015 and all
upgrade tests relying on ceph-*-dbg packages started to fail
systematically after this date.
Kefu Chai [Wed, 20 May 2015 06:24:48 +0000 (14:24 +0800)]
osdmap, mon: switch the params of print_tree()
* change from
print_tree(ostream*, Formatter*)
to
print_tree(Formatter*, ostream*)
this is more consistent with other map's print
functions. e.g.
MDSMap::print_summary(Formatter *f, ostream *out)
* and in print_tree(Formatter* f, ostream* os),
- `f` and `os` will be mutual exclusive.
- will assert(0) if both of them are NULL.
Kefu Chai [Wed, 20 May 2015 06:16:14 +0000 (14:16 +0800)]
osdmaptool: dump 'osd tree' in specified format
* so we are able to dump more info from osdmap using this tool,
and this allows us to reproduce the behavior of "ceph osd tree".
* add a test for 'osdmaptool --tree=<format> filepath'
Samuel Just [Wed, 27 May 2015 18:00:54 +0000 (11:00 -0700)]
ReplicatedPG: start_flush: use filtered snapset
Otherwise, we might send our deletes based on deleted snaps. This is
problematic since we may have trimmed the clones to which those snaps
belong, causing us to send them at an earlier snap than we used before.
The specific situation was
78:[78, 70, 63, 5a, 58, 57]:[64(63), 58(58, 57)]
with 58 already clean. To flush 64, we send:
delete@58
delete@59
copyfrom@62
Then, snap 63 is trimmed leaving us with a snapset of:
78:[78, 70, 63, 5a, 58, 57]:[58(58, 57)]
since trim_object doesn't filter the head object snapset snaps. This
isn't really a bug since in general all snapset users must be aware
that there may be trimmed snaps in snapset::snaps. However, here
it becomes a problem when we go to flush head:
delete@58 -- ignored due to snapc
delete@59 -- ignored due to snapc
copyfrom@78 -- not ignored
The base pool head is at snap seq 62, so it clones that value into
clone 78(78, 70) instead of forgetting it. What should have happened
is that we should have based our flushes on filtered snapset:
78:[78, 70, 58, 57]:[58(58, 57)]
Causing us to instead send:
delete@58 -- ignored due to snapc
delete@69 -- not ignored, causes no clone to be made
copyfrom@78 -- not ignored, updates head such that a subsequent clone
will leave 70 out of the clone snaps vector.
Fixes: 11787 Signed-off-by: Samuel Just <sjust@redhat.com>
Ilya Dryomov [Fri, 15 May 2015 18:44:27 +0000 (21:44 +0300)]
doc: fix crush-ruleset-name param description
Specified crush-ruleset-name is required to exist, implicit creation is
going to happen only if crush-ruleset-name wasn't specified on the
command line. While at it, pool-name is very much a required param.
Validate osd_pool_default_crush_{replicated_ruleset,rule} config
options, in particular when creating pools. Otherwise "ceph osd pool
create foo <pg_num>" may end up creating pools with non-existent
rulesets.
Ilya Dryomov [Thu, 21 May 2015 15:52:52 +0000 (18:52 +0300)]
OSDMap: respect default replicated ruleset config opt in build_simple()
Use id provided by osd_pool_default_crush_{replicated_ruleset,rule}
config options when creating a simple replicated ruleset for an initial
osdmap instead of always making it ruleset 0. Not doing so may leave
default created pools (currently "rbd") in a broken state with their
crush_ruleset pointing to a non-existent ruleset.
Ilya Dryomov [Fri, 22 May 2015 12:50:07 +0000 (15:50 +0300)]
tests: a couple tweaks to osd-pool-create.sh
In TEST_default_deprectated_*(), make expected/unexpected vars local
and actually check that rbd, being a default created pool, is set to
use the ruleset specified by conf.
INVALIDRULESET thing in TEST_replicated_pool() is redundant - it is
checked in TEST_replicated_pool_with_ruleset() a bit earlier.
First cut for a `ceph-release-notes` script added which looks at merge
commits and picks out issue numbers. Though this ideally suits for
backport releases workflow where the commit messages always follow a
specific pattern, it is partly useful for preparing release notes for
normal releases as well.
Jason Dillaman [Wed, 8 Apr 2015 23:06:52 +0000 (19:06 -0400)]
librbd: avoid blocking AIO API methods
Enqueue all AIO API methods within the new librbd thread pool to
reduce the possibility of any blocking operations. To maintain
backwards compatibility with the legacy return codes of the API's
AIO methods, it's still possible to block attempting to acquire
the snap_lock.
Fixes: #11056 Signed-off-by: Jason Dillaman <dillaman@redhat.com>