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. 01 Sep, 2022 1 commit
  2. 04 Aug, 2022 2 commits
    • Luiz Aoqui's avatar
      qemu: reduce monitor socket path (#13971) · e1ae7bf7
      Luiz Aoqui authored
      The QEMU driver can take an optional `graceful_shutdown` configuration
      which will create a Unix socket to send ACPI shutdown signal to the VM.
      
      Unix sockets have a hard length limit and the driver implementation
      assumed that QEMU versions 2.10.1 were able to handle longer paths. This
      is not correct, the linked QEMU fix only changed the behaviour from
      silently truncating longer socket paths to throwing an error.
      
      By validating the socket path before starting the QEMU machine we can
      provide users a more actionable and meaningful error message, and by
      using a shorter socket file name we leave a bit more room for
      user-defined values in the path, such as the task name.
      
      The maximum length allowed is also platform-dependant, so validation
      needs to be different for each OS.
      e1ae7bf7
    • Luiz Aoqui's avatar
      qemu: restore monitor socket path (#14000) · 258fab13
      Luiz Aoqui authored
      When a QEMU task is recovered the monitor socket path was not being
      restored into the task handler, so the `graceful_shutdown` configuration
      was effectively ignored if the client restarted.
      258fab13
  3. 10 Jun, 2022 1 commit
  4. 09 Jun, 2022 1 commit
  5. 27 Apr, 2022 1 commit
  6. 19 Nov, 2021 1 commit
    • Tim Gross's avatar
      qemu: add `args_allowlist` to sandbox VM command line inputs · 40de248b
      Tim Gross authored
      The QEMU driver allows arbitrary command line options, but many of
      these options give access to host resources that operators may not
      want to expose such as devices. Add an optional allowlist to the
      plugin configuration so that operators can limit the resources for
      QEMU.
      40de248b
  7. 15 Apr, 2021 1 commit
  8. 21 Jan, 2021 1 commit
  9. 09 Dec, 2020 1 commit
  10. 24 Jun, 2020 1 commit
  11. 18 Jun, 2020 1 commit
  12. 26 May, 2020 1 commit
    • Mahmood Ali's avatar
      cleanup driver eventor goroutines · d6c75e30
      Mahmood Ali authored
      This fixes few cases where driver eventor goroutines are leaked during
      normal operations, but especially so in tests.
      
      This change makes few modifications:
      
      First, it switches drivers to use `Context`s to manage shutdown events.
      Previously, it relied on callers invoking `.Shutdown()` function that is
      specific to internal drivers only and require casting.  Using `Contexts`
      provide a consistent idiomatic way to manage lifecycle for both internal
      and external drivers.
      
      Also, I discovered few places where we don't clean up a temporary driver
      instance in the plugin catalog code, where we dispense a driver to
      inspect and validate the schema config without properly cleaning it up.
      d6c75e30
  13. 21 May, 2020 1 commit
    • Tim Gross's avatar
      volumes: return better error messages for unsupported task drivers (#8030) · 8860b72b
      Tim Gross authored
      When an allocation runs for a task driver that can't support volume mounts,
      the mounting will fail in a way that can be hard to understand. With host
      volumes this usually means failing silently, whereas with CSI the operator
      gets inscrutable internals exposed in the `nomad alloc status`.
      
      This changeset adds a MountConfig field to the task driver Capabilities
      response. We validate this when the `csi_hook` or `volume_hook` fires and
      return a user-friendly error.
      
      Note that we don't currently have a way to get driver capabilities up to the
      server, except through attributes. Validating this when the user initially
      submits the jobspec would be even better than what we're doing here (and could
      be useful for all our other capabilities), but that's out of scope for this
      changeset.
      
      Also note that the MountConfig enum starts with "supports all" in order to
      support community plugins in a backwards compatible way, rather than...
      8860b72b
  14. 22 Nov, 2019 2 commits
  15. 19 Nov, 2019 1 commit
  16. 04 Sep, 2019 1 commit
  17. 31 Jul, 2019 2 commits
  18. 16 Feb, 2019 1 commit
    • Mahmood Ali's avatar
      drivers: restore port_map old json support · afb0c5ac
      Mahmood Ali authored
      This ensures that `port_map` along with other block like attribute
      declarations (e.g. ulimit, labels, etc) can handle various hcl and json
      syntax that was supported in 0.8.
      
      In 0.8.7, the following declarations are effectively equivalent:
      
      ```
      // hcl block
      port_map {
        http = 80
        https = 443
      }
      
      // hcl assignment
      port_map = {
        http  = 80
        https = 443
      }
      
      // json single element array of map (default in API response)
      {"port_map": [{"http": 80, "https": 443}]}
      
      // json array of individual maps (supported accidentally iiuc)
      {"port_map: [{"http": 80}, {"https": 443}]}
      ```
      
      We achieve compatbility by using `NewAttr("...", "list(map(string))",
      false)` to be serialized to a `map[string]string` wrapper, instead of using
      `BlockAttrs` declaration.  The wrapper merges the list of maps
      automatically, to ease driver development.
      
      This approach is closer to how v0.8.7 implemented the fields [1][2], and
      despite its verbosity, seems to perserve 0.8.7 behavior in hcl2.
      
      This is only required for built-in types that have backward
      compatibility constraints.  External drivers should use `BlockAttrs`
      instead, as they see fit.
      
      [1] https://github.com/hashicorp/nomad/blob/v0.8.7/client/driver/docker.go#L216
      [2] https://github.com/hashicorp/nomad/blob/v0.8.7/client/driver/docker.go#L698-L700
      afb0c5ac
  19. 23 Jan, 2019 2 commits
  20. 22 Jan, 2019 4 commits
  21. 18 Jan, 2019 4 commits
  22. 17 Jan, 2019 2 commits
  23. 16 Jan, 2019 1 commit
  24. 15 Jan, 2019 1 commit
  25. 12 Jan, 2019 1 commit
    • Nick Ethier's avatar
      executor: implement streaming stats API · fbf9a4c7
      Nick Ethier authored
      plugins/driver: update driver interface to support streaming stats
      
      client/tr: use streaming stats api
      
      TODO:
       * how to handle errors and closed channel during stats streaming
       * prevent tight loop if Stats(ctx) returns an error
      
      drivers: update drivers TaskStats RPC to handle streaming results
      
      executor: better error handling in stats rpc
      
      docker: better control and error handling of stats rpc
      
      driver: allow stats to return a recoverable error
      fbf9a4c7
  26. 11 Jan, 2019 1 commit
    • Alex Dadgar's avatar
      Plugins use parent loggers · 270ae48b
      Alex Dadgar authored
      This PR fixes various instances of plugins being launched without using
      the parent loggers. This meant that logs would not all go to the same
      output, break formatting etc.
      270ae48b
  27. 08 Jan, 2019 3 commits
    • Mahmood Ali's avatar
      drivers: re-export ResourceUsage structs · 800a3522
      Mahmood Ali authored
      Re-export the ResourceUsage structs in drivers package to avoid drivers
      directly depending on the internal client/structs package directly.
      
      I attempted moving the structs to drivers, but that caused some import
      cycles that was a bit hard to disentagle.  Alternatively, I added an
      alias here that's sufficient for our purposes of avoiding external
      drivers depend on internal packages, while allowing us to restructure
      packages in future without breaking source compatibility.
      800a3522
    • Mahmood Ali's avatar
      move cstructs.DeviceNetwork to drivers pkg · c0162fab
      Mahmood Ali authored
      c0162fab
    • Mahmood Ali's avatar
      use drivers.FSIsolation · 694e3010
      Mahmood Ali authored
      694e3010