Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Schurter <[email protected]>
  • Loading branch information
Mahmood Ali and schmichael authored Jun 15, 2020
1 parent fbb1092 commit 14cd3da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions command/operator_snapshot_restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type OperatorSnapshotRestoreCommand struct {

func (c *OperatorSnapshotRestoreCommand) Help() string {
helpText := `
Usage: nomad snapshot restore [options] FILE
Usage: nomad operator snapshot restore [options] FILE
Restores an atomic, point-in-time snapshot of the state of the Nomad servers
which includes jobs, nodes, allocations, periodic jobs, and ACLs.
Expand All @@ -30,7 +30,7 @@ Usage: nomad snapshot restore [options] FILE
To restore a snapshot from the file "backup.snap":
$ nomad snapshot restore backup.snap
$ nomad operator snapshot restore backup.snap
General Options:
Expand Down Expand Up @@ -83,7 +83,7 @@ func (c *OperatorSnapshotRestoreCommand) Run(args []string) int {
return 1
}

// Fetch the current configuration.
// Call snapshot restore API with backup file.
_, err = client.Operator().SnapshotRestore(snap, &api.WriteOptions{})
if err != nil {
c.Ui.Error(fmt.Sprintf("Failed to get restore snapshot: %v", err))
Expand Down
1 change: 1 addition & 0 deletions nomad/operator_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ func decodeStreamOutput(decoder *codec.Decoder) (io.Reader, <-chan error) {
if err != nil {
pw.CloseWithError(err)
errCh <- err
return
}
}

Expand Down

0 comments on commit 14cd3da

Please sign in to comment.