red-hat-storage / odf-cli

ODF CLI tool
Apache License 2.0
2 stars 10 forks source link

osd: add command to set osd full ratio #40

Closed subhamkrai closed 6 months ago

subhamkrai commented 7 months ago

adding command odf set full <ratio> to update the osd full ratio within the range of 0.0 to 1.0 and similarly 'backfillfull, nearfull' ratio. Also added the docs.

openshift-ci[bot] commented 7 months ago

Skipping CI for Draft Pull Request. If you want CI signal for your change, please convert it to an actual PR. You can still manually trigger a test run with /test all

subhamkrai commented 7 months ago

Will there be a separate PR for setting the near-full ratio and the backfill ratio? You might consider including them in the same PR so we can review for consistency of the commands.

added now, also two question:

  1. currently after running the commands it prints blank line like below, should we add some logs when it is applied
    
    ./bin/odf -n rook-ceph set ceph osd set-full-ratio 0.9

~/go/src/github.com/odf-cli srai@fedora ~ (add-cmd-osd-full-ratio) $


2. should add `get` command similar to set for these two new commands to list the settings? Also, we could call the `get` command after `set` command which prints the config. wdyt?
travisn commented 7 months ago

Will there be a separate PR for setting the near-full ratio and the backfill ratio? You might consider including them in the same PR so we can review for consistency of the commands.

added now, also two question:

  1. currently after running the commands it prints blank line like below, should we add some logs when it is applied
./bin/odf -n rook-ceph set ceph osd set-full-ratio 0.9

~/go/src/github.com/odf-cli
srai@fedora ~ (add-cmd-osd-full-ratio) $ 

Sounds good to print a success message, such as Successfully set <key> to <value>

  1. should add get command similar to set for these two new commands to list the settings? Also, we could call the get command after set command which prints the config. wdyt?

Yes, get commands sound good. How about in a follow-up PR? But perhaps we don't call it as part of the get since with the suggested generic approach, it might not work for all commands.

subhamkrai commented 7 months ago

Will there be a separate PR for setting the near-full ratio and the backfill ratio? You might consider including them in the same PR so we can review for consistency of the commands.

added now, also two question:

  1. currently after running the commands it prints blank line like below, should we add some logs when it is applied
./bin/odf -n rook-ceph set ceph osd set-full-ratio 0.9

~/go/src/github.com/odf-cli
srai@fedora ~ (add-cmd-osd-full-ratio) $ 

Sounds good to print a success message, such as Successfully set <key> to <value>

  1. should add get command similar to set for these two new commands to list the settings? Also, we could call the get command after set command which prints the config. wdyt?

Yes, get commands sound good. How about in a follow-up PR? But perhaps we don't call it as part of the get since with the suggested generic approach, it might not work for all commands.

follow up pr sounds good

openshift-ci[bot] commented 6 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: subhamkrai, travisn

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/red-hat-storage/odf-cli/blob/main/OWNERS)~~ [subhamkrai,travisn] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
subhamkrai commented 6 months ago

/cherry-pick release-4.16

openshift-cherrypick-robot commented 6 months ago

@subhamkrai: new pull request created: #46

In response to [this](https://github.com/red-hat-storage/odf-cli/pull/40#issuecomment-2109399309): >/cherry-pick release-4.16 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.