Apply suggestions from code review

Co-authored-by: Michael Schurter <mschurter@hashicorp.com>
This commit is contained in:
Mahmood Ali
2020-08-31 07:47:16 -04:00
parent 1896b8f7dd
commit cd7ac5c1ee
2 changed files with 6 additions and 3 deletions

View File

@@ -18,7 +18,10 @@ func (c *OperatorRaftInfoCommand) Help() string {
helpText := `
Usage: nomad operator raft _info <path to nomad data dir>
Displays info about the raft logs in the data directory
Displays info about the raft logs in the data directory.
This is a low-level debugging tool and not subject to Nomad's usual backward
compatibility guarantees.
`
return strings.TrimSpace(helpText)
}

View File

@@ -23,7 +23,7 @@ Usage: nomad operator raft _state <path to nomad data dir>
Options:
--last-index=<last_index>
-last-index=<last_index>
Set the last log index to be applied, to drop spurious log entries not
properly committed. If passed last_index is zero or negative, it's perceived
as an offset from the last index seen in raft.
@@ -73,7 +73,7 @@ func (c *OperatorRaftStateCommand) Run(args []string) int {
} else if _, err := os.Stat(filepath.Join(args[0], "raft.db")); err == nil {
p = args[0]
} else {
c.Ui.Error("path needs to be a data dir path with raft.db file")
c.Ui.Error(fmt.Sprintf("path needs to be a data dir path with raft.db file: %v", err))
return 1
}