]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
10 years agovstart.sh: set rgw dns name = localhost 4852/head
Sage Weil [Thu, 4 Jun 2015 16:02:29 +0000 (09:02 -0700)]
vstart.sh: set rgw dns name = localhost

So we can test buckets in the URL by adding entries in /etc/hosts

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agovstart.sh: sudo radosgw for low port numbers
Sage Weil [Wed, 3 Jun 2015 19:48:11 +0000 (12:48 -0700)]
vstart.sh: sudo radosgw for low port numbers

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agovstart.sh: show s3 creds at end
Sage Weil [Wed, 3 Jun 2015 19:48:00 +0000 (12:48 -0700)]
vstart.sh: show s3 creds at end

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #4793 from SUSE/wip_ceph_spec_directories_not_owned_by_a_package
Ken Dreyer [Wed, 3 Jun 2015 22:27:57 +0000 (16:27 -0600)]
Merge pull request #4793 from SUSE/wip_ceph_spec_directories_not_owned_by_a_package

ceph.spec.in:ownership of dirs extension

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
10 years agoMerge pull request #4821 from SUSE/wip_libcephfs_jni_postun
Ken Dreyer [Wed, 3 Jun 2015 22:24:34 +0000 (16:24 -0600)]
Merge pull request #4821 from SUSE/wip_libcephfs_jni_postun

ceph.spec.in libcephfs_jni1 has no %post and %postun

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
10 years agoMerge pull request #4725 from SUSE/wip_suse_forward_conditionals
Ken Dreyer [Wed, 3 Jun 2015 22:19:37 +0000 (16:19 -0600)]
Merge pull request #4725 from SUSE/wip_suse_forward_conditionals

Add rpm conditionals

10 years agoMerge pull request #4808 from liewegas/wip-make-dist
Sage Weil [Wed, 3 Jun 2015 22:14:54 +0000 (15:14 -0700)]
Merge pull request #4808 from liewegas/wip-make-dist

make_dist_tarball.sh

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
10 years agoMerge pull request #4850 from ktdreyer/wip-readme-simplify-deps
Sage Weil [Wed, 3 Jun 2015 21:29:33 +0000 (14:29 -0700)]
Merge pull request #4850 from ktdreyer/wip-readme-simplify-deps

README: simplify build deps section

10 years agoREADME: simplify build deps section 4850/head
Ken Dreyer [Wed, 3 Jun 2015 21:25:23 +0000 (15:25 -0600)]
README: simplify build deps section

The install-deps.sh step is the same for Debian and RPM-based systems.
Simplify the two README sections into a single section.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
10 years agoMerge pull request #4828 from liewegas/wip-11798
Gregory Farnum [Wed, 3 Jun 2015 20:51:54 +0000 (13:51 -0700)]
Merge pull request #4828 from liewegas/wip-11798

make upstart less aggressive with respawn (11798)

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
10 years agoMerge pull request #4844 from ceph/wip-11860
Sage Weil [Wed, 3 Jun 2015 20:15:37 +0000 (13:15 -0700)]
Merge pull request #4844 from ceph/wip-11860

rgw: Do not enclose the Bucket header in quotes

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoupstart: limit respawn to 3 in 30 mins (instead of 5 in 30s) 4828/head
Sage Weil [Wed, 3 Jun 2015 18:57:34 +0000 (14:57 -0400)]
upstart: limit respawn to 3 in 30 mins (instead of 5 in 30s)

It may take tens of seconds to restart each time, so 5 in 30s does not stop
the crash on startup respawn loop in many cases.  In particular, we'd like
to catch the case where the internal heartbeats fail.

This should be enough for all but the most sluggish of OSDs and capture
many cases of failure shortly after startup.

Fixes: #11798
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agorgw: Do not enclose the Bucket header in quotes 4844/head
Wido den Hollander [Wed, 3 Jun 2015 11:13:33 +0000 (13:13 +0200)]
rgw: Do not enclose the Bucket header in quotes

Fixes: #11860
Signed-off-by: Wido den Hollander <wido@42on.com>
10 years agoMerge pull request #4836 from ceph/wip-11857
Kefu Chai [Wed, 3 Jun 2015 16:51:24 +0000 (00:51 +0800)]
Merge pull request #4836 from ceph/wip-11857

admin/build-doc: fix dependency checks

Reviewed-by: Nathan Cutler <ncutler@suse.cz>
Reviewed-by: Kefu Chai <kchai@redhat.com>
10 years agoMerge pull request #4818 from dachary/wip-11272-ceph-disk-zap
Travis Rhoden [Wed, 3 Jun 2015 14:18:43 +0000 (10:18 -0400)]
Merge pull request #4818 from dachary/wip-11272-ceph-disk-zap

ceph-disk: always check zap is applied on a full device

Reviewed-by: Travis Rhoden <trhoden@redhat.com>
10 years agoMerge pull request #4842 from liewegas/wip-install-deps
Sage Weil [Wed, 3 Jun 2015 14:14:23 +0000 (07:14 -0700)]
Merge pull request #4842 from liewegas/wip-install-deps

make install-deps clean up

Reviewed-by: Kefu Chai <kchai@redhat.com>
10 years agoinstall-deps.sh: clean up after ourselves 4842/head
Sage Weil [Wed, 3 Jun 2015 14:05:28 +0000 (10:05 -0400)]
install-deps.sh: clean up after ourselves

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoAdd rpm conditionals : libs_compat 4725/head
Owen Synge [Fri, 29 May 2015 11:35:19 +0000 (13:35 +0200)]
Add rpm conditionals : libs_compat

Extracted conditionals from SUSE rpm spec file to forward port.
Original work done by Thorsten Behrens <tbehrens@suse.com>

Signed-off-by: Owen Synge <osynge@suse.com>
10 years agoAdd rpm conditionals : tcmalloc
Owen Synge [Fri, 29 May 2015 11:34:39 +0000 (13:34 +0200)]
Add rpm conditionals : tcmalloc

Extracted conditionals from SUSE rpm spec file to forward port.
Original work done by Thorsten Behrens <tbehrens@suse.com>

Signed-off-by: Owen Synge <osynge@suse.com>
10 years agoAdd rpm conditionals : tests
Owen Synge [Fri, 29 May 2015 11:33:13 +0000 (13:33 +0200)]
Add rpm conditionals : tests

Extracted conditionals from SUSE rpm spec file to forward port.
Original work done by Thorsten Behrens <tbehrens@suse.com>

Signed-off-by: Owen Synge <osynge@suse.com>
10 years agoAdd rpm conditionals : cephfs_java
Owen Synge [Fri, 29 May 2015 11:28:24 +0000 (13:28 +0200)]
Add rpm conditionals : cephfs_java

Extracted conditionals from SUSE rpm spec file to forward port.
Original work done by Thorsten Behrens <tbehrens@suse.com>

Signed-off-by: Owen Synge <osynge@suse.com>
10 years agoadmin/build-doc: fix dependency checks 4836/head
John Spray [Wed, 3 Jun 2015 09:09:09 +0000 (10:09 +0100)]
admin/build-doc: fix dependency checks

Fixes: #11857
Signed-off-by: John Spray <john.spray@redhat.com>
10 years agoMerge pull request #4712 from dachary/wip-11663-verify-erasure-code-profile
Loic Dachary [Wed, 3 Jun 2015 08:47:50 +0000 (10:47 +0200)]
Merge pull request #4712 from dachary/wip-11663-verify-erasure-code-profile

normalize and verify the erasure code profile

Reviewed-by: Andreas Peters <andreas.joachim.peters@cern.ch>
10 years agoMerge pull request #4590 from ceph/wip-da-SCA-20150427
Gregory Farnum [Wed, 3 Jun 2015 06:21:41 +0000 (23:21 -0700)]
Merge pull request #4590 from ceph/wip-da-SCA-20150427

SCA and Coverity fixes

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
10 years agoMerge pull request #4823 from liewegas/wip-ceph-post-file
Kefu Chai [Wed, 3 Jun 2015 03:30:45 +0000 (11:30 +0800)]
Merge pull request #4823 from liewegas/wip-ceph-post-file

ceph-post-file: behave when sftp doesn't take -i

Reviewed-by: Kefu Chai <kchai@redhat.com>
10 years agoMerge pull request #4816 from dachary/wip-11624-cephtools-test
David Zafman [Wed, 3 Jun 2015 00:28:37 +0000 (17:28 -0700)]
Merge pull request #4816 from dachary/wip-11624-cephtools-test

tests: cephtool/test.sh wait_for_clean after PG (re)mapping

Reviewed-by: David Zafman <dzafman@redhat.com>
10 years agoMerge pull request #4827 from ceph/wip-librbd-aio-submission
Josh Durgin [Tue, 2 Jun 2015 21:18:47 +0000 (14:18 -0700)]
Merge pull request #4827 from ceph/wip-librbd-aio-submission

librbd: new config option for legacy blocking aio behavior

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
10 years agoMerge pull request #4701 from jdurgin/wip-nova-rbd-cache
Jason Dillaman [Tue, 2 Jun 2015 15:34:45 +0000 (11:34 -0400)]
Merge pull request #4701 from jdurgin/wip-nova-rbd-cache

doc: add rbd cache settings to nova.conf

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
10 years agotests: verify librbd blocking aio code path 4827/head
Jason Dillaman [Tue, 2 Jun 2015 14:33:35 +0000 (10:33 -0400)]
tests: verify librbd blocking aio code path

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agolibrbd: add rbd_non_blocking_aio option to image metadata
Jason Dillaman [Tue, 2 Jun 2015 14:32:41 +0000 (10:32 -0400)]
librbd: add rbd_non_blocking_aio option to image metadata

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agoMerge pull request #4643 from tchaikov/wip-fix-11569
Kefu Chai [Tue, 2 Jun 2015 12:43:26 +0000 (20:43 +0800)]
Merge pull request #4643 from tchaikov/wip-fix-11569

fix "pg ls" with states of "recovering" and/or "repair"

Reviewed-by: Joao Eduardo Luis <joao@suse.de>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #4760 from ketor/fix_mutex_memory_leak
Kefu Chai [Tue, 2 Jun 2015 12:37:10 +0000 (20:37 +0800)]
Merge pull request #4760 from ketor/fix_mutex_memory_leak

Mutex: fix memory leak in lockdep _register

Reviewed-by: Kefu Chai <kchai@redhat.com>
10 years agoMerge pull request #4802 from isserrano/master
Loic Dachary [Tue, 2 Jun 2015 12:36:35 +0000 (14:36 +0200)]
Merge pull request #4802 from isserrano/master

doc: Fixed example sintax in Absolute Sizing

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agodoc: s/osd pool hot-storage/osd pool set hot-storage/ 4802/head
Ismael [Fri, 29 May 2015 15:31:20 +0000 (16:31 +0100)]
doc: s/osd pool hot-storage/osd pool set hot-storage/

Signed-off-by: Ismael Serrano <ismael.serrano@gmail.com>
10 years agoPut new variable initialization in its own block 4590/head
Greg Farnum [Tue, 2 Jun 2015 04:31:47 +0000 (21:31 -0700)]
Put new variable initialization in its own block

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
10 years agolibrbd: new rbd_non_blocking_aio config option
Jason Dillaman [Tue, 2 Jun 2015 02:56:11 +0000 (22:56 -0400)]
librbd: new rbd_non_blocking_aio config option

Setting this option to false reverts librbd to legacy behavior
where AIO operations could potentially block.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agoMakefile: install ceph-post-file keys with mode 600 4823/head
Sage Weil [Mon, 1 Jun 2015 22:10:14 +0000 (15:10 -0700)]
Makefile: install ceph-post-file keys with mode 600

Otherwise ssh (may) prompt for a password.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoceph-post-file: improve check for a source install
Joseph McDonald [Mon, 1 Jun 2015 22:05:32 +0000 (15:05 -0700)]
ceph-post-file: improve check for a source install

Signed-off-by: Joseph McDonald <joseph.mcdonald@alcatel-lucent.com>
10 years agoceph-post-file: behave when sftp doesn't take -i
Joseph McDonald [Mon, 1 Jun 2015 22:00:39 +0000 (15:00 -0700)]
ceph-post-file: behave when sftp doesn't take -i

Fixes: #11836
Signed-off-by: Joseph McDonald <joseph.mcdonald@alcatel-lucent.com>
10 years agoerasure-code: verify the profile content matches get_profile() 4712/head
Loic Dachary [Sun, 17 May 2015 22:06:06 +0000 (00:06 +0200)]
erasure-code: verify the profile content matches get_profile()

The profile stored by the plugin may be different from the one set by
the user: it includes defaults. When the plugin is initialized, the
profile is modified to include the default values. Verify that the
modified profile matches what the get_profile() method returns, to guard
against inconsistencies from the erasure code plugin implementation.

http://tracker.ceph.com/issues/11663 Fixes: #11663

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agomon: normalize erasure-code profile for storage and comparison
Loic Dachary [Sun, 17 May 2015 21:53:42 +0000 (23:53 +0200)]
mon: normalize erasure-code profile for storage and comparison

An erasure-code profile set by the user may be modified by the erasure
code plugin, most of the time to add default values for domain failure,
techniques etc.

Whenever the monitor gets an erasure code profile from the user or the
configuration file, it uses it to initialize the corresponding erasure
code plugin and:

 * validate the profile and get an error if it is invalid

 * get a normalized profile

The normalized profile is stored in the OSDMap. Should the user try
to set the same erasure code profile with the different values that lead
to the same normalized form, the modification will be accepted as a
noop, as if the same values were given. For instance:

   ceph osd erasure-code-profile set myprofile k=2

   ceph osd erasure-code-profile set myprofile k=2 m=1

are the same because the default value for m is 1 for the default
jerasure plugin.

If the normalized form is not used for storage and comparison, the
second call with m=1 will fail and require --force to override
myprofile, although the user can read from the documentation that it
matches the default value.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoerasure-code: implement get_profile for every plugins
Loic Dachary [Mon, 1 Jun 2015 17:50:05 +0000 (19:50 +0200)]
erasure-code: implement get_profile for every plugins

The ErasureCode::init function is implemented to store the profile and
is called by the init method of each plugin. The
ErasureCode::get_profile function is implemented to return the profile
that was stored. A specialized ostream<< function is implemented to
facilitate the display of the profile.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agomake_dist.sh: bz2 only 4808/head
Sage Weil [Mon, 1 Jun 2015 18:20:03 +0000 (11:20 -0700)]
make_dist.sh: bz2 only

faster and smaler.  caller can convert to gz or xz if they need it.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomake_dist.sh: improve version calc
Sage Weil [Mon, 1 Jun 2015 18:19:46 +0000 (11:19 -0700)]
make_dist.sh: improve version calc

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoerasure-code: expect all plugins to implement get_profile
Loic Dachary [Mon, 1 Jun 2015 17:46:50 +0000 (19:46 +0200)]
erasure-code: expect all plugins to implement get_profile

Add the get_profile method to the interface and make it a pure virtual.
Each plugin is expected to return the profile currently in use. Although
the profile is also stored in the OSDMap, it provides a convenient
introspection method to validate that the profile being set is indeed
the profile being used.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge pull request #4729 from SUSE/wip_suse_builddeps_and_deps
Ken Dreyer [Mon, 1 Jun 2015 16:12:00 +0000 (10:12 -0600)]
Merge pull request #4729 from SUSE/wip_suse_builddeps_and_deps

ceph.spec.in: Forward port suse build deps and recomends

10 years agoMerge pull request #4822 from SUSE/wip_rpm_summary_ended_with_dot
Kefu Chai [Mon, 1 Jun 2015 14:28:23 +0000 (22:28 +0800)]
Merge pull request #4822 from SUSE/wip_rpm_summary_ended_with_dot

ceph.spec.in summary-ended-with-dot

Reviewed-by: Kefu Chai <kchai@redhat.com>
10 years agoceph.spec.in summary-ended-with-dot 4822/head
Owen Synge [Mon, 1 Jun 2015 13:57:03 +0000 (15:57 +0200)]
ceph.spec.in summary-ended-with-dot

RPM spec files summary should not end with a dot.
This was inconsistent across the ceph rpm packages
and creates errors with rpm lint.

Signed-off-by: Owen Synge <osynge@suse.com>
10 years agoMerge pull request #4710 from dachary/wip-9589-default-erasure-code-profile
Loic Dachary [Mon, 1 Jun 2015 13:00:04 +0000 (15:00 +0200)]
Merge pull request #4710 from dachary/wip-9589-default-erasure-code-profile

erasure-code: query plugin for erasure-code-profile defaults

Reviewed-by: Andreas Peters <andreas.joachim.peters@cern.ch>
10 years agoceph.spec.in libcephfs_jni1 has no %post and %postun 4821/head
Owen Synge [Mon, 1 Jun 2015 12:58:31 +0000 (14:58 +0200)]
ceph.spec.in libcephfs_jni1 has no %post and %postun

/usr/lib64/libcephfs_jni.so.1.0.0 requires /sbin/ldconfig to be
run after installing and after removing.

Signed-off-by: Owen Synge <osynge@suse.com>
10 years agoMerge pull request #4820 from ceph/wip-fix-ceph-perf-local
Kefu Chai [Mon, 1 Jun 2015 07:33:15 +0000 (15:33 +0800)]
Merge pull request #4820 from ceph/wip-fix-ceph-perf-local

tools: fix ceph perf local build on i386

Reviewed-by: Haomai Wang <haomaiwang@gmail.com>
10 years agotest/perf_local: disable tests if not supported 4820/head
Kefu Chai [Mon, 1 Jun 2015 03:16:01 +0000 (11:16 +0800)]
test/perf_local: disable tests if not supported

* pass appropriate "-m<machine>" args to compiler

Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years ago.gitignore: ignore /perf_perf_local
Kefu Chai [Mon, 1 Jun 2015 02:36:01 +0000 (10:36 +0800)]
.gitignore: ignore /perf_perf_local

Fixes: #11827
Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years agotest/librbd/fsx.cc: fix int/unsigned long conversion
Danny Al-Gaaf [Thu, 21 May 2015 22:35:46 +0000 (00:35 +0200)]
test/librbd/fsx.cc: fix int/unsigned long conversion

getnum() returns an integer while maxfilelen is a unsinged long.
Use a temp var to be able to check the result of the call.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agomds/CInode.cc: fix FORWARD_NULL issue
Danny Al-Gaaf [Wed, 6 May 2015 15:09:08 +0000 (17:09 +0200)]
mds/CInode.cc:  fix FORWARD_NULL issue

Don't check for the conditions used inside get_projected_parent_dn(),
simply check if the returned value is valid.

Fix for:

CID 716915: Dereference after null check (FORWARD_NULL)
 var_deref_model: Passing null pointer this->get_projected_parent_dn()
 to pre_dirty, which dereferences it.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agoos/HashIndex.cc: add asserts to prevent BAD_SHIFT
Danny Al-Gaaf [Wed, 6 May 2015 13:45:01 +0000 (15:45 +0200)]
os/HashIndex.cc: add asserts to prevent BAD_SHIFT

Fix for:

CID 1232599: Bad bit shift operation (BAD_SHIFT)
 negative_shift: In expression i << (4 - split_bits) % 4, shifting by
 a negative amount has undefined behavior. The shift amount,
 (4 - split_bits) % 4, is -1.

CID 1232600: Bad bit shift operation (BAD_SHIFT)
 negative_shift: In expression 1 << pg_num_bits - 1, shifting by a
 negative amount has undefined behavior. The shift amount,
 pg_num_bits - 1, is -1.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agoosd/ClassHandler.cc: fix STRING_OVERFLOW
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>
10 years agotest/librbd/fsx.cc: fix BUFFER_SIZE_WARNING
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>
10 years agotools/rados/rados.cc: restore ostream precision format
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>
10 years agotools/rados/rados.cc: restore ostream precision format
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>
10 years agotools/rados/rados.cc: restore ostream format
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>
10 years agomon/OSDMonitor.cc: suppress false positive MISSING_BREAK
Danny Al-Gaaf [Mon, 4 May 2015 23:18:31 +0000 (01:18 +0200)]
mon/OSDMonitor.cc: suppress false positive MISSING_BREAK

Suppress coverity issue:

CID 1193085 (#1 of 1): Missing break in switch (MISSING_BREAK)
 unterminated_case: This case (value -114) is not terminated by a
 'break' statement.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agoos/FileStore.cc: remove dead code
Danny Al-Gaaf [Mon, 4 May 2015 23:06:44 +0000 (01:06 +0200)]
os/FileStore.cc: remove dead code

Fix for coverity issue caused by 8811df3 (introduced a similar
check some lines earlier in the code causing the check to return
earlier).

at_least: At condition r < 0, the value of r must be at least 0.
dead_error_condition: The condition r < 0 cannot be true.

CID 1274289 (#1 of 1): Logically dead code (DEADCODE)
dead_error_begin: Execution cannot reach this statement

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agorgw/rgw_rados.cc: remove dead code
Danny Al-Gaaf [Mon, 4 May 2015 22:51:36 +0000 (00:51 +0200)]
rgw/rgw_rados.cc: remove dead code

CID 1274290 (#1 of 1): Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement return r;.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agotest/librbd/fsx.cc: reduce scope of variables
Danny Al-Gaaf [Mon, 4 May 2015 18:02:55 +0000 (20:02 +0200)]
test/librbd/fsx.cc: reduce scope of variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agomds/MDS.cc: silence coverity DIV_BY_ZERO
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>
10 years agotest/librbd/fsx.cc: fix format specifier
Danny Al-Gaaf [Fri, 1 May 2015 08:58:47 +0000 (10:58 +0200)]
test/librbd/fsx.cc: fix format specifier

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agotest_internal.cc: prefer ++operator for non-primitive iter
Danny Al-Gaaf [Fri, 1 May 2015 08:55:07 +0000 (10:55 +0200)]
test_internal.cc: prefer ++operator for non-primitive iter

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agorgw/rgw_op.cc: prefer empty() over 'size() == 0' for emptiness check
Danny Al-Gaaf [Fri, 1 May 2015 08:51:09 +0000 (10:51 +0200)]
rgw/rgw_op.cc: prefer empty() over 'size() == 0' for emptiness check

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agolibrbd/internal.cc: close resource leak
Danny Al-Gaaf [Mon, 27 Apr 2015 14:25:51 +0000 (16:25 +0200)]
librbd/internal.cc: close resource leak

Fix for:

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

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
10 years agotests: cephtool/test.sh wait_for_clean after PG (re)mapping 4816/head
Loic Dachary [Sun, 31 May 2015 13:18:35 +0000 (15:18 +0200)]
tests: cephtool/test.sh wait_for_clean after PG (re)mapping

A get/set command may fail with

   Error EBUSY: currently creating pgs, wait

if issued before the PGs are clean. Call wait_for_clean after the pool
is created or a pool setting is changed and remaps the PGs it
contains (size, pg_num...) to ensure the PGs are clean and the set/get
command that follow will succeed.

http://tracker.ceph.com/issues/11624 Fixes: #11624

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agotests: reduce pg_num in test_mon_osd_pool_set
Loic Dachary [Sun, 31 May 2015 13:15:30 +0000 (15:15 +0200)]
tests: reduce pg_num in test_mon_osd_pool_set

No need for more than one pg to test get/set on pools: it also is faster
to become clean.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agotests: use get_pg from ceph-helpers.sh
Loic Dachary [Sun, 31 May 2015 13:13:52 +0000 (15:13 +0200)]
tests: use get_pg from ceph-helpers.sh

The semantic and interface of get_pg are the same, that avoids
duplication and the ceph-helpers.sh version is tested and documented.

Make the ceph-test package dependent on xmlstarlet because it is
needed by ceph-helpers.sh.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoCOPYING: note git-archive-all.sh license
Sage Weil [Sun, 31 May 2015 22:25:59 +0000 (18:25 -0400)]
COPYING: note git-archive-all.sh license

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomake_dist.sh: rename from bin/make_dist_tarball.sh
Sage Weil [Sun, 31 May 2015 21:58:49 +0000 (17:58 -0400)]
make_dist.sh: rename from bin/make_dist_tarball.sh

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomake_dist_tarball.sh: make gz and bz2 archives
Sage Weil [Sun, 31 May 2015 21:57:41 +0000 (17:57 -0400)]
make_dist_tarball.sh: make gz and bz2 archives

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoceph-disk: always check zap is applied on a full device 4818/head
Loic Dachary [Sun, 31 May 2015 17:42:45 +0000 (19:42 +0200)]
ceph-disk: always check zap is applied on a full device

zap only makes sense on a full device and this is verified for

    ceph-disk prepare --zap-disk

but not for

    ceph-disk zap

Unify the two and add a test to check that it fails as expected when
trying to zap a directory.

http://tracker.ceph.com/issues/11272 Fixes: #11272

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Sun, 31 May 2015 16:43:33 +0000 (12:43 -0400)]
Merge remote-tracking branch 'gh/next'

10 years agounittest_ceph_argparse: test float parsing
Sage Weil [Sun, 31 May 2015 16:42:52 +0000 (12:42 -0400)]
unittest_ceph_argparse: test float parsing

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoAllow float value by allowing . in input value
Rajesh Nambiar [Sun, 31 May 2015 14:36:08 +0000 (14:36 +0000)]
Allow float value by allowing . in input value

Dont bail out if the input value happens to be .

Fixes: #11620
Signed-off-by: Rajesh Nambiar <rajesh.n@msystechnologies.com>
Tested-by: Sage Weil <sage@redhat.com>
10 years agotests: ceph-helpers.sh use expr instead of (( ))
Loic Dachary [Sun, 31 May 2015 14:06:24 +0000 (16:06 +0200)]
tests: ceph-helpers.sh use expr instead of (( ))

Because (( timer++ )) is mistaken by set -e to not be a successful
command, use expr instead.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agotests: move ceph-helpers.sh to qa/workunits
Loic Dachary [Sun, 31 May 2015 13:11:47 +0000 (15:11 +0200)]
tests: move ceph-helpers.sh to qa/workunits

So that it can be used by scripts in qa/workunits that need it.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoerasure-code: ErasureCodeShec update default values to string 4710/head
Loic Dachary [Sun, 17 May 2015 16:09:21 +0000 (18:09 +0200)]
erasure-code: ErasureCodeShec update default values to string

Update the ErasureCodeShec::init function to use string default
values. The default profile values for technique, ruleset-root and
ruleset-failure-domain are set for the user to see.

The error message when an invalid technique is provided is written to
the error stream to be returned to the user instead of being written to
the OSD log.

Updating other values from the profile would require deeper changes and
is left for later.

http://tracker.ceph.com/issues/9589 Fixes: #9589

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoerasure-code: ErasureCodeLrc update default values to string
Loic Dachary [Sun, 17 May 2015 16:08:31 +0000 (18:08 +0200)]
erasure-code: ErasureCodeLrc update default values to string

Update the ErasureCodeLrc::init function to use string default values
and update the profile accordingly.

If the k,m,l values are set and generate mappings and layers entries,
those are not stored in the profile. The details of what k,m,l create
are private and not exposed to the caller.

http://tracker.ceph.com/issues/9589 Fixes: #9589

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoerasure-code: return ErasureCodeLrc::parse_kml error
Loic Dachary [Sun, 17 May 2015 16:07:33 +0000 (18:07 +0200)]
erasure-code: return ErasureCodeLrc::parse_kml error

Instead of always returning 0

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoerasure-code: ErasureCodeJerasure update default values to string
Loic Dachary [Sun, 17 May 2015 16:04:56 +0000 (18:04 +0200)]
erasure-code: ErasureCodeJerasure update default values to string

Update the ErasureCodeJerasure::init function to use string default values
and update the profile accordingly.

The ErasureCodeJerasure::revert_to_default prototype is modified so it
can update the profile.

http://tracker.ceph.com/issues/9589 Fixes: #9589

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoerasure-code: ErasureCodeIsa update default values to string
Loic Dachary [Sun, 17 May 2015 15:58:36 +0000 (17:58 +0200)]
erasure-code: ErasureCodeIsa update default values to string

Update the ErasureCodeIsa::init function to use string default values
and update the profile accordingly.

Also fix a bug by which the plugin would incorrectly report using the
default technique when the reed_sol_van or cauchy techniques are the
only legitimate values.

http://tracker.ceph.com/issues/9589 Fixes: #9589

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoerasure-code: ErasureCode default value is a string
Loic Dachary [Sun, 17 May 2015 15:53:55 +0000 (17:53 +0200)]
erasure-code: ErasureCode default value is a string

The to_int, to_bool prototypes are modified and the default values are
changed to string instead of int. If a default value is set, the profile
is modified to contain the default value.

The to_string helper is added so it can be used to set the default value
of a string, in a way that is consistent with to_int and to_bool.

http://tracker.ceph.com/issues/9589 Fixes: #9589

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge pull request #4810 from zaitcev/context_io_init_undup
Yehuda Sadeh [Sat, 30 May 2015 17:25:45 +0000 (20:25 +0300)]
Merge pull request #4810 from zaitcev/context_io_init_undup

rgw: Drop a redundant context_io.init

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: Drop a redundant context_io.init 4810/head
Pete Zaitcev [Fri, 29 May 2015 23:55:59 +0000 (17:55 -0600)]
rgw: Drop a redundant context_io.init

Interestingly enough, the function is not even entirely idempotent:
it prints debugging output, duplicated.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
10 years agoMerge pull request #4812 from yuyuyu101/fix-perf-incompatible
Loic Dachary [Sat, 30 May 2015 14:17:46 +0000 (16:17 +0200)]
Merge pull request #4812 from yuyuyu101/fix-perf-incompatible

PerfLocal: Doesnt' compile div64 for non-64 bits arch

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoPerfLocal: Doesnt' compile div64 for non-64 bits arch 4812/head
Haomai Wang [Sat, 30 May 2015 13:10:12 +0000 (21:10 +0800)]
PerfLocal: Doesnt' compile div64 for non-64 bits arch

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
10 years agoMerge pull request #4797 from dachary/wip-11665-erasure-code-lrc
Loic Dachary [Sat, 30 May 2015 10:19:59 +0000 (12:19 +0200)]
Merge pull request #4797 from dachary/wip-11665-erasure-code-lrc

tests: add lrc tests to osd-scrub-repair.sh

Reviewed-by: Shylesh Kumar <shmohan@redhat.com>
10 years agoMerge pull request #4799 from dachary/wip-install-deps
Kefu Chai [Sat, 30 May 2015 09:47:36 +0000 (17:47 +0800)]
Merge pull request #4799 from dachary/wip-install-deps

install-deps.sh: robust pip and wheel installation

Reviewed-by: Kefu Chai <kchai@redhat.com>
10 years agoinstall-deps.sh: do not store pip cache outside of the tree 4799/head
Loic Dachary [Sat, 30 May 2015 08:53:51 +0000 (10:53 +0200)]
install-deps.sh: do not store pip cache outside of the tree

Signed-off-by: Loic Dachary <ldachary@redhat.org>
10 years agobin/make_dist_tarball.sh
Sage Weil [Sat, 30 May 2015 01:29:48 +0000 (21:29 -0400)]
bin/make_dist_tarball.sh

This includes all submodules *except* ceph-object-corpus and
ceph-erasure-code-corpus.

This is a bit different that autotools' version:

 - compiled man pages
 - some autotools cruft
 - src/.git_version
 - compiled *.in files
 + .git*
 + CMake stuff
 + copyright files
 + readme files
 + cmake/
 + debian/
 + doc/
 + keys/
 + qa/
 + systemd/
 + tons of other stuff we should probably have included

All in all, I think it's much more complete.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agobin/git-all-archive.sh: add --ignore option
Sage Weil [Sat, 30 May 2015 01:22:52 +0000 (21:22 -0400)]
bin/git-all-archive.sh: add --ignore option

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agobin/git-archive-all.sh
Sage Weil [Sat, 30 May 2015 01:05:14 +0000 (21:05 -0400)]
bin/git-archive-all.sh

Thank you, internet: https://github.com/meitar/git-archive-all.sh

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #4727 from tchaikov/wip-osdmaptool-dump-tree-with-format
Sage Weil [Sat, 30 May 2015 00:43:54 +0000 (17:43 -0700)]
Merge pull request #4727 from tchaikov/wip-osdmaptool-dump-tree-with-format

osdmaptool: dump tree with given format

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoinstall-deps.sh: keep debian alternatives
Loic Dachary [Fri, 29 May 2015 21:55:01 +0000 (23:55 +0200)]
install-deps.sh: keep debian alternatives

Instead of removing the | when an alternative is found in the control
file such as

     cryptsetup-bin | cryptsetup

remove the surrounding spaces so that it is treated as a regular
expression that matches either one.

Replace the form

    sudo bash -c "FOO=bar ..."

with

    sudo env FOO=bar ...

to reduce the levels of shell escaping.

Reported-by: http://dyweni.com/
Signed-off-by: Loic Dachary <ldachary@redhat.com>