]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
9 years agopybind/rbd.pyx: misc typo bugfixes 6768/head
Hector Martin [Wed, 9 Dec 2015 09:47:40 +0000 (18:47 +0900)]
pybind/rbd.pyx: misc typo bugfixes

9 years agopybind/rbd.pyx: PyString -> PyBytes
Hector Martin [Wed, 9 Dec 2015 09:07:50 +0000 (18:07 +0900)]
pybind/rbd.pyx: PyString -> PyBytes

9 years agopybind/rbd.pyx: Return something useful from str() and repr()
Hector Martin [Thu, 3 Dec 2015 11:51:35 +0000 (20:51 +0900)]
pybind/rbd.pyx: Return something useful from str() and repr()

str() defaults to repr(), so implement __repr__ instead.

Signed-off-by: Hector Martin <marcan@marcan.st>
9 years agopybind/rbd.pyx: only set self.closed after a successful close
Hector Martin [Wed, 2 Dec 2015 18:07:02 +0000 (03:07 +0900)]
pybind/rbd.pyx: only set self.closed after a successful close

Signed-off-by: Hector Martin <marcan@marcan.st>
9 years agopybind/rbd.pyx: remove redundant RBD.__init__ method
Hector Martin [Wed, 2 Dec 2015 17:58:29 +0000 (02:58 +0900)]
pybind/rbd.pyx: remove redundant RBD.__init__ method

Signed-off-by: Hector Martin <marcan@marcan.st>
9 years agoceph.spec: Cython is spelled python-Cython in OpenSuSE
Hector Martin [Wed, 2 Dec 2015 13:58:42 +0000 (22:58 +0900)]
ceph.spec: Cython is spelled python-Cython in OpenSuSE

Signed-off-by: Hector Martin <marcan@marcan.st>
9 years agopybind: Improvements to Cython build
Hector Martin [Wed, 2 Dec 2015 13:34:41 +0000 (22:34 +0900)]
pybind: Improvements to Cython build

- Avoid a silly rebuild at install time by always using src/build explicitly as build dir
- Tell Cython to put rbd.c in the build dir instead of in the source

This should fix a race when librbd gets relinked at the same time as pybind is installed
(since that install was causing a rebuild too).

Signed-off-by: Hector Martin <marcan@marcan.st>
9 years agopybind: convert librbd bindings to Cython
Hector Martin [Tue, 1 Dec 2015 14:30:01 +0000 (23:30 +0900)]
pybind: convert librbd bindings to Cython

ctypes is fundamentally incapable of providing safe callback support
(exceptions during callbacks are not handled properly). To fix this, and also
gain more flexibility, rewrite/port the librbd bindings to Cython instead.
Other Python bindings are expected to migrate to Cython in the future.

Reference: http://tracker.ceph.com/issues/13115

To support this, this change also:
- Introduces a Makefile for pybind which calls setup.py
- Updates the installation files for packages
- Adds a hack to admin/build-doc to build a dummy librbd, avoiding the need to
  build the entire client library just to generate documentation (Sphinx needs
  to be able to import rbd.so, which depends on librbd.so symbols).

With contributions by Josh Durgin <jdurgin@redhat.com>

Signed-off-by: Hector Martin <marcan@marcan.st>
9 years agodebian/control: make python-rbd depend on minimum librbd version
Hector Martin [Tue, 1 Dec 2015 14:28:17 +0000 (23:28 +0900)]
debian/control: make python-rbd depend on minimum librbd version

As the Cython bindings build to a binary module, backwards compatibility with
older librbd ABIs at runtime is not possible, so depend on at least the same
version (or newer).

Signed-off-by: Hector Martin <marcan@marcan.st>
9 years agoMakefile: break out local targets into variables
Hector Martin [Tue, 1 Dec 2015 14:25:33 +0000 (23:25 +0900)]
Makefile: break out local targets into variables

To support more than one set of local-* rules, break them out into
sub-rules referenced by appending to variables. This will be used
when introducing the Cython-based librbd bindings that rely on
setup.py

Signed-off-by: Hector Martin <marcan@marcan.st>
9 years agoconfigure/packaging: introduce Cython dependency
Hector Martin [Tue, 1 Dec 2015 14:20:01 +0000 (23:20 +0900)]
configure/packaging: introduce Cython dependency

To prepare for the migration of rbd.py to Cython, add Cython as a package
dependency and have the configure script look for it.

Also adds Cython as a dependency for admin/build-doc, and changes the
virtualenv to allow usage of system packages (to avoid having to compile
Cython inside the virtualenv).

With contributions by Josh Durgin <jdurgin@redhat.com>

Signed-off-by: Hector Martin <marcan@marcan.st>
9 years agoMerge pull request #6749 from dachary/wip-doc-install
Loic Dachary [Tue, 1 Dec 2015 15:03:54 +0000 (16:03 +0100)]
Merge pull request #6749 from dachary/wip-doc-install

doc: INSTALL redirect to online documentation

Reviewed-by: Loic Dachary <ldachary@redhat.com>
9 years agoMerge pull request #6729 from majianpeng/librbd-journal
Jason Dillaman [Tue, 1 Dec 2015 14:24:05 +0000 (09:24 -0500)]
Merge pull request #6729 from majianpeng/librbd-journal

librbd: only send signal when AIO completions queue empty

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #6751 from ceph/wip-cmake-strerror_r
John Spray [Tue, 1 Dec 2015 14:17:46 +0000 (14:17 +0000)]
Merge pull request #6751 from ceph/wip-cmake-strerror_r

cmake: define STRERROR_R_CHAR_P for GNU-specific strerror_r

Reviewed-by: John Spray <john.spray@redhat.com>
9 years agoMerge pull request #5465 from yuyuyu101/wip-librbd-ap
Jason Dillaman [Tue, 1 Dec 2015 14:16:19 +0000 (09:16 -0500)]
Merge pull request #5465 from yuyuyu101/wip-librbd-ap

librbd: support eventfd for AIO completion notifications

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agocmake: define STRERROR_R_CHAR_P for GNU-specific strerror_r 6751/head
Ilya Dryomov [Tue, 1 Dec 2015 14:07:48 +0000 (15:07 +0100)]
cmake: define STRERROR_R_CHAR_P for GNU-specific strerror_r

This is what autotools does with AC_FUNC_STRERROR_R bit.  It takes us
from

    $ monmaptool --print nonexistant
    monmaptool: monmap file nonexistant
    monmaptool: couldn't open nonexistant: (2)

to

    $ monmaptool --print nonexistant
    monmaptool: monmap file nonexistant
    monmaptool: couldn't open nonexistant: (2) No such file or directory

on cmake - otherwise we end up using GNU-specific version as if it was
the POSIX version.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
9 years agoMerge pull request #6745 from drunkard/master
Sage Weil [Tue, 1 Dec 2015 13:59:57 +0000 (08:59 -0500)]
Merge pull request #6745 from drunkard/master

doc: fix typo in cephfs/quota

9 years agoMerge remote-tracking branch 'gh/jewel'
Sage Weil [Tue, 1 Dec 2015 13:51:48 +0000 (08:51 -0500)]
Merge remote-tracking branch 'gh/jewel'

9 years agodoc: INSTALL redirect to online documentation 6749/head
Loic Dachary [Tue, 1 Dec 2015 13:28:05 +0000 (14:28 +0100)]
doc: INSTALL redirect to online documentation

The INSTALL file has obsolete and misleading instructions to compile
from sources (-pg actually fails at link time). Replace with links to
the online installation and build from source documentations.

Signed-off-by: Loic Dachary <loic@dachary.org>
9 years agodoc: typo fix in cephfs/quota 6745/head
Drunkard Zhang [Tue, 1 Dec 2015 09:15:29 +0000 (17:15 +0800)]
doc: typo fix in cephfs/quota

9 years agolibrbd/JournalReplay: Only Send signal when aio completions queue empty. 6729/head
Jianpeng Ma [Fri, 27 Nov 2015 02:27:47 +0000 (10:27 +0800)]
librbd/JournalReplay: Only Send signal when aio completions queue empty.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
9 years agoMerge pull request #6697 from XinzeChi/wip-scrub-test
Loic Dachary [Tue, 1 Dec 2015 08:50:06 +0000 (09:50 +0100)]
Merge pull request #6697 from XinzeChi/wip-scrub-test

test: fix osd-scrub-snaps.sh

Reviewed-by: Loic Dachary <ldachary@redhat.com>
9 years agotest: fix osd-scrub-snaps.sh 6697/head
Xinze Chi [Wed, 25 Nov 2015 12:19:54 +0000 (20:19 +0800)]
test: fix osd-scrub-snaps.sh

when we run run-make-check.sh in hdd disk, it would spend much more
time to finish scrub.

Signed-off-by: Xinze Chi <xinze@xsky.com>
9 years agotest: add pg_scrub for ceph-helpers.sh
Xinze Chi [Wed, 25 Nov 2015 12:19:03 +0000 (20:19 +0800)]
test: add pg_scrub for ceph-helpers.sh

Signed-off-by: Xinze Chi <xinze@xsky.com>
9 years agolibrbd: Fix rebase with new io flow 5465/head
Haomai Wang [Fri, 20 Nov 2015 04:27:27 +0000 (12:27 +0800)]
librbd: Fix rebase with new io flow

Signed-off-by: Haomai Wang <haomai@xsky.com>
9 years agolibrbd: fix lttng tracing argument mismatch
Haomai Wang [Fri, 20 Nov 2015 04:27:18 +0000 (12:27 +0800)]
librbd: fix lttng tracing argument mismatch

Signed-off-by: Haomai Wang <haomai@xsky.com>
9 years agolibrbd: Add set_event_notify to AioImageRequestWQ
Haomai Wang [Wed, 18 Nov 2015 07:43:51 +0000 (15:43 +0800)]
librbd: Add set_event_notify to AioImageRequestWQ

Signed-off-by: Haomai Wang <haomai@xsky.com>
9 years agolibrbd: Remove unneeded set_event_notify
Haomai Wang [Mon, 9 Nov 2015 15:05:01 +0000 (23:05 +0800)]
librbd: Remove unneeded set_event_notify

Since xlist clear method invoked below is enough to disassociate the xlist
item from the xlist, so the remove_myself() call in the destructor is safe
to invoke since it's already been removed from the list.

Signed-off-by: Haomai Wang <haomai@xsky.com>
9 years agoMakefile: Add noinst headr files
Haomai Wang [Mon, 9 Nov 2015 15:01:45 +0000 (23:01 +0800)]
Makefile: Add noinst headr files

Signed-off-by: Haomai Wang <haomai@xsky.com>
9 years agolibrbd: Make rbd header file uses independent enum definition
Haomai Wang [Mon, 9 Nov 2015 14:58:32 +0000 (22:58 +0800)]
librbd: Make rbd header file uses independent enum definition

Signed-off-by: Haomai Wang <haomai@xsky.com>
9 years agoLibrbd: Make AioCompletion complete doesn't unlock if callback
Haomai Wang [Sat, 7 Nov 2015 07:55:47 +0000 (15:55 +0800)]
Librbd: Make AioCompletion complete doesn't unlock if callback

Signed-off-by: Haomai Wang <haomai@xsky.com>
9 years agoLibrbd: fix return code of EventSocket init and notify
Haomai Wang [Sat, 7 Nov 2015 07:54:53 +0000 (15:54 +0800)]
Librbd: fix return code of EventSocket init and notify

Signed-off-by: Haomai Wang <haomai@xsky.com>
9 years agolibrbd: Add ictx check to avoid AIO_TYPE_NONE completion
Haomai Wang [Fri, 21 Aug 2015 06:54:56 +0000 (14:54 +0800)]
librbd: Add ictx check to avoid AIO_TYPE_NONE completion

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
9 years agolibrbd: normalize notify return code
Haomai Wang [Wed, 19 Aug 2015 08:15:40 +0000 (16:15 +0800)]
librbd: normalize notify return code

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
9 years agolibrbd: Fix incorrect api declaration
Haomai Wang [Thu, 6 Aug 2015 03:14:46 +0000 (11:14 +0800)]
librbd: Fix incorrect api declaration

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
9 years agolibrbd: check event_notify to avoid extra logic
Haomai Wang [Wed, 5 Aug 2015 14:59:32 +0000 (22:59 +0800)]
librbd: check event_notify to avoid extra logic

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
9 years agoEventSocket: Add new event type pipe support
Haomai Wang [Tue, 4 Aug 2015 09:50:36 +0000 (17:50 +0800)]
EventSocket: Add new event type pipe support

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
9 years agotest: Add tests for getting arg of completion
Haomai Wang [Tue, 4 Aug 2015 09:33:39 +0000 (17:33 +0800)]
test: Add tests for getting arg of completion

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
9 years agolibrbd: Add interface to let user can get private data from comp
Haomai Wang [Tue, 4 Aug 2015 09:31:43 +0000 (17:31 +0800)]
librbd: Add interface to let user can get private data from comp

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
9 years agotests: Add tests for user io event notify
Haomai Wang [Tue, 4 Aug 2015 09:22:56 +0000 (17:22 +0800)]
tests: Add tests for user io event notify

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
9 years agolibrbd: Add event notify interfaces
Haomai Wang [Tue, 4 Aug 2015 09:22:40 +0000 (17:22 +0800)]
librbd: Add event notify interfaces

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
9 years agoMerge pull request #6741 from SUSE/wip-tyepdef-typo-fix
Loic Dachary [Mon, 30 Nov 2015 23:58:30 +0000 (00:58 +0100)]
Merge pull request #6741 from SUSE/wip-tyepdef-typo-fix

include/rados/librados.h: fix typo

Reviewed-by: Loic Dachary <ldachary@redhat.com>
9 years agoinclude/rados/librados.h: fix typo 6741/head
Nathan Cutler [Mon, 30 Nov 2015 23:26:08 +0000 (00:26 +0100)]
include/rados/librados.h: fix typo

This typo causes a warning when building the docs.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
9 years agoMerge pull request #6740 from dillaman/wip-13911
Josh Durgin [Mon, 30 Nov 2015 22:50:27 +0000 (14:50 -0800)]
Merge pull request #6740 from dillaman/wip-13911

librbd: ensure copy-on-read requests are complete prior to closing parent image

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
9 years agolibrbd: utilize common flush helper when closing parent images 6740/head
Jason Dillaman [Mon, 30 Nov 2015 21:32:10 +0000 (16:32 -0500)]
librbd: utilize common flush helper when closing parent images

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agolibrbd: only enqueue flush completion if a flush is pending
Jason Dillaman [Mon, 30 Nov 2015 21:30:51 +0000 (16:30 -0500)]
librbd: only enqueue flush completion if a flush is pending

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #6737 from dillaman/wip-13912
Josh Durgin [Mon, 30 Nov 2015 20:30:36 +0000 (12:30 -0800)]
Merge pull request #6737 from dillaman/wip-13912

librbd: check for presence of journal before attempting to remove

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
9 years agoMerge pull request #6668 from zaitcev/cleanup-dead-code-2
Yehuda Sadeh [Mon, 30 Nov 2015 20:30:21 +0000 (12:30 -0800)]
Merge pull request #6668 from zaitcev/cleanup-dead-code-2

rgw: Remove unused code in PutMetadataAccount:execute

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
Reviewed-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
9 years agoMerge pull request #6738 from ceph/wip-rbd-cli-misc
Jason Dillaman [Mon, 30 Nov 2015 19:43:42 +0000 (14:43 -0500)]
Merge pull request #6738 from ceph/wip-rbd-cli-misc

rbd: fixes for refactored CLI and related tests

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #6715 from jcsp/wip-librbd-cmake
Jason Dillaman [Mon, 30 Nov 2015 19:02:57 +0000 (14:02 -0500)]
Merge pull request #6715 from jcsp/wip-librbd-cmake

cmake: update for recent librbd changes

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #6432 from ukernel/wip-11482
John Spray [Mon, 30 Nov 2015 17:53:51 +0000 (17:53 +0000)]
Merge pull request #6432 from ukernel/wip-11482

mds: fix client capabilities during reconnect (client.XXXX isn't responding to mclientcaps(revoke))

Reviewed-by: John Spray <john.spray@redhat.com>
9 years agoMerge pull request #6736 from dillaman/wip-13914
Josh Durgin [Mon, 30 Nov 2015 17:43:17 +0000 (09:43 -0800)]
Merge pull request #6736 from dillaman/wip-13914

librbd: not necessary to hold owner_lock while releasing snap id

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
9 years agolibrbd: check for presence of journal before attempting to remove 6737/head
Jason Dillaman [Mon, 30 Nov 2015 17:36:13 +0000 (12:36 -0500)]
librbd: check for presence of journal before attempting to remove

Fixes: #13912
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agojournal: helper method to determine if journal exists
Jason Dillaman [Mon, 30 Nov 2015 17:31:02 +0000 (12:31 -0500)]
journal: helper method to determine if journal exists

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agolibrbd: not necessary to hold owner_lock while releasing snap id 6736/head
Jason Dillaman [Mon, 30 Nov 2015 16:55:10 +0000 (11:55 -0500)]
librbd: not necessary to hold owner_lock while releasing snap id

Fixes: #13914
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agorbd: bail if too many arguments provided 6738/head
Ilya Dryomov [Sun, 29 Nov 2015 20:46:41 +0000 (21:46 +0100)]
rbd: bail if too many arguments provided

The code has a catch clause for that, but it was being rendered useless
by the preceding

    if (command_spec.size() > matching_spec->size())
      positional_options.add(at::POSITIONAL_ARGUMENTS.c_str(), -1);

which names all (both expected and extraneous) positional arguments.

Change it to name only expected arguments, deriving the number of
expected arguments from the length of positional_opts vector, supplied
by each action.  This works for all actions except "feature enable" and
"feature disable" which are specified as multitoken, so keep on passing
in -1 for those.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
9 years agorbd: don't append an extra newline after some errors
Ilya Dryomov [Mon, 30 Nov 2015 16:19:12 +0000 (17:19 +0100)]
rbd: don't append an extra newline after some errors

Don't append an extra newline after program_options-generated errors,
like "unrecognised option" or "the argument for option is invalid".

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
9 years agotests: update unmap.t CLI test
Ilya Dryomov [Mon, 30 Nov 2015 15:36:43 +0000 (16:36 +0100)]
tests: update unmap.t CLI test

Fixup the exit code - the old CLI tried to differentiate between CLI
errors and action errors by returning EXIT_FAILURE in the former case.
Also remove a test that relied on a special case check in the old CLI.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
9 years agocmake: librbd needs libjournal and libcls_journal_client
Ilya Dryomov [Mon, 30 Nov 2015 15:29:56 +0000 (16:29 +0100)]
cmake: librbd needs libjournal and libcls_journal_client

Commit 4719696cadd1 ("cmake: updates for refactored librbd IO path")
fixed file lists but missed the link dependency - librbd now needs
libjournal and libcls_journal_client.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
9 years agoMerge pull request #6706 from xiexingguo/xxg-wip-13711
Jason Dillaman [Mon, 30 Nov 2015 15:12:57 +0000 (10:12 -0500)]
Merge pull request #6706 from xiexingguo/xxg-wip-13711

rbd: output formatter may not be closed upon error

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #6734 from accelazh/master
Loic Dachary [Mon, 30 Nov 2015 15:11:25 +0000 (16:11 +0100)]
Merge pull request #6734 from accelazh/master

Correct typo 'restared' to 'restarted'

Reviewed-by: Loic Dachary <ldachary@redhat.com>
9 years agoCorrect typo 'restared' to 'restarted' 6734/head
Accela Zhao [Mon, 30 Nov 2015 14:24:26 +0000 (22:24 +0800)]
Correct typo 'restared' to 'restarted'

There is a typo in document "Monitoring OSDs and PGs" as below

    An OSD was ``down``, was restared, and is now ``recovering``.

This patch corrects 'restared' to 'restarted'. The whole code base
is also searched to ensure there is no more 'restared'.

Signed-off-by: Yilong Zhao <accelazh@gmail.com>
9 years agoMerge pull request #6733 from tchaikov/wip-fixcodingstyle
Loic Dachary [Mon, 30 Nov 2015 14:00:04 +0000 (15:00 +0100)]
Merge pull request #6733 from tchaikov/wip-fixcodingstyle

CodingStyle: fix broken URLs

Reviewed-by: Loic Dachary <ldachary@redhat.com>
9 years agoCodingStyle: fix broken URLs 6733/head
Kefu Chai [Mon, 30 Nov 2015 13:12:37 +0000 (21:12 +0800)]
CodingStyle: fix broken URLs

Signed-off-by: Kefu Chai <kchai@redhat.com>
9 years agoMerge pull request #6724 from dachary/wip-13592-test-auto-repair 6728/head
Loic Dachary [Sun, 29 Nov 2015 16:01:14 +0000 (17:01 +0100)]
Merge pull request #6724 from dachary/wip-13592-test-auto-repair

tests: fix race condition testing auto scrub

Reviewed-by: Xinze Chi <xinze@xsky.com>
9 years agomon/PGMonitor: MAX AVAIL is 0 if some OSDs' weight is 0
Chengyuan Li [Fri, 20 Nov 2015 05:29:39 +0000 (22:29 -0700)]
mon/PGMonitor: MAX AVAIL is 0 if some OSDs' weight is 0

In get_rule_avail(), even p->second is 0, it's possible to be used
as divisor and quotient is infinity, then is converted to an integer
which is negative value.
So we should check p->second value before calculation.

It fixes BUG #13840.

Signed-off-by: Chengyuan Li <chengyli@ebay.com>
(cherry picked from commit 18713e60edd1fe16ab571f7c83e6de026db483ca)

9 years agoos: FileStore::_destroy_collection may hide the real mistake.
Ruifeng Yang [Tue, 17 Nov 2015 03:18:27 +0000 (11:18 +0800)]
os: FileStore::_destroy_collection may hide the real mistake.

Signed-off-by: Ruifeng Yang <yangruifeng.09209@h3c.com>
(cherry picked from commit 9e9770ca87720781264d2e283739fc9e197706c9)

9 years agoFix mon routed_request_tids leak
Ning Yao [Thu, 8 Oct 2015 08:24:50 +0000 (16:24 +0800)]
Fix mon routed_request_tids leak

Signed-off-by: Ning Yao <zay11022@gmail.com>
(cherry picked from commit ba3c64ca705590f833806300461f3b98de0e62f8)

9 years agopybind: decode empty string in conf_parse_argv() correctly
Josh Durgin [Thu, 26 Nov 2015 05:37:23 +0000 (21:37 -0800)]
pybind: decode empty string in conf_parse_argv() correctly

cretargs is a array of c_char_p, which means ctypes has already
converted it to python byte strings. decode_cstr() would misinterpret
the empty string as a NULL c_char_p(), and convert it to None by
accident, resulting in errors when running commands like
'ceph config-key put foo ""'.

Since this is the only place we use arrays of c_char_p, just decode
it directly in conf_parse_argv(). Tested with python 2 and 3.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
(cherry picked from commit f76d5d6fe6a9f92b1ec17191f5504e2f61e0ff28)

9 years agoceph_test_keyvaluedb_iterators: Fix broken test
Haomai Wang [Mon, 16 Nov 2015 04:41:50 +0000 (12:41 +0800)]
ceph_test_keyvaluedb_iterators: Fix broken test

Introduced by #6312
Signed-off-by: Haomai Wang <haomai@xsky.com>
(cherry picked from commit ce0369444558b6308e1e0ffa49ae68faaac2bd1d)

9 years agotests: fix race condition testing auto scrub 6724/head
Loic Dachary [Sat, 28 Nov 2015 16:55:46 +0000 (17:55 +0100)]
tests: fix race condition testing auto scrub

When testing auto scrub, waiting 20 seconds for the scrub to complete is
sometimes not enough and creates false negatives.

Split wait_for_scrub out of the repair helper so that it can be used to
wait for the scrub to happen instead of using a timer.

The scrub timestamp is obtained after removing the object, therefore
there is a chance for the scrub to be finished already. But since auto
scrub is scheduled every 5 seconds, it will only make the test wait an
extra 5 seconds and not hang forever.

http://tracker.ceph.com/issues/13592

Signed-off-by: Xinze Chi <xinze@xsky.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
9 years agocmake: update for recent librbd changes 6715/head
John Spray [Thu, 26 Nov 2015 14:29:23 +0000 (14:29 +0000)]
cmake: update for recent librbd changes

Recent merge moved lots of things.

Signed-off-by: John Spray <john.spray@redhat.com>
9 years agoMerge pull request #6503 from XinzeChi/wip-repop-worker
Sage Weil [Sat, 28 Nov 2015 13:31:12 +0000 (08:31 -0500)]
Merge pull request #6503 from XinzeChi/wip-repop-worker

osd: defer decoding of MOSDRepOp/MOSDRepOpReply

Reviewed-by: Haomai Wang <haomai@xsky.com>
Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #6597 from ceph/wip-fix-kvdb-test
Sage Weil [Sat, 28 Nov 2015 13:29:15 +0000 (08:29 -0500)]
Merge pull request #6597 from ceph/wip-fix-kvdb-test

tests: ceph_test_keyvaluedb_iterators: fix broken test

Reviewed-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
9 years agoMerge pull request #6543 from efirs/optimize-stringify-call
Sage Weil [Sat, 28 Nov 2015 13:28:36 +0000 (08:28 -0500)]
Merge pull request #6543 from efirs/optimize-stringify-call

common: reduce CPU usage by making stringstream in stringify function thread local

Reviewed-by: Haomai Wang <haomai@xsky.com>
Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #6455 from 0003ydlom/perfctrwa
Sage Weil [Sat, 28 Nov 2015 13:27:40 +0000 (08:27 -0500)]
Merge pull request #6455 from 0003ydlom/perfctrwa

osd: enable perfcounters on sharded work queue mutexes

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #6441 from aclamk/wip-faster-log-fixed
Sage Weil [Sat, 28 Nov 2015 13:26:53 +0000 (08:26 -0500)]
Merge pull request #6441 from aclamk/wip-faster-log-fixed

common: optimize debug logging code

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #6276 from david-z/wip-systemd-finegrain-ceph-service
Sage Weil [Sat, 28 Nov 2015 13:25:40 +0000 (08:25 -0500)]
Merge pull request #6276 from david-z/wip-systemd-finegrain-ceph-service

systemd: start/stop/restart ceph services by daemon type

Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
9 years agoMerge pull request #6198 from XinzeChi/wip-buffer-history-alloc
Sage Weil [Sat, 28 Nov 2015 13:23:40 +0000 (08:23 -0500)]
Merge pull request #6198 from XinzeChi/wip-buffer-history-alloc

common: perf counter for bufferlist history total alloc

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #6081 from trociny/wip-pool_opts_t
Sage Weil [Fri, 27 Nov 2015 15:34:33 +0000 (10:34 -0500)]
Merge pull request #6081 from trociny/wip-pool_opts_t

osd: pg_pool_t: add dictionary for pool options

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoosd: store per pool scrub intervals in pool options 6081/head
Mykola Golub [Tue, 29 Sep 2015 06:35:32 +0000 (09:35 +0300)]
osd: store per pool scrub intervals in pool options

  ceph osd pool set $POOL scrub_min_interval N
  ceph osd pool set $POOL scrub_max_interval N
  ceph osd pool set $POOL deep_scrub_interval N

If N > 0, this value is used for the pool instead of
the corresponding global parameter from the config
(osd_scrub_min_interval, osd_scrub_max_interval or
osd_deep_scrub_interval).

Fixes: #13077
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
9 years agotests: workunits should not have ./ (assume it in $PATH)
Mykola Golub [Fri, 27 Nov 2015 06:23:55 +0000 (08:23 +0200)]
tests: workunits should not have ./ (assume it in $PATH)

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
9 years agoosd: pg_pool_t: add dictionary for pool options
Mykola Golub [Tue, 29 Sep 2015 06:24:24 +0000 (09:24 +0300)]
osd: pg_pool_t: add dictionary for pool options

It is going to be used to store per pool configuration parameters like
scrub intervals or recovery priority.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
9 years agoMerge pull request #6710 from jdurgin/wip-13877
Kefu Chai [Fri, 27 Nov 2015 08:48:56 +0000 (16:48 +0800)]
Merge pull request #6710 from jdurgin/wip-13877

test: use sequential journal_tid for object cacher test

Reported-by: Kefu Chai <kchai@redhat.com>
9 years agoMerge pull request #6711 from jdurgin/wip-13880
Kefu Chai [Fri, 27 Nov 2015 06:14:50 +0000 (14:14 +0800)]
Merge pull request #6711 from jdurgin/wip-13880

pybind: decode empty string in conf_parse_argv() correctly

Reviewed-by: Kefu Chai <kchai@redhat.com>
9 years agoMerge pull request #6704 from liewegas/wip-up-thru
Sage Weil [Thu, 26 Nov 2015 22:31:16 +0000 (17:31 -0500)]
Merge pull request #6704 from liewegas/wip-up-thru

mon: block 'ceph osd pg-temp ...' if pg_temp update is already pending

Reviewed-by: Joao Eduardo Luis <joao@suse.de>
9 years agoMerge pull request #6653 from branch-predictor/bp-no-zero-reverse
Sage Weil [Thu, 26 Nov 2015 22:30:38 +0000 (17:30 -0500)]
Merge pull request #6653 from branch-predictor/bp-no-zero-reverse

common: don't reverse hobject_t hash bits when zero

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #6475 from branch-predictor/bp-trim-n-reorder-bools
Sage Weil [Thu, 26 Nov 2015 22:29:58 +0000 (17:29 -0500)]
Merge pull request #6475 from branch-predictor/bp-trim-n-reorder-bools

osd: reduce memory consumption of some structs

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #6456 from stiopaa1/removeConstr
Sage Weil [Thu, 26 Nov 2015 22:29:31 +0000 (17:29 -0500)]
Merge pull request #6456 from stiopaa1/removeConstr

common: buffer: remove unneeded list destructor

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #6263 from dx9/wip-12406-os-filestore
Sage Weil [Thu, 26 Nov 2015 22:28:51 +0000 (17:28 -0500)]
Merge pull request #6263 from dx9/wip-12406-os-filestore

osd: FileStore: remove __SWORD_TYPE dependency

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #6262 from dx9/wip-12406-os-fs
Sage Weil [Thu, 26 Nov 2015 22:28:31 +0000 (17:28 -0500)]
Merge pull request #6262 from dx9/wip-12406-os-fs

osd: remove __SWORD_TYPE dependency

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #6175 from XinzeChi/wip-finisher-lat
Sage Weil [Thu, 26 Nov 2015 22:28:10 +0000 (17:28 -0500)]
Merge pull request #6175 from XinzeChi/wip-finisher-lat

common: add latency perf counter for finisher

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #6102 from mslovy/wip-mon-leak-fix
Sage Weil [Thu, 26 Nov 2015 22:27:47 +0000 (17:27 -0500)]
Merge pull request #6102 from mslovy/wip-mon-leak-fix

mon: fix routed_request_tids leak

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #6093 from tchaikov/wip-kvstore-tool-argv
Sage Weil [Thu, 26 Nov 2015 22:26:43 +0000 (17:26 -0500)]
Merge pull request #6093 from tchaikov/wip-kvstore-tool-argv

ceph-kvstore-tool: handle bad out file on command line

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #5793 from yuyuyu101/impl-perf
Sage Weil [Thu, 26 Nov 2015 22:26:05 +0000 (17:26 -0500)]
Merge pull request #5793 from yuyuyu101/impl-perf

osd: add osd op queue latency perfcounter

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #5734 from cxwshawn/mon-fix
Sage Weil [Thu, 26 Nov 2015 22:24:59 +0000 (17:24 -0500)]
Merge pull request #5734 from cxwshawn/mon-fix

auth: make keyring without mon entity type return -EACCES

Reviewed-by: Loic Dachary <ldachary@redhat.com>
9 years agoMerge pull request #6714 from aiicore/test_encoding_readable
Loic Dachary [Thu, 26 Nov 2015 14:12:57 +0000 (15:12 +0100)]
Merge pull request #6714 from aiicore/test_encoding_readable

test/encoding/readable.sh fix

Reviewed-by: Loic Dachary <ldachary@redhat.com>
9 years agotest/encoding/readable.sh fix 6714/head
Igor Podoski [Thu, 26 Nov 2015 12:38:50 +0000 (13:38 +0100)]
test/encoding/readable.sh fix

1. Fix formatting (mixed tabs and spaces)
2. Status of skipped types was showing always last version in directory

Signed-off-by: Igor Podoski <igor.podoski@ts.fujitsu.com>
9 years agoMerge pull request #6705 from vanpire110/master
Loic Dachary [Thu, 26 Nov 2015 09:15:25 +0000 (10:15 +0100)]
Merge pull request #6705 from vanpire110/master

doc: Fixes a spelling error

Reviewed-by: Loic Dachary <ldachary@redhat.com>
9 years agopybind: decode empty string in conf_parse_argv() correctly 6711/head
Josh Durgin [Thu, 26 Nov 2015 05:37:23 +0000 (21:37 -0800)]
pybind: decode empty string in conf_parse_argv() correctly

cretargs is a array of c_char_p, which means ctypes has already
converted it to python byte strings. decode_cstr() would misinterpret
the empty string as a NULL c_char_p(), and convert it to None by
accident, resulting in errors when running commands like
'ceph config-key put foo ""'.

Since this is the only place we use arrays of c_char_p, just decode
it directly in conf_parse_argv(). Tested with python 2 and 3.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>