]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
tools, test/cli: add read balancer to osdmaptool
authorLaura Flores <lflores@redhat.com>
Wed, 1 Feb 2023 23:52:17 +0000 (23:52 +0000)
committerLaura Flores <lflores@redhat.com>
Wed, 22 Feb 2023 16:29:38 +0000 (16:29 +0000)
commit10b89f96d9632f703083c0b01244de959582636a
treea78147c48d4fe109e4a31a97f0f34c2b08dd3021
parent8daff1cb3829e9a96046b46255ed58b2f507d526
tools, test/cli: add read balancer to osdmaptool

This commit adds the capability to balance reads on a
given osdmap with the osdmaptool. The user has the option
of performing a "dry run" of read balancing OR taking it a
step further and applying the results to a live cluster.

Performing a "dry run" would involve simply running an
osdmaptool command and inspecting the results.

The template for the command is:
`osdmaptool <osd map file> --read <file for command output> --read-pool <pool name>`

An example command a user might run is:
`osdmaptool om --read out.txt --read-pool default.rgw.control`

This commit also adds a `--vstart` flag that allows a user to print ceph
commands in the outfile formatted for a vstart cluster. An example command
a user might run is:
`./bin/osdmaptool om --vstart --read out.txt --read-pool default.rgw.control`
The out.txt file would contain ceph commands prefixed with `./bin/`.
The `--vstart` flag may also be applied to an `--upmap` osdmaptool command.

If the user wants to apply read balancing results from their dry run to a
live cluster, they may either manually apply the ceph commands from the out
file, or run `source <outfile>`.

Signed-off-by: Laura Flores <lflores@redhat.com>
src/test/cli/osdmaptool/help.t
src/tools/osdmaptool.cc