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.
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
- 12 Mar, 2021 1 commit
-
-
Tim Gross authored
-
- 08 Mar, 2021 1 commit
-
-
Adrian Todorov authored
-
- 14 Jan, 2021 1 commit
-
-
Kris Hicks authored
* Throw away result of multierror.Append When given a *multierror.Error, it is mutated, therefore the return value is not needed. * Simplify MergeMultierrorWarnings, use StringBuilder * Hash.Write() never returns an error * Remove error that was always nil * Remove error from Resources.Add signature When this was originally written it could return an error, but that was refactored away, and callers of it as of today never handle the error. * Throw away results of io.Copy during Bridge * Handle errors when computing node class in test
-
- 04 Jan, 2021 1 commit
-
-
Chris Baker authored
resolves #9839 resolves #6929 resolves #6910 e2e: template env interpolation path testing
-
- 10 Dec, 2020 1 commit
-
-
Kris Hicks authored
-
- 09 Dec, 2020 1 commit
-
-
Kris Hicks authored
-
- 25 Nov, 2020 2 commits
-
-
Mahmood Ali authored
Use targetted ignore comments for the cases where we are bound by backward compatibility. I've left some file based linters, especially when the file is riddled with linter voilations (e.g. enum names), or if it's a property of the file (e.g. package and file names). I encountered an odd behavior related to RPC_REQUEST_RESPONSE_UNIQUE and RPC_REQUEST_STANDARD_NAME. Apparently, if they target a `stream` type, we must separate them into separate lines so that the ignore comment targets the type specifically.
-
Mahmood Ali authored
Fix #9210 . This update the executor so it honors the User when using nomad alloc exec. The bug was that the exec task didn't honor the init command when execing.
-
- 23 Nov, 2020 1 commit
-
-
Nick Ethier authored
-
- 17 Nov, 2020 1 commit
-
-
Kris Hicks authored
This replaces all usage of `protoc` with `buf`. See `tools/buf/README.md` for more.
-
- 10 Nov, 2020 1 commit
-
-
Kris Hicks authored
Previously, it was required that you `go get github.com/hashicorp/nomad` to be able to build protos, as the protoc invocation added an include directive that pointed to `$GOPATH/src`, which is how dependent protos were discovered. As Nomad now uses Go modules, it won't necessarily be cloned to `$GOPATH`. (Additionally, if you _had_ go-gotten Nomad at some point, protoc compilation would have possibly used the _wrong_ protos, as those wouldn't necessarily be the most up-to-date ones.) This change modifies the proto files and the `protoc` invocation to handle discovering dependent protos via protoc plugin modifier statements that are specific to the protoc plugin being used. In this change, `make proto` was run to recompile the protos, which results in changes only to the gzipped `FileDescriptorProto`.
-
- 14 Oct, 2020 1 commit
-
-
Michael Schurter authored
1.0 here we come!
-
- 12 Oct, 2020 1 commit
-
-
Yoan Blanc authored
Signed-off-by:
Yoan Blanc <yoan@dosimple.ch>
-
- 08 Oct, 2020 1 commit
-
-
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.
-
- 01 Oct, 2020 1 commit
-
-
Mahmood Ali authored
In systemd-resolved hosts with no DNS customizations, the docker driver DNS setting should be compared to /run/systemd/resolve/resolv.conf while exec/java drivers should be compared to /etc/resolv.conf. When system-resolved is enabled, /etc/resolv.conf is a stub that points to 127.0.0.53. Docker avoids this stub because this address isn't accessible from the container. The exec/java drivers that don't create network isolations use the stub though in the default configuration.
-
- 11 Aug, 2020 1 commit
-
-
Nick Ethier authored
* docker: support group allocated ports * docker: add new ports driver config to specify which group ports are mapped * docker: update port mapping docs
-
- 07 Aug, 2020 1 commit
-
-
Tim Gross authored
When the client-side actions of a CSI client RPC succeed but we get disconnected during the RPC or we fail to checkpoint the claim state, we want to be able to retry the client RPC without getting blocked by the client-side state (ex. mount points) already having been cleaned up in previous calls.
-
- 21 Jul, 2020 1 commit
-
-
Mahmood Ali authored
-
- 22 Jun, 2020 1 commit
-
-
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.
-
- 18 Jun, 2020 1 commit
-
-
Nick Ethier authored
Co-Authored-By:
Tim Gross <tgross@hashicorp.com> Co-Authored-By:
Seth Hoenig <shoenig@hashicorp.com>
-
- 26 May, 2020 1 commit
-
-
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.
-
- 21 May, 2020 1 commit
-
-
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...
-
- 19 May, 2020 1 commit
-
-
Mahmood Ali authored
The hcl2 library has moved from http://github.com/hashicorp/hcl2 to https://github.com/hashicorp/hcl/tree/hcl2. This updates Nomad's vendoring to start using hcl2 library. Also updates some related libraries (e.g. `github.com/zclconf/go-cty/cty` and `github.com/apparentlymart/go-textseg`).
-
- 18 May, 2020 1 commit
-
-
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.
-
- 15 May, 2020 1 commit
-
-
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.
-
- 14 May, 2020 2 commits
-
-
Tim Gross authored
The plugin supervisor lazily connects to plugins, but this means we only get "Unavailable" back from the gRPC call in cases where the plugin can never be reached (for example, if the Nomad client has the wrong permissions for the socket). This changeset improves the operator experience by switching to a blocking `DialWithContext`. It eagerly connects so that we can validate the connection is real and get a "failed to open" error in case where Nomad can't establish the initial connection.
-
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.
-
- 11 May, 2020 2 commits
-
-
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.
-
Mahmood Ali authored
When serializing structs with msgpack, only consider type tags of `codec`. Hashicorp/go-msgpack (based on ugorji/go) defaults to interpretting `codec` tag if it's available, but falls to using `json` if `codec` isn't present. This behavior is surprising in cases where we want to serialize json differently from msgpack, e.g. serializing `ConsulExposeConfig`.
-
- 05 May, 2020 1 commit
-
-
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.
-
- 30 Apr, 2020 1 commit
-
-
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.
-
- 20 Apr, 2020 1 commit
-
-
Anthony Scalisi authored
-
- 01 Apr, 2020 1 commit
-
-
Tim Gross authored
-
- 31 Mar, 2020 2 commits
-
-
Yoan Blanc authored
Signed-off-by:
Yoan Blanc <yoan@dosimple.ch>
-
Yoan Blanc authored
Signed-off-by:
Yoan Blanc <yoan@dosimple.ch>
-
- 30 Mar, 2020 1 commit
-
-
Tim Gross authored
The CSI Specification defines various gRPC Errors and how they may be retried. After auditing all our CSI RPC calls in #6863, this changeset: * adds retries and backoffs to the where they were needed but not implemented * annotates those CSI RPCs that do not need retries so that we don't wonder whether it's been left off accidentally * added a timeout and cancellation context to the `Probe` call, which didn't have one.
-
- 23 Mar, 2020 4 commits
-
-
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 VolumeMount...
-
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.
-
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.
-
Danielle Lancashire authored
This commit introduces support for providing VolumeCapabilities during requests to `ControllerPublishVolumes` as this is a required field.
-