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. 23 Nov, 2021 1 commit
    • James Rasell's avatar
      core: allow setting and propagation of eval priority on job de/registration (#11532) · 80dcae72
      James Rasell authored
      This change modifies the Nomad job register and deregister RPCs to
      accept an updated option set which includes eval priority. This
      param is optional and override the use of the job priority to set
      the eval priority.
      
      In order to ensure all evaluations as a result of the request use
      the same eval priority, the priority is shared to the
      allocReconciler and deploymentWatcher. This creates a new
      distinction between eval priority and job priority.
      
      The Nomad agent HTTP API has been modified to allow setting the
      eval priority on job update and delete. To keep consistency with
      the current v1 API, job update accepts this as a payload param;
      job delete accepts this as a query param.
      
      Any user supplied value is validated within the agent HTTP handler
      removing the need to pass invalid requests to the server.
      
      The register and deregister opts functions now all for setting
      the eval priority on requests.
      
      The change includes a small change to the DeregisterOpts function
      which handles nil opts. This brings the function inline with the
      RegisterOpts.
      80dcae72
  2. 16 Sep, 2021 1 commit
    • James Rasell's avatar
      allow configuration of Docker hostnames in bridge mode (#11173) · e34fa583
      James Rasell authored
      Add a new hostname string parameter to the network block which
      allows operators to specify the hostname of the network namespace.
      Changing this causes a destructive update to the allocation and it
      is omitted if empty from API responses. This parameter also supports
      interpolation.
      
      In order to have a hostname passed as a configuration param when
      creating an allocation network, the CreateNetwork func of the
      DriverNetworkManager interface needs to be updated. In order to
      minimize the disruption of future changes, rather than add another
      string func arg, the function now accepts a request struct along with
      the allocID param. The struct has the hostname as a field.
      
      The in-tree implementations of DriverNetworkManager.CreateNetwork
      have been modified to account for the function signature change.
      In updating for the change, the enhancement of adding hostnames to
      network namespaces has also been added to the Docker driver, whilst
      the...
      e34fa583
  3. 02 Aug, 2021 1 commit
  4. 08 Jul, 2021 1 commit
    • Tim Gross's avatar
      cli: `-namespace` should override job namespace · 38af39e1
      Tim Gross authored
      When a jobspec doesn't include a namespace, we provide it with the default
      namespace, but this ends up overriding the explicit `-namespace` flag. This
      changeset uses the same logic as region parsing to create an order of
      precedence: the query string parameter (the `-namespace` flag) overrides the
      API request body which overrides the jobspec.
      38af39e1
  5. 07 Jul, 2021 1 commit
  6. 15 Jun, 2021 1 commit
  7. 04 Jun, 2021 1 commit
    • Seth Hoenig's avatar
      consul/connect: add support for connect mesh gateways · 312161c5
      Seth Hoenig authored
      This PR implements first-class support for Nomad running Consul
      Connect Mesh Gateways. Mesh gateways enable services in the Connect
      mesh to make cross-DC connections via gateways, where each datacenter
      may not have full node interconnectivity.
      
      Consul docs with more information:
      https://www.consul.io/docs/connect/gateways/mesh-gateway
      
      The following group level service block can be used to establish
      a Connect mesh gateway.
      
      service {
        connect {
          gateway {
            mesh {
              // no configuration
            }
          }
        }
      }
      
      Services can make use of a mesh gateway by configuring so in their
      upstream blocks, e.g.
      
      service {
        connect {
          sidecar_service {
            proxy {
              upstreams {
                destination_name = "<service>"
                local_bind_port  = <port>
                datacenter       = "<datacenter>"
                mesh_gateway {
                  mode = "<mode>"
                }
              }
            }
          }
        }
      }
      
      Typical use of a mesh gateway is to create a bridge bet...
      312161c5
  8. 07 May, 2021 1 commit
  9. 23 Apr, 2021 1 commit
    • Mahmood Ali's avatar
      api: Ignore User provided ParentID (#10424) · 982f0aca
      Mahmood Ali authored
      ParentID is an internal field that Nomad sets for dispatched or parameterized jobs. Job submitters should not be able to set it directly, as that messes up children tracking.
      
      Fixes #10422 . It specifically stops the scheduler from honoring the ParentID. The reason failure and why the scheduler didn't schedule that job once it was created is very interesting and requires follow up with a more technical issue.
      982f0aca
  10. 13 Apr, 2021 1 commit
    • Nick Spain's avatar
      Add a 'body' field to the check stanza · a1e0784f
      Nick Spain authored
      Consul allows specifying the HTTP body to send in a health check. Nomad
      uses Consul for health checking so this just plumbs the value through to
      where the Consul API is called.
      
      There is no validation that `body` is not used with an incompatible
      check method like GET.
      a1e0784f
  11. 05 Apr, 2021 1 commit
  12. 30 Mar, 2021 1 commit
    • Mahmood Ali's avatar
      oversubscription: adds CLI and API support · 7df90da9
      Mahmood Ali authored
      This commit updates the API to pass the MemoryMaxMB field, and the CLI to show
      the max set for the task.
      
      Also, start parsing the MemoryMaxMB in hcl2, as it's set by tags.
      
      A sample CLI output; note the additional `Max: ` for "task":
      
      ```
      $ nomad alloc status 96fbeb0b
      ID                  = 96fbeb0b-a0b3-aa95-62bf-b8a39492fd5c
      [...]
      
      Task "cgroup-fetcher" is "running"
      Task Resources
      CPU        Memory         Disk     Addresses
      0/500 MHz  32 MiB/20 MiB  300 MiB
      
      Task Events:
      [...]
      
      Task "task" is "running"
      Task Resources
      CPU        Memory          Disk     Addresses
      0/500 MHz  176 KiB/20 MiB  300 MiB
                 Max: 30 MiB
      
      Task Events:
      [...]
      ```
      7df90da9
  13. 26 Feb, 2021 1 commit
  14. 08 Feb, 2021 1 commit
    • Drew Bailey's avatar
      OnUpdate configuration for services and checks · 5c301483
      Drew Bailey authored
      Allow for readiness type checks by configuring nomad to ignore warnings
      or errors reported by a service check. This allows the deployment to
      progress and while Consul handles introducing the sercive into a
      resource pool once the check passes.
      5c301483
  15. 25 Jan, 2021 1 commit
    • Seth Hoenig's avatar
      consul/connect: Add support for Connect terminating gateways · ceae8ad1
      Seth Hoenig authored
      This PR implements Nomad built-in support for running Consul Connect
      terminating gateways. Such a gateway can be used by services running
      inside the service mesh to access "legacy" services running outside
      the service mesh while still making use of Consul's service identity
      based networking and ACL policies.
      
      https://www.consul.io/docs/connect/gateways/terminating-gateway
      
      These gateways are declared as part of a task group level service
      definition within the connect stanza.
      
      service {
        connect {
          gateway {
            proxy {
              // envoy proxy configuration
            }
            terminating {
              // terminating-gateway configuration entry
            }
          }
        }
      }
      
      Currently Envoy is the only supported gateway implementation in
      Consul. The gateay task can be customized by configuring the
      connect.sidecar_task block.
      
      When the gateway.terminating field is set, Nomad will write/update
      the Configuration Entry into Consul on job submission. Because CEs
      are global in scope and there may be more than one Nomad cluster
      communicating with Consul, there is an assumption that any terminating
      gateway defined in Nomad for a particular service will be the same
      among Nomad clusters.
      
      Gateways require Consul 1.8.0+, checked by a node constraint.
      
      Closes #9445
      ceae8ad1
  16. 30 Nov, 2020 1 commit
    • Seth Hoenig's avatar
      consul/connect: enable setting datacenter in connect upstream · ce32e311
      Seth Hoenig authored
      Before, upstreams could only be defined using the default datacenter.
      Now, the `datacenter` field can be set in a connect upstream definition,
      informing consul of the desire for an instance of the upstream service
      in the specified datacenter. The field is optional and continues to
      default to the local datacenter.
      
      Closes #8964
      ce32e311
  17. 13 Nov, 2020 1 commit
    • Seth Hoenig's avatar
      jobspec: add support for headers in artifact stanza · 6c757863
      Seth Hoenig authored
      This PR adds the ability to set HTTP headers when downloading
      an artifact from an `http` or `https` resource.
      
      The implementation in `go-getter` is such that a new `HTTPGetter`
      must be created for each artifact that sets headers (as opposed
      to conveniently setting headers per-request). This PR maintains
      the memoization of the default Getter objects, creating new ones
      only for artifacts where headers are set.
      
      Closes #9306
      6c757863
  18. 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
  19. 30 Sep, 2020 1 commit
    • Michael Schurter's avatar
      jobspec: lower min cpu resources from 10->1 · 902b0b56
      Michael Schurter authored
      Since CPU resources are usually a soft limit it is desirable to allow
      setting it as low as possible to allow tasks to run only in "idle" time.
      
      Setting it to 0 is still not allowed to avoid potential unintentional
      side effects with allowing a zero value. While there may not be any side
      effects this commit attempts to minimize risk by avoiding the issue.
      
      This does *not* change the defaults.
      902b0b56
  20. 24 Aug, 2020 1 commit
  21. 10 Aug, 2020 1 commit
  22. 24 Jul, 2020 1 commit
    • Drew Bailey's avatar
      oss compoments for multi-vault namespaces · 19810365
      Drew Bailey authored
      adds in oss components to support enterprise multi-vault namespace feature
      
      upgrade specific doc on vault multi-namespaces
      
      vault docs
      
      update test to reflect new error
      19810365
  23. 22 Jul, 2020 1 commit
  24. 06 Jul, 2020 1 commit
  25. 23 Jun, 2020 1 commit
  26. 22 Jun, 2020 1 commit
    • Seth Hoenig's avatar
      consul/connect: add support for running connect native tasks · 7e8d5c23
      Seth Hoenig authored
      This PR adds the capability of running Connect Native Tasks on Nomad,
      particularly when TLS and ACLs are enabled on Consul.
      
      The `connect` stanza now includes a `native` parameter, which can be
      set to the name of task that backs the Connect Native Consul service.
      
      There is a new Client configuration parameter for the `consul` stanza
      called `share_ssl`. Like `allow_unauthenticated` the default value is
      true, but recommended to be disabled in production environments. When
      enabled, the Nomad Client's Consul TLS information is shared with
      Connect Native tasks through the normal Consul environment variables.
      This does NOT include auth or token information.
      
      If Consul ACLs are enabled, Service Identity Tokens are automatically
      and injected into the Connect Native task through the CONSUL_HTTP_TOKEN
      environment variable.
      
      Any of the automatically set environment variables can be overridden by
      the Connect Native task using the `env` stanza.
      
      Fixes #6083
      7e8d5c23
  27. 17 Jun, 2020 4 commits
  28. 18 May, 2020 1 commit
    • Mahmood Ali's avatar
      endpoint to expose all jobs across all namespaces · 9813a55d
      Mahmood Ali authored
      Allow a `/v1/jobs?all_namespaces=true` to list all jobs across all
      namespaces.  The returned list is to contain a `Namespace` field
      indicating the job namespace.
      
      If ACL is enabled, the request token needs to be a management token or
      have `namespace:list-jobs` capability on all existing namespaces.
      9813a55d
  29. 01 Apr, 2020 1 commit
  30. 31 Mar, 2020 2 commits
  31. 24 Mar, 2020 6 commits