Commit Graph

21357 Commits

Author SHA1 Message Date
Mahmood Ali
b294f6353a add a note about node connection failure and fallback 2021-05-25 14:24:24 -04:00
Mahmood Ali
a15a61759e 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
Mahmood Ali
ab4b42f4f4 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
b774accc43 e2e: stop suppressing unexpected EOF errors 2021-05-24 13:35:08 -04:00
Luiz Aoqui
3c2f1d1e5d Display confirmation message on 'nomad volume delete' and 'nomad volume deregister' 2021-05-24 12:02:55 -04:00
Tim Gross
e2108678b5 changelog: add missing GH link 2021-05-24 11:52:18 -04:00
Tim Gross
479b4f634d 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
9135b42903 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
97af3e9a4c 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
4f57e06957 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
51073e51c8 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
b01416258e 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
1a974d0dd2 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
8e91f6f013 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
6b083c20c8 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
17ff991a49 docs: fix jobspec hcl2 locals example. 2021-05-21 15:20:46 +02:00
Grant Griffiths
771aad241f Add new volume commands to overview page 2021-05-21 07:50:57 -04:00
Mahmood Ali
97a0256680 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
1e414a5da1 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
90da87f6e6 (demo) -> [demo] 2021-05-19 16:30:23 -04:00
mrspanishviking
674ae4b3f1 docs: fixes broken links
Fixed broken links for the remote task driver ECS page
2021-05-19 12:56:08 -07:00
Daniel Durante
cb5a408f1a docs: fixes typo within volume registration page 2021-05-19 08:36:38 -04:00
Tim Gross
e6c4a75bcf 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
b32da80e78 Update alert-banner.js 2021-05-18 13:13:00 -04:00
Tim Gross
36f17285dd Merge pull request #10615 from hashicorp/docs-merge-from-release
merge from release
2021-05-18 13:04:55 -04:00
Tim Gross
aff3a59d17 fix version to be 'dev' 2021-05-18 13:04:35 -04:00
Tim Gross
b685236f05 Merge branch 'release-1.1.0' into main 2021-05-18 13:00:48 -04:00
Mahmood Ali
150195fcc7 Remove 1.1.0 RC merchandising (#10614) 2021-05-18 12:47:04 -04:00
Tim Gross
7deebd00c7 release 1.1.0: bump version and changelog info 2021-05-18 11:56:19 -04:00
Seth Hoenig
707138dfcd Merge pull request #10612 from hashicorp/docs-cl-fmt
docs: run changelogfmt
2021-05-18 09:17:50 -06:00
Seth Hoenig
8a0f54dc46 docs: run changelogfmt 2021-05-18 09:15:55 -06:00
Mike Wickett
b497705920 patch images (#10607) 2021-05-18 11:14:09 -04:00
mrspanishviking
9f76bdf75f Merge pull request #10610 from hashicorp/license-documentation-update
docs: update enterprise license page
2021-05-18 07:48:44 -07:00
mrspanishviking
43201cb4c7 docs: update enterprise license page
Added a link to the enterprise license tutorial and updated the trial link to use the recommended marketing url.
2021-05-18 07:25:54 -07:00
Tim Gross
bfa8f90ba0 e2e: update TF lockfile 2021-05-18 09:35:57 -04:00
Tim Gross
9aef40eaa6 remove unused dist/ directory
The `dist/` directory is unmaintained and gets out of sync with the Linux
packages that we distribute and the documentation found in the Learn
Guides. We even have upstart files for a distro that is out of support!
Remove this directory so that users are not confused.
2021-05-18 09:35:51 -04:00
Jimmy Merritello
c2709e7c3c Add HashiConf alert banner data (#10606) 2021-05-17 15:36:23 -05:00
Nomad Release Bot
4cdb4e494f remove generated files 2021-05-17 20:23:28 +00:00
Nomad Release Bot
f99f1e27bb Release v1.1.0 2021-05-17 20:23:21 +00:00
Bram Vogelaar
56934f9638 Update nomad.service
While working on voxpupuli/puppet-nomad/pull/50 we observed that the released version of this file and the file in this repo are not in sync. This PR brings the systemd service file in sync with what is currently packaged into the rpm and deb packages as released in the HashiCorp repositories. I am not sure how/where to update the  [deployment guide](https://learn.hashicorp.com/tutorials/nomad/production-deployment-guide-vm-with-consul#configure-systemd)
2021-05-17 15:45:03 -04:00
Ahmed
7896c42f72 Update service.mdx 2021-05-17 15:41:50 -04:00
Nomad Release bot
2678c3604b Generate files for 1.1.0 release 2021-05-17 19:41:41 +00:00
Tim Gross
f0856ab526 release version and date 2021-05-17 15:28:42 -04:00
Seth Hoenig
2f924a9df7 Merge pull request #10600 from hashicorp/f-exec-allow_caps
drivers/exec+java: reduce default set of linux capabilities
2021-05-17 15:23:22 -04:00
Seth Hoenig
3f34f936bb Merge pull request #10600 from hashicorp/f-exec-allow_caps
drivers/exec+java: reduce default set of linux capabilities
2021-05-17 13:11:04 -06:00
Seth Hoenig
845a3d3cdc docs: minor wording tweaks + cl 2021-05-17 12:52:52 -06:00
Seth Hoenig
595cef8136 drivers/exec: pass capabilities through executor RPC
Add capabilities to the LaunchRequest proto so that the
capabilities set actually gets plumbed all the way through
to task launch.
2021-05-17 12:37:40 -06:00
Seth Hoenig
683751ddd6 deps: update go mod tidy
Looks like we no longer need a package.
2021-05-17 12:37:40 -06:00
Seth Hoenig
17ec5a5aa8 drivers: fixup linux version dependent test cases
The error output being checked depends on the linux caps supported
by the particular operating system. Fix these test cases to just
check that an error did occur.
2021-05-17 12:37:40 -06:00
Seth Hoenig
7245ac3fc5 docs: update docs for linux capabilities in exec/java/docker drivers
Update docs for allow_caps, cap_add, cap_drop in exec/java/docker driver
pages. Also update upgrade guide with guidance on new default linux
capabilities for exec and java drivers.
2021-05-17 12:37:40 -06:00