Commit Graph

34185 Commits

Author SHA1 Message Date
Sage Weil
a501eb80f4 Merge pull request #2061 from ceph/wip-8728
qa/workunits/rest/test.py: make osd create test idempotent

Reviewed-by: Dan Mick <dan.mick@inktank.com>
2014-07-02 17:55:05 -07:00
Sage Weil
bb3e1c92b6 qa/workunits/rest/test.py: make osd create test idempotent
Avoid possibility that we create multiple OSDs do to retries by passing in
the optional uuid arg.  (A stray osd id will make the osd tell tests a
few lines down fail.)

Fixes: #8728
Signed-off-by: Sage Weil <sage@inktank.com>
2014-07-02 10:39:17 -07:00
Greg Farnum
8697d6a10e OSD: await_reserved_maps() prior to calling mark_down
send_message_osd_cluster() et al are *trying* to protect their Connection
lookups (and not re-open zapped Connections) via map reservations, but
that only works if we know that we haven't already called mark_down() on
the entities they might be looking up. So we need to await_reserved_maps
before we do any mark_down calls.
Since the waiting might take some time (fast dispatch in progress), only do
so if we are actually going to mark somebody down.

Fixes: #8512

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2014-06-30 21:51:10 -07:00
Dan Mick
f3c92145ef Merge pull request #2050 from ceph/wip-cephtool
qa/workunits/cephtool/test.sh: sudo ceph daemon
2014-06-30 16:48:29 -07:00
Sage Weil
bcc09f9376 qa/workunits/cephtool/test.sh: sudo ceph daemon
Signed-off-by: Sage Weil <sage@inktank.com>
2014-06-30 16:41:17 -07:00
Josh Durgin
809fe7ead8 Merge pull request #2048 from ceph/wip-8699
rgw: fix uninit ofs in RGWObjManifect::obj_iterator

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-06-30 13:02:17 -07:00
Sage Weil
e0d3b78b6a rgw: fix uninit ofs in RGWObjManifect::obj_iterator
Valgrind picked this up:

  <kind>UninitCondition</kind>
  <what>Conditional jump or move depends on uninitialised value(s)</what>
  <stack>
    <frame>
      <ip>0x5145B8</ip>
      <obj>/usr/bin/radosgw</obj>
      <fn>RGWObjManifest::obj_iterator::seek(unsigned long)</fn>
      <dir>/srv/autobuild-ceph/gitbuilder.git/build/out~/ceph-0.82-354-g62027ec/src/rgw</dir>
      <file>rgw_rados.cc</file>
      <line>562</line>
    </frame>
    <frame>
      <ip>0x5672A4</ip>
      <obj>/usr/bin/radosgw</obj>
      <fn>list_multipart_parts(RGWRados*, req_state*, std::string const&amp;, std::string&amp;, int, int, std::map&lt;unsigned int, RGWUploadPartInfo, std::less&lt;unsigned int&gt;, std::allocator&lt;std::pair&lt;unsigned int const, RGWUploadPartInfo&gt; &gt; &gt;&amp;, int*, bool*, bool)</fn>
      <dir>/srv/autobuild-ceph/gitbuilder.git/build/out~/ceph-0.82-354-g62027ec/src/rgw</dir>
      <file>rgw_rados.h</file>
      <line>217</line>
    </frame>
    <frame>
      <ip>0x5688EE</ip>
      <obj>/usr/bin/radosgw</obj>
      <fn>RGWListMultipart::execute()</fn>
      <dir>/srv/autobuild-ceph/gitbuilder.git/build/out~/ceph-0.82-354-g62027ec/src/rgw</dir>
      <file>rgw_op.cc</file>
      <line>2956</line>
    </frame>
...

Fixes: #8699
Backport: firefly
Signed-off-by: Sage Weil <sage@inktank.com>
2014-06-30 12:55:45 -07:00
Sage Weil
9db124d9ca Merge pull request #2045 from ceph/wip-8542
qa/workunits/suites/fsx.sh: don't use zero range

Reviewed-by: Greg Farnum <greg@inktank.com>
2014-06-30 12:35:46 -07:00
Sage Weil
2dec8a8100 qa/workunits/suites/fsx.sh: don't use zero range
Zero range is not supported by cephfs.

Fixes: #8542
Signed-off-by: Sage Weil <sage@inktank.com>
2014-06-30 07:05:48 -07:00
Sage Weil
eb3963f849 Merge branch 'next' 2014-06-27 12:55:44 -07:00
Yehuda Sadeh
7fae941299 rgw: allocate enough space for bucket instance id
Fixes: #8608
Backport: dumpling, firefly
Bucket instance id is a concatenation of zone name, rados instance id,
and a running counter. We need to allocate enough space to account zone
name length.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2014-06-27 12:55:39 -07:00
Sage Weil
94e1b77624 Merge pull request #2035 from ceph/wip-da-SCA-20140623
Fix for SCA and CID issues

Reviewed-by: Sage Weil <sage@redhat.com>
2014-06-26 12:43:08 -07:00
Sage Weil
ad81a98e09 Revert "ceph-disk: Enable creating multiple osds per dev"
This reverts commit 200d0ae9c6.

This breaks ceph-disk.  See #8644.  Reverting for now.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-06-26 11:37:15 -07:00
Greg Farnum
e02957dbf7 test: use (unsigned)0 with gtest to avoid spurious warnings
Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2014-06-26 11:14:22 -07:00
Samuel Just
4aadddc30b Merge pull request #2034 from ceph/wip-osd-ints
osd: fix int -> int32_t in misc encoded structures

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-06-26 11:05:49 -07:00
Danny Al-Gaaf
f8df9bd269 scratchtool.c: cleanup do_rados_getxattrs()
Cleanup error path to reduce code duplication.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-06-26 18:51:19 +02:00
Sage Weil
4e9c2c1b38 osd: fix pg_stat_t int -> int32_t
Still 4 bytes on i386 and x86_64.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-06-26 09:13:47 -07:00
Sage Weil
238b1a3fa4 osd: fix pg_shard_t int -> int32_t
Still 4 bytes on i386 and x86_64.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-06-26 09:13:30 -07:00
Sage Weil
709f0c47c4 osd: fix pg_interval_t int -> int32_t
Still 4 bytes on i386 and x86_64.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-06-26 09:11:53 -07:00
Sage Weil
959d664ba4 Merge pull request #2032 from sponce/wip-fixstriperoni386
Wip fixstriperoni386

Reviewed-by: Sage Weil <sage@redhat.com>
2014-06-26 08:47:06 -07:00
Sebastien Ponce
a5f9a091f8 Fixed build on 32 bits platforms
Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
2014-06-26 17:40:08 +02:00
Sebastien Ponce
f5a72b75d5 Added a couple of ASSERTS for avoiding coverity to complain about the possibility of a division by 0
Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
2014-06-26 17:40:08 +02:00
Sage Weil
cf16dfc7e3 Merge pull request #2030 from ceph/wip-xattr-fix
mds: set xattr_version to 0 if replay doesn't contain xattrs

Reviewed-by: Sage Weil <sage@redhat.com>
2014-06-26 08:33:11 -07:00
Yan, Zheng
93df7daf18 mds: set xattr_version to 0 if replay doesn't contain xattrs
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
2014-06-26 13:33:55 +08:00
Sage Weil
c2ffad3494 Merge pull request #2019 from ceph/wip-refactor-cephtool-test
qa/workunits/cephtool/test.sh: refactor and make it modular (yey! \o/)

Reviewed-by: Loic Dachary <loic@dachary.org>
2014-06-25 22:06:58 -07:00
Danny Al-Gaaf
046c9769fc common/fd.cc: fix possible out-of-bounds write
Read max 'sizeof(target) - 1' to not write out of bound
later on the 'target[r] = 0;' call in case we read the
full PATH_MAX.

CID 1128416 (#1 of 1): Out-of-bounds write (OVERRUN)
 overrun-local: Overrunning array target of 4096 bytes
 at byte offset 4096 using index r (which evaluates to 4096).

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-06-26 05:22:02 +02:00
Danny Al-Gaaf
605d180569 mount.ceph.c: fix strdup related memory leak
CID 1219611 (#1 - 5): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable saw_name going out of scope
 leaks the storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-06-26 04:40:09 +02:00
Danny Al-Gaaf
7f7e56c698 scratchtool.c: fix resource leak and error handling
Check the result of rados_ioctx_create()before using io_ctx.
Free io_ctx where needed. Fix messages at the end of testrados().

CID 1219613 (#1 of 1): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable io_ctx going out of scope leaks the
 storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-06-26 03:49:22 +02:00
Danny Al-Gaaf
bdb134607d scratchtool.c: fix resource leak
CID 1219612 (#1 - 3): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable iter going out of scope leaks the
 storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-06-26 02:50:29 +02:00
Joao Eduardo Luis
48e38ac632 qa/workunits: cephtool: fix 'osd bench' test
Commit 7dc93a9651 fixed an incorrect
behavior with the OSD's 'osd bench' value hard-caps.  The test wasn't
appropriately modified unfortunately.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 01:00:36 +01:00
Joao Eduardo Luis
802290d686 osd: OSD: better explanation on 'max_count' calculation for 'osd bench'
'max_count' is the maximum number of bytes that we are to allow for an
'osd bench' command.  This value is a hard-cap that takes into account
a predefined throughput, the 'osd bench' duration and, for a rather large
block size, can be taken as the amount of bytes that we would ever be
able to write in that period of time.

The explanation wasn't appropriate enough, hence this patch, which
hopefully will avoid confusion in the future.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 01:00:36 +01:00
Joao Eduardo Luis
4b0809a13e qa/workunits: cephtool: only run heap profiler test if tcmalloc enabled
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 01:00:36 +01:00
Joao Eduardo Luis
5c4616e100 qa/workunits: cephtool: set +e for the tcmalloc tests
Avoids failing the tests when tcmalloc is not present

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 01:00:36 +01:00
Joao Eduardo Luis
6725543515 qa/workunits: cephtool: delete unnecessary function calls
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 01:00:36 +01:00
Joao Eduardo Luis
946bd0dad4 qa/workunits: cephtool: disable bash debug when not running tests
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 01:00:35 +01:00
Joao Eduardo Luis
5d26575ef2 qa/workunits: cephtool: allow running individual tests
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 01:00:35 +01:00
Joao Eduardo Luis
f4184086d0 qa/workunits: cephtool: cleanup state after erasure-code-profile test
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 01:00:35 +01:00
Joao Eduardo Luis
780424df3a qa/workunits: cephtool: add/remove comments
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 00:57:14 +01:00
Joao Eduardo Luis
3d14a96f4b qa/workunits: cephtool: split into properly indented functions
The test was a big sequence of commands being run and it has been growing
organically for a while, even though it has maintained a sense of
locality with regard to the portions being tested.

This patch intends to split the commands into functions, allowing for a
better semantic context and easier expansion.  On the other hand, this
will also allow us to implement mechanisms to run specific portions of
the test instead of always having to run the whole thing just to test a
couple of lines down at the bottom (or have to creatively edit the test).

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 00:55:46 +01:00
Joao Eduardo Luis
04658b7b2b qa/workunits: cephtool: move test line to where it's more appropriate
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 00:52:44 +01:00
Joao Eduardo Luis
db6cc133ba qa/workunits: cephtool: split into functions
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 00:51:05 +01:00
Josh Durgin
d2f17c7405 Merge pull request #1863 from ceph/wip-rgw-manifest-iter
rgw: reduce calls to rgw_obj.set_obj()

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-06-25 16:37:04 -07:00
Sage Weil
8a5e0034cb Merge pull request #2021 from ceph/wip-da-fix-make-check
Fixes to get "make check" run on SUSE v2

Reviewed-by: Sage Weil <sage@redhat.com>
2014-06-25 16:14:06 -07:00
Samuel Just
4e68ac34ec Merge pull request #2001 from dachary/wip-tiermsg
mon: test that pools used in tiers cannot be removed

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-06-25 13:39:48 -07:00
Sage Weil
c6ac1b7fb8 Merge pull request #1938 from dachary/wip-8071
erasure-code: remove jerasure internals dependencies
2014-06-25 13:35:59 -07:00
Sage Weil
971950bdbc Merge pull request #2025 from ceph/wip-disable-static
do_autogen.sh: --disable-static

Reviewed-by: Loic Dachary <loic@dachary.org>
2014-06-25 13:30:05 -07:00
Sage Weil
3226a85f9c Merge pull request #1967 from yuyuyu101/kvstore-fix-set-alloc-hint
Make KeyValueStore not use expected_write_size

Reviewed-by: Sage Weil <sage@redhat.com>
2014-06-25 13:24:00 -07:00
Danny Al-Gaaf
39530536ff test/ceph-disk.sh: fix for SUSE
On SUSE 'which' returns always the full path of (shell) commands and
not e.g. './ceph-conf' as on Debian. Add check also for full
path returned by which.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-06-25 22:23:28 +02:00
Danny Al-Gaaf
be70c1ffe3 osdmaptool/test-map-pgs.t: fix escaping to fix run
Run failed always running into the '|| cat $OUT' case due
to bad escaping of '\t'. This is caused by different shells
on different distros (e.g. bash on SUSE vs dash on Ubuntu).

Use 'grep -P ' and fix the regex to make it shell independet.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-06-25 22:23:27 +02:00
Sage Weil
dc1a4dfd4d Revert "Give meaningful error when submodules are not checked out"
This reverts commit 87f9dbaf78.

This breaks the gitbuilders.  Maybe it needs the base dir to be explicit?

Signed-off-by: Sage Weil <sage@redhat.com>
2014-06-25 13:19:03 -07:00