This project is mirrored from https://gitee.com/mirrors/nomad.git. Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
  1. 12 Jul, 2022 1 commit
  2. 11 Jul, 2022 1 commit
  3. 07 Jul, 2022 2 commits
  4. 23 Jun, 2022 1 commit
  5. 24 May, 2022 1 commit
    • Michael Schurter's avatar
      artifact: fix numerous go-getter security issues · 39685098
      Michael Schurter authored
      Fix numerous go-getter security issues:
      
      - Add timeouts to http, git, and hg operations to prevent DoS
      - Add size limit to http to prevent resource exhaustion
      - Disable following symlinks in both artifacts and `job run`
      - Stop performing initial HEAD request to avoid file corruption on
        retries and DoS opportunities.
      
      **Approach**
      
      Since Nomad has no ability to differentiate a DoS-via-large-artifact vs
      a legitimate workload, all of the new limits are configurable at the
      client agent level.
      
      The max size of HTTP downloads is also exposed as a node attribute so
      that if some workloads have large artifacts they can specify a high
      limit in their jobspecs.
      
      In the future all of this plumbing could be extended to enable/disable
      specific getters or artifact downloading entirely on a per-node basis.
      39685098
  6. 16 May, 2022 1 commit
  7. 27 Apr, 2022 1 commit
  8. 22 Apr, 2022 1 commit
  9. 18 Apr, 2022 1 commit
    • Seth Hoenig's avatar
      docs: update documentation with connect acls changes · b2a2f77d
      Seth Hoenig authored
      This PR updates the changelog, adds notes the 1.3 upgrade guide, and
      updates the connect integration docs with documentation about the new
      requirement on Consul ACL policies of Consul agent default anonymous ACL
      tokens.
      b2a2f77d
  10. 14 Apr, 2022 1 commit
  11. 08 Apr, 2022 2 commits
  12. 29 Mar, 2022 1 commit
    • Michael Schurter's avatar
      template: disallow `writeToFile` by default · f87ec7e6
      Michael Schurter authored
      Resolves #12095 by WONTFIXing it.
      
      This approach disables `writeToFile` as it allows arbitrary host
      filesystem writes and is only a small quality of life improvement over
      multiple `template` stanzas.
      
      This approach has the significant downside of leaving people who have
      altered their `template.function_denylist` *still vulnerable!* I added
      an upgrade note, but we should have implemented the denylist as a
      `map[string]bool` so that new funcs could be denied without overriding
      custom configurations.
      
      This PR also includes a bug fix that broke enabling all consul-template
      funcs. We repeatedly failed to differentiate between a nil (unset)
      denylist and an empty (allow all) one.
      f87ec7e6
  13. 24 Mar, 2022 1 commit
  14. 23 Mar, 2022 1 commit
    • Seth Hoenig's avatar
      client: enable support for cgroups v2 · 5da1a31e
      Seth Hoenig authored
      This PR introduces support for using Nomad on systems with cgroups v2 [1]
      enabled as the cgroups controller mounted on /sys/fs/cgroups. Newer Linux
      distros like Ubuntu 21.10 are shipping with cgroups v2 only, causing problems
      for Nomad users.
      
      Nomad mostly "just works" with cgroups v2 due to the indirection via libcontainer,
      but not so for managing cpuset cgroups. Before, Nomad has been making use of
      a feature in v1 where a PID could be a member of more than one cgroup. In v2
      this is no longer possible, and so the logic around computing cpuset values
      must be modified. When Nomad detects v2, it manages cpuset values in-process,
      rather than making use of cgroup heirarchy inheritence via shared/reserved
      parents.
      
      Nomad will only activate the v2 logic when it detects cgroups2 is mounted at
      /sys/fs/cgroups. This means on systems running in hybrid mode with cgroups2
      mounted at /sys/fs/cgroups/unified (as is typical) Nomad will continue to
      use the v1 logic, and should operate as before. Systems that do not support
      cgroups v2 are also not affected.
      
      When v2 is activated, Nomad will create a parent called nomad.slice (unless
      otherwise configured in Client conifg), and create cgroups for tasks using
      naming convention <allocID>-<task>.scope. These follow the naming convention
      set by systemd and also used by Docker when cgroups v2 is detected.
      
      Client nodes now export a new fingerprint attribute, unique.cgroups.version
      which will be set to 'v1' or 'v2' to indicate the cgroups regime in use by
      Nomad.
      
      The new cpuset management strategy fixes #11705, where docker tasks that
      spawned processes on startup would "leak". In cgroups v2, the PIDs are
      started in the cgroup they will always live in, and thus the cause of
      the leak is eliminated.
      
      [1] https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html
      
      Closes #11289
      Fixes #11705 #11773 #11933
      5da1a31e
  15. 17 Mar, 2022 2 commits
    • Luiz Aoqui's avatar
      cli: display Raft version in `server members` (#12317) · eca4ac67
      Luiz Aoqui authored
      The previous output of the `nomad server members` command would output a
      column named `Protocol` that displayed the Serf protocol being currently
      used by servers.
      
      This is not a configurable option, so it holds very little value to
      operators. It is also easy to confuse it with the Raft Protocol version,
      which is configurable and highly relevant to operators.
      
      This commit replaces the previous `Protocol` column with the new `Raft
      Version`. It also updates the `-detailed` flag to be called `-verbose`
      so it matches other commands. The detailed output now also outputs the
      same information as the standard output with the addition of the
      previous `Protocol` column and `Tags`.
      eca4ac67
    • Luiz Aoqui's avatar
      server: transfer leadership in case of error (#12293) · dfe520a9
      Luiz Aoqui authored
      When a Nomad server becomes the Raft leader, it must perform several
      actions defined in the establishLeadership function. If any of these
      actions fail, Raft will think the node is the leader, but it will not
      actually be able to act as a Nomad leader.
      
      In this scenario, leadership must be revoked and transferred to another
      server if possible, or the node should retry the establishLeadership
      steps.
      dfe520a9
  16. 24 Feb, 2022 1 commit
  17. 23 Feb, 2022 2 commits
    • Seth Hoenig's avatar
      core: switch to go.etc.io/bbolt · 16efcf4e
      Seth Hoenig authored
      This PR swaps the underlying BoltDB implementation from boltdb/bolt
      to go.etc.io/bbolt.
      
      In addition, the Server has a new configuration option for disabling
      NoFreelistSync on the underlying database.
      
      Freelist option: https://github.com/etcd-io/bbolt/blob/master/db.go#L81
      Consul equivelent PR: https://github.com/hashicorp/consul/pull/11720
      16efcf4e
    • Tim Gross's avatar
      CSI: allow for concurrent plugin allocations (#12078) · 7bcf0afd
      Tim Gross authored
      The dynamic plugin registry assumes that plugins are singletons, which
      matches the behavior of other Nomad plugins. But because dynamic
      plugins like CSI are implemented by allocations, we need to handle the
      possibility of multiple allocations for a given plugin type + ID, as
      well as behaviors around interleaved allocation starts and stops.
      
      Update the data structure for the dynamic registry so that more recent
      allocations take over as the instance manager singleton, but we still
      preserve the previous running allocations so that restores work
      without racing.
      
      Multiple allocations can run on a client for the same plugin, even if
      only during updates. Provide each plugin task a unique path for the
      control socket so that the tasks don't interfere with each other.
      7bcf0afd
  18. 10 Feb, 2022 1 commit
  19. 03 Feb, 2022 1 commit
    • Tim Gross's avatar
      raft: default to protocol v3 (#11572) · e3009f1c
      Tim Gross authored
      Many of Nomad's Autopilot features require raft protocol version
      3. Set the default raft protocol to 3, and improve the upgrade
      documentation.
      e3009f1c
  20. 17 Jan, 2022 1 commit
  21. 03 Jan, 2022 1 commit
  22. 16 Dec, 2021 1 commit
  23. 15 Dec, 2021 1 commit
    • Tim Gross's avatar
      `nomad eval list` command (#11675) · 97621ec3
      Tim Gross authored
      Use the new filtering and pagination capabilities of the `Eval.List`
      RPC to provide filtering and pagination at the command line.
      
      Also includes note that `nomad eval status -json` is deprecated and
      will be replaced with a single evaluation view in a future version of
      Nomad.
      97621ec3
  24. 09 Dec, 2021 1 commit
  25. 24 Nov, 2021 1 commit
  26. 14 Oct, 2021 1 commit
  27. 16 Sep, 2021 1 commit
  28. 01 Sep, 2021 1 commit
  29. 30 Aug, 2021 1 commit
  30. 23 Aug, 2021 1 commit
    • Luiz Aoqui's avatar
      Don't timestamp active log file (#11070) · d74ab11d
      Luiz Aoqui authored
      * don't timestamp active log file
      
      * website: update log_file default value
      
      * changelog: add entry for #11070
      
      * website: add upgrade instructions for log_file in v1.14 and v1.2.0
      d74ab11d
  31. 05 Aug, 2021 1 commit
  32. 30 Jun, 2021 1 commit
    • Tim Gross's avatar
      docker: move host path for hosts file mount to alloc dir (#10823) · a66034bb
      Tim Gross authored
      In Nomad 1.1.1 we generate a hosts file based on the Nomad-owned network
      namespace, rather than using the default hosts file from the pause
      container. This hosts file should be shared between tasks in the same
      allocation so that tasks can update the file and have the results propagated
      between tasks.
      a66034bb
  33. 28 Jun, 2021 1 commit
  34. 17 May, 2021 3 commits