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. 24 Mar, 2020 15 commits
  2. 23 Mar, 2020 25 commits
    • Mahmood Ali's avatar
      Merge pull request #7384 from hashicorp/vendoring-tweaks-20200318 · e82b3b71
      Mahmood Ali authored
      Vendor package cleanup
      e82b3b71
    • Drew Bailey's avatar
      make auditor interface more explicit · dafbf364
      Drew Bailey authored
      dafbf364
    • Mahmood Ali's avatar
      Merge pull request #7417 from hashicorp/f-allocstatus-lifecycle · cd12632c
      Mahmood Ali authored
      cli: show lifecycle info in alloc status
      cd12632c
    • Mahmood Ali's avatar
      7bdebc09
    • Mahmood Ali's avatar
      vendor: remove appengine unused package · c056d777
      Mahmood Ali authored
      c056d777
    • Mahmood Ali's avatar
      755f9a64
    • Mahmood Ali's avatar
      remove unused packages · 120c2446
      Mahmood Ali authored
      120c2446
    • Mahmood Ali's avatar
      update github.com/pkg/errors · 784e06c6
      Mahmood Ali authored
      784e06c6
    • Mahmood Ali's avatar
      bad package · f795ce89
      Mahmood Ali authored
      f795ce89
    • 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
    • Mahmood Ali's avatar
      Merge pull request #7437 from hashicorp/ci-build-darwin · 4bcb6ad5
      Mahmood Ali authored
      build darwin binaries in CI
      4bcb6ad5
    • Mahmood Ali's avatar
      ci: fix darwin artifact path · 9069fec8
      Mahmood Ali authored
      9069fec8
    • Drew Bailey's avatar
      Merge pull request #7436 from hashicorp/b-fix-compilation · a813b469
      Drew Bailey authored
      fix compilation with  correct func
      a813b469
    • Drew Bailey's avatar
      fix compilation with correct func · b0fc0710
      Drew Bailey authored
      b0fc0710
    • Tim Gross's avatar
      Merge pull request #7012 from hashicorp/f-csi-volumes · d23eaed8
      Tim Gross authored
      Container Storage Interface Support
      d23eaed8
    • Drew Bailey's avatar
      Merge pull request #7419 from hashicorp/f-event-pkg · 1f32c3c7
      Drew Bailey authored
      Audit config, seams for enterprise audit features
      1f32c3c7
    • Lang Martin's avatar
      csi: add mount_options to volumes and volume requests (#7398) · 1bef8b88
      Lang Martin authored
      Add mount_options to both the volume definition on registration and to the volume block in the group where the volume is requested. If both are specified, the options provided in the request replace the options defined in the volume. They get passed to the NodePublishVolume, which causes the node plugin to actually mount the volume on the host.
      
      Individual tasks just mount bind into the host mounted volume (unchanged behavior). An operator can mount the same volume with different options by specifying it twice in the group context.
      
      closes #7007
      
      * nomad/structs/volumes: add MountOptions to volume request
      
      * jobspec/test-fixtures/basic.hcl: add mount_options to volume block
      
      * jobspec/parse_test: add expected MountOptions
      
      * api/tasks: add mount_options
      
      * jobspec/parse_group: use hcl decode not mapstructure, mount_options
      
      * client/allocrunner/csi_hook: pass MountOptions through
      
      client/allocrunner/csi_hook: add a VolumeMountOptions
      
      client/allocrunner/csi_hook: drop Options
      
      client/allocrunner/csi_hook: use the structs options
      
      * client/pluginmanager/csimanager/interface: UsageOptions.MountOptions
      
      * client/pluginmanager/csimanager/volume: pass MountOptions in capabilities
      
      * plugins/csi/plugin: remove todo 7007 comment
      
      * nomad/structs/csi: MountOptions
      
      * api/csi: add options to the api for parsing, match structs
      
      * plugins/csi/plugin: move VolumeMountOptions to structs
      
      * api/csi: use specific type for mount_options
      
      * client/allocrunner/csi_hook: merge MountOptions here
      
      * rename CSIOptions to CSIMountOptions
      
      * client/allocrunner/csi_hook
      
      * client/pluginmanager/csimanager/volume
      
      * nomad/structs/csi
      
      * plugins/csi/fake/client: add PrevVolumeCapability
      
      * plugins/csi/plugin
      
      * client/pluginmanager/csimanager/volume_test: remove debugging
      
      * client/pluginmanager/csimanager/volume: fix odd merging logic
      
      * api: rename CSIOptions -> CSIMountOptions
      
      * nomad/csi_endpoint: remove a 7007 comment
      
      * command/alloc_status: show mount options in the volume list
      
      * nomad/structs/csi: include MountOptions in the volume stub
      
      * api/csi: add MountOptions to stub
      
      * command/volume_status_csi: clean up csiVolMountOption, add it
      
      * command/alloc_status: csiVolMountOption lives in volume_csi_status
      
      * command/node_status: display mount flags
      
      * nomad/structs/volumes: npe
      
      * plugins/csi/plugin: npe in ToCSIRepresentation
      
      * jobspec/parse_test: expand volume parse test cases
      
      * command/agent/job_endpoint: ApiTgToStructsTG needs MountOptions
      
      * command/volume_status_csi: copy paste error
      
      * jobspec/test-fixtures/basic: hclfmt
      
      * command/volume_status_csi: clean up csiVolMountOption
      1bef8b88
    • Tim Gross's avatar
      2cebb3e6
    • Tim Gross's avatar
      csi: stub fingerprint on instance manager shutdown (#7388) · a280cf06
      Tim Gross authored
      Run the plugin fingerprint one last time with a closed client during
      instance manager shutdown. This will return quickly and will give us a
      correctly-populated `PluginInfo` marked as unhealthy so the Nomad
      client can update the server about plugin health.
      a280cf06
    • Tim Gross's avatar
      csi: dynamically update plugin registration (#7386) · 0f9983f2
      Tim Gross authored
      Allow for faster updates to plugin status when allocations become
      terminal by listening for register/deregister events from the dynamic
      plugin registry (which in turn are triggered by the plugin supervisor
      hook).
      
      The deregistration function closures that we pass up to the CSI plugin
      manager don't properly close over the name and type of the
      registration, causing monolith-type plugins to deregister only one of
      their two plugins on alloc shutdown. Rebind plugin supervisor 
      deregistration targets to fix that.
      
      Includes log message and comment improvements
      0f9983f2
    • Lang Martin's avatar
      csi: ACLs for plugin endpoints (#7380) · 2dc95485
      Lang Martin authored
      * acl/policy: add PolicyList for global ACLs
      
      * acl/acl: plugin policy
      
      * acl/acl: maxPrivilege is required to allow "list"
      
      * nomad/csi_endpoint: enforce plugin access with PolicyPlugin
      
      * nomad/csi_endpoint: check job ACL swapped params
      
      * nomad/csi_endpoint_test: test alloc filtering
      
      * acl/policy: add namespace csi-register-plugin
      
      * nomad/job_endpoint: check csi-register-plugin ACL on registration
      
      * nomad/job_endpoint_test: add plugin job cases
      2dc95485
    • Lang Martin's avatar
      csi: implement volume ACLs (#7339) · 4573cbee
      Lang Martin authored
      * acl/policy: add the volume ACL policies
      
      * nomad/csi_endpoint: enforce ACLs for volume access
      
      * nomad/search_endpoint_oss: volume acls
      
      * acl/acl: add plugin read as a global policy
      
      * acl/policy: add PluginPolicy global cap type
      
      * nomad/csi_endpoint: check the global plugin ACL policy
      
      * nomad/mock/acl: PluginPolicy
      
      * nomad/csi_endpoint: fix list rebase
      
      * nomad/core_sched_test: new test since #7358
      
      * nomad/csi_endpoint_test: use correct permissions for list
      
      * nomad/csi_endpoint: allowCSIMount keeps ACL checks together
      
      * nomad/job_endpoint: check mount permission for jobs
      
      * nomad/job_endpoint_test: need plugin read, too
      4573cbee
    • 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
    • Tim Gross's avatar
      csi: implement controller detach RPCs (#7356) · 72309e3e
      Tim Gross authored
      This changeset implements the remaining controller detach RPCs: server-to-client and client-to-controller. The tests also uncovered a bug in our RPC for claims which is fixed here; the volume claim RPC is used for both claiming and releasing a claim on a volume. We should only submit a controller publish RPC when the claim is new and not when it's being released.
      72309e3e