Commit Graph

48 Commits

Author SHA1 Message Date
Seth Hoenig
be7ec8de3e raw_exec: make raw exec driver work with cgroups v2
This PR adds support for the raw_exec driver on systems with only cgroups v2.

The raw exec driver is able to use cgroups to manage processes. This happens
only on Linux, when exec_driver is enabled, and the no_cgroups option is not
set. The driver uses the freezer controller to freeze processes of a task,
issue a sigkill, then unfreeze. Previously the implementation assumed cgroups
v1, and now it also supports cgroups v2.

There is a bit of refactoring in this PR, but the fundamental design remains
the same.

Closes #12351 #12348
2022-04-04 16:11:38 -05:00
Mahmood Ali
68bae12fd4 Raft Debugging Improvements (#11414) 2021-11-04 10:16:12 -04:00
Florian Apolloner
6cb36971c6 Added support for -force-color to the CLI. (#10975) 2021-10-06 10:02:42 -04:00
Mahmood Ali
1896b8f7dd add helper commands for debugging state 2020-08-31 08:45:59 -04:00
Lang Martin
b5ef217c90 nomad debug renamed to nomad operator debug (#8602)
* renamed: command/debug.go -> command/operator_debug.go
* website: rename debug -> operator debug
* website/pages/api-docs/agent: name in api docs
2020-08-11 15:39:44 -04:00
Mahmood Ali
7e69a5be21 fix comment typo 2019-09-18 09:11:08 -04:00
Nick Ethier
404d2d4c98 reduce memory required for logmon, docker_logger and executor p… (#6341)
* reduce memory required for logmon, docker_logger and executor processes

* comment early importing
2019-09-17 23:55:07 -04:00
Danielle Tomlinson
ed9818a570 ui: Support colored output on Windows
This commit uses the go-colorable library to enable support for coloured
UI output on Windows. This acts as a compatibility layer that takes
standard unix-y terminal codes and translates them into the requisite
windows calls as required.
2019-02-20 14:01:35 +01:00
Danielle Tomlinson
ccf0202ba7 cli: Hide nomad docker_logger from help output 2019-01-23 16:27:05 +01:00
Nick Ethier
5b14d24bf4 executor v2 (#4656)
* client/executor: refactor client to remove interpolation

* executor: POC libcontainer based executor

* vendor: use hashicorp libcontainer fork

* vendor: add libcontainer/nsenter dep

* executor: updated executor interface to simplify operations

* executor: implement logging pipe

* logmon: new logmon plugin to manage task logs

* driver/executor: use logmon for log management

* executor: fix tests and windows build

* executor: fix logging key names

* executor: fix test failures

* executor: add config field to toggle between using libcontainer and standard executors

* logmon: use discover utility to discover nomad executable

* executor: only call libcontainer-shim on main in linux

* logmon: use seperate path configs for stdout/stderr fifos

* executor: windows fixes

* executor: created reusable pid stats collection utility that can be used in an executor

* executor: update fifo.Open calls

* executor: fix build

* remove executor from docker driver

* executor: Shutdown func to kill and cleanup executor and its children

* executor: move linux specific universal executor funcs to seperate file

* move logmon initialization to a task runner hook

* client: doc fixes and renaming from code review


* taskrunner: use shared config struct for logmon fifo fields

* taskrunner: logmon only needs to be started once per task
2018-10-16 16:53:31 -07:00
Michael Schurter
7ff790bc7d cli: differentiate normal output vs info 2018-03-30 11:42:11 -07:00
Alex Dadgar
0360176c00 Autocomplete command aliases
This PR allows aliased commands to be autocompleted but still filters
them from the help output.
2018-03-29 12:55:25 -07:00
Chelsea Holland Komlo
7aae8ab7ab remove unused function 2018-03-23 09:51:27 -04:00
Alex Dadgar
148a9504e7 color 2018-03-21 20:27:32 -07:00
Alex Dadgar
d39b13ed58 Deprecated commands 2018-03-21 20:27:32 -07:00
Alex Dadgar
683e271069 common commands 2018-03-21 20:27:32 -07:00
Alex Dadgar
c7fc6571d8 use subcommands 2018-03-21 20:27:32 -07:00
Alex Dadgar
378c566294 node eligibility command 2018-03-21 16:51:44 -07:00
Alex Dadgar
2bdeacebff Drain cli, api, http 2018-03-21 16:51:43 -07:00
Alex Dadgar
f6fbb36054 sync 2017-10-13 14:36:02 -07:00
Alex Dadgar
a9e3a41407 Enable more linters 2017-09-26 15:26:33 -07:00
Chelsea Holland Komlo
4e3d4b1cd0 remove unneeded hidden command 2017-09-15 20:23:41 +00:00
Chelsea Holland Komlo
7941e78406 filter acl subcommands 2017-09-15 19:37:57 +00:00
Chelsea Holland Komlo
23e0acbea4 fixups from code review 2017-09-15 18:08:46 +00:00
Alex Dadgar
ed8f07f324 Hide non-user commands from autocomplete output
This PR hides non-user CLI commands from the list of autocomplete
suggestions.
2017-09-08 11:24:21 -07:00
Alex Dadgar
ac1539d5d9 Sync namespace changes 2017-09-07 17:04:21 -07:00
Alex Dadgar
c26ecb7092 Add version package
This PR adds a version package and consolidates version strings into a
Version struct.
2017-08-16 15:44:21 -07:00
Alex Dadgar
b57b9af467 Fix vet issue 2017-07-26 14:53:08 -07:00
Alex Dadgar
9c610a8862 Custom help output 2017-07-25 15:42:22 -07:00
Alex Dadgar
635395a479 Job promote command 2017-07-19 15:39:32 -07:00
Alex Dadgar
c0084dcab1 Add command autocompletion.
This PR adds command autocompletion to the CLI.
2017-07-17 15:00:40 -07:00
Alex Dadgar
b21d912277 Allow cli package to handle version.
This PR removes our custom handling of the version flag and updates job
history to use a version flag instead of `-job-version`.
2017-07-17 11:04:07 -07:00
Alex Dadgar
4ce7b62105 job deployments 2017-07-07 12:07:07 -07:00
Alex Dadgar
004a766171 deployment promote 2017-07-07 12:07:07 -07:00
Alex Dadgar
dc3d500119 deployment list 2017-07-07 12:07:07 -07:00
Alex Dadgar
fbd2b73904 job revert 2017-07-07 12:07:07 -07:00
Alex Dadgar
9220836cb4 JobVersions returns struct with optional diff 2017-07-07 12:05:57 -07:00
Alex Dadgar
24995a6749 Operator command/endpoint/documentation 2017-02-09 18:04:46 -08:00
Alex Dadgar
c1bc077d32 Vendor memberlist fixes 2017-02-08 16:07:33 -08:00
Sean Chittenden
3f9d3854dd Seed random once in main 2016-06-10 15:48:36 -04:00
Diptanu Choudhury
e0cddec857 Filtering out nomad check 2016-05-17 05:39:39 +02:00
Alex Dadgar
db1639123c hide the fs subcommands 2016-03-20 17:05:46 -07:00
Diptanu Choudhury
7eedcbfcf6 Starting the syslog collector along with a docker container 2016-02-09 18:24:30 -08:00
Diptanu Choudhury
8a81cee425 Filtered out the executor command 2016-02-05 10:51:29 -08:00
Alex Dadgar
5e1f7c41a9 Allow no interfaces in network fingerprinter 2015-11-18 19:01:39 -08:00
Mitchell Hashimoto
baee91fb0c style change, no logic change 2015-10-27 19:39:19 -07:00
Alex Dadgar
5ac6c3b73d Linux executor with cgroup isolation support 2015-09-21 09:08:57 -07:00
Armon Dadgar
0083511b6b Adding initial skeleton 2015-06-01 13:46:21 +02:00