Commit Graph

45908 Commits

Author SHA1 Message Date
Vicente Cheng
d3d139b496 doc: Update ceph-disk manual page with new feature deactivate/destroy.
- Update the ceph-disk manual page

Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
2015-11-19 09:33:21 +08:00
Josh Durgin
46249fe5b2 Merge pull request #6541 from dillaman/wip-11287
librbd: integrate journaling support for IO operations

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-11-17 11:39:51 -08:00
Jason Dillaman
f92f7417ae librbd: copy operation needs to use AIO work queue for writes
This ensures that the exclusive lock is properly acquired prior to
writing to the new image.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-11-17 10:22:26 -05:00
Jason Dillaman
ee7c6f7399 librbd: simplify IO flush handling
Add a new convenience method to ImageCtx for handling flush
requests and cleanup flush handling with dealing with the cache.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-11-17 10:22:24 -05:00
Jason Dillaman
cb634dfa42 librbd: possible deadlock attempting to drain parent image WQs
Ensure all AIO to the parent image is properly flushed and assert
that all work queues are empty before closing the parent image.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-11-17 09:01:59 -05:00
Jason Dillaman
b118d7df1e WorkQueue: PointerWQ drain no longer waits for other queues
If another (independent) queue was processing, drain could
block waiting.  Instead, allow drain to exit quickly if
no items are being processed and the queue is empty for
the current WQ.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-11-17 08:52:15 -05:00
Loic Dachary
257a3c3863 Merge pull request #5867 from Vicente-Cheng/ceph-disk-destroy-implementation
ceph-disk: Add destroy and deactivate option

ceph-disk now understands deactivate to shutdown an OSD and umount the partition. It will remain in a "down" state until it is activated again with --reactivate. If a deactivated OSD is destroyed with ceph-disk destroy, it will be permanently removed from the cluster and from the crushmap. 

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-11-17 11:43:02 +01:00
Vicente Cheng
2a3040b87a ceph-disk: remove the redundant try except and minor nits
- remove the redundant try except

Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
2015-11-17 09:24:43 +08:00
Vicente Cheng
b954c519e8 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>
2015-11-17 09:24:43 +08:00
Vicente Cheng
0f892e65a4 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>
2015-11-17 09:24:43 +08:00
Vicente Cheng
c110a63382 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>
2015-11-17 09:24:43 +08:00
Vicente Cheng
3823c31f56 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>
2015-11-17 09:24:43 +08:00
Vicente Cheng
7e88cf005f 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>
2015-11-17 09:24:43 +08:00
Vicente Cheng
f51dd57b5d 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>
2015-11-17 09:24:43 +08:00
Vicente Cheng
56b3bbcd4c 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>
2015-11-17 09:24:43 +08:00
Vicente Cheng
d490fe99c6 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>
2015-11-17 09:24:43 +08:00
Vicente Cheng
06aeec9e5e 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>
2015-11-17 09:24:43 +08:00
Vicente Cheng
7922041080 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>
2015-11-17 09:24:43 +08:00
Vicente Cheng
7b5151a4d1 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>
2015-11-17 09:24:43 +08:00
Vicente Cheng
7ca8d1daed 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>
2015-11-17 09:24:43 +08:00
Vicente Cheng
be471a2994 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>
2015-11-17 09:24:43 +08:00
Vicente Cheng
f064622103 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>
2015-11-17 09:24:43 +08:00
Vicente Cheng
3fcdf411d4 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>
2015-11-17 09:24:42 +08:00
Josh Durgin
6bf5c8755d Merge pull request #6607 from dillaman/wip-13784
rbd: support negative boolean command-line optionals

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-11-16 11:21:38 -08:00
Josh Durgin
b66af10f8b Merge pull request #6606 from dillaman/wip-13806
rbd: add missing command aliases to refactored CLI

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-11-16 11:20:58 -08:00
Jason Dillaman
5aa840af0a rbd: support negative boolean command-line optionals
Fixes: #13784
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-11-16 13:31:34 -05:00
Jason Dillaman
f58ffdc040 tests: new rbd CLI command aliases
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-11-16 12:57:29 -05:00
Jason Dillaman
1ff6889054 rbd: add missing command aliases to refactored CLI
Fixes: #13806
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-11-16 12:55:11 -05:00
Jason Dillaman
8f9841d617 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>
2015-11-16 09:07:39 -05:00
Jason Dillaman
9fd0df50a5 Merge pull request #6593 from trociny/fixup-rbd-refactor
rbd: stripe unit/count set incorrectly from config

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2015-11-16 09:05:36 -05:00
Loic Dachary
28f884e3ee Merge pull request #6594 from chenji-kael/patch-2
Update .mailmap
2015-11-16 07:33:08 +01:00
chenji-kael
7fc87e3469 Update .mailmap 2015-11-16 09:25:41 +08:00
Mykola Golub
08fd09a856 rbd: stripe unit/count set incorrectly from config
(after rbd-refactor fixup)

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-11-15 21:37:44 +02:00
Josh Durgin
6ad1013a59 Merge pull request #6549 from kylinstorage/global_flags
fix: use right init_flags to finish CephContext

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-11-15 10:45:04 -08:00
Sage Weil
d5bf38e6d5 Merge pull request #6575 from ceph/update-infernalis-releasenotes
doc: update infernalis release notes
2015-11-14 21:45:03 -05:00
Sage Weil
16f23abb8d 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>
2015-11-14 21:44:18 -05:00
Sage Weil
6becf839a9 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>
2015-11-14 21:42:17 -05:00
Sage Weil
3a5e0a3db8 Merge pull request #6416 from rohanmars/wip-solaris-port
librados: Solaris port

Reviewed-by: Sage Weil <sage@redhat.com>
2015-11-14 21:41:31 -05:00
Sage Weil
b9251b4b6f 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>
2015-11-14 21:40:42 -05:00
Sage Weil
8dd801d86d Merge pull request #6547 from xiaoxichen/fix1
osd: check do_shutdown before do_restart

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-11-14 21:39:46 -05:00
Sage Weil
ef2fec7844 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>
2015-11-14 21:38:50 -05:00
Ilya Dryomov
481bb2ce1b 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>
2015-11-14 22:35:19 +01:00
Sage Weil
02acff3954 Merge pull request #6584 from dachary/wip-test
tests: ignore test-suite.log

Reviewed-by: Sage Weil <sage@redhat.com>
2015-11-14 12:50:16 -05:00
Sage Weil
118fc22207 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>
2015-11-14 12:27:43 -05:00
Loic Dachary
8629b61b63 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>
2015-11-14 17:57:23 +01:00
Ilya Dryomov
f2432e01f2 rbd: recognize cephx_sign_messages option
Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
2015-11-14 16:39:35 +01:00
Ilya Dryomov
34b2b8f48a 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>
2015-11-14 16:38:53 +01:00
Xinze Chi
c6a2ec2733 tests: fix test case using new api
Signed-off-by: Xinze Chi <xinze@xsky.com>
2015-11-14 17:45:15 +08:00
Sage Weil
492720e85d Merge pull request #6574 from yuyuyu101/fix-broken-kinects
kv/KineticStore: fix broken split_key

Reviewed-by: Sage Weil <sage@redhat.com>
2015-11-13 21:14:56 -05:00
Sage Weil
6015bfb2eb Merge pull request #6571 from dachary/wip-test-run-cli
tests: restore run-cli-tests
2015-11-13 19:27:45 -05:00