Skip to content

Commit

Permalink
docs: add more warnings about running agent as root on Linux (#15926)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross authored Jan 27, 2023
1 parent dbbac30 commit 92effde
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions website/content/docs/commands/agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ in its own section. See the [Nomad Agent] guide and the [Configuration]
documentation section for more information on how to use this command and the
options it has.

-> **Note:** If you are running Nomad on Linux, you'll need to run client agents
as root (or with `sudo`) so that cpuset accounting and network namespaces work
correctly.

## Command-line Options

A subset of the available Nomad agent configuration can optionally be passed in
Expand Down
5 changes: 5 additions & 0 deletions website/content/docs/install/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,11 @@ No additional steps necessary after installing Nomad using Chocolatey.
</Tab>

<Tab heading="Linux" group="linux">

Note that if you are running Nomad on Linux, you'll need to run client agents as
root (or with `sudo`) so that cpuset accounting and network namespaces work
correctly.

<h3>Install CNI plugins</h3>

Nomad uses CNI plugins to configure network namespaces when using the `bridge`
Expand Down
2 changes: 1 addition & 1 deletion website/content/docs/install/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Install Nomad on the public cloud.

If you would like to try Nomad locally, you can install Nomad on your local
machine using the same steps that you would for a production environments and
run a single-node development instance using the `nomad agent -dev` command
run a single-node development instance using the `sudo nomad agent -dev` command

[Installing Nomad][installing-binary]

Expand Down
6 changes: 5 additions & 1 deletion website/content/docs/operations/nomad-agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@ The agent is started with the [`nomad agent` command](/nomad/docs/commands/agent
command blocks, running forever or until told to quit. The agent command takes a variety
of configuration options, but most have sane defaults.

-> **Note:** If you are running Nomad on Linux, you'll need to run client agents
as root (or with `sudo`) so that cpuset accounting and network namespaces work
correctly.

When running `nomad agent`, you should see output similar to this:

```shell-session
$ nomad agent -dev
$ sudo nomad agent -dev
==> Starting Nomad agent...
==> Nomad agent configuration:
Expand Down

0 comments on commit 92effde

Please sign in to comment.