diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2023-08-11 12:24:10 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2023-08-11 12:24:10 +0300 |
commit | 6fe37297a3a8381bd7f3b5c2c0c4c248ffa8f7c9 (patch) | |
tree | 5797e8b404ab289dd4f02d596adc1d2dff1a8734 | |
parent | 9e16fdda92bf37f9dbd6578db4f9f01863fec397 (diff) | |
parent | 8600a4f248b0ffdf5af20b06bdab1f4169f82bbb (diff) |
Merge branch 'eread/edit-and-add-example-to-accept_dataloss-subcommand' into 'master'
Edit help text and add example to accept-dataloss subcommand
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6114
Merged-by: Sami Hiltunen <shiltunen@gitlab.com>
Approved-by: John McDonnell <jmcdonnell@gitlab.com>
Approved-by: Fiona Neill <fneill@gitlab.com>
Approved-by: Sami Hiltunen <shiltunen@gitlab.com>
Reviewed-by: Sami Hiltunen <shiltunen@gitlab.com>
Co-authored-by: Evan Read <eread@gitlab.com>
-rw-r--r-- | internal/cli/praefect/subcmd_accept_dataloss.go | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/internal/cli/praefect/subcmd_accept_dataloss.go b/internal/cli/praefect/subcmd_accept_dataloss.go index 0911f309a..903ef5a1e 100644 --- a/internal/cli/praefect/subcmd_accept_dataloss.go +++ b/internal/cli/praefect/subcmd_accept_dataloss.go @@ -8,16 +8,17 @@ import ( "gitlab.com/gitlab-org/gitaly/v16/proto/go/gitalypb" ) -// praefect -config PATH_TO_CONFIG accept-dataloss -virtual-storage <virtual-storage> -relative-path <relative-path> -authoritative-storage <authoritative-storage> func newAcceptDatalossCommand() *cli.Command { return &cli.Command{ Name: "accept-dataloss", - Usage: "accept data loss in a repository", - Description: `The subcommand "accept-dataloss" allows for accepting data loss in a repository to enable it for -writing again. The current version of the repository on the authoritative storage is set to be -the latest version and replications to other nodes are scheduled in order to bring them consistent -with the new authoritative version. -`, + Usage: "accept potential data loss in a repository", + Description: `Set a new authoritative replica of a repository and enable the repository for writing again. + +The replica of the repository on the specified physical storage is set as authoritative. Replications to other physical +storages that contain replicas of the repository are scheduled to make them consistent with the replica on the new +authoritative physical storage. + +Example: praefect --config praefect.config.toml accept-dataloss --virtual-storage default --repository <relative_path_on_the_virtual_storage> --authoritative-storage <physical_storage_1>`, HideHelpCommand: true, Flags: []cli.Flag{ &cli.StringFlag{ @@ -27,12 +28,12 @@ with the new authoritative version. }, &cli.StringFlag{ Name: paramRelativePath, - Usage: "repository to accept data loss for", + Usage: "relative path on the virtual storage of the repository to accept data loss for", Required: true, }, &cli.StringFlag{ Name: paramAuthoritativeStorage, - Usage: "storage with the repository to consider as authoritative", + Usage: "physical storage containing the replica of the repository to set as authoritative", Required: true, }, }, |