Commit Graph

16622 Commits

Author SHA1 Message Date
Danielle Lancashire
8bb27f7eeb chore: Switch from gometalinter to golangci-lint
gometalinter has been deprecated, with golangci-lint as its spiritual
and recommended successor. Here we switch to using it with an equivalent
configuration, albeit with newer versions of some linters.

To maintain compatibility with existing settings, we have a couple of
things disabled here, specifically:

- tests
        We have a lot of unused code in our tests that choke deadcode.
        We should attempt to clean these up soon so that we can lint our
        testcode.
- govet.check-shadowing = false
        This breaks on redefining `err` which we do all over the nomad
        codebase.
2019-12-05 18:58:13 -06:00
Mahmood Ali
e2ce1eb2ea Merge pull request #6809 from hoh/patch-1
docs: port name requires quotes in hcl
2019-12-05 10:09:28 -05:00
Hugo Herter
ec9837fe16 docs: port name requires quotes in hcl
When trying to run this example, Nomad v0.10.2 raises the following error:
`Error getting job struct: Error parsing job file from example-ipv6.hcl: error parsing: At 33:22: Unknown token: 27:16 IDENT db`

Adding quotes around the port map `db` fixes the problem and the job works as expected.
2019-12-05 12:37:24 +01:00
Michael Schurter
b7a48a99cc Merge pull request #6807 from hashicorp/docs-097
docs: add #6792 backport to 0.9.7 changelog
2019-12-04 14:49:16 -08:00
Michael Schurter
e7675b94a9 docs: add #6792 backport to 0.9.7 changelog 2019-12-04 14:48:45 -08:00
Michael Schurter
0cff312311 Merge pull request #6805 from hashicorp/release-0102
Release 0102
2019-12-04 14:38:44 -08:00
Michael Schurter
f530bed66c Merge pull request #6806 from hashicorp/docs-0102
docs: release 0.10.2 and 0.9.7
2019-12-04 14:27:53 -08:00
Michael Schurter
7f85f7170f docs: release 0.10.2 and 0.9.7 2019-12-04 14:18:17 -08:00
Michael Schurter
e2b12087a1 release: prep for 0.10.3 development 2019-12-04 14:14:22 -08:00
Michael Schurter
aaffe61863 Merge branch 'master' into release-0102 2019-12-04 14:13:34 -08:00
Luiz Aoqui
5651999563 Merge pull request #6803 from hashicorp/docs-driver-skeleton-reference
docs: add reference to the driver plugin skeleton project
2019-12-04 18:49:17 +00:00
Michael Schurter
53fe1a3f23 Merge pull request #6804 from hashicorp/docs-cni-version
docs: reference cni-plugins v0.8.3
2019-12-04 10:49:03 -08:00
Michael Schurter
0b118f967d release: remove 0.10.2 generated files 2019-12-04 10:45:57 -08:00
Michael Schurter
9c93a44ee0 docs: reference cni-plugins v0.8.3 2019-12-04 10:20:33 -08:00
Michael Schurter
40edb4d3dd Release v0.10.2 2019-12-04 10:14:01 -08:00
Nomad Release bot
0d2d6e3dc5 Generate files for 0.10.2 release 2019-12-04 17:03:20 +00:00
Michael Schurter
1ab08a11e4 release: unset prerelease for final release 2019-12-04 08:52:25 -08:00
Mahmood Ali
b5d7c31ee5 Merge pull request #6795 from hashicorp/vendor-update-aws-sdk-v1.25.41
update aws sdk v1.25.41
2019-12-04 07:59:12 -05:00
Luiz Aoqui
e93252d61b docs: add reference to the drivir plugin skeleton project 2019-12-03 17:17:52 -05:00
Charlie Voiselle
5884f6250c Merge pull request #6791 from hashicorp/docs/cv/stateful_to_learn
Stateful Workload guides to learn.hashicorp.com
2019-12-03 14:48:01 -05:00
Mahmood Ali
68c0a4074e vendor: Update go-discover for AWS SDK change
Update go-discover to pull in latest AWS SDK change through its vendored
path, along with other provider changes.
2019-12-03 13:49:52 -05:00
Michael Schurter
263f89eee1 Merge pull request #6792 from hashicorp/b-propose-panic
scheduler: fix panic when preempting and evicting allocs
2019-12-03 10:42:12 -08:00
Michael Schurter
b2dd21a19e Merge pull request #6792 from hashicorp/b-propose-panic
scheduler: fix panic when preempting and evicting allocs
2019-12-03 10:40:19 -08:00
Mahmood Ali
6bfe899756 gitignore: only ignore toplevel tags and bin
Primarily don't ignore tags and bin packages in vendored folders
2019-12-03 13:36:54 -05:00
Mahmood Ali
a1d78388f8 Update AWS SDK library to v1.25.41
Update github.com/aws/aws-sdk-go and github.com/hashicorp/go-discover to
pick up support for EC2 Metadata Instance Service v2 changes.

Follow up to https://github.com/hashicorp/go-discover/pull/128 .
2019-12-03 13:35:03 -05:00
Michael Schurter
4c909cc4b3 docs: mention #6787 in upgrade guide 2019-12-03 08:46:23 -08:00
Tim Gross
b31573ae72 changelog: node-reschedule-penalty 2019-12-03 08:40:02 -08:00
Tim Gross
3716a67b30 scheduler: fix job update placement on prev node penalized (#6781)
Fixes #5856

When the scheduler looks for a placement for an allocation that's
replacing another allocation, it's supposed to penalize the previous
node if the allocation had been rescheduled or failed. But we're
currently always penalizing the node, which leads to unnecessary
migrations on job update.

This commit leaves in place the existing behavior where if the
previous alloc was itself rescheduled, its previous nodes are also
penalized. This is conservative but the right behavior especially on
larger clusters where a group of hosts might be having correlated
trouble (like an AZ failure).

Co-Authored-By: Michael Schurter <mschurter@hashicorp.com>
2019-12-03 06:14:49 -08:00
Michael Schurter
41d29a2de9 docs: add #6792 to changelog 2019-12-02 20:30:18 -08:00
Michael Schurter
f12bfdb193 scheduler: update tests with modern error helper 2019-12-02 20:25:52 -08:00
Michael Schurter
6112ad9f92 scheduler: fix panic when preempting and evicting
Fixes #6787

In ProposedAllocs the proposed alloc slice was being copied while its
contents were not. Since RemoveAllocs nils elements of the proposed
alloc slice and is called twice, it could panic on the second call when
erroneously accessing a nil'd alloc.

The fix is to not copy the proposed alloc slice and pass the slice
returned by the 1st RemoveAllocs call to the 2nd call, thus maintaining
the trimmed length.
2019-12-02 20:22:22 -08:00
Charlie Voiselle
3af3ebab77 Stateful Workload guides to learn.hashicorp.com 2019-12-02 16:37:06 -05:00
Seth Hoenig
76c6437b69 Merge pull request #6752 from hashicorp/docs-vault-token_period
docs: vault integration docs should reference new token_period field
2019-12-02 16:21:17 -05:00
Michael Lange
d92aa6d44e Merge pull request #6591 from hashicorp/d-remove-old-ui-guide
Docs: Remove the old UI guide
2019-12-02 12:26:38 -08:00
Seth Hoenig
7687ac0e3a docs: vault integration docs should reference new token_explicit_max_ttl field 2019-12-02 14:22:47 -06:00
Michael Lange
10251196cd Fix incorrect page title on the operating a job UI guide 2019-12-02 11:27:56 -08:00
Michael Lange
1b6c4d3819 Remove old UI guide 2019-12-02 11:27:55 -08:00
Michael Lange
397b10bc52 Add a redirect rule from the old ui guide to the new ones 2019-12-02 11:27:54 -08:00
Mahmood Ali
10c97bfb29 Merge pull request #6779 from hashicorp/r-aws-fingerprint-via-library
Use AWS SDK to access EC2 Metadata
2019-12-02 13:30:51 -05:00
Michael Schurter
830c0b16d2 Merge pull request #6774 from alrs/fix-client-test-goroutine
client: fix use of T.Fatalf() in test goroutine
2019-11-26 07:53:49 -08:00
Mahmood Ali
b55bc6443e fingerprint code refactor
Some code cleanup:

* Use a field for setting EC2 metadata instead of env-vars in testing;
but keep environment variables for backward compatibility reasons

* Update tests to use testify
2019-11-26 10:51:28 -05:00
Mahmood Ali
f24dd5bec9 fingerprint: avoid api query if config overrides it 2019-11-26 10:51:28 -05:00
Mahmood Ali
34b9ee5433 fingerprint: use ec2metadata package 2019-11-26 10:51:27 -05:00
Tim Gross
f02f59d579 fix plugin launcher SetConfig msgpack params (#6776)
* fix plugin launcher SetConfig msgpack params

The plugin launcher tool was passing the wrong byte array into
`SetConfig`, resulting in msgpack decoding errors. This was fixed in
a949050 (#6725) but accidentally reverted in 6aff18d (#6590).

Co-Authored-By: Chris Baker <1675087+cgbaker@users.noreply.github.com>
2019-11-26 10:49:22 -05:00
Mahmood Ali
f3d77c5b40 Merge pull request #6773 from xak2000/patch-2
Fix demo vagrant provision hung when libssl asks for confirmation
2019-11-26 09:31:03 -05:00
Mahmood Ali
65182bb11e Merge pull request #6761 from hashicorp/b-acl-anonymous-request-errors
acl_endpoint: permission denied for unauthenticated requests
2019-11-26 08:52:50 -05:00
Mahmood Ali
e03ea9bd2b address feedback review
apply `s/requestAuthToken/requestACLToken/g`
2019-11-26 08:39:04 -05:00
Tim Gross
f036aac9e3 e2e: add allocstats test for Windows (#6775)
Extends the BasicAllocStats test to include a test for Windows
clients, exercising stats via a powershell `raw_exec` job.

Adds `ListLinuxClientNodes` and `ListWindowsClientNodes` utils so that
we can scope tests to run only when Linux or Windows clients are
available. This prevents waiting on timeouts when running a subset of
the tests against a development cluster (vs our nightly test
cluster).
2019-11-26 08:05:42 -05:00
Lars Lehtonen
1c9a66950c client: fix use of T.Fatal inside TestFS_logsImpl_NoFollow() goroutine. 2019-11-25 23:51:28 -08:00
Lang Martin
6aff18dcd0 plugins device: remove trace level containing config contents 2019-11-25 14:49:40 -05:00