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. 24 Aug, 2022 5 commits
    • Seth Hoenig's avatar
      cleanup: move fs helpers into escapingfs · 1b1a68e4
      Seth Hoenig authored
      1b1a68e4
    • Seth Hoenig's avatar
      7f5dfe44
    • Luiz Aoqui's avatar
      deps: sync versions of go-discover in go.mod (#14269) · abeeecbe
      Luiz Aoqui authored
      In #13491 the version of `go-discover` was updated in `go.mod` but the
      comment above it mentions that it also needs to be updated in the
      `replace` directive.
      abeeecbe
    • Piotr Kazmierczak's avatar
      docs: Update upgrade guide to reflect enterprise changes introduced in nomad-enterprise (#14212) · 2d4acce3
      Piotr Kazmierczak authored
      This PR documents a change made in the enterprise version of nomad that addresses the following issue:
      
      When a user tries to filter audit logs, they do so with a stanza that looks like the following:
      
      audit {
        enabled = true
      
        filter "remove deletes" {
          type = "HTTPEvent"
          endpoints  = ["*"]
          stages = ["OperationComplete"]
          operations = ["DELETE"]
        }
      }
      
      When specifying both an "endpoint" and a "stage", the events with both matching a "endpoint" AND a matching "stage" will be filtered.
      
      When specifying both an "endpoint" and an "operation" the events with both matching a "endpoint" AND a matching "operation" will be filtered.
      
      When specifying both a "stage" and an "operation" the events with a matching a "stage" OR a matching "operation" will be filtered.
      
      The "OR" logic with stages and operations is unexpected and doesn't allow customers to get specific on which events they want to filter. For instance the following use-case is impossible to achieve: "I want to filter out all OperationReceived events that have the DELETE verb".
      2d4acce3
    • Seth Hoenig's avatar
      build: set osusergo build tag by default (#14248) · 2d425bf2
      Seth Hoenig authored
      This PR activates the osuergo build tag in GNUMakefile. This forces the os/user
      package to be compiled without CGO. Doing so seems to resolve a race condition
      in getpwnam_r that causes alloc creation to hang or panic on `user.Lookup("nobody")`.
      2d425bf2
  2. 23 Aug, 2022 8 commits
  3. 22 Aug, 2022 14 commits
  4. 19 Aug, 2022 3 commits
  5. 18 Aug, 2022 8 commits
    • Michael Schurter's avatar
      client: fix data races in config handling (#14139) · 01648e61
      Michael Schurter authored
      Before this change, Client had 2 copies of the config object: config and configCopy. There was no guidance around which to use where (other than configCopy's comment to pass it to alloc runners), both are shared among goroutines and mutated in data racy ways. At least at one point I think the idea was to have `config` be mutable and then grab a lock to overwrite `configCopy`'s pointer atomically. This would have allowed alloc runners to read their config copies in data race safe ways, but this isn't how the current implementation worked.
      
      This change takes the following approach to safely handling configs in the client:
      
      1. `Client.config` is the only copy of the config and all access must go through the `Client.configLock` mutex
      2. Since the mutex *only protects the config pointer itself and not fields inside the Config struct:* all config mutation must be done on a *copy* of the config, and then Client's config pointer is overwritten while the mutex is acquired. Alloc runners and other goroutines with the old config pointer will not see config updates.
      3. Deep copying is implemented on the Config struct to satisfy the previous approach. The TLS Keyloader is an exception because it has its own internal locking to support mutating in place. An unfortunate complication but one I couldn't find a way to untangle in a timely fashion.
      4. To facilitate deep copying I made an *internally backward incompatible API change:* our `helper/funcs` used to turn containers (slices and maps) with 0 elements into nils. This probably saves a few memory allocations but makes it very easy to cause panics. Since my new config handling approach uses more copying, it became very difficult to ensure all code that used containers on configs could handle nils properly. Since this code has caused panics in the past, I fixed it: nil containers are copied as nil, but 0-element containers properly return a new 0-element container. No more "downgrading to nil!"
      01648e61
    • Derek Strickland's avatar
      sentinel: add support for Nomad ACL Token and Namespace (#14171) · a67bdd14
      Derek Strickland authored
      * sentinel: add ability to reference Nomad ACL Token and Namespace in Sentinel policies
      a67bdd14
    • Michael Schurter's avatar
      3de691a4
    • Seth Hoenig's avatar
      Merge pull request #14187 from hashicorp/f-print-correct-go-version-windows-circle · c5f5ba79
      Seth Hoenig authored
      build: print installed go version in cricle on windows
      c5f5ba79
    • Seth Hoenig's avatar
      build: print installed go version in cricle on windows · c3d024e7
      Seth Hoenig authored
      This PR fixes the circle workflow step on windows where we print
      the go version. Like the other commands that use Go, we must
      inject the install path into PATH first.
      c3d024e7
    • Seth Hoenig's avatar
      Merge pull request #14181 from hashicorp/cleanup-command-tests-part-2 · f125f9bb
      Seth Hoenig authored
      cleanup: fixing warnings and refactoring of command package, part 2
      f125f9bb
    • Seth Hoenig's avatar
      cleanup: fixing warnings and refactoring of command package, part 2 · 9cc27b3c
      Seth Hoenig authored
      This PR continues the cleanup of the command package, removing linter
      warnings, refactoring to use helpers, making tests easier to read, etc.
      9cc27b3c
    • Seth Hoenig's avatar
      Merge pull request #14172 from hashicorp/cleanup-command-tests-wait-for-node · 6ca539a2
      Seth Hoenig authored
      cleanup: first pass at fixing command package warnings
      6ca539a2
  6. 17 Aug, 2022 2 commits