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. 28 Feb, 2022 3 commits
  2. 24 Feb, 2022 4 commits
  3. 23 Feb, 2022 2 commits
  4. 19 Feb, 2022 1 commit
    • Michael Schurter's avatar
      core: remove all traces of unused protocol version · 2411d3af
      Michael Schurter authored
      Nomad inherited protocol version numbering configuration from Consul and
      Serf, but unlike those projects Nomad has never used it. Nomad's
      `protocol_version` has always been `1`.
      
      While the code is effectively unused and therefore poses no runtime
      risks to leave, I felt like removing it was best because:
      
      1. Nomad's RPC subsystem has been able to evolve extensively without
         needing to increment the version number.
      2. Nomad's HTTP API has evolved extensively without increment
         `API{Major,Minor}Version`. If we want to version the HTTP API in the
         future, I doubt this is the mechanism we would choose.
      3. The presence of the `server.protocol_version` configuration
         parameter is confusing since `server.raft_protocol` *is* an important
         parameter for operators to consider. Even more confusing is that
         there is a distinct Serf protocol version which is included in `nomad
         server members` output under the heading `Protocol`. `raft_protocol`
         is the *only* protocol version relevant to Nomad developers and
         operators. The other protocol versions are either deadcode or have
         never changed (Serf).
      4. If we were to need to version the RPC, HTTP API, or Serf protocols, I
         don't think these configuration parameters and variables are the best
         choice. If we come to that point we should choose a versioning scheme
         based on the use case and modern best practices -- not this 6+ year
         old dead code.
      2411d3af
  5. 16 Feb, 2022 2 commits
  6. 15 Feb, 2022 2 commits
  7. 11 Feb, 2022 1 commit
    • Tim Gross's avatar
      csi: volume cli prefix matching should accept exact match (#12051) · 4afc67b7
      Tim Gross authored
      The `volume detach`, `volume deregister`, and `volume status` commands
      accept a prefix argument for the volume ID. Update the behavior on
      exact matches so that if there is more than one volume that matches
      the prefix, we should only return an error if one of the volume IDs is
      not an exact match. Otherwise we won't be able to use these commands
      at all on those volumes. This also makes the behavior of these commands
      consistent with `job stop`.
      4afc67b7
  8. 10 Feb, 2022 1 commit
    • Luiz Aoqui's avatar
      api: prevent excessice CPU load on job parse · 1aa3b561
      Luiz Aoqui authored
      Add new namespace ACL requirement for the /v1/jobs/parse endpoint and
      return early if HCLv2 parsing fails.
      
      The endpoint now requires the new `parse-job` ACL capability or
      `submit-job`.
      1aa3b561
  9. 08 Feb, 2022 1 commit
  10. 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
  11. 02 Feb, 2022 1 commit
    • Seth Hoenig's avatar
      cleanup: prevent leaks from time.After · c1e033c8
      Seth Hoenig authored
      This PR replaces use of time.After with a safe helper function
      that creates a time.Timer to use instead. The new function returns
      both a time.Timer and a Stop function that the caller must handle.
      
      Unlike time.NewTimer, the helper function does not panic if the duration
      set is <= 0.
      c1e033c8
  12. 28 Jan, 2022 1 commit
  13. 26 Jan, 2022 1 commit
  14. 25 Jan, 2022 1 commit
    • Tim Gross's avatar
      fix integer bounds checks (#11815) · 358a4681
      Tim Gross authored
      * driver: fix integer conversion error
      
      The shared executor incorrectly parsed the user's group into int32 and
      then cast to uint32 without bounds checking. This is harmless because
      an out-of-bounds gid will throw an error later, but it triggers
      security and code quality scans. Parse directly to uint32 so that we
      get correct error handling.
      
      * helper: fix integer conversion error
      
      The autopilot flags helper incorrectly parses a uint64 to a uint which
      is machine specific size. Although we don't have 32-bit builds, this
      sets off security and code quality scaans. Parse to the machine sized
      uint.
      
      * driver: restrict bounds of port map
      
      The plugin server doesn't constrain the maximum integer for port
      maps. This could result in a user-visible misconfiguration, but it
      also triggers security and code quality scans. Restrict the bounds
      before casting to int32 and return an error.
      
      * cpuset: restrict upper bounds of cpuset values
      
      Our cpuset configuration ex...
      358a4681
  15. 24 Jan, 2022 1 commit
    • Seth Hoenig's avatar
      build: upgrade and speedup circleci configuration · 8492c657
      Seth Hoenig authored
      This PR upgrades our CI images and fixes some affected tests.
      
      - upgrade go-machine-image to premade latest ubuntu LTS (ubuntu-2004:202111-02)
      
      - eliminate go-machine-recent-image (no longer necessary)
      
      - manage GOPATH in GNUMakefile (see https://discuss.circleci.com/t/gopath-is-set-to-multiple-directories/7174)
      
      - fix tcp dial error check (message seems to be OS specific)
      
      - spot check values measured instead of specifically 'RSS' (rss no longer reported in cgroups v2)
      
      - use safe MkdirTemp for generating tmpfiles
      
      NOT applied: (too flakey)
      
      - eliminate setting GOMAXPROCS=1 (build tools were also affected by this setting)
      
      - upgrade resource type for all imanges to large (2C -> 4C)
      8492c657
  16. 19 Jan, 2022 2 commits
  17. 18 Jan, 2022 2 commits
  18. 17 Jan, 2022 1 commit
    • Michael Schurter's avatar
      cli: improve debug error messages (#11507) · dc81f265
      Michael Schurter authored
      Improves `nomad debug` error messages when contacting agents that do not
      have /v1/agent/host endpoints (the endpoint was added in v0.12.0)
      
      Part of #9568 and manually tested against Nomad v0.8.7.
      
      Hopefully isRedirectError can be reused for more cases listed in #9568
      dc81f265
  19. 14 Jan, 2022 2 commits
  20. 13 Jan, 2022 1 commit
  21. 12 Jan, 2022 2 commits
  22. 10 Jan, 2022 1 commit
    • Derek Strickland's avatar
      Expose Consul template configuration parameters (#11606) · 43edd0e7
      Derek Strickland authored
      
      This PR exposes the following existing`consul-template` configuration options to Nomad jobspec authors in the `{job.group.task.template}` stanza.
      
      - `wait`
      
      It also exposes the following`consul-template` configuration to Nomad operators in the `{client.template}` stanza.
      
      - `max_stale`
      - `block_query_wait`
      - `consul_retry`
      - `vault_retry` 
      - `wait` 
      
      Finally, it adds the following new Nomad-specific configuration to the `{client.template}` stanza that allows Operators to set bounds on what `jobspec` authors configure.
      
      - `wait_bounds`
      Co-authored-by: default avatarTim Gross <tgross@hashicorp.com>
      Co-authored-by: default avatarMichael Schurter <mschurter@hashicorp.com>
      43edd0e7
  23. 06 Jan, 2022 1 commit
    • Charlie Voiselle's avatar
      Make number of scheduler workers reloadable (#11593) · 6e61606e
      Charlie Voiselle authored
      
      ## Development Environment Changes
      * Added stringer to build deps
      
      ## New HTTP APIs
      * Added scheduler worker config API
      * Added scheduler worker info API
      
      ## New Internals
      * (Scheduler)Worker API refactor—Start(), Stop(), Pause(), Resume()
      * Update shutdown to use context
      * Add mutex for contended server data
          - `workerLock` for the `workers` slice
          - `workerConfigLock` for the `Server.Config.NumSchedulers` and
            `Server.Config.EnabledSchedulers` values
      
      ## Other
      * Adding docs for scheduler worker api
      * Add changelog message
      Co-authored-by: default avatarDerek Strickland <1111455+DerekStrickland@users.noreply.github.com>
      6e61606e
  24. 03 Jan, 2022 2 commits
  25. 20 Dec, 2021 1 commit
  26. 16 Dec, 2021 2 commits
    • Tim Gross's avatar
      cli: stream raft logs to operator raft logs subcommand (#11684) · bd18a452
      Tim Gross authored
      The `nomad operator raft logs` command uses a raft helper that reads
      in the logs from raft and serializes them to JSON. The previous
      implementation returned the slice of all logs and then serializes the
      entire object. Update the helper to stream the log entries and then
      serialize them as newline-delimited JSON.
      bd18a452
    • Tim Gross's avatar
      cli: unhide advanced operator raft debugging commands (#11682) · 03ea7d1c
      Tim Gross authored
      The `nomad operator raft` and `nomad operator snapshot state`
      subcommands for inspecting on-disk raft state were hidden and
      undocumented. Expose and document these so that advanced operators
      have support for these tools.
      03ea7d1c