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. 12 Mar, 2021 1 commit
  2. 08 Oct, 2020 1 commit
    • Tim Gross's avatar
      csi: loosen ValidateVolumeCapability requirements (#9049) · bf62f46a
      Tim Gross authored
      The CSI specification for `ValidateVolumeCapability` says that we shall
      "reconcile successful capability-validation responses by comparing the
      validated capabilities with those that it had originally requested" but leaves
      the details of that reconcilation unspecified. This API is not implemented in
      Kubernetes, so controller plugins don't have a real-world implementation to
      verify their behavior against.
      
      We have found that CSI plugins in the wild may return "successful" but
      incomplete `VolumeCapability` responses, so we can't require that all
      capabilities we expect have been validated, only that the ones that have been
      validated match. This appears to violate the CSI specification but until
      that's been resolved in upstream we have to loosen our validation
      requirements. The tradeoff is that we're more likely to have runtime errors
      during `NodeStageVolume` instead of at the time of volume registration.
      bf62f46a
  3. 22 Jun, 2020 1 commit
    • Tim Gross's avatar
      csi: add VolumeContext to NodeStage/Publish RPCs (#8239) · ffd783e6
      Tim Gross authored
      In #7957 we added support for passing a volume context to the controller RPCs.
      This is an opaque map that's created by `CreateVolume` or, in Nomad's case,
      in the volume registration spec.
      
      However, we missed passing this field to the `NodeStage` and `NodePublish` RPC,
      which prevents certain plugins (such as MooseFS) from making node RPCs.
      ffd783e6
  4. 18 May, 2020 1 commit
    • Tim Gross's avatar
      csi: improve plugin error messages and volume validation (#7984) · 64c6a8db
      Tim Gross authored
      Some CSI plugins don't return much for errors over the gRPC socket
      above and beyond the bare minimum error codes. This changeset improves
      the operator experience by unpacking the error codes when available
      and wrapping the error with some user-friendly direction.
      
      Improving these errors also revealed a bad comparison with
      `require.Error` when `require.EqualError` should be used in the test
      code for plugin errors. This defect in turn was hiding a bug in volume
      validation where we're being overly permissive in allowing mount
      flags, which is now fixed.
      64c6a8db
  5. 15 May, 2020 1 commit
    • Tim Gross's avatar
      csi: support for VolumeContext and VolumeParameters (#7957) · 103d873e
      Tim Gross authored
      The MVP for CSI in the 0.11.0 release of Nomad did not include support
      for opaque volume parameters or volume context. This changeset adds
      support for both.
      
      This also moves args for ControllerValidateCapabilities into a struct.
      The CSI plugin `ControllerValidateCapabilities` struct that we turn
      into a CSI RPC is accumulating arguments, so moving it into a request
      struct will reduce the churn of this internal API, make the plugin
      code more readable, and make this method consistent with the other
      plugin methods in that package.
      103d873e
  6. 14 May, 2020 1 commit
    • Tim Gross's avatar
      csi: refactor internal client field name to ExternalID (#7958) · c514a552
      Tim Gross authored
      The CSI plugins RPCs require the use of the storage provider's volume
      ID, rather than the user-defined volume ID. Although changing the RPCs
      to use the field name `ExternalID` risks breaking backwards
      compatibility, we can use the `ExternalID` name internally for the
      client and only use `VolumeID` at the RPC boundaries.
      c514a552
  7. 11 May, 2020 1 commit
    • Tim Gross's avatar
      csi: support Secrets parameter in CSI RPCs (#7923) · a28f18ea
      Tim Gross authored
      CSI plugins can require credentials for some publishing and
      unpublishing workflow RPCs. Secrets are configured at the time of
      volume registration, stored in the volume struct, and then passed
      around as an opaque map by Nomad to the plugins.
      a28f18ea
  8. 05 May, 2020 1 commit
    • Tim Gross's avatar
      csi: fix mount validation (#7869) · 1585d343
      Tim Gross authored
      Several of the CSI `VolumeCapability` methods return pointers, which
      we were then comparing to pointers in the request rather than
      dereferencing them and comparing their contents.
      
      This changeset does a more fine-grained comparison of the request vs
      the capabilities, and adds better error messaging.
      1585d343
  9. 30 Apr, 2020 1 commit
    • Tim Gross's avatar
      csi: check returned volume capability validation (#7831) · f592dd90
      Tim Gross authored
      This changeset corrects handling of the `ValidationVolumeCapabilities`
      response:
      
      * The CSI spec for the `ValidationVolumeCapabilities` requires that
        plugins only set the `Confirmed` field if they've validated all
        capabilities. The Nomad client improperly assumes that the lack of a
        `Confirmed` field should be treated as a failure. This breaks the
        Azure and Linode block storage plugins, which don't set this
        optional field.
      
      * The CSI spec also requires that the orchestrator check the validation
        responses to guard against older versions of a plugin reporting
        "valid" for newer fields it doesn't understand.
      f592dd90
  10. 23 Mar, 2020 10 commits
    • Tim Gross's avatar
      csi: add Provider field to CSI CLIs and APIs (#7285) · d6c9952d
      Tim Gross authored
      Derive a provider name and version for plugins (and the volumes that
      use them) from the CSI identity API `GetPluginInfo`. Expose the vendor
      name as `Provider` in the API and CLI commands.
      d6c9952d
    • Tim Gross's avatar
      csi: implement CSI controller detach request/response (#7107) · 27e5cea0
      Tim Gross authored
      This changeset implements the minimal structs on the client-side we
      need to compile the work-in-progress implementation of the
      server-to-controller RPCs. It doesn't include implementing the
      `ClientCSI.DettachVolume` RPC on the client.
      27e5cea0
    • Danielle Lancashire's avatar
      77f3ef34
    • Danielle Lancashire's avatar
      csi: Add NodePublishVolume RPCs · 9f73f09f
      Danielle Lancashire authored
      9f73f09f
    • Danielle Lancashire's avatar
      639bcdf8
    • Danielle Lancashire's avatar
      csi: Add NodeStageVolume RPC · 3b667d68
      Danielle Lancashire authored
      3b667d68
    • Danielle Lancashire's avatar
      csi: Add NodeGetCapabilities RPC · 0d412c0d
      Danielle Lancashire authored
      0d412c0d
    • Danielle Lancashire's avatar
      91e3bfea
    • Danielle Lancashire's avatar
      86de04d8
    • Danielle Lancashire's avatar
      CSI Plugin Registration (#6555) · d296efd2
      Danielle Lancashire authored
      This changeset implements the initial registration and fingerprinting
      of CSI Plugins as part of #5378. At a high level, it introduces the
      following:
      
      * A `csi_plugin` stanza as part of a Nomad task configuration, to
        allow a task to expose that it is a plugin.
      
      * A new task runner hook: `csi_plugin_supervisor`. This hook does two
        things. When the `csi_plugin` stanza is detected, it will
        automatically configure the plugin task to receive bidirectional
        mounts to the CSI intermediary directory. At runtime, it will then
        perform an initial heartbeat of the plugin and handle submitting it to
        the new `dynamicplugins.Registry` for further use by the client, and
        then run a lightweight heartbeat loop that will emit task events
        when health changes.
      
      * The `dynamicplugins.Registry` for handling plugins that run
        as Nomad tasks, in contrast to the existing catalog that requires
        `go-plugin` type plugins and to know the plugin configuration in
        advance.
      
      * The `csimanager` which fingerprints CSI plugins, in a similar way to
        `drivermanager` and `devicemanager`. It currently only fingerprints
        the NodeID from the plugin, and assumes that all plugins are
        monolithic.
      
      Missing features
      
      * We do not use the live updates of the `dynamicplugin` registry in
        the `csimanager` yet.
      
      * We do not deregister the plugins from the client when they shutdown
        yet, they just become indefinitely marked as unhealthy. This is
        deliberate until we figure out how we should manage deploying new
        versions of plugins/transitioning them.
      d296efd2