Commit Graph

13259 Commits

Author SHA1 Message Date
Mahmood Ali
f181f1a07a Wrap Vault API api errors for easing debugging 2018-11-20 17:10:54 -05:00
Mahmood Ali
88c1698ef5 Emit metric counters for Vault token and renewal failures 2018-11-20 17:10:54 -05:00
Mahmood Ali
05d9b39942 Set a 1s floor for Vault renew operation backoff 2018-11-20 17:10:54 -05:00
Mahmood Ali
feaf6214f9 Set User-Agent header when hitting Vault API 2018-11-20 17:10:54 -05:00
Preetha
084693ffe0 Merge pull request #4911 from hashicorp/add-circleci-master
Add CircleCI configuration for website build
2018-11-20 16:01:57 -06:00
Alvin Huang
b688f7de43 remove packer.json since CircleCI builds the site 2018-11-20 16:59:42 -05:00
Alvin Huang
926aa0994d add circleci website build 2018-11-20 16:59:34 -05:00
Preetha
582a52d100 Merge pull request #4857 from hashicorp/f-affinity-docs
docs for affinity
2018-11-20 14:17:28 -06:00
Preetha
afe4c61447 Update CHANGELOG.md 2018-11-20 14:16:37 -06:00
Mahmood Ali
f098c9ada3 Merge pull request #4903 from hashicorp/b-delete-versions-mod-while-iter
Fix a panic related to batch GC
2018-11-20 15:16:02 -05:00
Preetha
38e9d9a7d5 Merge pull request #4885 from hashicorp/f-update-consultemplate
Vendor update consul template
2018-11-20 14:15:14 -06:00
Michael Schurter
d213b1e778 changelog: mention #4904 2018-11-20 11:37:09 -08:00
Mahmood Ali
72df87b101 address review comments 2018-11-20 13:21:39 -05:00
Michael Schurter
206d98cf0d Remove committed test output and gitignore it 2018-11-20 10:16:03 -08:00
Michael Schurter
e8475fe86a Merge pull request #4904 from hashicorp/b-vault-panic
vault: fix panic by checking for nil secret
2018-11-20 12:09:35 -06:00
Charlie Voiselle
1f98eed8b0 Merge pull request #4905 from sevagh/fix-typo
Fix typo in GNUmakefile
2018-11-20 09:25:09 -05:00
Sevag Hanssian
0f211d11d5 webiste -> website 2018-11-19 18:50:42 -08:00
Mahmood Ali
10b073a81b add a missing no errorassertion 2018-11-19 21:44:00 -05:00
Mahmood Ali
cf51bc62e4 Fix a panic related to batch GC
`deleteJobVersions` does concurrent modifications to iterated items
while iterating, by deleting job versions while it's iterating on them,
2018-11-19 20:59:45 -05:00
Mahmood Ali
616ef214d9 Reproduce a panic related to batch GC
Test case that reproduces a panic with the following stacktrace:

```
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x1149715]

goroutine 35 [running]:
testing.tRunner.func1(0xc0001e2200)
	/usr/local/Cellar/go/1.11.2/libexec/src/testing/testing.go:792 +0x387
panic(0x167e400, 0x1c43a30)
	/usr/local/Cellar/go/1.11.2/libexec/src/runtime/panic.go:513 +0x1b9
github.com/hashicorp/nomad/vendor/github.com/hashicorp/go-immutable-radix.(*Iterator).Next(0xc0003a4080, 0x17f7ba0, 0x0, 0xc0002e74a0, 0xc0003a0510, 0xc0003a0530, 0xc0003a0530)
	/go/src/github.com/hashicorp/nomad/vendor/github.com/hashicorp/go-immutable-radix/iter.go:81 +0xa5
github.com/hashicorp/nomad/vendor/github.com/hashicorp/go-memdb.(*radixIterator).Next(0xc0003a0420, 0x1756059, 0xb)
	/go/src/github.com/hashicorp/nomad/vendor/github.com/hashicorp/go-memdb/txn.go:634 +0x2e
github.com/hashicorp/nomad/nomad/state.(*StateStore).deleteJobVersions(0xc00028f7d0, 0x2711, 0xc0002e7680, 0xc000392100, 0xc0003a4040, 0x0)
	/go/src/github.com/hashicorp/nomad/nomad/state/state_store.go:1130 +0x1a1
github.com/hashicorp/nomad/nomad/state.(*StateStore).DeleteJobTxn(0xc00028f7d0, 0x2711, 0x175334f, 0x7, 0xc000306810, 0x2f, 0xc000392100, 0x0, 0x0)
	/go/src/github.com/hashicorp/nomad/nomad/state/state_store.go:1102 +0x46c
github.com/hashicorp/nomad/nomad/state.TestStateStore_DeleteJobTxn_BatchDeletes.func1(0xc000392100, 0x1777ce0, 0xc000392100)
	/go/src/github.com/hashicorp/nomad/nomad/state/state_store_test.go:1705 +0x1a2
github.com/hashicorp/nomad/nomad/state.(*StateStore).WithWriteTransaction(0xc00028f7d0, 0xc0000d5e48, 0x0, 0x0)
	/go/src/github.com/hashicorp/nomad/nomad/state/state_store.go:3953 +0x79
github.com/hashicorp/nomad/nomad/state.TestStateStore_DeleteJobTxn_BatchDeletes(0xc0001e2200)
	/go/src/github.com/hashicorp/nomad/nomad/state/state_store_test.go:1703 +0x685
testing.tRunner(0xc0001e2200, 0x1777138)
	/usr/local/Cellar/go/1.11.2/libexec/src/testing/testing.go:827 +0xbf
created by testing.(*T).Run
	/usr/local/Cellar/go/1.11.2/libexec/src/testing/testing.go:878 +0x353
```
2018-11-19 20:58:32 -05:00
Michael Schurter
f5f5948203 vault: fix panic by checking for nil secret
Vault's RenewSelf(...) API may return (nil, nil). We failed to check if
secret was nil before attempting to use it.

RenewSelf:
e3eee5b4fb/api/auth_token.go (L138-L155)

Calls ParseSecret:
e3eee5b4fb/api/secret.go (L309-L311)

If anyone has an idea on how to test this I didn't see any options. We
use a real Vault service, so there's no opportunity to mock the
response.
2018-11-19 17:07:59 -08:00
Michael Lange
a1d5f127e3 Merge pull request #4860 from hashicorp/b-ui-allocation-detail-empty-state
UI: Allocation detail empty state
2018-11-19 12:43:39 -08:00
Michael Lange
122a8a12e8 Add an empty state to the allocation detail task list 2018-11-19 12:18:14 -08:00
Michael Lange
654611ea9a Merge pull request #4850 from hashicorp/f-ui-links-on-error-pages
UI: Escape hatch links on error pages
2018-11-19 12:17:36 -08:00
Omar Khawaja
c5a222bd19 change instrumented webserver job file (#4897) 2018-11-17 01:10:44 -05:00
Omar Khawaja
dce594bb6d clarification regarding Nomad client generating token vs retrieving (#4890) 2018-11-16 19:52:31 -05:00
Mahmood Ali
6b7953af21 Merge pull request #4884 from hashicorp/f-alloc-devices-cli
Report alloc device statistics in API and CLI
2018-11-16 18:04:54 -05:00
Mahmood Ali
551a13b7b6 show Device Stats header in alloc status 2018-11-16 17:34:37 -05:00
Mahmood Ali
d8d0a55ee4 Show stable order of device attributes 2018-11-16 17:34:37 -05:00
Mahmood Ali
fd49039f09 address review comments 2018-11-16 17:13:01 -05:00
Michael Schurter
b0dcbb7665 Merge pull request #4843 from hashicorp/b-driver-env
client: interpolate driver configurations
2018-11-16 12:45:43 -06:00
Preetha
07e31669ba Update CHANGELOG.md 2018-11-16 12:31:54 -06:00
Preetha
5003f51dc9 Merge pull request #4889 from hashicorp/f-service-meta
Pass service metadata "external-source" for consul UI integration
2018-11-16 12:24:21 -06:00
Preetha Appan
3cf22d2903 Pass service metadata "external-source" for consul UI integration 2018-11-16 11:28:56 -06:00
Mahmood Ali
17eb416df7 tweak whitespace in device stats output 2018-11-16 10:37:39 -05:00
Mahmood Ali
4f18086d35 Display device stats in nomad alloc status 2018-11-16 10:26:32 -05:00
Mahmood Ali
6208d53275 Prepare to reuse device resources printing 2018-11-16 10:26:32 -05:00
Mahmood Ali
58cbafe913 Populate alloc stats API with device stats
This change makes few compromises:

* Looks up the devices associated with tasks at look up time.  Given
that `nomad alloc status` is called rarely generally (compared to stats
telemetry and general job reporting), it seems fine.  However, the
lookup overhead grows bounded by number of `tasks x total-host-devices`,
which can be significant.

* `client.Client` performs the task devices->statistics lookup.  It
passes self to alloc/task runners so they can look up the device statistics
allocated to them.
  * Currently alloc/task runners are responsible for constructing the
entire RPC response for stats
  * The alternatives for making task runners device statistics aware
don't seem appealing (e.g. having task runners contain reference to hostStats)

* On the alloc aggregation resource usage, I did a naive merging of task device statistics.
  * Personally, I question the value of such aggregation, compared to
costs of struct duplication and bloating the response - but opted to be
consistent in the API.
  * With naive concatination, device instances from a single device group used by separate tasks in the alloc, would be aggregated in two separate device group statistics.
2018-11-16 10:26:32 -05:00
Preetha
fff2d6f4d8 Merge pull request #4882 from sportebois/f-update-docs-env-stanza-coercion
Change misleading boolean example in env stanza coercion section (#4820)
2018-11-16 08:00:56 -06:00
Michael Schurter
9189173649 tests: fix tests post-rebase 2018-11-15 17:40:56 -08:00
Michael Schurter
a552a0c42c client/tr: add a bit of context to envbuilder errors 2018-11-15 16:26:25 -08:00
Michael Schurter
2283c8fff3 client: remove old proxy references from comments 2018-11-15 16:26:25 -08:00
Michael Schurter
926e3dc706 client: test more env key variations 2018-11-15 16:26:25 -08:00
Michael Schurter
b878bbf3f7 client: add new nested variables to task's hcl ctx
The error messages are really bad, but it's extremely difficult to
produce good error messages without the original HCL.
2018-11-15 16:26:25 -08:00
Michael Schurter
c4c0869a2e docs: document new interpolation behavior and options 2018-11-15 16:26:25 -08:00
Michael Schurter
26211408a6 client: turn env into nested objects for task configs 2018-11-15 16:25:57 -08:00
Michael Schurter
43b359914b client: interpolate driver configurations
Also add missing SetDriverNetwork calls.
2018-11-15 16:25:57 -08:00
Michael Schurter
ca4e237d62 gofmt -s -w command/helper_stats_test.go
Fixes the static checks build
2018-11-15 14:14:05 -08:00
Preetha Appan
a9c557508d update consul template 2018-11-15 14:15:12 -06:00
Danielle Tomlinson
60c6cb8586 Merge pull request #4875 from hashicorp/f-constraints
scheduler: Make != constraints more flexible
2018-11-15 11:04:21 -08:00