Mount/unmount a ``ceph-fuse`` client. The config is optional and defaults to mounting on all clients. If a config is given, it is expected to be a list of clients to do this operation on. This lets you e.g. set up one client with ``ceph-fuse`` and another with ``kclient``.
(ctx, config)
| 14 | |
| 15 | @contextlib.contextmanager |
| 16 | def task(ctx, config): |
| 17 | """ |
| 18 | Mount/unmount a ``ceph-fuse`` client. |
| 19 | |
| 20 | The config is optional and defaults to mounting on all clients. If |
| 21 | a config is given, it is expected to be a list of clients to do |
| 22 | this operation on. This lets you e.g. set up one client with |
| 23 | ``ceph-fuse`` and another with ``kclient``. |
| 24 | |
| 25 | ``brxnet`` should be a Private IPv4 Address range, default range is |
| 26 | [192.168.0.0/16] |
| 27 | |
| 28 | Example that mounts all clients:: |
| 29 | |
| 30 | tasks: |
| 31 | - ceph: |
| 32 | - ceph-fuse: |
| 33 | - interactive: |
| 34 | - brxnet: [192.168.0.0/16] |
| 35 | |
| 36 | Example that uses both ``kclient` and ``ceph-fuse``:: |
| 37 | |
| 38 | tasks: |
| 39 | - ceph: |
| 40 | - ceph-fuse: [client.0] |
| 41 | - kclient: [client.1] |
| 42 | - interactive: |
| 43 | |
| 44 | Example that enables valgrind: |
| 45 | |
| 46 | tasks: |
| 47 | - ceph: |
| 48 | - ceph-fuse: |
| 49 | client.0: |
| 50 | valgrind: [--tool=memcheck, --leak-check=full, --show-reachable=yes] |
| 51 | - interactive: |
| 52 | |
| 53 | Example that stops an already-mounted client: |
| 54 | |
| 55 | :: |
| 56 | |
| 57 | tasks: |
| 58 | - ceph: |
| 59 | - ceph-fuse: [client.0] |
| 60 | - ... do something that requires the FS mounted ... |
| 61 | - ceph-fuse: |
| 62 | client.0: |
| 63 | mounted: false |
| 64 | - ... do something that requires the FS unmounted ... |
| 65 | |
| 66 | Example that adds more generous wait time for mount (for virtual machines): |
| 67 | |
| 68 | tasks: |
| 69 | - ceph: |
| 70 | - ceph-fuse: |
| 71 | client.0: |
| 72 | mount_wait: 60 # default is 0, do not wait before checking /sys/ |
| 73 | mount_timeout: 120 # default is 30, give up if /sys/ is not populated |
nothing calls this directly
no test coverage detected