Commit Graph

16111 Commits

Author SHA1 Message Date
Seth Hoenig
06eff9dbad Merge pull request #6447 from hashicorp/contributing-doc-tweaks
contributing: fix typo & append RPC checklist
2019-10-08 14:54:56 -05:00
Seth Hoenig
0fe14e4681 contributing: fix typo & append RPC checklist 2019-10-08 19:28:35 +00:00
Michael Schurter
32faf94802 Merge pull request #6443 from hashicorp/docs-jobspec-checklist
docs: add sidebar to jobspec checklist
2019-10-08 12:27:28 -07:00
Buck Doyle
e6c66354d0 UI: Update to Ember 3.8 LTS (#5968) 2019-10-08 13:44:19 -05:00
Michael Schurter
418ec80e41 Merge pull request #6446 from hashicorp/revert-6445-revert-6395-b-missing-vault-sercret
Revert "Revert "Use joint context to cancel prestart hooks""
2019-10-08 11:35:34 -07:00
Michael Schurter
43909b1374 Revert "Revert "Use joint context to cancel prestart hooks"" 2019-10-08 11:34:09 -07:00
Michael Schurter
eb8aba3d80 Merge pull request #6445 from hashicorp/revert-6395-b-missing-vault-sercret
Revert "Use joint context to cancel prestart hooks"
2019-10-08 11:28:18 -07:00
Michael Schurter
680e30457f Revert "Use joint context to cancel prestart hooks" 2019-10-08 11:27:08 -07:00
Michael Schurter
ddd8a92302 docs: add sidebar to jobspec checklist 2019-10-08 10:55:53 -07:00
Mahmood Ali
7dc86711e6 Merge pull request #6442 from hashicorp/b-alloc-namespace-check
acl: check ACL against object namespace
2019-10-08 13:26:38 -04:00
Mahmood Ali
7a38784244 acl: check ACL against object namespace
Fix a bug where a millicious user can access or manipulate an alloc in a
namespace they don't have access to.  The allocation endpoints perform
ACL checks against the request namespace, not the allocation namespace,
and performs the allocation lookup independently from namespaces.

Here, we check that the requested can access the alloc namespace
regardless of the declared request namespace.

Ideally, we'd enforce that the declared request namespace matches
the actual allocation namespace.  Unfortunately, we haven't documented
alloc endpoints as namespaced functions; we suspect starting to enforce
this will be very disruptive and inappropriate for a nomad point
release.  As such, we maintain current behavior that doesn't require
passing the proper namespace in request.  A future major release may
start enforcing checking declared namespace.
2019-10-08 12:59:22 -04:00
Mahmood Ali
30331900b4 Merge pull request #6440 from hashicorp/docs-release-096
Update website and changelog with 0.9.6
2019-10-08 12:56:27 -04:00
Mahmood Ali
e59cc7ce90 Merge pull request #6441 from hashicorp/b-agent-token
Redact replication tokens in /agent/self
2019-10-08 12:55:45 -04:00
Mahmood Ali
f0e2e23491 update CHANGELOG with 0.9.6 changes 2019-10-08 12:50:53 -04:00
Mahmood Ali
dad9ba9dea website: Publish release 0.9.6 2019-10-08 12:48:05 -04:00
Charlie Voiselle
9882de1df7 Merge pull request #6435 from hashicorp/doc-host-volume-update
Docs: Updated Host Volumes guide
2019-10-08 09:13:09 -04:00
Charlie Voiselle
c209eecaf4 Updated Host Volumes guide
Added read_only to highlight them
Style updates
2019-10-07 14:17:30 -04:00
Omar Khawaja
7b08e19f72 Upgrade Nomad terraform directory for TF 0.12+ (#6424)
* update

* fix error

* convert server ips in list of string and loop through for output

* drop the for loop in outputs and keep the join command

* switched to TF 0.12 splat expression
2019-10-07 12:43:42 -04:00
Buck Doyle
550e1b1a1e 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
17f659e579 docs: Add missing double-quote (#6418)
The missing quote broke syntax highlighting.
2019-10-02 19:58:10 -05:00
Omar Khawaja
7adbf453c2 specify token given to consul template as periodic and orphan (#6148) 2019-10-02 12:52:10 -04:00
Nick Ethier
56fb3de0ed 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
e779d5ba65 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
149578ca1e executor: rename wrapNetns to withNetworkIsolation 2019-09-30 21:38:31 -04:00
Drew Bailey
12be12020e 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
e0dbbb0950 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
8ee9fe623d 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
e6ce6d2c2b comment wrapNetns 2019-09-30 12:06:52 -04:00
Nick Ethier
159b911820 executor: removed unused field from exec_utils.go 2019-09-30 11:57:34 -04:00
Nick Ethier
2f16eb9640 executor: run exec commands in netns if set 2019-09-30 11:50:22 -04:00
Nick Ethier
02d7b4dbf3 Merge pull request #6397 from shantanugadgil/patch-1
clarify rhel/centos and beta1
2019-09-30 10:54:06 -04:00
Preetha Appan
3aca8dd829 clarify index starting value for blocking queries 2019-09-30 09:46:42 -05:00
Buck Doyle
a37d45223a 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
02dfdb0fd9 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
Mahmood Ali
f16632b40e 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
9aa5a63074 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
a8e6c2845f 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
d94e301219 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
96abf56a52 use RequestNamespace(), the canonical way to get namespace 2019-09-27 07:40:58 -04:00
Mahmood Ali
19e79f1c8f 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
38cb49dd3e remove redundant changelog entries 2019-09-26 15:47:45 -04:00
Lang Martin
976483a481 CHANGELOG remove raft proto 3 update announcement 2019-09-26 15:04:37 -04:00
Tim Gross
db99791f5f doc: clarify driver support for netns/connect (#6357) 2019-09-26 14:50:06 -04:00
Buck Doyle
7fcfdab316 UI: Update Mirage to 1.1.2 (#6166) 2019-09-26 13:47:07 -05:00
Lang Martin
dbd1488ac6 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
a63bf5b595 docs: autopilot guide additional raft proto upgrade documentation 2019-09-26 13:59:59 -04:00
Buck Doyle
e3d8e73124 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
0b9a345d3b 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
053a1001f2 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
a7923c3ed2 doc: clarify command path requirements for exec 2019-09-25 16:37:45 -04:00