Skip to content

Commit

Permalink
Merge pull request #11403 from hashicorp/f-gh-11059
Browse files Browse the repository at this point in the history
agent/docs: add better clarification when top-level data dir needs setting
  • Loading branch information
jrasell authored Jan 13, 2022
2 parents eee5d90 + 0a571b7 commit c08a036
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion command/agent/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ func (c *Command) isValidConfig(config, cmdConfig *Config) bool {
if !config.DevMode {
// Ensure that we have the directories we need to run.
if config.Server.Enabled && config.DataDir == "" {
c.Ui.Error("Must specify data directory")
c.Ui.Error(`Must specify "data_dir" config option or "data-dir" CLI flag`)
return false
}

Expand Down
2 changes: 1 addition & 1 deletion command/agent/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func TestCommand_Args(t *testing.T) {
},
{
[]string{"-server"},
"Must specify data directory",
"Must specify \"data_dir\" config option or \"data-dir\" CLI flag",
},
{
[]string{"-client", "-alloc-dir="},
Expand Down
10 changes: 5 additions & 5 deletions website/content/docs/configuration/server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ server {
`1` does not provide any fault tolerance and is not recommended for production
use cases.

- `data_dir` `(string: "[data_dir]/server")` - Specifies the directory to use -
for server-specific data, including the replicated log. By default, this is -
the top-level [data_dir](/docs/configuration#data_dir)
suffixed with "server", like `"/opt/nomad/server"`. This must be an absolute
path.
- `data_dir` `(string: "[data_dir]/server")` - Specifies the directory to use
for server-specific data, including the replicated log. By default, this is
the top-level [data_dir](/docs/configuration#data_dir) suffixed with "server",
like `"/opt/nomad/server"`. The top-level option must be set, even when
setting this value. This must be an absolute path.

- `enabled` `(bool: false)` - Specifies if this agent should run in server mode.
All other server options depend on this value being set.
Expand Down

0 comments on commit c08a036

Please sign in to comment.