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. 19 Aug, 2022 1 commit
  2. 18 Aug, 2022 1 commit
  3. 17 Aug, 2022 1 commit
  4. 12 May, 2022 1 commit
    • Eng Zer Jun's avatar
      test: use `T.TempDir` to create temporary test directory (#12853) · fca4ee8e
      Eng Zer Jun authored
      * test: use `T.TempDir` to create temporary test directory
      
      This commit replaces `ioutil.TempDir` with `t.TempDir` in tests. The
      directory created by `t.TempDir` is automatically removed when the test
      and all its subtests complete.
      
      Prior to this commit, temporary directory created using `ioutil.TempDir`
      needs to be removed manually by calling `os.RemoveAll`, which is omitted
      in some tests. The error handling boilerplate e.g.
      	defer func() {
      		if err := os.RemoveAll(dir); err != nil {
      			t.Fatal(err)
      		}
      	}
      is also tedious, but `t.TempDir` handles this for us nicely.
      
      Reference: https://pkg.go.dev/testing#T.TempDir
      
      Signed-off-by: default avatarEng Zer Jun <engzerjun@gmail.com>
      
      * test: fix TestLogmon_Start_restart on Windows
      Signed-off-by: default avatarEng Zer Jun <engzerjun@gmail.com>
      
      * test: fix failing TestConsul_Integration
      
      t.TempDir fails to perform the cleanup properly because the folder is
      still in use
      
      testing.go:967: TempDir Re...
      fca4ee8e
  5. 15 Mar, 2022 1 commit
  6. 07 Mar, 2022 1 commit
    • Tim Gross's avatar
      CSI: allow updates to volumes on re-registration (#12167) · 7d0f87b9
      Tim Gross authored
      CSI `CreateVolume` RPC is idempotent given that the topology,
      capabilities, and parameters are unchanged. CSI volumes have many
      user-defined fields that are immutable once set, and many fields that
      are not user-settable.
      
      Update the `Register` RPC so that updating a volume via the API merges
      onto any existing volume without touching Nomad-controlled fields,
      while validating it with the same strict requirements expected for
      idempotent `CreateVolume` RPCs.
      
      Also, clarify that this state store method is used for everything, not just
      for the `Register` RPC.
      7d0f87b9
  7. 01 Oct, 2021 1 commit
  8. 16 Nov, 2020 1 commit
    • Tim Gross's avatar
      csi: alloc status -verbose should query volume request 'source' (#9354) · 78afe189
      Tim Gross authored
      The `nomad alloc status -verbose` command returns a 404 from CSI volumes
      because the volume mount block in the task points back to the
      `job.group.volume` block. So using the `Name` field to query is the "name" as
      seen in the jobspec, and not the name of the volume that we need for querying.
      
      Show both the job-specific name and the volume ID in the resulting output,
      which clarifies the difference between the two fields and is more consistent
      with the web UI.
      78afe189
  9. 19 Oct, 2020 1 commit
    • Drew Bailey's avatar
      Events/msgtype cleanup (#9117) · 7ce0b501
      Drew Bailey authored
      * use msgtype in upsert node
      
      adds message type to signature for upsert node, update tests, remove placeholder method
      
      * UpsertAllocs msg type test setup
      
      * use upsertallocs with msg type in signature
      
      update test usage of delete node
      
      delete placeholder msgtype method
      
      * add msgtype to upsert evals signature, update test call sites with test setup msg type
      
      handle snapshot upsert eval outside of FSM and ignore eval event
      
      remove placeholder upsertevalsmsgtype
      
      handle job plan rpc and prevent event creation for plan
      
      msgtype cleanup upsertnodeevents
      
      updatenodedrain msgtype
      
      msg type 0 is a node registration event, so set the default  to the ignore type
      
      * fix named import
      
      * fix signature ordering on upsertnode to match
      7ce0b501
  10. 05 Oct, 2020 1 commit
  11. 23 Mar, 2020 3 commits
    • Mahmood Ali's avatar
      cli: show lifecycle info in alloc status · ff529619
      Mahmood Ali authored
      Display task lifecycle info in `nomad alloc status <alloc_id>` output.
      I chose to embed it in the Task header and only add it for tasks with
      lifecycle info.
      
      Also, I chose to order the tasks in the following order:
      
      1. prestart non-sidecar tasks
      2. prestart sidecar tasks
      3. main tasks
      
      The tasks are sorted lexicographically within each tier.
      
      Sample output:
      
      ```
      $ nomad alloc status 6ec0eb52
      ID                  = 6ec0eb52-e6c8-665c-169c-113d6081309b
      Eval ID             = fb0caa98
      Name                = lifecycle.cache[0]
      [...]
      
      Task "init" (prestart) is "dead"
      Task Resources
      CPU        Memory       Disk     Addresses
      0/500 MHz  0 B/256 MiB  300 MiB
      [...]
      
      Task "some-sidecar" (prestart sidecar) is "running"
      Task Resources
      CPU        Memory          Disk     Addresses
      0/500 MHz  68 KiB/256 MiB  300 MiB
      [...]
      
      Task "redis" is "running"
      Task Resources
      CPU         Memory           Disk     Addresses
      10/500 MHz  984 KiB/256 MiB  300 MiB
      [...]
      ```
      ff529619
    • Lang Martin's avatar
      csi: volume ids are only unique per namespace (#7358) · 9c9a0c5e
      Lang Martin authored
      * nomad/state/schema: use the namespace compound index
      
      * scheduler/scheduler: CSIVolumeByID interface signature namespace
      
      * scheduler/stack: SetJob on CSIVolumeChecker to capture namespace
      
      * scheduler/feasible: pass the captured namespace to CSIVolumeByID
      
      * nomad/state/state_store: use namespace in csi_volume index
      
      * nomad/fsm: pass namespace to CSIVolumeDeregister & Claim
      
      * nomad/core_sched: pass the namespace in volumeClaimReap
      
      * nomad/node_endpoint_test: namespaces in Claim testing
      
      * nomad/csi_endpoint: pass RequestNamespace to state.*
      
      * nomad/csi_endpoint_test: appropriately failed test
      
      * command/alloc_status_test: appropriately failed test
      
      * node_endpoint_test: avoid notTheNamespace for the job
      
      * scheduler/feasible_test: call SetJob to capture the namespace
      
      * nomad/csi_endpoint: ACL check the req namespace, query by namespace
      
      * nomad/state/state_store: remove deregister namespace check
      
      * nomad/state/state_store: remove unused CSIVolumes
      
      * scheduler/feasible: CSIVolumeChecker SetJob -> SetNamespace
      
      * nomad/csi_endpoint: ACL check
      
      * nomad/state/state_store_test: remove call to state.CSIVolumes
      
      * nomad/core_sched_test: job namespace match so claim gc works
      9c9a0c5e
    • Tim Gross's avatar
      storage: add volumes to 'nomad alloc status' CLI (#7256) · b4b682b7
      Tim Gross authored
      Adds a stanza for both Host Volumes and CSI Volumes to the the CLI
      output for `nomad alloc status`. Mostly relies on information already
      in the API structs, but in the case where there are CSI Volumes we
      need to make extra API calls to get the volume status. To reduce
      overhead, these extra calls are hidden behind the `-verbose` flag.
      b4b682b7
  12. 01 Nov, 2019 1 commit
  13. 10 Apr, 2019 2 commits
  14. 20 Dec, 2018 1 commit
  15. 30 Oct, 2018 1 commit
  16. 04 Sep, 2018 3 commits
  17. 18 Apr, 2018 1 commit
  18. 31 Jan, 2018 5 commits
  19. 01 Nov, 2017 1 commit
  20. 29 Aug, 2017 1 commit
  21. 28 Aug, 2017 1 commit
  22. 22 Aug, 2017 1 commit
  23. 16 Aug, 2017 1 commit
  24. 15 Aug, 2017 1 commit
  25. 21 Jul, 2017 2 commits
  26. 07 Jul, 2017 1 commit
  27. 10 May, 2017 1 commit
  28. 20 Dec, 2016 1 commit
  29. 22 Aug, 2016 1 commit
  30. 19 Aug, 2016 1 commit