Commit Graph

3035 Commits

Author SHA1 Message Date
Fabian Holler
fbc461b904 fix: disable swap for executor_linux allocations
A comment in the nomad source code states that swapping for
executor_linux allocations is disabled but it wasn't.

Nomad wrote -1 to the memsw.limit_in_bytes cgroup file to disable
swapping.
This has the following problems:

1.) Writing -1 to the file does not disable swapping. It sets
    the limit for memory and swap to unlimited.
2.) On common Linux distributions like Ubuntu 16.04 LTS the
    memsw.limit_in_bytes cgroup file does not exist by default.
    The memsw.limit_in_bytes file only exist if the Linux kernel is
    build with CONFIG_MEMCG_SWAP=yes and either
    CONFIG_MEMCG_SWAP_ENABLED=yes or when the kernel parameter
    swapaccount=1 is passed during boot.
    Most Linux distributions disable swap accounting by default because
    of higher memory usage.
    Nomad silently ignores if writing to the memsw.limit_in_bytes file
    fails. The allocation succeeds, no message is logged to notify the
    user.

To ensure that disabling swap works on common Linux kernels, disable
swapping by writing 0 to the memory.swappiness file.
Using the memory.swappiness file only requires that the kernel is
compiled with CONFIG_MEMCG=yes. This is the default in common Linux
kernels.
2018-03-13 10:52:50 +01:00
Alex Dadgar
42e9fe1b57 Merge pull request #3890 from hashicorp/b-heartbeat
Heartbeat improvements and handling failures during establishing leadership
2018-03-12 14:41:59 -07:00
Michael Schurter
8da7335c16 non-Existent -> nonexistent
Reverting from #3963

https://www.merriam-webster.com/dictionary/existent
2018-03-12 11:59:33 -07:00
Josh Soref
c4e762a910 spelling: version 2018-03-11 19:13:25 +00:00
Josh Soref
a851a79407 spelling: verify 2018-03-11 19:13:32 +00:00
Josh Soref
2bf249b9be spelling: unexpected 2018-03-11 19:08:07 +00:00
Josh Soref
0afd7f8d56 spelling: transition 2018-03-11 19:06:05 +00:00
Josh Soref
c297d03315 spelling: thresholds 2018-03-11 19:03:47 +00:00
Josh Soref
c77b05aebd spelling: terminated 2018-03-11 19:01:49 +00:00
Josh Soref
892abf09cd spelling: templates 2018-03-11 19:01:39 +00:00
Josh Soref
ef6a98388a spelling: shutdown 2018-03-11 18:55:49 +00:00
Josh Soref
a7476398be spelling: severity 2018-03-11 18:53:52 +00:00
Josh Soref
ba94a15617 spelling: service 2018-03-11 18:53:47 +00:00
Josh Soref
c10723cd5a spelling: server 2018-03-11 18:55:30 +00:00
Josh Soref
06760728ac spelling: serialize 2018-03-11 18:53:39 +00:00
Josh Soref
02a8be09f9 spelling: semantics 2018-03-11 19:00:26 +00:00
Josh Soref
c39b9a0f4f spelling: secrets 2018-03-11 18:53:26 +00:00
Josh Soref
98b6dd5cae spelling: safety 2018-03-11 18:52:54 +00:00
Josh Soref
e4d4b94040 spelling: retrieved 2018-03-11 18:51:40 +00:00
Josh Soref
b405713969 spelling: resource 2018-03-11 18:51:03 +00:00
Josh Soref
94e9e17d05 spelling: represents 2018-03-11 18:42:29 +00:00
Josh Soref
b51c68afd1 spelling: replace 2018-03-11 18:41:53 +00:00
Josh Soref
a657cbaced spelling: removes 2018-03-11 18:41:43 +00:00
Josh Soref
31651d124d spelling: remnants 2018-03-11 18:41:26 +00:00
Josh Soref
25eb073964 spelling: registry 2018-03-11 18:41:13 +00:00
Josh Soref
0230661b30 spelling: purposes 2018-03-11 18:39:35 +00:00
Josh Soref
e7fc3bd16b spelling: propagated 2018-03-11 18:39:26 +00:00
Josh Soref
c35ee6c593 spelling: previous 2018-03-11 18:38:23 +00:00
Josh Soref
61a2fe4124 spelling: periodically 2018-03-11 18:36:59 +00:00
Josh Soref
672d51b774 spelling: parallelism 2018-03-11 18:35:54 +00:00
Josh Soref
84277e6d6a spelling: otherwise 2018-03-11 18:34:27 +00:00
Josh Soref
3124128554 spelling: mount 2018-03-11 18:27:18 +00:00
Josh Soref
2007eab12e spelling: malicious 2018-03-11 18:26:25 +00:00
Josh Soref
65bb9c727e spelling: labels 2018-03-11 18:21:44 +00:00
Josh Soref
bd2912978b spelling: isolation 2018-03-11 18:19:02 +00:00
Josh Soref
d271707e0b spelling: interpolation 2018-03-11 18:16:36 +00:00
Josh Soref
fb7a5d6699 spelling: interface 2018-03-11 18:15:37 +00:00
Josh Soref
9655acf79a spelling: inspect 2018-03-11 18:15:27 +00:00
Josh Soref
0ef3e4229b spelling: initialization 2018-03-11 18:18:37 +00:00
Josh Soref
06f00b4ae8 spelling: idempotent 2018-03-11 18:14:50 +00:00
Josh Soref
71163eeab0 spelling: heartbeating 2018-03-11 18:12:19 +00:00
Josh Soref
51c3d7e69f spelling: fingerprint 2018-03-11 18:07:37 +00:00
Josh Soref
ac40c42533 spelling: existent 2018-03-11 18:30:37 +00:00
Josh Soref
8f4cbb2157 spelling: executor 2018-03-11 18:05:31 +00:00
Josh Soref
fbea110040 spelling: each 2018-03-11 17:56:19 +00:00
Josh Soref
34274f5ca3 spelling: down 2018-03-11 17:55:47 +00:00
Josh Soref
84d6c92937 spelling: documentation 2018-03-11 17:55:21 +00:00
Josh Soref
087ea02bb4 spelling: disable 2018-03-11 17:55:12 +00:00
Josh Soref
a9b44757dd spelling: directory 2018-03-11 17:55:06 +00:00
Josh Soref
767f22a9d2 spelling: destruction 2018-03-11 17:54:39 +00:00