]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
9 years agoceph-disk: remove the redundant try except and minor nits 5867/head
Vicente Cheng [Fri, 13 Nov 2015 01:59:27 +0000 (09:59 +0800)]
ceph-disk: remove the redundant try except and minor nits

  - remove the redundant try except

Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
9 years agotests: ceph-disk: add wait_for_osd_down() in ceph-disk-test.py of qa
Vicente Cheng [Fri, 13 Nov 2015 01:28:10 +0000 (09:28 +0800)]
tests: ceph-disk: add wait_for_osd_down() in ceph-disk-test.py of qa

  - add wait_for_osd_down() to avoid the side effect of deactivate

Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
9 years agotests: ceph-disk: modify the ceph-disk qa test cases
Vicente Cheng [Tue, 3 Nov 2015 09:45:55 +0000 (17:45 +0800)]
tests: ceph-disk: modify the ceph-disk qa test cases

  - minor correct for the latest ceph-disk qa test cases

Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
9 years agotests: ceph-disk: improve the unit test to coverage all deactivate/destroy function.
Vicente Cheng [Tue, 3 Nov 2015 09:44:05 +0000 (17:44 +0800)]
tests: ceph-disk: improve the unit test to coverage all deactivate/destroy function.

  - rework the unit test to coverage all deactivate/destroy function
  - make test item simple and easier to read

Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
9 years agoceph-disk: improve the device query stage on deactivate/destroy feature.
Vicente Cheng [Tue, 3 Nov 2015 09:11:33 +0000 (17:11 +0800)]
ceph-disk: improve the device query stage on deactivate/destroy feature.

  - Make code path much easier to get device info. (get little bit overhead)
  - Let some error rasie the correct execption
  - for dmcrypt device, we unmap on the deactivate stage. (consist with activate)

Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
9 years agotests: ceph-disk: add deactivate/reactivate/destroy test cases.
Vicente Cheng [Thu, 15 Oct 2015 06:32:20 +0000 (14:32 +0800)]
tests: ceph-disk: add deactivate/reactivate/destroy test cases.

  - using the deactivate/destroy feature to destroy osd
  - test reactivate option when the osd goes deactive
  - add check_osd_status to check osd status when osd goes up

Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
9 years agotests: ceph-disk: add some unittest functions to coverage destroy/deactivate feature.
Vicente Cheng [Thu, 15 Oct 2015 06:42:17 +0000 (14:42 +0800)]
tests: ceph-disk: add some unittest functions to coverage destroy/deactivate feature.

  - Add new unittest functions to coverage the part of dmcrypt/mpath handling.

Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
9 years agoceph-disk: modify the destroy/deactivate behavior to handle dmcrypt/mpath feature.
Vicente Cheng [Thu, 15 Oct 2015 06:03:29 +0000 (14:03 +0800)]
ceph-disk: modify the destroy/deactivate behavior to handle dmcrypt/mpath feature.

  - modify the behavior to handle dmcrypt/mpath osd
  - add some functions to get the information of dmcrypt osd
  - fixed the logging format Use `%(filename)s` instead of `%(filename)`

Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
9 years agotests: ceph-disk: Make unit test coverage all ceph-disk destroy/deactivate feature
Vicente Cheng [Fri, 25 Sep 2015 09:44:19 +0000 (17:44 +0800)]
tests: ceph-disk: Make unit test coverage all ceph-disk destroy/deactivate feature

  - Add some unit test to coverage all destroy/deactivate feature.
  - Do some minor modifications on the ceph-diskw

Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
9 years agotests: ceph-disk: modified the destroy_osd test function.
Vicente Cheng [Fri, 18 Sep 2015 02:23:19 +0000 (10:23 +0800)]
tests: ceph-disk: modified the destroy_osd test function.

  - use the new implementation (ceph-disk deactivate/destroy) instead of step by step remove

Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
9 years agoceph-disk: Implement unittest for ceph-disk deactivate/destroy feature
Vicente Cheng [Fri, 18 Sep 2015 02:20:41 +0000 (10:20 +0800)]
ceph-disk: Implement unittest for ceph-disk deactivate/destroy feature

  - The unit tests cover all the implemention about deactivate/destroy.

Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
9 years agoceph-disk: add --reactivate option, modify parameter about deactivate and destroy
Vicente Cheng [Mon, 14 Sep 2015 12:03:55 +0000 (20:03 +0800)]
ceph-disk: add --reactivate option, modify parameter about deactivate and destroy

  - add `--reactivate` option (activate do no-op without reactivate with deactive flag)
  - for consistency, make both deactivate and destroy take the device/partition name
  - add `--deactivate-by-id` to deactivate and destroy for ease of use

Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
9 years agoceph-disk: add `--mark-out` option on deactivate feature.
Vicente Cheng [Fri, 11 Sep 2015 03:33:13 +0000 (11:33 +0800)]
ceph-disk: add `--mark-out` option on deactivate feature.

  - Using `--mark-out` option to mark osd out when
    deactivate this osd instead of always mark osd out.

Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
9 years agoceph-disk: use `ceph osd dump` to check osd status
Vicente Cheng [Thu, 10 Sep 2015 08:13:37 +0000 (16:13 +0800)]
ceph-disk: use `ceph osd dump` to check osd status

  - Before deactivated osd, we need to know the status
    including IN/OUT, UP/DOWN on this osd.

Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
9 years agoceph-disk: add destroy feature
Vicente Cheng [Thu, 10 Sep 2015 09:02:39 +0000 (17:02 +0800)]
ceph-disk: add destroy feature

  Implement destroy option on ceph-disk.

  - remove OSD from CRUSH map
  - remove OSD cephx key
  - deallocate OSD ID
  - destroy data (with --zap option)

Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
9 years agoceph-disk: add deactivate feature
Vicente Cheng [Thu, 10 Sep 2015 08:37:03 +0000 (16:37 +0800)]
ceph-disk: add deactivate feature

  Implement deactivate option on ceph-disk.

  - stop ceph-osd service if needed (If osd still in osd map, make it out first)
  - remove 'ready', 'active', and INIT-specific files
  - remove gpt partition type and change partition name (prevent triggered by udev)
  - create deactive flag
  - umount device and remove mount point

Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
9 years agoMerge pull request #6607 from dillaman/wip-13784
Josh Durgin [Mon, 16 Nov 2015 19:21:38 +0000 (11:21 -0800)]
Merge pull request #6607 from dillaman/wip-13784

rbd: support negative boolean command-line optionals

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
9 years agoMerge pull request #6606 from dillaman/wip-13806
Josh Durgin [Mon, 16 Nov 2015 19:20:58 +0000 (11:20 -0800)]
Merge pull request #6606 from dillaman/wip-13806

rbd: add missing command aliases to refactored CLI

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
9 years agorbd: support negative boolean command-line optionals 6607/head
Jason Dillaman [Mon, 16 Nov 2015 18:31:34 +0000 (13:31 -0500)]
rbd: support negative boolean command-line optionals

Fixes: #13784
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agotests: new rbd CLI command aliases 6606/head
Jason Dillaman [Mon, 16 Nov 2015 17:57:29 +0000 (12:57 -0500)]
tests: new rbd CLI command aliases

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agorbd: add missing command aliases to refactored CLI
Jason Dillaman [Mon, 16 Nov 2015 17:55:11 +0000 (12:55 -0500)]
rbd: add missing command aliases to refactored CLI

Fixes: #13806
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #6590 from ceph/wip-rbd-user-option
Jason Dillaman [Mon, 16 Nov 2015 14:07:39 +0000 (09:07 -0500)]
Merge pull request #6590 from ceph/wip-rbd-user-option

rbd: accept --user, refuse -i command-line optionals

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #6593 from trociny/fixup-rbd-refactor
Jason Dillaman [Mon, 16 Nov 2015 14:05:36 +0000 (09:05 -0500)]
Merge pull request #6593 from trociny/fixup-rbd-refactor

rbd: stripe unit/count set incorrectly from config

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #6594 from chenji-kael/patch-2
Loic Dachary [Mon, 16 Nov 2015 06:33:08 +0000 (07:33 +0100)]
Merge pull request #6594 from chenji-kael/patch-2

Update .mailmap

9 years agoUpdate .mailmap 6594/head
chenji-kael [Mon, 16 Nov 2015 01:25:41 +0000 (09:25 +0800)]
Update .mailmap

9 years agorbd: stripe unit/count set incorrectly from config 6593/head
Mykola Golub [Sun, 15 Nov 2015 19:37:44 +0000 (21:37 +0200)]
rbd: stripe unit/count set incorrectly from config

(after rbd-refactor fixup)

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
9 years agoMerge pull request #6549 from kylinstorage/global_flags 6624/head
Josh Durgin [Sun, 15 Nov 2015 18:45:04 +0000 (10:45 -0800)]
Merge pull request #6549 from kylinstorage/global_flags

fix: use right init_flags to finish CephContext

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
9 years agoMerge pull request #6575 from ceph/update-infernalis-releasenotes
Sage Weil [Sun, 15 Nov 2015 02:45:03 +0000 (21:45 -0500)]
Merge pull request #6575 from ceph/update-infernalis-releasenotes

doc: update infernalis release notes

9 years agoMerge pull request #6484 from XinzeChi/wip-journal-optimization
Sage Weil [Sun, 15 Nov 2015 02:44:18 +0000 (21:44 -0500)]
Merge pull request #6484 from XinzeChi/wip-journal-optimization

os: write file journal optimization

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: David Zafman <dzafman@redhat.com>
9 years agoMerge pull request #6371 from liewegas/wip-osd-less-crush
Sage Weil [Sun, 15 Nov 2015 02:42:17 +0000 (21:42 -0500)]
Merge pull request #6371 from liewegas/wip-osd-less-crush

osd: avoid calculating crush mapping for most ops

Reviewed-by: Samuel Just <sjust@redhat.com>
9 years agoMerge pull request #6416 from rohanmars/wip-solaris-port
Sage Weil [Sun, 15 Nov 2015 02:41:31 +0000 (21:41 -0500)]
Merge pull request #6416 from rohanmars/wip-solaris-port

librados: Solaris port

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #6439 from XinzeChi/wip-merge-tnx
Sage Weil [Sun, 15 Nov 2015 02:40:42 +0000 (21:40 -0500)]
Merge pull request #6439 from XinzeChi/wip-merge-tnx

osd: merge local_t and op_t txn to single one

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #6547 from xiaoxichen/fix1
Sage Weil [Sun, 15 Nov 2015 02:39:46 +0000 (21:39 -0500)]
Merge pull request #6547 from xiaoxichen/fix1

osd: check do_shutdown before do_restart

Reviewed-by: Kefu Chai <kchai@redhat.com>
9 years agoMerge pull request #6566 from kylinstorage/wip-fix-wrong-use-parenthesis
Sage Weil [Sun, 15 Nov 2015 02:38:50 +0000 (21:38 -0500)]
Merge pull request #6566 from kylinstorage/wip-fix-wrong-use-parenthesis

osd: fix wrong use of right parenthesis in localized read logic

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agorbd: accept --user, refuse -i 6590/head
Ilya Dryomov [Sat, 14 Nov 2015 20:56:15 +0000 (21:56 +0100)]
rbd: accept --user, refuse -i

--user is the equivalent of --id (mentioned in docs and ceph -h) and
used by at least a couple of qa scripts and teuthology.  Add it to the
list of valid rbd options - it's handled inside global_init() before
Shell:execute() is called.

OTOH allowing -i is bogus - global_init() wouldn't process it for
clients (CEPH_ENTITY_TYPE_CLIENT), which rbd tool is one of.  Drop it.

Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
9 years agoMerge pull request #6584 from dachary/wip-test
Sage Weil [Sat, 14 Nov 2015 17:50:16 +0000 (12:50 -0500)]
Merge pull request #6584 from dachary/wip-test

tests: ignore test-suite.log

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #6583 from ceph/wip-krbd-map-args
Sage Weil [Sat, 14 Nov 2015 17:27:43 +0000 (12:27 -0500)]
Merge pull request #6583 from ceph/wip-krbd-map-args

rbd: unbreak rbd map + cephx_sign_messages option

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agotests: ignore test-suite.log 6584/head
Loic Dachary [Sat, 14 Nov 2015 16:57:23 +0000 (17:57 +0100)]
tests: ignore test-suite.log

Now that the tests at the top level directory are run via TESTS and not
check-local:, the test-suite.log file is created and must bit
gitignored.

Signed-off-by: Loic Dachary <loic@dachary.org>
9 years agorbd: recognize cephx_sign_messages option 6583/head
Ilya Dryomov [Sat, 14 Nov 2015 15:06:03 +0000 (16:06 +0100)]
rbd: recognize cephx_sign_messages option

Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
9 years agorbd: unbreak rbd map CLI
Ilya Dryomov [Sat, 14 Nov 2015 14:12:52 +0000 (15:12 +0100)]
rbd: unbreak rbd map CLI

Previously, if snapname wasn't specified we would pass NULL to
krbd_map(), which was a cue for it to use "-" as a snapshot name.  With
the new rbd CLI, "" is passed in; same goes for map options.

Change krbd_map() accordingly and update its other user.

Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
9 years agotests: fix test case using new api 6484/head
Xinze Chi [Fri, 6 Nov 2015 13:45:18 +0000 (21:45 +0800)]
tests: fix test case using new api

Signed-off-by: Xinze Chi <xinze@xsky.com>
9 years agoMerge pull request #6574 from yuyuyu101/fix-broken-kinects
Sage Weil [Sat, 14 Nov 2015 02:14:56 +0000 (21:14 -0500)]
Merge pull request #6574 from yuyuyu101/fix-broken-kinects

kv/KineticStore: fix broken split_key

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #6571 from dachary/wip-test-run-cli
Sage Weil [Sat, 14 Nov 2015 00:27:45 +0000 (19:27 -0500)]
Merge pull request #6571 from dachary/wip-test-run-cli

tests: restore run-cli-tests

9 years agoMerge pull request #6578 from dachary/wip-13785-debian-rbd-replay
Loic Dachary [Fri, 13 Nov 2015 21:04:56 +0000 (22:04 +0100)]
Merge pull request #6578 from dachary/wip-13785-debian-rbd-replay

build/ops: rbd-replay moved from ceph-test-dbg to ceph-common-dbg

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
9 years agoMerge pull request #4737 from kylinstorage/wip-temp-based-object-eviction
Sage Weil [Fri, 13 Nov 2015 20:39:54 +0000 (15:39 -0500)]
Merge pull request #4737 from kylinstorage/wip-temp-based-object-eviction

osd: improve temperature calculation for cache tier agent

Reviewed-by: Sage Weil
9 years agoMerge pull request #6422 from xiexingguo/xxg-wip13639
Sage Weil [Fri, 13 Nov 2015 20:22:08 +0000 (15:22 -0500)]
Merge pull request #6422 from xiexingguo/xxg-wip13639

librados: fix potential null pointer access when do pool_snap_list

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
9 years agoMerge pull request #6486 from XinzeChi/wip-multiple-finisher
Sage Weil [Fri, 13 Nov 2015 20:20:48 +0000 (15:20 -0500)]
Merge pull request #6486 from XinzeChi/wip-multiple-finisher

osd: FileStore: support multiple ondisk finish and apply finishers

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
9 years agoMerge pull request #6518 from kylinstorage/wip-trivial-optimization
Sage Weil [Fri, 13 Nov 2015 20:20:13 +0000 (15:20 -0500)]
Merge pull request #6518 from kylinstorage/wip-trivial-optimization

osd: optimize scrub subset_last_update calculation

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agobuild/ops: rbd-replay moved from ceph-test-dbg to ceph-common-dbg 6578/head
Loic Dachary [Fri, 13 Nov 2015 18:10:28 +0000 (19:10 +0100)]
build/ops: rbd-replay moved from ceph-test-dbg to ceph-common-dbg

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

Signed-off-by: Loic Dachary <loic@dachary.org>
9 years agotests: avoid bashism 6571/head
Loic Dachary [Fri, 13 Nov 2015 17:47:31 +0000 (18:47 +0100)]
tests: avoid bashism

The shell used by the cli tests is not always bash. Not using the
here-word is also more readable in this specific case.

Signed-off-by: Loic Dachary <loic@dachary.org>
9 years agorbd: hardcode application name into help
Jason Dillaman [Fri, 13 Nov 2015 15:20:19 +0000 (10:20 -0500)]
rbd: hardcode application name into help

Avoid dynamically detecting the application name and instead hardcode
the rbd CLI name into the help output.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agokv/KineticStore: Fix broken split_key 6574/head
Haomai Wang [Fri, 13 Nov 2015 17:04:11 +0000 (01:04 +0800)]
kv/KineticStore: Fix broken split_key

Introduced by PR #6312

Signed-off-by: Haomai Wang <haomai@xsky.com>
9 years agoUpdate infernalis release notes 6575/head
vasukulkarni [Fri, 13 Nov 2015 17:02:20 +0000 (09:02 -0800)]
Update infernalis release notes

Update infernalis release notes

Signed-off-by: Vasu Kulkarni vasu@redhat.com
9 years agotests: restore run-cli-tests
Loic Dachary [Fri, 13 Nov 2015 15:23:27 +0000 (16:23 +0100)]
tests: restore run-cli-tests

e4ca468 moved src/test/run-cli-tests from check-local to check_SCRIPTS
but did not add it to the TESTS variable.

Signed-off-by: Loic Dachary <loic@dachary.org>
9 years agoSIGPIPE suppression for platforms without SO_NOSIGPIPE or MSG_NOSIGNAL 6416/head
Rohan Mars [Tue, 27 Oct 2015 03:34:08 +0000 (20:34 -0700)]
SIGPIPE suppression for platforms without SO_NOSIGPIPE or MSG_NOSIGNAL

Signed-off-by: Rohan Mars <code@rohanmars.com>
9 years agoradosgw-admin: fix cli tests 6569/head
Sage Weil [Fri, 13 Nov 2015 15:06:18 +0000 (10:06 -0500)]
radosgw-admin: fix cli tests

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoosdmaptool: fix cli tests
Sage Weil [Fri, 13 Nov 2015 15:05:53 +0000 (10:05 -0500)]
osdmaptool: fix cli tests

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agocrushtool: fix cli tests
Sage Weil [Fri, 13 Nov 2015 14:53:37 +0000 (09:53 -0500)]
crushtool: fix cli tests

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agocrushtool: fix cli test help
Sage Weil [Fri, 13 Nov 2015 14:27:28 +0000 (09:27 -0500)]
crushtool: fix cli test help

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #6532 from dachary/wip-mailmap
Loic Dachary [Fri, 13 Nov 2015 14:14:11 +0000 (15:14 +0100)]
Merge pull request #6532 from dachary/wip-mailmap

mailmap: Ubuntu Kylin name changed to Kylin Cloud

Reviewed-by: Li Wang <li.wang@kylin-cloud.com>
9 years agoMerge pull request #5848 from storage-zuiwanyuan/wip-nonblock-connect
Sage Weil [Fri, 13 Nov 2015 14:04:47 +0000 (09:04 -0500)]
Merge pull request #5848 from storage-zuiwanyuan/wip-nonblock-connect

msg/async: support of non-block connect in async messenger

Reviewed-by: Haomai Wang <haomai@xsky.com>
9 years agoMerge pull request #6478 from yuyuyu101/wip-13666
Sage Weil [Fri, 13 Nov 2015 14:03:35 +0000 (09:03 -0500)]
Merge pull request #6478 from yuyuyu101/wip-13666

msg/async: let receiver ack message ASAP

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoosd: fix wrong use of right parenthesis 6566/head
Jie Wang [Fri, 13 Nov 2015 13:52:21 +0000 (21:52 +0800)]
osd: fix wrong use of right parenthesis

Signed-off-by: Jie Wang <jie.wang@kylin-cloud.com>
Reviewed-by: Li Wang <li.wang@kylin-cloud.com>
9 years agomsg/async: support of non-block connect in async messenger 5848/head
Jianhui Yuan [Fri, 13 Nov 2015 07:36:36 +0000 (15:36 +0800)]
msg/async: support of non-block connect in async messenger

Fixes: #12802
Signed-off-by: Jianhui Yuan <zuiwanyuan@gmail.com>
9 years agoMerge pull request #6534 from kylinstorage/wip-trivial-scrub-cleanup
Kefu Chai [Fri, 13 Nov 2015 07:28:39 +0000 (15:28 +0800)]
Merge pull request #6534 from kylinstorage/wip-trivial-scrub-cleanup

osd: clarify the scrub result report

Reviewed-by: Kefu Chai <kchai@redhat.com>
9 years agoscrub: clarify the result report 6534/head
Li Wang [Fri, 13 Nov 2015 07:00:09 +0000 (15:00 +0800)]
scrub: clarify the result report

It may happen that the authoritative object
such that auth.size != be_get_ondisk_size(auth_oi.size),
in that case, clarify the error report.

Signed-off-by: Li Wang <li.wang@kylin-cloud.com>
9 years agoMerge branch 'wip-py3'
Josh Durgin [Fri, 13 Nov 2015 04:15:48 +0000 (20:15 -0800)]
Merge branch 'wip-py3'

pybind: a few more python 3 fixes for rbd and rados

Reviewed-by: David Coles <dcoles@gaikai.com>
9 years agopybind/rados: return pool_reverse_lookup() result as a string
Josh Durgin [Thu, 12 Nov 2015 08:57:36 +0000 (00:57 -0800)]
pybind/rados: return pool_reverse_lookup() result as a string

This makes it symmetric with create_pool() in python 3.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
9 years agopybind/test_rbd: convert a few more str to bytes for py3
Josh Durgin [Thu, 12 Nov 2015 07:59:21 +0000 (23:59 -0800)]
pybind/test_rbd: convert a few more str to bytes for py3

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
9 years agopybind/rbd: encode snap_rename args for py3
Josh Durgin [Thu, 12 Nov 2015 07:57:16 +0000 (23:57 -0800)]
pybind/rbd: encode snap_rename args for py3

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
9 years agopybind/rbd: decode stat() and list_children() results for py3
Josh Durgin [Thu, 12 Nov 2015 07:56:14 +0000 (23:56 -0800)]
pybind/rbd: decode stat() and list_children() results for py3

For stat(), only block_name_prefix is filled in - parent and
parent_pool are always blank.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
9 years agopybind/rbd: decode parent_info() to str types for py3
Josh Durgin [Thu, 12 Nov 2015 03:05:59 +0000 (19:05 -0800)]
pybind/rbd: decode parent_info() to str types for py3

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
9 years agopybind/test_rbd: fix map() usage for py3 compat
Josh Durgin [Thu, 12 Nov 2015 03:02:12 +0000 (19:02 -0800)]
pybind/test_rbd: fix map() usage for py3 compat

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
9 years agopybind/test_rbd: use // for division for py3
Josh Durgin [Thu, 12 Nov 2015 08:06:14 +0000 (00:06 -0800)]
pybind/test_rbd: use // for division for py3

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
9 years agoMerge branch 'pybind3' of https://github.com/dcoles/ceph into wip-pybind3
Josh Durgin [Fri, 13 Nov 2015 03:32:42 +0000 (19:32 -0800)]
Merge branch 'pybind3' of https://github.com/dcoles/ceph into wip-pybind3

pybind: Add Python 3 support for rados and rbd modules

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Conflicts:
src/pybind/rbd.py (new create args, minor fix to work with py3)

9 years agosolaris big endian fixes
Rohan Mars [Tue, 27 Oct 2015 03:38:15 +0000 (20:38 -0700)]
solaris big endian fixes

Signed-off-by: Rohan Mars <code@rohanmars.com>
9 years agoerror code translation logic
Rohan Mars [Wed, 28 Oct 2015 04:44:02 +0000 (21:44 -0700)]
error code translation logic

Signed-off-by: Rohan Mars <code@rohanmars.com>
9 years agoSolaris compilation/build changes
Rohan Mars [Tue, 27 Oct 2015 04:50:30 +0000 (21:50 -0700)]
Solaris compilation/build changes

Signed-off-by: Rohan Mars <code@rohanmars.com>
9 years agoupdated common library linked objects
Rohan Mars [Tue, 27 Oct 2015 04:01:59 +0000 (21:01 -0700)]
updated common library linked objects

9 years agocross platform pthreads
Rohan Mars [Tue, 27 Oct 2015 03:57:16 +0000 (20:57 -0700)]
cross platform pthreads

Signed-off-by: Rohan Mars <code@rohanmars.com>
9 years agofix sem_open() call to be compliant
Rohan Mars [Tue, 27 Oct 2015 03:39:14 +0000 (20:39 -0700)]
fix sem_open() call to be compliant

Signed-off-by: Rohan Mars <code@rohanmars.com>
9 years agoimport missing free function definition
Rohan Mars [Tue, 27 Oct 2015 03:38:39 +0000 (20:38 -0700)]
import missing free function definition

Signed-off-by: Rohan Mars <code@rohanmars.com>
9 years agostdin/stdout/stderr clash with standard definition, renamed to getter/setter
Rohan Mars [Tue, 27 Oct 2015 03:30:17 +0000 (20:30 -0700)]
stdin/stdout/stderr clash with standard definition, renamed to getter/setter

Signed-off-by: Rohan Mars <code@rohanmars.com>
9 years agoceph: Make stdout/stderr always output Unicode (UTF-8) 6315/head
David Coles [Wed, 11 Nov 2015 22:06:45 +0000 (14:06 -0800)]
ceph: Make stdout/stderr always output Unicode (UTF-8)

If a stream is not interactive, then under Python 2, then the encoding for
stdout/stderr may be None. This means that it's not possible to print Unicode
characters since the encoding will fall back to ASCII.

This explicitly makes sys.stdout/sys.stderr always use UTF-8 encoding for
strings, regardless of the system's local or if the console is interactive or
not.
This matches the existing tests that assume that output of non-ASCII pool names
will be UTF-8 encoded.

When outputting raw binary data (such as the CRUSH-map), we must bypass the
codec and write directly to raw streams (since the new stream will only accept
ASCII byte-strings or Unicode strings).

Signed-off-by: David Coles <dcoles@gaikai.com>
9 years agopybind: Add decode_cstr helper function
David Coles [Tue, 27 Oct 2015 20:32:44 +0000 (13:32 -0700)]
pybind: Add decode_cstr helper function

This function attempts to decode a C-style string into a Python Unicode string.
It accepts an optional "size" parameter for the string length, otherwise it is
assumed that the string is NUL-terminated.

If the pointer is NULL, then this function returns None.

Signed-off-by: David Coles <dcoles@gaikai.com>
9 years agopybind: Add test for creating pool by raw UTF-8
David Coles [Tue, 20 Oct 2015 17:57:46 +0000 (10:57 -0700)]
pybind: Add test for creating pool by raw UTF-8

Some clients try providing non-ASCII pool names by sending raw encoded bytes.
This check ensures that we still support this behaviour for Python 2.

In Python 3, bytestrings will fail since strings are Unicode strings and thus
clients should use Unicode escapes instead.

Signed-off-by: David Coles <dcoles@gaikai.com>
9 years agopybind: Import cstr from the rados module
David Coles [Tue, 20 Oct 2015 17:55:44 +0000 (10:55 -0700)]
pybind: Import cstr from the rados module

Since rados is required for rbd, we can avoid duplication of code across these
two modules.

Signed-off-by: David Coles <dcoles@gaikai.com>
9 years agopybind: Don't encode str on Python 2
David Coles [Tue, 20 Oct 2015 02:42:18 +0000 (19:42 -0700)]
pybind: Don't encode str on Python 2

If you attempt to call encode on a non-ASCII string, then a UnicodeDecodeError
will be raised.

Since str on Python 2 is an 8-bit string, it's possible that it's already UTF-8
encoded. As such we should just pass it through to the C API unmodified.

On Python 3 or if the user explicitly uses unicode, then we'll encode it to
UTF-8 for them.

Signed-off-by: David Coles <dcoles@gaikai.com>
9 years agoMerge branch 'wip-13504' of https://github.com/trociny/ceph
Josh Durgin [Thu, 12 Nov 2015 22:08:31 +0000 (14:08 -0800)]
Merge branch 'wip-13504' of https://github.com/trociny/ceph

rbd: API: options on image create

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Conflicts:
src/test/librbd/test_librbd.cc (trivial, two tests added at end of file)

9 years agoos: write file journal optimezation
Xinze Chi [Fri, 6 Nov 2015 13:44:38 +0000 (21:44 +0800)]
os: write file journal optimezation

Currently, there is single write thread for file journal, so it would be bottleneck.
It is important to keep logic of the journal write thread simple. According to the
implementation of transaction encoding, it is almost impossible that the write
bufferlist would be align. So write journal would call rebuild_aligned almost every time.
Because of the memory fragmentation, the bufferlist crc and rebuild would be bottleneck.

My implementation would move the complex logic out of journal write thread.

Signed-off-by: Xinze Chi <xinze@xsky.com>
Reviewed-by: Haomai Wang <haomai@xsky.com>
9 years agolibrbd: API: options on image create: update tests 6369/head
Mykola Golub [Fri, 23 Oct 2015 14:27:33 +0000 (17:27 +0300)]
librbd: API: options on image create: update tests

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
9 years agolibrbd: API: options on image create
Mykola Golub [Fri, 23 Oct 2015 09:38:08 +0000 (12:38 +0300)]
librbd: API: options on image create

Pass options as key/value configuration pairs on image create instead
of expanding rbd_create/rbd_clone/rbd_copy for every possible
configuration override.

Fixes: #13504
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
9 years agoMerge pull request #6557 from ceph/wip-rbd-cmake-fixes
Jason Dillaman [Thu, 12 Nov 2015 18:32:31 +0000 (13:32 -0500)]
Merge pull request #6557 from ceph/wip-rbd-cmake-fixes

cmake: librbd and libjournal build fixes

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #6556 from athanatos/wip-cmake-nss
Casey Bodley [Thu, 12 Nov 2015 17:34:08 +0000 (12:34 -0500)]
Merge pull request #6556 from athanatos/wip-cmake-nss

cmake: add nss as a suffix for pk11pub.h

9 years agocmake: add nss as a suffix for pk11pub.h 6556/head
Samuel Just [Wed, 11 Nov 2015 21:28:08 +0000 (13:28 -0800)]
cmake: add nss as a suffix for pk11pub.h

Signed-off-by: Samuel Just <sjust@redhat.com>
9 years agolibrbd: provide an out-of-class definition for MAX_DESCRIPTION_OFFSET 6557/head
Ilya Dryomov [Thu, 12 Nov 2015 13:38:05 +0000 (14:38 +0100)]
librbd: provide an out-of-class definition for MAX_DESCRIPTION_OFFSET

std::min() takes its parameters by reference, so provide a definition
for OptionPrinter::MAX_DESCRIPTION_OFFSET constant.

Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
9 years agocmake: fix librbd and add src/journal
Ilya Dryomov [Thu, 12 Nov 2015 13:52:47 +0000 (14:52 +0100)]
cmake: fix librbd and add src/journal

librbd was missing a recently added file, src/journal was missing
entirely - this brings the build back.

Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
9 years agomailmap: Ubuntu Kylin name changed to Kylin Cloud 6532/head
Loic Dachary [Wed, 11 Nov 2015 06:10:30 +0000 (07:10 +0100)]
mailmap: Ubuntu Kylin name changed to Kylin Cloud

Reviewed-by: Li Wang <li.wang@kylin-cloud.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
9 years agomailmap: sort files
Loic Dachary [Wed, 11 Nov 2015 06:07:07 +0000 (07:07 +0100)]
mailmap: sort files

Signed-off-by: Loic Dachary <loic@dachary.org>
9 years agoMerge pull request #6517 from kylinstorage/wip-trivial-bug
Sage Weil [Thu, 12 Nov 2015 13:40:42 +0000 (08:40 -0500)]
Merge pull request #6517 from kylinstorage/wip-trivial-bug

osd: fix bug in last_* PG state timestamps

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>