Commit Graph

16263 Commits

Author SHA1 Message Date
Mahmood Ali bb730d3ea7 api: declare websocket as a dependency
`github.com/gorilla/websocket` was declared in `vendor/vendor.json` but
not in the API go module manifest.
2019-10-04 11:57:29 -04:00
Mahmood Ali b77fd8654b cli: recover from client ACL lookup failures
This fixes a bug in the CLI handling of node lookup failures when
querying allocation and FS endpoints.

Allocation and FS endpoint are handled by the client; one can query the
relevant client directly, or query a server to have it forwarded
transparently to relevant client.  Querying the client directly is
benefecial to avoid loading servers with IO.

As an optimization, the CLI attempts to query the client directly, but
then falls back to using server forwarding path if it encounters network
or connection errors (e.g. clients are locked down or in a separate
inaccessible network).

Here, we fix a bug where if the CLI fails to find to lookup the client
details because it lacks ACL capability or other unexpected reasons, the
CLI will not go through fallback path.
2019-10-04 11:23:59 -04:00
Buck Doyle 5da134d074
UI: Change Mirage data to be stable in development (#6389)
This sets a default-but-query-configurable Faker seed in development,
via faker-seed. It also changes uses of Math.random to use Faker’s
randomness so auto-generated data remains stable in development.
2019-10-03 09:13:08 -05:00
Daniel Dreier 5d7b06e6ee docs: Add missing double-quote (#6418)
The missing quote broke syntax highlighting.
2019-10-02 19:58:10 -05:00
Michael Lange 9f671dda43 Copy changes from review 2019-10-02 16:54:38 -07:00
Omar Khawaja 073fbb2daa
specify token given to consul template as periodic and orphan (#6148) 2019-10-02 12:52:10 -04:00
Nick Ethier 0c19bf6f04
executor: run exec commands in netns if set (#6405)
executor: run exec commands in netns if set
2019-10-01 14:45:43 -04:00
Drew Bailey f4df5592df
Merge pull request #6395 from hashicorp/b-missing-vault-sercret
Use joint context to cancel prestart hooks
2019-10-01 07:07:17 -07:00
Nick Ethier 8b881d83d5
executor: rename wrapNetns to withNetworkIsolation 2019-09-30 21:38:31 -04:00
Drew Bailey 69eebcd241
simplify logic to check for vault read event
defer shutdown to cleanup after failed run

Co-Authored-By: Michael Schurter <mschurter@hashicorp.com>

update comment to include ctx note for shutdown
2019-09-30 11:02:14 -07:00
Drew Bailey 7565b8a8d9
Use joint context to cancel prestart hooks
fixes https://github.com/hashicorp/nomad/issues/6382

The prestart hook for templates blocks while it resolves vault secrets.
If the secret is not found it continues to retry. If a task is shutdown
during this time, the prestart hook currently does not receive
shutdownCtxCancel, causing it to hang.

This PR joins the two contexts so either killCtx or shutdownCtx cancel
and stop the task.
2019-09-30 10:48:01 -07:00
Preetha 0bf4a2ea38
Merge pull request #6404 from hashicorp/docs-nomad-index
clarify index starting value for blocking queries
2019-09-30 11:41:20 -05:00
Nick Ethier 5127caef11
comment wrapNetns 2019-09-30 12:06:52 -04:00
Nick Ethier 67ac161565
executor: removed unused field from exec_utils.go 2019-09-30 11:57:34 -04:00
Nick Ethier 6fd773eb88
executor: run exec commands in netns if set 2019-09-30 11:50:22 -04:00
Nick Ethier ddc9465629
Merge pull request #6397 from shantanugadgil/patch-1
clarify rhel/centos and beta1
2019-09-30 10:54:06 -04:00
Preetha Appan 1ca3fcca35 clarify index starting value for blocking queries 2019-09-30 09:46:42 -05:00
Buck Doyle 75aa2e36ee
UI: Change factories to be more dynamic (#6387)
I noticed while working on #6166 that some of the factory properties
that used Faker’s randomisation features are using their output
rather than a function that would call the randomiser. This means that
the randomisation happens once and the value is used for every model
generated by the factory. This wraps the randomiser calls in functions
so different models can have different values.
2019-09-30 09:44:22 -05:00
Shantanu Gadgil 05573a255c
clarify rhel/centos and beta1
Specify RHEL7, RHEL8, CentOS7, CentOS8
Specify beta1 for 0.10 (beta2 coming soon? 😉 )
2019-09-29 11:40:23 +05:30
Michael Lange 2b945370aa Add missing comma to fix the code-in-heading selectors 2019-09-27 19:27:39 -07:00
Michael Lange 6e061201f2 Screenshots for the securing ui guide 2019-09-27 19:27:38 -07:00
Michael Lange 089cadde3a Screenshots for the inspecting the cluster guide 2019-09-27 19:27:37 -07:00
Michael Lange 9c3b212b39 Screenshots for the operating a job guide 2019-09-27 13:21:06 -07:00
Michael Lange fd22b4a1dc Screenshots for the job submit guide 2019-09-27 13:21:05 -07:00
Michael Lange 31ec898b15 Image for the access the page 2019-09-27 13:21:04 -07:00
Michael Lange d9d72c3296 Swap out UI guide images 2019-09-27 13:21:03 -07:00
Michael Lange 6639189d04 Change resolution to neatly frame the UI 2019-09-27 13:21:02 -07:00
Michael Lange 3b90e82a2c Copy for the securing guide 2019-09-27 13:21:01 -07:00
Michael Lange 3e39d3872a Content for the inspecting the cluster page 2019-09-27 13:21:00 -07:00
Michael Lange 5d9c2f35a3 Content for the operating a job guide 2019-09-27 13:21:00 -07:00
Michael Lange 0b4c65b488 Edits and links for the submitting a job guide 2019-09-27 13:20:59 -07:00
Michael Lange d7261e20a8 Content for the submitting a job guide 2019-09-27 13:20:58 -07:00
Michael Lange b3cd3b095a Format line length 2019-09-27 13:20:57 -07:00
Michael Lange 692095996f New UI guides structure 2019-09-27 13:20:56 -07:00
Mahmood Ali 4a93081275
Merge pull request #6391 from hashicorp/b-ns-job-register-check
nomad: defensive check for namespaces in job registration call
2019-09-27 14:39:44 -04:00
Mahmood Ali bdccad567c
Merge pull request #6393 from hashicorp/r-ugorji-go-import-path
Fix hashicorp/go-msgpack import for golang 1.13
2019-09-27 12:27:38 -04:00
Mahmood Ali 4c548b9c75 Fix hashicorp/go-msgpack import
Golang 1.13 is pickier with importpaths and aliasing and fails
compilation currently.

Here, for go-msgpack dependency, we use upstream ugorji/go with a single
change
23165f7bc3
.

For consistency and to ease noticing descripency, I made ugorji/go and
hashicorp/go-msgpack reference the same sha.

This is a dependency management update and has no functional change to
product.
2019-09-27 09:08:30 -04:00
Tim Gross 9efca131be driver/java: pass task network isolation to executor
Without passing the network isolation configuration to the executor,
java tasks are not placed in the same network namespace as the other
processes in their task group, which breaks Consul Connect.
2019-09-27 08:26:54 -04:00
Mahmood Ali 674a457865 use RequestNamespace(), the canonical way to get namespace 2019-09-27 07:40:58 -04:00
Mahmood Ali e29ee4c400 nomad: defensive check for namespaces in job registration call
In a job registration request, ensure that the request namespace "header" and job
namespace field match.  This should be the case already in prod, as http
handlers ensures that the values match [1].

This mitigates bugs that exploit bugs where we may check a value but act
on another, resulting into bypassing ACL system.

[1] https://github.com/hashicorp/nomad/blob/v0.9.5/command/agent/job_endpoint.go#L415-L418
2019-09-26 17:02:47 -04:00
Mahmood Ali a9d93c52ba remove redundant changelog entries 2019-09-26 15:47:45 -04:00
Lang Martin ab7f4639e2 CHANGELOG remove raft proto 3 update announcement 2019-09-26 15:04:37 -04:00
Tim Gross 51438acbb0
doc: clarify driver support for netns/connect (#6357) 2019-09-26 14:50:06 -04:00
Buck Doyle 8950626c55
UI: Update Mirage to 1.1.2 (#6166) 2019-09-26 13:47:07 -05:00
Lang Martin 0648402150
Merge pull request #6373 from hashicorp/b-raft-proto-upgrade
raft protocol defaults to version 2
2019-09-26 14:33:09 -04:00
Lang Martin 3b4f11b8ac docs: autopilot guide additional raft proto upgrade documentation 2019-09-26 13:59:59 -04:00
Buck Doyle 1a47a11c95
UI: Restore proxy tag tests (#6360)
The recurring problem here was that sometimes the factories would
generate more than one task, and it was random whether the task
with the proxy task would be the first in the list. This ensures
that the proxy task is always first so the tests can run again.
2019-09-26 11:50:01 -05:00
Mahmood Ali 00c0be394d
Merge pull request #6386 from hashicorp/c-golang-1.12.10
Use golang 1.12.10
2019-09-26 12:03:31 -04:00
Mahmood Ali 916c6bdda4 Use golang to 1.12.10
To get fix for https://github.com/golang/go/issues/34540 .
2019-09-26 10:46:07 -04:00
Tim Gross 9703d3de3a doc: clarify command path requirements for exec 2019-09-25 16:37:45 -04:00