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. 17 Feb, 2022 1 commit
  2. 16 Feb, 2022 5 commits
  3. 15 Feb, 2022 10 commits
  4. 14 Feb, 2022 2 commits
  5. 11 Feb, 2022 5 commits
    • 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
    • Tim Gross's avatar
      csi: provide `CSI_ENDPOINT` env var to plugins (#12050) · 16baefcb
      Tim Gross authored
      The CSI specification says:
      > The CO SHALL provide the listen-address for the Plugin by way of the
      `CSI_ENDPOINT` environment variable.
      
      Note that plugins without filesystem isolation won't have the plugin
      dir bind-mounted to their alloc dir, but we can provide a path to the
      socket anyways.
      
      Refactor to use opts struct for plugin supervisor hook config.
      The parameter list for configuring the plugin supervisor hook has
      grown enough where is makes sense to use an options struct similiar to
      many of the other task runner hooks (ex. template).
      16baefcb
    • James Rasell's avatar
      Merge pull request #12053 from marcaurele/fix-typo · 26061886
      James Rasell authored
      doc(typo): technical typo in advertised example
      26061886
    • James Rasell's avatar
      Merge pull request #12041 from hashicorp/b-gh-12040 · d1ffc237
      James Rasell authored
      changelog: add entry for #12040
      d1ffc237
    • James Rasell's avatar
      client: track service deregister call so it's only called once. · 72f411c9
      James Rasell authored
      In certain task lifecycles the taskrunner service deregister call
      could be called three times for a task that is exiting. Whilst
      each hook caller of deregister has its own purpose, we should try
      and ensure it is only called once during the shutdown lifecycle of
      a task.
      
      This change therefore tracks when deregister has been called, so
      that subsequent calls are noop. In the event the task is
      restarting, the deregister value is reset to ensure proper
      operation.
      72f411c9
  6. 10 Feb, 2022 16 commits
    • Derek Strickland's avatar
      reconciler: refactor `computeGroup` (#12033) · cefc58dd
      Derek Strickland authored
      The allocReconciler's computeGroup function contained a significant amount of inline logic that was difficult to understand the intent of. This commit extracts inline logic into the following intention revealing subroutines. It also includes updates to the function internals also aimed at improving maintainability and renames some existing functions for the same purpose. New or renamed functions include.
      
      Renamed functions
      
      - handleGroupCanaries -> cancelUnneededCanaries
      - handleDelayedLost -> createLostLaterEvals
      - handeDelayedReschedules -> createRescheduleLaterEvals
      
      New functions
      
      - filterAndStopAll
      - initializeDeploymentState
      - requiresCanaries
      - computeCanaries
      - computeUnderProvisionedBy
      - computeReplacements
      - computeDestructiveUpdates
      - computeMigrations
      - createDeployment
      - isDeploymentComplete
      cefc58dd
    • Luiz Aoqui's avatar
    • Luiz Aoqui's avatar
      update download to Nomad v1.2.6 (#12042) · 6d7813d5
      Luiz Aoqui authored
      6d7813d5
    • Luiz Aoqui's avatar
      Merge pull request #12045 from hashicorp/merge-release-1.2.6-branch · af332373
      Luiz Aoqui authored
      Merge release 1.2.6 branch
      af332373
    • Luiz Aoqui's avatar
      prepare for next release · 096934a5
      Luiz Aoqui authored
      096934a5
    • Luiz Aoqui's avatar
      Merge tag 'v1.2.6' into merge-release-1.2.6-branch · bc333c25
      Luiz Aoqui authored
      Version 1.2.6
      bc333c25
    • Marc-Aurèle Brothier's avatar
      small typo in advertised example · 0cc28e95
      Marc-Aurèle Brothier authored
      0cc28e95
    • James Rasell's avatar
      changelog: add entry for #12040 · 7f0435ae
      James Rasell authored
      7f0435ae
    • Nomad Release Bot's avatar
      Release v1.2.6 · 95514d56
      Nomad Release Bot authored
      95514d56
    • Nomad Release bot's avatar
      Generate files for 1.2.6 release · a6c6b475
      Nomad Release bot authored
      a6c6b475
    • Luiz Aoqui's avatar
      docs: add 1.2.6 to changelog · a3319d7d
      Luiz Aoqui authored
      a3319d7d
    • Tim Gross's avatar
      scheduler: prevent panic in spread iterator during alloc stop · c49359ad
      Tim Gross authored
      The spread iterator can panic when processing an evaluation, resulting
      in an unrecoverable state in the cluster. Whenever a panicked server
      restarts and quorum is restored, the next server to dequeue the
      evaluation will panic.
      
      To trigger this state:
      * The job must have `max_parallel = 0` and a `canary >= 1`.
      * The job must not have a `spread` block.
      * The job must have a previous version.
      * The previous version must have a `spread` block and at least one
        failed allocation.
      
      In this scenario, the desired changes include `(place 1+) (stop
      1+), (ignore n) (canary 1)`. Before the scheduler can place the canary
      allocation, it tries to find out which allocations can be
      stopped. This passes back through the stack so that we can determine
      previous-node penalties, etc. We call `SetJob` on the stack with the
      previous version of the job, which will include assessing the `spread`
      block (even though the results are unused). The task group spread info
      sta...
      c49359ad
    • 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
    • Seth Hoenig's avatar
      client: check escaping of alloc dir using symlinks · b3c0e6a7
      Seth Hoenig authored
      This PR adds symlink resolution when doing validation of paths
      to ensure they do not escape client allocation directories.
      b3c0e6a7
    • Seth Hoenig's avatar
      client: fix race condition in use of go-getter · 6445da9b
      Seth Hoenig authored
      go-getter creates a circular dependency between a Client and Getter,
      which means each is inherently thread-unsafe if you try to re-use
      on or the other.
      
      This PR fixes Nomad to no longer make use of the default Getter objects
      provided by the go-getter package. Nomad must create a new Client object
      on every artifact download, as the Client object controls the Src and Dst
      among other things. When Caling Client.Get, the Getter modifies its own
      Client reference, creating the circular reference and race condition.
      
      We can still achieve most of the desired connection caching behavior by
      re-using a shared HTTP client with transport pooling enabled.
      6445da9b
    • Charlie Voiselle's avatar
      Add changelog · 1e29872d
      Charlie Voiselle authored
      1e29872d
  7. 09 Feb, 2022 1 commit
    • Tim Gross's avatar
      CSI: use job status not alloc status for plugin updates from summary (#12027) · 05b99001
      Tim Gross authored
      When an allocation is updated, the job summary for the associated job
      is also updated. CSI uses the job summary to set the expected count
      for controller and node plugins. We incorrectly used the allocation's
      server status instead of the job status when deciding whether to
      update or remove the job from the plugins. This caused a node drain or
      other terminal state for an allocation to clear the expected count for
      the entire plugin.
      
      Use the job status to guide whether to update or remove the expected
      count.
      
      The existing CSI tests for the state store incorrectly modeled the
      updates we received from servers vs those we received from clients,
      leading to test assertions that passed when they should not.
      
      Rework the tests to clarify each step in the lifecycle and rename CSI state
      store functions for clarity
      05b99001