]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
10 years agolibrados_test_stub: add support for flushing watches
Jason Dillaman [Thu, 30 Apr 2015 17:36:26 +0000 (13:36 -0400)]
librados_test_stub: add support for flushing watches

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agocommon: lockdep now support unregistering once destructed
Jason Dillaman [Thu, 30 Apr 2015 17:29:12 +0000 (13:29 -0400)]
common: lockdep now support unregistering once destructed

librbd use of an image hierarchy resulted in lock names being
re-used and incorrectly analyzed.  librbd now uses unique lock
names per instance, but to prevent an unbounded growth of
tracked locks, we now remove lock tracking once a lock is
destructed.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agocommon: add valgrind.h convenience wrapper
Jason Dillaman [Thu, 30 Apr 2015 17:26:41 +0000 (13:26 -0400)]
common: add valgrind.h convenience wrapper

Conditionally support helgrind annotations if valgrind support is
enabled during the build.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agolibrbd: add work queue for op completions
Jason Dillaman [Wed, 8 Apr 2015 21:24:08 +0000 (17:24 -0400)]
librbd: add work queue for op completions

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agoWorkQueue: ContextWQ can now accept a return code
Jason Dillaman [Wed, 8 Apr 2015 20:46:34 +0000 (16:46 -0400)]
WorkQueue: ContextWQ can now accept a return code

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
10 years agoMerge pull request #4717 from athanatos/wip-8635
Samuel Just [Thu, 4 Jun 2015 18:25:12 +0000 (11:25 -0700)]
Merge pull request #4717 from athanatos/wip-8635

Wip 8635 -- Move scrub, snap_trim into a unified queue

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #4718 from athanatos/wip-sync-omap
Samuel Just [Thu, 4 Jun 2015 18:24:43 +0000 (11:24 -0700)]
Merge pull request #4718 from athanatos/wip-sync-omap

FileStore: sync object_map when we syncfs

Reviewed-by: Kefu Chai <kchai@redhat.com>
10 years agoMerge pull request #4839 from ceph/wip-fix-arm-linking-issue
Sage Weil [Thu, 4 Jun 2015 16:46:29 +0000 (09:46 -0700)]
Merge pull request #4839 from ceph/wip-fix-arm-linking-issue

common/Cycles.cc: skip initialization if rdtsc is not implemented

Reviewed-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Haomai Wang <haomaiwang@gmail.com>
10 years agoMerge pull request #4852 from ceph/wip-rgw-vstart
Orit Wasserman [Thu, 4 Jun 2015 16:03:58 +0000 (18:03 +0200)]
Merge pull request #4852 from ceph/wip-rgw-vstart

make vstart + rgw more useful

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 agoMerge pull request #4858 from SUSE/wip_ceph.spec.in_remove_extra_else_statement
Kefu Chai [Thu, 4 Jun 2015 11:07:52 +0000 (19:07 +0800)]
Merge pull request #4858 from SUSE/wip_ceph.spec.in_remove_extra_else_statement

ceph.spec.in: remove extra %else statement

Reviewed-by: Kefu Chai <kchai@redhat.com>
10 years agoMerge pull request #4859 from ceph/wip-fix-i386-test-11870
Loic Dachary [Thu, 4 Jun 2015 10:14:10 +0000 (12:14 +0200)]
Merge pull request #4859 from ceph/wip-fix-i386-test-11870

test: fix the plugin_exists()

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agotest: fix the plugin_exists() 4859/head
Kefu Chai [Thu, 4 Jun 2015 09:45:09 +0000 (17:45 +0800)]
test: fix the plugin_exists()

in 8e61a99, we try to init the plugin when user set a profile using
"ceph osd erasure-code-profile set <profile-name> <profile>", so
if user passes in an unknown plugin, ceph will reject it right away,
instead of loading the plugin when "ceph osd crush rule create-erasure".

Fixes: #11870
Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years agoMerge pull request #4856 from ceph/wip-install-deps-11869
Loic Dachary [Thu, 4 Jun 2015 08:52:10 +0000 (10:52 +0200)]
Merge pull request #4856 from ceph/wip-install-deps-11869

install-deps.sh: create virtualenv only if necessary

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoceph.spec.in: remove extra %else statement 4858/head
Owen Synge [Thu, 4 Jun 2015 08:11:34 +0000 (10:11 +0200)]
ceph.spec.in: remove extra %else statement

Remove extra conditional.

Signed-off-by: Owen Synge <osynge@suse.com>
10 years agoinstall-deps.sh: s/get_pip_and_wheel/populate_wheelhouse/ 4856/head
Kefu Chai [Thu, 4 Jun 2015 08:00:45 +0000 (16:00 +0800)]
install-deps.sh: s/get_pip_and_wheel/populate_wheelhouse/

Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years agoinstall-deps.sh: create virtualenv only if necessary
Kefu Chai [Thu, 4 Jun 2015 05:44:00 +0000 (13:44 +0800)]
install-deps.sh: create virtualenv only if necessary

Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years agoinstall-deps.sh: do not create "wheelhouse" unless it's ready
Kefu Chai [Thu, 4 Jun 2015 03:53:55 +0000 (11:53 +0800)]
install-deps.sh: do not create "wheelhouse" unless it's ready

* only create "wheelhouse" directory for tox when it is populated
  with all packages in *requiresments.txt. before than, the wheels
  are put in "wheelhouse-wip"

Fixes: #11869
Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years agocommon/Cycles.cc: skip initialization if rdtsc is not implemented 4839/head
Boris Ranto [Wed, 3 Jun 2015 10:24:48 +0000 (12:24 +0200)]
common/Cycles.cc: skip initialization if rdtsc is not implemented

The Cycles initialization gets stuck in infinite loop if rdtsc is not
implemented. This patch fixes the issue by quitting the initialization
if rtdsc fails.

The patch was cherry-picked from ubuntu patch by James Page, see

https://bugzilla.redhat.com/show_bug.cgi?id=1222286

for more details on the patch.

Signed-off-by: James Page <james.page@ubuntu.com>
10 years agoinstall-deps.sh: refactor pip install a little bit
Kefu Chai [Thu, 4 Jun 2015 03:45:55 +0000 (11:45 +0800)]
install-deps.sh: refactor pip install a little bit

Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years agoMerge pull request #4855 from tchaikov/wip-man-page-fix
Kefu Chai [Thu, 4 Jun 2015 05:24:22 +0000 (13:24 +0800)]
Merge pull request #4855 from tchaikov/wip-man-page-fix

man/create-create-keys: minor fixes

Reviewed-by: Abhishek Lekshmanan <abhishek.lekshmanan@ril.com>
10 years agoman/create-create-keys: minor fixes 4855/head
Kefu Chai [Thu, 4 Jun 2015 03:24:13 +0000 (11:24 +0800)]
man/create-create-keys: minor fixes

to address the comments on https://github.com/ceph/ceph/pull/4846

Fixes: #10725
Signed-off-by: Kefu Chai <kchai@redhat.com>
10 years agoMerge pull request #4853 from ceph/wip-rpm-rm-endif
Kefu Chai [Thu, 4 Jun 2015 03:21:39 +0000 (11:21 +0800)]
Merge pull request #4853 from ceph/wip-rpm-rm-endif

ceph.spec.in: fix rpm build errors

Reviewed-by: Kefu Chai <kchai@redhat.com>
10 years agoRevert "ceph.spec.in:ownership of dirs extension" 4853/head
Ken Dreyer [Wed, 3 Jun 2015 23:42:27 +0000 (17:42 -0600)]
Revert "ceph.spec.in:ownership of dirs extension"

This reverts commit 6f495974a8255ec4bbd4c7c85f1ed21b3f281f2b.

This needs more discussion, since "make install" does not currently
create /usr/lib/ceph (and maybe /usr/share/ceph?)

This fixes the rpmbuild failure,

  error: File not found:
  /srv/autobuild-ceph/gitbuilder.git/build/rpmbuild/BUILDROOT/ceph-9.0.0-1225.ga16afdd.el6.x86_64/usr/lib/ceph

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
10 years agoceph.spec.in: rm stray %endif
Ken Dreyer [Wed, 3 Jun 2015 23:20:26 +0000 (17:20 -0600)]
ceph.spec.in: rm stray %endif

Commit d8abde3338b0c7df373b762e35099ad5123866bf introduced a stray
%endif. Remove it.

This fixes the build error:

  "error: /srv/autobuild-ceph/gitbuilder.git/build/ceph.spec:140: Got a
  %endif with no %if"

Reported-by: Greg Farnum <gfarnum@redhat.com>
Signed-off-by: Ken Dreyer <kdreyer@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 agoosd/: convert scrub to use the OpWQ 4717/head
Samuel Just [Fri, 15 May 2015 17:34:29 +0000 (10:34 -0700)]
osd/: convert scrub to use the OpWQ

Fixes: 8635
Signed-off-by: Samuel Just <sjust@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>