Commit graph

23319 commits

Author SHA1 Message Date
Seth Hoenig adf41cc7ef
Merge pull request #13485 from hashicorp/f-api-env-cleanup
api: use testing.T.Setenv to set env vars in tests
2022-06-27 12:16:09 -05:00
Seth Hoenig 19deec2265
Merge pull request #13486 from hashicorp/f-remove-gotextseg-replace
deps: remove replace statement for go-textseg
2022-06-27 11:56:31 -05:00
Seth Hoenig 4aedca8437
Merge pull request #13479 from hashicorp/b-update-testify
tests: update testify dependency
2022-06-27 11:52:21 -05:00
Seth Hoenig 84b59194ef
Merge pull request #13487 from greut/feat/use-moby-term
feat: docker/docker/pkg/term has been deprecated in favor of moby/term
2022-06-27 08:14:21 -05:00
Yoan Blanc 9d52d23e67
fixup! feat: docker/docker/pkg/term has been deprecated in favor of moby/term
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
2022-06-26 15:38:16 +02:00
Yoan Blanc 3d96145ea5
feat: docker/docker/pkg/term has been deprecated in favor of moby/term
See https://github.com/moby/moby/pull/40825

Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
2022-06-26 15:35:27 +02:00
Seth Hoenig 636368d937 deps: remove replace statement for go-textseg 2022-06-25 17:21:54 +00:00
Seth Hoenig 9467bc9eb3 api: enable selecting subset of services using rendezvous hashing
This PR adds the 'choose' query parameter to the '/v1/service/<service>' endpoint.

The value of 'choose' is in the form '<number>|<key>', number is the number
of desired services and key is a value unique but consistent to the requester
(e.g. allocID).

Folks aren't really expected to use this API directly, but rather through consul-template
which will soon be getting a new helper function making use of this query parameter.

Example,

curl 'localhost:4646/v1/service/redis?choose=2|abc123'

Note: consul-templte v0.29.1 includes the necessary nomadServices functionality.
2022-06-25 10:37:37 -05:00
Seth Hoenig ead76333fd api: use testing.T.Setenv to set env vars in tests 2022-06-25 09:20:52 -05:00
Phil Renaud 2e6e95e78c
[ui] Reinstate Meta and Payload sections to Parameterized Child Jobs (#13473)
* Shift meta off job.definition and decodedPayload alias to passed arg

* Changelog
2022-06-24 15:03:08 -04:00
Seth Hoenig a5eab7c0f2 tests: update testify dependency 2022-06-24 15:39:21 +00:00
Seth Hoenig b7a8318eac
Merge pull request #13467 from hashicorp/f-purge-raft-v2
core: remove support for raft protocol version 2
2022-06-24 10:10:26 -05:00
Tim Gross 4368dcc02f
fix deadlock in plan_apply (#13407)
The plan applier has to get a snapshot with a minimum index for the
plan it's working on in order to ensure consistency. Under heavy raft
loads, we can exceed the timeout. When this happens, we hit a bug
where the plan applier blocks waiting on the `indexCh` forever, and
all schedulers will block in `Plan.Submit`.

Closing the `indexCh` when the `asyncPlanWait` is done with it will
prevent the deadlock without impacting correctness of the previous
snapshot index.

This changeset includes the a PoC failing test that works by injecting
a large timeout into the state store. We need to turn this into a test
we can run normally without breaking the state store before we can
merge this PR.

Increase `snapshotMinIndex` timeout to 10s.
This timeout creates backpressure where any concurrent `Plan.Submit`
RPCs will block waiting for results. This sheds load across all
servers and gives raft some CPU to catch up, because schedulers won't
dequeue more work while waiting. Increase it to 10s based on
observations of large production clusters.
2022-06-23 12:06:27 -04:00
Seth Hoenig 91e08d5e23 core: remove support for raft protocol version 2
This PR checks server config for raft_protocol, which must now
be set to 3 or unset (0). When unset, version 3 is used as the
default.
2022-06-23 14:37:50 +00:00
Michael Schurter 7b7c72b21d
docs: clarify total_escaped is just an optimization (#13460) 2022-06-22 11:39:56 -07:00
Derek Strickland 7d6a3df197
csi_hook: valid if any driver supports csi (#13446)
* csi_hook: valid if any driver supports csi volumes
2022-06-22 10:43:43 -04:00
Jason Paul Deland 1ed857266a
update hashistack demo for current versions of Terraform
Replace deprecated `template` block with `templatefile` function
2022-06-21 16:09:11 -04:00
Elijah Voigt 665b198968
Lob.com uses Nomad too! (#13295)
Lob.com has been ramping up our use of Nomad for ~6 months.
Now that we've started blogging about it we'd love to be on the _official_ list.
2022-06-21 09:10:08 -04:00
Derek Strickland 9de4d7367c
cli: fix detach handling (#13405)
Fix detach handling for:

- `deployment fail`
- `deployment promote`
- `deployment resume`
- `deployment unblock`
- `job promote`
2022-06-21 06:01:23 -04:00
Jeffrey Clark a97699221c
cni: add loopback to linux bridge (#13428)
CNI changed how to bring up the interface in v0.2.0.
Support was moved to a new loopback plugin.

https://github.com/containernetworking/cni/pull/121

Fixes #10014
2022-06-20 11:22:53 -04:00
Ted Behling b7ea463d0e
Update example license_path to match docs (#13374) 2022-06-20 09:04:02 -04:00
Derek Strickland a15cef689d
Improve Autoscaler overview (#13396)
Improve Autoscaler overview documentation.
2022-06-17 05:15:22 -04:00
Nick Wales 3a8c8250f4
Merge pull request #13401 from nickwales/tls_typo
Updates TLS documentation
2022-06-16 12:34:59 -05:00
Arthur Leclerc d98a9b1d72
docs: Fix typo (#13389) 2022-06-16 13:24:18 -04:00
Nick Wales c964ae0135
Updates TLS documentation 2022-06-16 12:15:40 -05:00
James Hu 7e3d21646d
Fix spelling error (#13397) 2022-06-16 12:41:49 -04:00
James Rasell f1f7c5040b
api: added sysbatch job type constant to match other schedulers. (#13359) 2022-06-16 11:53:04 +02:00
Joseph Martin 4aa96d5bfc
Return evalID if -detach flag is passed to job revert (#13364)
* Return evalID if `-detach` flag is passed to job revert
2022-06-15 14:20:29 -04:00
Charlie Voiselle a5045b3f0f
Quote assignees value to fix dependabot.yaml parsing error (#13372) 2022-06-14 15:07:52 -04:00
Tim Gross 12d87c040c
fixup changelog entry for backported regression fix (#13370)
The changelog entry for #13340 indicated it was an improvement. But on
discussion, it was determined that this was a workaround for a
regression. Update the changelog to make this clear.
2022-06-14 14:33:39 -04:00
Luiz Aoqui 6598567725
docs: create volume spec page (#13353)
In addition to jobs, there are other objects in Nomad that have a
specific format and can be provided to commands and API endpoints.

This commit creates a new menu section to hold the specification for
volumes and update the command pages to point to the new centralized
definition.

Redirecting the previous entries is not possible with `redirect.js`
because they are done server-side and URL fragments are not accessible
to detect a match. So we provide hidden anchors with a link to the new
page to guide users towards the new documentation.

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2022-06-14 14:08:25 -04:00
Luiz Aoqui 5adec31cea
ci: remove step that generates GO_LDFLAGS (#13314)
These flags were not being used because GNUmakefile overwrites them with
another value. We also don't want to set `-s -w` since they remove
information that is important for production debug.

In other projects this variable is used to override the default `-dev`
prerelease that is set even if `VersionPrerelease` is empty, but in
Nomad this check is never actually done because this conditional in
`version/version.go` is always false:

```go
func GetVersion() *VersionInfo {
  // ...
  rel := VersionPrerelease
  // ...
  if GitDescribe == "" && rel == "" && VersionPrerelease != "" {
    rel = "dev"
  }
  // ...
}
```

This seems like some leftover from a previous release process, but I
decided the leave the code as is.
2022-06-14 12:36:15 -04:00
Luiz Aoqui 5af0c33bf8
website: fix redirects with fragments (#13354)
* website: fix redirects with fragments

Vercel redirects don't support fragments in relative destination paths,
so an absolute URL must be specified instead.

* website: fix Vercel redirect documentation link
2022-06-14 11:27:34 -04:00
Tim Gross 41f0fe97d0
client: wait for alloc create index when deriving vault token (#12396) 2022-06-14 10:22:31 -04:00
Grant Griffiths 99896da443
CSI: make plugin health_timeout configurable in csi_plugin stanza (#13340)
Signed-off-by: Grant Griffiths <ggriffiths@purestorage.com>
2022-06-14 10:04:16 -04:00
Michael Schurter f41ea0e5dc
docs: explain behavior of system gc command (#13342) 2022-06-13 09:54:23 +02:00
Derek Strickland 5ebd06a8f9
template: improve default language for max_stale and wait (#13334)
* template: improve default language for max_stale and wait

Co-authored-by: Michael Schurter <mschurter@hashicorp.com>
2022-06-10 14:34:25 -04:00
Daniel Rossbach 8c52c03c8c
qemu driver: Add option to configure drive_interface (#11864) 2022-06-10 10:03:51 -04:00
Seth Hoenig 0443a3b8c1
Merge pull request #13330 from hashicorp/b-windows-go-path-order
build: rearrange go path order on windows
2022-06-10 08:06:25 -05:00
Luiz Aoqui e8b788b372
changelog: add entry for #12961 (#13318) 2022-06-10 09:04:00 -04:00
Seth Hoenig 82e71b5b1b build: rearrange go path order on windows
If PATH comes first, an older version of Go is used that cannot install
dependencies that use features of newer versions of Go, which we just
installed.
2022-06-10 07:41:12 -05:00
Raffaele Di Fazio 66938e0ef0
Update supplement.mdx with the right GitHub spelling (#13326) 2022-06-10 11:46:19 +02:00
Seth Hoenig 2d554a6429
Merge pull request #13308 from hashicorp/f-generic-helpers
helpers: provide a few generic helper functions
2022-06-09 13:08:37 -05:00
Seth Hoenig c9a9cef9ae helpers: provide a few generic helper functions
This PR deprecates some functions in favor of generic alternatives.

The new functions are compatible only with Nomad v1.4+.

The old functions (nor their use) should not be removed until Nomad v1.6+.
2022-06-09 10:43:54 -05:00
Tim Gross 9d5523a72d
CSI: skip node unpublish on GC'd or down nodes (#13301)
If the node has been GC'd or is down, we can't send it a node
unpublish. The CSI spec requires that we don't send the controller
unpublish before the node unpublish, but in the case where a node is
gone we can't know the final fate of the node unpublish step.

The `csi_hook` on the client will unpublish if the allocation has
stopped and if the host is terminated there's no mount for the volume
anyways. So we'll now assume that the node has unpublished at its
end. If it hasn't, any controller unpublish will potentially hang or
error and need to be retried.
2022-06-09 11:33:22 -04:00
phreakocious 94a78597d2
Add guest_agent config option for QEMU driver (#12800)
Add boolean 'guest_agent' config option for QEMU driver, which will
create the socket file for the QEMU Guest Agent in the task dir when
enabled.
2022-06-09 09:21:38 -04:00
Derek Strickland 34dea90d7a
docker: update images to reference hashicorpdev Docker organization (#12903)
docker: update images to reference hashicorpdev dockerhub organization
generate job_init.bindata_assetfs.go

Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
2022-06-08 15:06:00 -04:00
Derek Strickland 13ea5ae87a
consul-template: Add fault tolerant defaults (#13041)
consul-template: Add fault tolerant defaults

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2022-06-08 14:08:25 -04:00
Shantanu Gadgil 43d8baace0
heartbeat_grace is a server parameter (#13288)
`heartbeat_grace` is a `server` parameter, not a `client` parameter.
2022-06-08 10:49:23 -04:00
dependabot[bot] 8eaef3eafb
build(deps): bump node-fetch in /scripts/screenshots/src (#11908)
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-08 10:48:36 -04:00