Commit Graph

41960 Commits

Author SHA1 Message Date
Owen Synge
5747ea1910 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>
2015-06-03 15:55:14 +02:00
Owen Synge
c65538f489 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>
2015-06-03 15:55:00 +02:00
Loic Dachary
3ca1b50975 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>
2015-06-03 10:47:50 +02:00
Gregory Farnum
b7eec9ab68 Merge pull request #4590 from ceph/wip-da-SCA-20150427
SCA and Coverity fixes

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-06-02 23:21:41 -07:00
Kefu Chai
323918a3d6 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>
2015-06-03 11:30:45 +08:00
David Zafman
17f73fafc4 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>
2015-06-02 17:28:37 -07:00
Josh Durgin
eb92254099 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>
2015-06-02 14:18:47 -07:00
Jason Dillaman
3d39a9bc69 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>
2015-06-02 11:34:45 -04:00
Jason Dillaman
4cf41486e9 tests: verify librbd blocking aio code path
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-06-02 10:33:35 -04:00
Jason Dillaman
008a9c4f6f librbd: add rbd_non_blocking_aio option to image metadata
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-06-02 10:32:41 -04:00
Kefu Chai
c2b06ab372 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>
2015-06-02 20:43:26 +08:00
Kefu Chai
aa3d2693d3 Merge pull request #4760 from ketor/fix_mutex_memory_leak
Mutex: fix memory leak in lockdep _register

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-06-02 20:37:10 +08:00
Loic Dachary
ddfc589975 Merge pull request #4802 from isserrano/master
doc: Fixed example sintax in Absolute Sizing

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-06-02 14:36:35 +02:00
Ismael
de14093fe2 doc: s/osd pool hot-storage/osd pool set hot-storage/
Signed-off-by: Ismael Serrano <ismael.serrano@gmail.com>
2015-06-02 13:30:15 +01:00
Greg Farnum
64ec79f0d9 Put new variable initialization in its own block
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2015-06-01 21:31:47 -07:00
Jason Dillaman
769cad1271 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>
2015-06-01 22:56:11 -04:00
Sage Weil
106a1c3081 Makefile: install ceph-post-file keys with mode 600
Otherwise ssh (may) prompt for a password.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-06-01 15:38:07 -07:00
Joseph McDonald
ee170eadcd ceph-post-file: improve check for a source install
Signed-off-by: Joseph McDonald <joseph.mcdonald@alcatel-lucent.com>
2015-06-01 15:38:07 -07:00
Joseph McDonald
b84031ed5e ceph-post-file: behave when sftp doesn't take -i
Fixes: #11836
Signed-off-by: Joseph McDonald <joseph.mcdonald@alcatel-lucent.com>
2015-06-01 15:37:58 -07:00
Loic Dachary
e2e1f35feb 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>
2015-06-01 21:52:14 +02:00
Loic Dachary
8e61a99d0d 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>
2015-06-01 21:52:14 +02:00
Loic Dachary
77e5330da1 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>
2015-06-01 21:52:09 +02:00
Loic Dachary
0f2c556796 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>
2015-06-01 19:52:48 +02:00
Ken Dreyer
a1de1fc20e Merge pull request #4729 from SUSE/wip_suse_builddeps_and_deps
ceph.spec.in: Forward port suse build deps and recomends
2015-06-01 10:12:00 -06:00
Kefu Chai
e5222b7ff0 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>
2015-06-01 22:28:23 +08:00
Owen Synge
042e8ff4dc 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>
2015-06-01 15:57:03 +02:00
Loic Dachary
8b7a6fdeaa 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>
2015-06-01 15:00:04 +02:00
Kefu Chai
0f024602bd 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>
2015-06-01 15:33:15 +08:00
Kefu Chai
06e6c15217 test/perf_local: disable tests if not supported
* pass appropriate "-m<machine>" args to compiler

Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-06-01 14:58:57 +08:00
Kefu Chai
63343cef77 .gitignore: ignore /perf_perf_local
Fixes: #11827
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-06-01 14:58:52 +08:00
Danny Al-Gaaf
cc1ff9b456 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>
2015-06-01 06:59:26 +02:00
Danny Al-Gaaf
05b050f0b6 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>
2015-06-01 06:59:26 +02:00
Danny Al-Gaaf
0ae8fcadfb 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>
2015-06-01 06:59:26 +02:00
Danny Al-Gaaf
f5ae56b57c 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>
2015-06-01 06:59:26 +02:00
Danny Al-Gaaf
0a45a7a19e 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>
2015-06-01 06:59:26 +02:00
Danny Al-Gaaf
bbeb37fc4d 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>
2015-06-01 06:59:26 +02:00
Danny Al-Gaaf
6ffec51880 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>
2015-06-01 06:59:26 +02:00
Danny Al-Gaaf
3b720f5a62 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>
2015-06-01 06:59:26 +02:00
Danny Al-Gaaf
71df303a90 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>
2015-06-01 06:59:26 +02:00
Danny Al-Gaaf
42f93a6418 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>
2015-06-01 06:59:26 +02:00
Danny Al-Gaaf
258b7b9a31 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>
2015-06-01 06:59:26 +02:00
Danny Al-Gaaf
af144371f0 test/librbd/fsx.cc: reduce scope of variables
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-06-01 06:59:26 +02:00
Danny Al-Gaaf
83cb6095dd 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>
2015-06-01 06:59:26 +02:00
Danny Al-Gaaf
958289b0f9 test/librbd/fsx.cc: fix format specifier
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-06-01 06:59:25 +02:00
Danny Al-Gaaf
b705949a61 test_internal.cc: prefer ++operator for non-primitive iter
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-06-01 06:59:25 +02:00
Danny Al-Gaaf
e60c9c2213 rgw/rgw_op.cc: prefer empty() over 'size() == 0' for emptiness check
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-06-01 06:59:25 +02:00
Danny Al-Gaaf
d312847336 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>
2015-06-01 06:59:25 +02:00
Loic Dachary
7e2a7a8685 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>
2015-06-01 01:13:44 +02:00
Loic Dachary
f6e4000589 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>
2015-06-01 01:13:44 +02:00
Loic Dachary
d2cc2b184b 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>
2015-06-01 01:11:28 +02:00