Commit graph

16748 commits

Author SHA1 Message Date
Mahmood Ali 57ff36df5c ci: avoid paging 2019-11-22 11:52:01 -05:00
Mahmood Ali 5c17bf36b8 ci: ignore docs only changes
Skip running backend and UI changes for docs/website updates, as
indicated by branch name.
2019-11-22 11:51:57 -05:00
Mahmood Ali e85886d33c git: only .circleci/config.yml is a generated one 2019-11-22 11:24:13 -05:00
Mahmood Ali ea888b3876 Merge pull request #6763 from hashicorp/b-handle-initialize-logger
drivers: always initialize taskHandle.logger
2019-11-22 11:13:31 -05:00
Mahmood Ali 6b90a179f1
Merge pull request #6763 from hashicorp/b-handle-initialize-logger
drivers: always initialize taskHandle.logger
2019-11-22 11:04:54 -05:00
Mahmood Ali 51a8b21cc6 changelog
[ci skip]
2019-11-22 11:04:24 -05:00
Mahmood Ali aa1c83871b drivers: always initialize taskHandle.logger
Looks like the RecoverTask doesn't set taskHandle.logger field causing
a panic when the handle attempts to log (e.g. when Shutdown or Signaling
fails).
2019-11-22 10:44:59 -05:00
Mahmood Ali d694f1d61c document docker dangling container repeaper 2019-11-22 09:58:00 -05:00
Mahmood Ali 02e20c720b acl_endpoint: permission denied for unauthenticated requests
If ACL Request is unauthenticated, we should honor the anonymous token.
This PR makes few changes:

* `GetPolicy` endpoints may return policy if anonymous policy allows it,
or return permission denied otherwise.
* `ListPolicies` returns an empty policy list, or one with anonymous
policy if one exists.

Without this PR, the we return an incomprehensible error.

Before:
```
$ curl http://localhost:4646/v1/acl/policy/doesntexist; echo
acl token lookup failed: index error: UUID must be 36 characters
$ curl http://localhost:4646/v1/acl/policies; echo
acl token lookup failed: index error: UUID must be 36 characters
```

After:
```
$ curl http://localhost:4646/v1/acl/policy/doesntexist; echo
Permission denied
$ curl http://localhost:4646/v1/acl/policies; echo
[]
```
2019-11-22 08:43:09 -05:00
Chris Baker ee066bdaca
Merge pull request #6755 from hashicorp/docs-device-plugin-guide
cherry-pick: device plugin authoring guide
2019-11-21 18:39:57 -06:00
Chris Baker bde82d7d0e added the device plugin authoring guide, made minor formatting changes to task driver plugin authoring guide. 2019-11-22 00:38:46 +00:00
Michael Schurter a5642dee2a Merge pull request #6754 from hashicorp/docs-0.10.2
Changelog updates and download link for 0.10.2-rc1
2019-11-21 15:26:07 -08:00
Michael Schurter 9cd6aa24da
Merge pull request #6754 from hashicorp/docs-0.10.2
Changelog updates and download link for 0.10.2-rc1
2019-11-21 15:19:32 -08:00
Michael Schurter ae61a80de5 docs: add Nomad v0.10.2-rc1 download link 2019-11-21 15:05:29 -08:00
Michael Schurter 9c4a96358b docs: reformat changelog for 0.10.2-rc1 2019-11-21 15:05:29 -08:00
Drew Bailey b45ce9e997
add server-id to -h output 2019-11-21 16:04:28 -05:00
Drew Bailey 0e0e985cc4
Merge pull request #6753 from hashicorp/monitor-add-server-id-help
add server-id to -h output
2019-11-21 16:03:33 -05:00
Drew Bailey b3765b06ea
add server-id to -h output 2019-11-21 16:01:09 -05:00
Mahmood Ali 54b22ae3a6 changelog GH-6580 2019-11-21 15:49:49 -05:00
Seth Hoenig 75539ff281 docs: vault integration docs should reference new token_period field 2019-11-21 14:19:34 -06:00
Drew Bailey 6d5156bbba
Allows a node uuid prefix to be passed in 2019-11-21 15:15:41 -05:00
Drew Bailey 95e017c56d
Merge pull request #6750 from hashicorp/nomad-monitor-node-id-prefix
Allows a node uuid prefix to be passed in
2019-11-21 15:14:20 -05:00
Drew Bailey 7ca6dbe61e
Allows a node uuid prefix to be passed in 2019-11-21 14:51:48 -05:00
Lang Martin 850ca88635 CHANGELOG quota network 2019-11-21 10:34:05 -05:00
Mahmood Ali 5e3dbe7a42
Merge pull request #6749 from hashicorp/b-test-tweaks-20191120
CI and Test tweaks
2019-11-21 08:29:42 -05:00
Mahmood Ali e89108fb01 fixup! tests: don't assume eth0 network is available 2019-11-21 08:28:20 -05:00
Mahmood Ali 07fe93da3c ci: match ci timeout to go test timeout
make test-nomad sets 15 minute time out for build.  Increase the ci
timeout to 20m, so we can get meaningful output and goroutine stack
traces rather than have test be simply killed by CircleCI.

The extra 5 minutes is a buffer for generating-structs and some
unnecessary padding.
2019-11-20 20:39:23 -05:00
Mahmood Ali 443804b5c7 tests: don't assume eth0 network is available
TestClient_UpdateNodeFromFingerprintKeepsConfig checks a test node
network interface, which is hardcoded to `eth0` and is updated
asynchronously.  This causes flakiness when eth0 isn't available.

Here, we hardcode the value to an arbitrary network interface.
2019-11-20 20:37:30 -05:00
Mahmood Ali ed3f1957e7 tests: run TestClient_WatchAllocs in non-linux environments 2019-11-20 20:37:29 -05:00
Mahmood Ali 521f51a929 testS: fix TestClient_RestoreError
When spinning a second client, ensure that it uses new driver
instances, rather than reuse the already shutdown unhealthy drivers from
first instance.

This speeds up tests significantly, but cutting ~50 seconds or so, the
timeout in NewClient until drivers fingerprints.  They never do because
drivers were shutdown already.
2019-11-20 20:37:28 -05:00
Mahmood Ali 4efb71cf0c tests: remove TestClient_RestoreError test
TestClient_RestoreError is very slow, taking ~81 seconds.

It has few problematic patterns.  It's unclear what it tests, it
simulates a failure condition where all state db lookup fails and
asserts that alloc fails.  Though starting from
https://github.com/hashicorp/nomad/pull/6216 , we don't fail allocs in
that condition but rather restart them.

Also, the drivers used in second client `c2` are the same singleton
instances used in `c1` and already shutdown.  We ought to start healthy
new driver instances.
2019-11-20 20:37:27 -05:00
Mahmood Ali 0947155ddb
Merge pull request #6745 from hashicorp/c-circleci-tweaks-20191120
ci: Revamp CircleCI config
2019-11-20 20:37:12 -05:00
Lang Martin 1e9df94daa docs: update quota docs to include network limits 2019-11-20 18:00:12 -06:00
Lang Martin 069e9a624b command: quota init writes files with a network limit 2019-11-20 17:59:55 -06:00
Lang Martin d2fc279af4 command: quota status reports network usage 2019-11-20 17:59:34 -06:00
Lang Martin def417a33a docs: update quota docs to include network limits 2019-11-20 18:44:06 -05:00
Lang Martin f45bebdb66 command: quota init writes files with a network limit 2019-11-20 18:44:06 -05:00
Lang Martin 2e2c662977 command: quota status reports network usage 2019-11-20 18:44:06 -05:00
Michael Schurter 5e2ee1e237 docs: added #6021 to changelog 2019-11-20 15:34:25 -08:00
Michael Schurter 4b6762511d
Merge pull request #6021 from hashicorp/f-anonymous-policy-access
api: Update policy endpoint to permit anonymous access
2019-11-20 15:33:45 -08:00
Michael Schurter 48239d7f2e
Merge pull request #6017 from hashicorp/f-policy-json
api: Add parsed rules to policy response
2019-11-20 15:31:03 -08:00
Mahmood Ali be6c60455e
Merge pull request #6669 from hashicorp/b-cors-allow-credentials
Allow UI to query client directly for task logs/state
2019-11-20 15:14:01 -05:00
Mahmood Ali 7514658039 simply link to vault .circleci README 2019-11-20 15:02:10 -05:00
Mahmood Ali 52af6e973b Refactor circleci CI scripts
This adopts pattern used by Vault, where we split CircleCI yaml config
into multiple files that get packed and translated to 2.0.

This has two motivations: First, to ease translating config to CircleCI
2.0 so it can run on Enterprise private repository.  Second and most
importantly, it also adding Enterprise specific jobs in separate files
with reduced config file merging conflict resolution.
2019-11-20 15:02:08 -05:00
Mahmood Ali 45e91394ae build-deps-image no longer runs
This is a remenant of the time we used a custom hashicorp docker image for CI.
Currently, we use the official golang image, so no longer need the job
or manage the dockerhub credentials.
2019-11-20 14:57:48 -05:00
Mahmood Ali 29a457cbdd Ignore ci workflow in stable-website
`stable-website` branch is only meant for updating the nomadproject.io
website, and the backend tests are irrelevant.  Also, the ci workflow
uses up the plans containers and may delay website deployments by 20
minutes or more while we are cutting a release.
2019-11-20 14:57:45 -05:00
Mahmood Ali 7f1e9d8485 low case references 2019-11-20 14:56:42 -05:00
Tim Gross 11e0403173
ci: add build-binaries job for artifact storage (#6741) 2019-11-20 14:45:20 -05:00
Buck Doyle 5fcc00d0f9 Add gofmt changes 2019-11-20 12:47:01 -06:00
Buck Doyle dc9c0d5ead
Add explanatory comment 2019-11-20 11:45:44 -06:00