Commit Graph

19977 Commits

Author SHA1 Message Date
Mahmood Ali
73df83fffd Custom message when job file is HCL2 incompatible
Use a custom message when the job file is a valid HCL1 but no longer
valid under HCL 2 syntax.
2020-11-10 14:56:20 -05:00
Michael Schurter
e8b88647b5 Merge pull request #9305 from hashicorp/go-1.15.4
go: update from 1.15.1 to 1.15.4
2020-11-10 10:34:43 -08:00
Mahmood Ali
669f9cbcbe Merge pull request #9304 from hashicorp/b-legacy-executors-are-executors
Legacy executors are executors after all
2020-11-10 12:54:03 -05:00
Mahmood Ali
dd7b6f0ec2 update changelog
[ci skip]
2020-11-10 12:50:34 -05:00
Kris Hicks
b3825e74b5 protos: Update .proto files not to use Go package name (#9301)
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`.
2020-11-10 08:42:35 -08:00
Michael Schurter
645dd1b4c6 docs: add go upgrade to changelog 2020-11-10 08:38:05 -08:00
Michael Schurter
c1dc510335 go: update from 1.15.1 to 1.15.4
1.15.5 is due in a couple days but we may release before then.
2020-11-10 08:35:25 -08:00
Mahmood Ali
5847b93c94 Legacy executors are executors after all
This fixes a bug where pre-0.9 executors fail to recover after an
upgrade.

The bug is that legacyExecutorWrappers didn't get updated with
ExecStreaming function, and thus failed to implement the Executor
function. Sadly, this meant that all recovery attempts fail, as the
runtime check in
b312aacbc9/drivers/shared/executor/utils.go (L103-L110)
.
2020-11-10 10:20:07 -05:00
Ryan Oaks
b312aacbc9 Remove Netlify config 2020-11-10 09:57:14 -05:00
Seth Hoenig
76328b9935 Merge pull request #9299 from hashicorp/b-detect-unloaded-kmod
client/fingerprint: detect unloaded dynamic bridge kernel module
2020-11-10 08:24:28 -06:00
Mahmood Ali
11b968c7cb Merge pull request #9298 from hashicorp/f-hcl2-localsvars
HCL2: Variables and Locals
2020-11-09 16:44:37 -05:00
Mahmood Ali
c2a6a6da80 use a constructor to initialize job config 2020-11-09 16:27:22 -05:00
Mahmood Ali
21be890256 clarify test 2020-11-09 16:24:22 -05:00
Mahmood Ali
147c8e12c2 clarify variable references 2020-11-09 16:23:09 -05:00
Luiz Aoqui
801e93f4e1 Merge pull request #9300 from hashicorp/changelog-for-job-scale-bug
add CHANGELOG entry for #9296
2020-11-09 15:49:05 -05:00
Luiz Aoqui
f37d4d7f25 add CHANGELOG entry for #9296 2020-11-09 15:26:38 -05:00
Seth Hoenig
3ad75f0c04 docs: add changelog entry 2020-11-09 14:16:33 -06:00
Luiz Aoqui
6881346f12 Merge pull request #9296 from hashicorp/b-remove-namespace-from-scale-request
Remove Namespace field from JobScaleRequest
2020-11-09 15:13:33 -05:00
Mahmood Ali
62ee73316e Update variable interpolation tests 2020-11-09 15:03:17 -05:00
Mahmood Ali
dda76b2e03 Start accepting input variable files as CLI arguments 2020-11-09 15:02:58 -05:00
Mahmood Ali
a2dff8ed1e Parse variable files 2020-11-09 15:02:21 -05:00
Mahmood Ali
5a784f43a3 Start using the new jobspec2 API 2020-11-09 15:01:31 -05:00
Mahmood Ali
878b3f82fe Restructure Variables and Locals
This reimplements the handling of Variables and Locals in HCL2 config.

This change supports declaring variables and locals, with defaults.
2020-11-09 14:58:57 -05:00
Seth Hoenig
52cef27176 client/fingerprint: detect unloaded dynamic bridge kernel module
In Nomad v0.12.0, the client added additional fingerprinting around the
presense of the bridge kernel module. The fingerprinter only checked in
`/proc/modules` which is a list of loaded modules. In some cases, the
bridge kernel module is builtin rather than dynamically loaded. The fix
for that case is in #8721. However we were still missing the case where
the bridge module is dynamically loaded, but not yet loaded during the
startup of the Nomad agent. In this case the fingerprinter would believe
the bridge module was unavailable when really it gets loaded on demand.

This PR now has the fingerprinter scan the kernel module dependency file,
which will contain an entry for the bridge module even if it is not yet
loaded.

In summary, the client now looks for the bridge kernel module in
 - /proc/modules
 - /lib/modules/<kernel>/modules.builtin
 - /lib/modules/<kernel>/modules.dep

Closes #8423
2020-11-09 13:56:14 -06:00
Mahmood Ali
36ad151609 copy variables files from Packer 2020-11-09 14:35:02 -05:00
Tim Gross
3854916a72 e2e: Windows provisioning improvements (#9246)
Small changes to the Windows 2016 Packer build for debuggability of
provisioning:

* improve verbosity of powershell error handling
* remove unused "tools" installation
* use ssh communicator for Packer to improve Packer build times and eliminate
  deprecated winrm remote access (unavailable from current macOS)
2020-11-09 13:29:40 -05:00
Luiz Aoqui
b9991a3f2b remove Namespace field from JobScaleRequest 2020-11-09 13:02:05 -05:00
Byron Wolfman
9609addb3d Document correct default nomad port (#9290) 2020-11-06 16:37:36 -05:00
Drew Bailey
c77f81ee38 re-run make sync from earlier event_stream changes (#9291) 2020-11-06 16:36:15 -05:00
Drew Bailey
5718115938 append custom path to custom_config_files (#9289)
* append custom path to custom_config_files

* remove config_path variable
2020-11-06 11:16:13 -05:00
James Rasell
19c772932b docs: add recommendation CLI documentation. (#9288)
Co-authored-by: Chris Baker <1675087+cgbaker@users.noreply.github.com>
2020-11-06 16:30:24 +01:00
James Rasell
3fe55a4f2d Merge pull request #9272 from hashicorp/f-recommendation-cli
cli: add recommendation commands.
2020-11-06 16:29:57 +01:00
Kris Hicks
b1f9d2221f api/testutil: Use fast fingerprint timeout in dev mode tests (#9285) 2020-11-06 07:01:27 -08:00
Buck Doyle
7b9f8b5cb1 Fix job detail crash when recommendations off (#9269)
Without this, visiting any job detail page on Nomad OSS would crash with
an error like this:

Error: Ember Data Request GET
/v1/recommendations?job=ping%F0%9F%A5%B3&namespace=default returned a
404 Payload (text/xml)

The problem was twofold.

1. The recommendation ability didn’t include anything about checking
whether the feature was present. This adds a request to
/v1/operator/license on application load to determine which features are
present and store them in the system service. The ability now looks for
'Dynamic Application Sizing' in that feature list.

2. Second, I didn’t check permissions at all in the job-fetching or job
detail templates.
2020-11-06 08:21:38 -06:00
James Rasell
0cd4d75aab cli: add recommendation commands.
Adds new CLI commands for applying, dismissing and detailing Nomad
recommendations under a new top level recommendation command.
2020-11-06 11:16:24 +01:00
Michael Lange
88a7458488 Merge pull request #9271 from hashicorp/b-ui/missing-warning-in-stories
UI: Update lingering instances of the old warning icon in stories
2020-11-05 13:56:07 -08:00
Michael Lange
d2b6f67159 Merge pull request #9270 from hashicorp/f-ui/topo-viz-help-states
UI: Topo viz error state and no data polling notice
2020-11-05 13:50:43 -08:00
Kris Hicks
f2d2669f97 events: Use single eventsFromChanges func (#9281) 2020-11-05 13:06:52 -08:00
Chris Baker
b11d067584 Merge pull request #9278 from hashicorp/b-9268-all-namespace-allocs-acl
fix ACL bugs in listing allocs across all namespaces
2020-11-05 14:59:47 -06:00
Nick Ethier
60838c94f8 ar/groupservice: remove drivernetwork (#9233)
* ar/groupservice: remove drivernetwork

* consul: allow host address_mode to accept raw port numbers

* consul: fix logic for blank address
2020-11-05 15:00:22 -05:00
Kris Hicks
5e34efadab Fix handling of deleted change (#9280) 2020-11-05 11:06:41 -08:00
Drew Bailey
be2024ab90 Api/event stream payload values (#9277)
* Get concrete types out of dynamic payload

wip

pull out value setting to func

* Add TestEventSTream_SetPayloadValue

Add more assertions

use alias type in unmarshalJSON to handle payload rawmessage

shorten unmarshal and remove anonymous wrap struct

* use map structure and helper functions to return concrete types

* ensure times are properly handled

* update test name

* put all decode logic in a single function

Co-authored-by: Kris Hicks <khicks@hashicorp.com>
2020-11-05 13:04:18 -05:00
Mark Lodato
d9bd87760c Fix typo in batch processing use case (#9184)
I believe there’s a typo where “workloads” was changed to “jobs” but the original word wasn’t removed. Or maybe it’s the other way around. But currently there is an orphaned one-word sentence.
2020-11-05 13:01:50 -05:00
Jimmy Merritello
472ea82b69 Bump HSM version (#9264) 2020-11-05 11:47:57 -06:00
Chris Baker
4aeb890057 updated Allocation.List to properly handle ACL checking for namespace=* 2020-11-05 17:26:33 +00:00
Kris Hicks
3926317613 Refactor GenericEventsFromChanges (#9279) 2020-11-05 09:06:08 -08:00
Chris Baker
c5fe588181 documenting test for #9268 2020-11-05 16:19:55 +00:00
Drew Bailey
4daf5a43f8 make sync to update event stream api (#9274) 2020-11-05 10:06:56 -05:00
Ricky Grassmuck
64d0113751 Update Cinder CSI example docs (#9267) 2020-11-05 08:19:16 -05:00
Michael Lange
a69eb82cfc Show dismissable no live updating notice on the topology page 2020-11-04 19:25:12 -08:00