Commit Graph

21425 Commits

Author SHA1 Message Date
Seth Hoenig b548cf6816 client/fingerprint/consul: refactor the consul fingerprinter to test individual attributes
This PR refactors the ConsulFingerprint implementation, breaking individual attributes
into individual functions to make testing them easier. This is in preparation for
additional extractors about to be added. Behavior should be otherwise unchanged.

It adds the attribute consul.sku, which can be used to differentiate between Consul
OSS vs Consul ENT.
2021-06-03 12:48:39 -05:00
Tim Gross bc6278ca08 docs: fix broken links in `nomad csi snapshot` commands 2021-06-03 11:25:30 -04:00
dependabot[bot] 8a8728dbc2
build(deps): bump ws from 6.2.1 to 6.2.2 in /website (#10691)
Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/commits)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-03 10:23:19 -04:00
Jeff Escalante 57d0387e27
rotate algolia api key (#10662) 2021-06-03 10:22:16 -04:00
Tim Gross 99380aa3f0 docs: clarify default `check.initial_status` behavior 2021-06-03 10:02:25 -04:00
Tim Gross 37fa6850d2 scheduler: test for reconciler's in-place rollback behavior
The reconciler has some complicated behavior when there are already running
allocations from a previous version of the job that we want to keep, as
happens during a rollback. Document this behavior with a test.
2021-06-03 10:02:19 -04:00
Tim Gross dbd493d26f docs: changelog entries for 1.1.1 and backports 2021-06-03 08:50:06 -04:00
Kendall Strautman abf02f4fcb
chore: updates text-split-with-logo-grid package (#10690) 2021-06-02 17:00:55 -07:00
Tim Gross e9777a88ce plan applier: add trace-level log of plan
The plans generated by the scheduler produce high-level output of counts on each
evaluation, but when debugging scheduler issues it'd be nice to have a more
detailed view of the resulting plan. Emitting this log at trace minimizes the
overhead, and producing it in the plan applyer makes it easier to find as it
will always be on the leader.
2021-06-02 10:25:23 -04:00
Tim Gross 7a55a6af16 leader: call eval log formatting lazily
Arguments to our logger's various write methods are evaluated eagerly, so
method calls in log parameters will always be called, regardless of log
level. Move some logger messages to the logger's `Fmt` method so that
`GoString` is evaluated lazily instead.
2021-06-02 09:59:55 -04:00
Kendall Strautman f0d36daff1 chore: updates alert-banner — hashiconf eu 2021-06-01 14:32:40 -07:00
Luiz Aoqui 139c5e8df9
e2e: fix terraform output environment command instruction (#10674) 2021-06-01 10:10:12 -04:00
mrspanishviking b73a848ec3
docs: added license faq 2021-05-27 13:30:17 -04:00
Grant Griffiths 3f41150fbb CSI snapshot list: do not shorten snapshot ID
Signed-off-by: Grant Griffiths <ggriffiths@purestorage.com>
2021-05-27 13:28:18 -04:00
Mahmood Ali d8de4e62bb
Merge pull request #10657 from hashicorp/b-alloc-exec-closing
Handle `nomad exec` termination events in order
2021-05-25 14:50:58 -04:00
Mahmood Ali dfb7874da5 add a note about node connection failure and fallback 2021-05-25 14:24:24 -04:00
Mahmood Ali 0853d48927
e2e: Spin clusters with custom url binaries (#10656)
Ease spinning up a cluster, where binaries are fetched from arbitrary
urls.  These could be CircleCI `build-binaries` job artifacts, or
presigned S3 urls.

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2021-05-25 13:47:39 -04:00
Mahmood Ali 2ebbffad12 exec: api: handle closing errors differently
refactor the api handling of `nomad exec`, and ensure that we process
all received events before handling websocket closing.

The exit code should be the last message received, and we ought to
ignore any websocket close error we receive afterwards.

Previously, we used two channels: one for websocket frames and another
for handling errors. This raised the possibility that we processed the
error before processing the frames, resulting into an "unexpected EOF"
error.
2021-05-25 11:19:42 -04:00
Tim Gross 9e23884c16 docs: changelog entry for 10539 2021-05-25 09:57:22 -04:00
Mahmood Ali 0f5539c382 exec: http: close websocket connection gracefully
In this loop, we ought to close the websocket connection gracefully when
the StreamErrWrapper reaches EOF.

Previously, it's possible that that we drop the last few events or skip sending
the websocket closure. If `handler(handlerPipe)` returns and `cancel` is called,
before the loop here completes processing streaming events, the loop exits
prematurely without propagating the last few events.

Instead here, the loop continues until we hit `httpPipe` EOF (through
`decoder.Decode`), to ensure we process the events to completion.
2021-05-24 13:37:23 -04:00
Mahmood Ali 3b7c5ff46e e2e: stop suppressing unexpected EOF errors 2021-05-24 13:35:08 -04:00
Luiz Aoqui c1ef539fa3
Display confirmation message on 'nomad volume delete' and 'nomad volume deregister' 2021-05-24 12:02:55 -04:00
Tim Gross 258352957a changelog: add missing GH link 2021-05-24 11:52:18 -04:00
Tim Gross 82fe7300e5
cli: improve wildcard namespace prefix matches (#10648)
When a wildcard namespace is used for `nomad job` commands that support prefix
matching, avoid asking the user for input if a prefix is an unambiguous exact
match so that the behavior is similar to the commands using a specific or
unset namespace.
2021-05-24 11:38:05 -04:00
Tim Gross 41d364ad81 docs: improve documentation for CSI create/register mount_options
Adds clarification to `nomad volume create` commands around how the `volume`
block in the jobspec overrides this behavior. Adds missing section to `nomad
volume register` and to example volume spec for both commands.
2021-05-24 11:13:58 -04:00
Ryan Sundberg d43c5f98a5 CSI: Include MountOptions in capabilities sent to CSI for all RPCs
Include the VolumeCapability.MountVolume data in
ControllerPublishVolume, CreateVolume, and ValidateVolumeCapabilities
RPCs sent to the CSI controller. The previous behavior was to only
include the MountVolume capability in the NodeStageVolume request, which
on some CSI implementations would be rejected since the Volume was not
originally provisioned with the specific mount capabilities requested.
2021-05-24 10:59:54 -04:00
Tim Gross 084a46e0e5
agent: surface websocket errors in logs
The websocket interface used for `alloc exec` has to silently drop client send
errors because otherwise those errors would interleave with the streamed
output. But we may be able to surface errors that cause terminated websockets
a little better in the HTTP server logs.
2021-05-24 09:46:45 -04:00
James Rasell b2ef3acff5
Merge pull request #10647 from hashicorp/b-fix-nomad-event-endpoint-tests
events: fix event endpoint tests to ignore heartbeats.
2021-05-24 14:40:12 +02:00
Florian Apolloner 337cb4156d Removed unsupported options from volume create
Volume creation doesn't support the context (this would only be used for register)
2021-05-24 08:29:42 -04:00
James Rasell db4e2541bd
events: fix event endpoint tests to ignore heartbeats.
seems when this PR was raised, the Nomad CI provider was having
availability issues meaning the test suite was not correctly run,
thus allowing broken tests into main. The PR itself exercised test
code which had not been hit before.

The particular problem is when identifying whether the event
received is a heartbeat; this was performed using standard Golang
conditionals. Unfortunately the operator == is not defined on byte
arrays, resulting in the check always returning false. To overcome
this issue the code now uses the bytes.Equal function to correctly
compare the data.
2021-05-24 10:28:19 +02:00
James Rasell bd68460532
Merge pull request #10634 from hashicorp/b-docs-fix-hcl2-locals-example
docs: fix jobspec hcl2 locals example.
2021-05-24 08:56:21 +02:00
Szabolcs Gelencsér fc97bd6acf
events: fix slow client connection to empty event stream (#10637)
* events: fix slow client connection to empty event stream

* doc: fix changelog of event stream connection init
2021-05-21 13:17:07 -04:00
James Rasell 99128e8601
docs: fix jobspec hcl2 locals example. 2021-05-21 15:20:46 +02:00
Grant Griffiths e8712d974a Add new volume commands to overview page 2021-05-21 07:50:57 -04:00
Mahmood Ali b518454bf8
cli: Handle nil MemoryMaxMB (#10620)
Handle when MemoryMaxMB is nil, as expected when a new 1.1.0 is hitting
a pre-1.1.0 Server.
2021-05-19 16:56:06 -04:00
mrspanishviking c3341b0798
Merge pull request #10627 from hashicorp/documentation-ecs-remote-task-driver
docs: fixes broken links
2021-05-19 13:40:43 -07:00
Charlie Voiselle f659197549
(demo) -> [demo] 2021-05-19 16:30:23 -04:00
mrspanishviking a53bc6130d
docs: fixes broken links
Fixed broken links for the remote task driver ECS page
2021-05-19 12:56:08 -07:00
Daniel Durante dc52c8c0e9 docs: fixes typo within volume registration page 2021-05-19 08:36:38 -04:00
Tim Gross 324be52991 docs: ensure definitions have anchors
Move the words being defined in the /docs/internal/architecture page to be
small headers so that they can be linked to with anchors from Learn guides and
other documentation location.
2021-05-18 15:05:11 -04:00
changli0617 a19fa702eb Update alert-banner.js 2021-05-18 13:13:00 -04:00
Tim Gross ebc691bb37
Merge pull request #10615 from hashicorp/docs-merge-from-release
merge from release
2021-05-18 13:04:55 -04:00
Tim Gross 93e8449f75 fix version to be 'dev' 2021-05-18 13:04:35 -04:00
Tim Gross 43db82f6c3 Merge branch 'release-1.1.0' into main 2021-05-18 13:00:48 -04:00
Mahmood Ali 36a3fe34e5
Remove 1.1.0 RC merchandising (#10614) 2021-05-18 12:47:04 -04:00
Tim Gross ddde007b66 release 1.1.0: bump version and changelog info 2021-05-18 11:56:19 -04:00
Seth Hoenig e0b92861ef
Merge pull request #10612 from hashicorp/docs-cl-fmt
docs: run changelogfmt
2021-05-18 09:17:50 -06:00
Seth Hoenig 81c5b0dc25 docs: run changelogfmt 2021-05-18 09:15:55 -06:00
Mike Wickett b7fc7c3d76
patch images (#10607) 2021-05-18 11:14:09 -04:00
mrspanishviking 38cee0c737
Merge pull request #10610 from hashicorp/license-documentation-update
docs: update enterprise license page
2021-05-18 07:48:44 -07:00