red-hat-storage / odf-cli

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

Restore Quorum documentation has incorrect cmd usage #77

Open kelsonw1 opened 2 months ago

kelsonw1 commented 2 months ago

According to [1], it's stated to use odf mons restore-quorum c, which doesn't seem to be valid:

Management and troubleshooting tools for ODF clusters.

Usage:
  odf [command]

Available Commands:
  get         Get ODF configuration
  help        Help about any command
  purge-osd   Permanently remove an OSD from the cluster.
  set         Set ODF configuration
  subvolume   Manages subvolumes

Flags:
      --context string              Openshift context to use
  -h, --help                        help for odf
      --kubeconfig string           Openshift config path
  -n, --namespace string            Openshift namespace where the StorageCluster CR is created (default "openshift-storage")
      --operator-namespace string   Openshift namespace where the ODF operator is running

Use "odf [command] --help" for more information about a command.

Reviewing [2], we see the command should be odf restore mon-quorum <mon_id>. Is the code being updated or are the docs incorrect?

[1] https://github.com/red-hat-storage/odf-cli/blob/main/docs/mons.md#restore-quorum [2]https://github.com/red-hat-storage/odf-cli/blob/main/cmd/odf/restore/mon_quorum.go

subhamkrai commented 2 months ago

@kelsonw1 I think you were trying tool version 4.16. Is that correct?

kelsonw1 commented 2 months ago

@subhamkrai I was looking at the main branch code and docs I also repulled main and have the same issue. I noticed a difference in how the command was documented vs how it was coded.

subhamkrai commented 2 months ago

@kelsonw1 did you rebuild?

srai@fedora ~ (main) $ ./bin/odf 
Management and troubleshooting tools for ODF clusters.

Usage:
  odf [command]

Available Commands:
  get         Get ODF configuration
  help        Help about any command
  maintenance Perform maintenance operation on mons and OSDs deployment by scaling it down and creating a maintenance deployment.
  operator    Calls subcommands specific to various ODF operators
  purge-osd   Permanently remove an OSD from the cluster.
  restore     
  set         Set ODF configuration
  subvolume   Manages subvolumes

Flags:
      --context string              Openshift context to use
  -h, --help                        help for odf
      --kubeconfig string           Openshift config path
  -n, --namespace string            Openshift namespace where the StorageCluster CR is created (default "openshift-storage")
      --operator-namespace string   Openshift namespace where the ODF operator is running

Use "odf [command] --help" for more information about a command.

I can see above commands

kelsonw1 commented 2 weeks ago

No, I didn't rebuild. but I pulled the main branch and saw the same issue. I haven't tested this since I opened this issue tho.

subhamkrai commented 2 weeks ago

No, I didn't rebuild. but I pulled the main branch and saw the same issue. I haven't tested this since I opened this issue tho.

Please build again and check