Michael Schurter
63ee0ed3a5
Merge pull request #4613 from hashicorp/b-cert-whitespace
...
config: accept CA PEM files with extra whitespace
2018-09-06 17:00:44 -07:00
Michael Schurter
401ed92847
config: accept CA PEM files with extra whitespace
...
Previously we did a validation pass over CA PEM files before calling
Go's CertPool.AppendCertsFromPEM to provide more detailed error messages
than the stdlib provides.
Unfortunately our validation was overly strict and rejected valid CA
files. This is actually the reason the stdlib PEM parser doesn't return
meaningful errors: PEM files are extremely permissive and it's difficult
to tell the difference between invalid data and valid metadata.
This PR removes our custom validation as it would reject valid data and
the extra error messages were not useful in diagnosing the error
encountered.
2018-09-06 11:38:56 -07:00
Michael Schurter
58da11f571
Merge pull request #4648 from hashicorp/b-migrate-tls
...
Set hostname when migrating ephemeral disks over TLS
2018-09-06 11:31:52 -07:00
Michael Schurter
ea5a8eba8a
Add changelog entry for #4648
2018-09-05 17:37:52 -07:00
Michael Schurter
08862fc177
fix race around error handling
2018-09-05 17:34:17 -07:00
Michael Schurter
6def5bc4f9
client: set host name when migrating over tls
...
Not setting the host name led the Go HTTP client to expect a certificate
with a DNS-resolvable name. Since Nomad uses `${role}.${region}.nomad`
names ephemeral dir migrations were broken when TLS was enabled.
Added an e2e test to ensure this doesn't break again as it's very
difficult to test and the TLS configuration is very easy to get wrong.
2018-09-05 17:24:17 -07:00
Preetha Appan
996484981c
Fix panic when reschedule policy for allocation can't be looked up
...
because its task group changed
2018-09-05 17:01:02 -05:00
Preetha
88fefa5404
Merge pull request #4645 from hashicorp/f-restart-docs-fix
...
Fix incorrect default mode for restart stanza in docs
2018-09-05 08:12:44 -06:00
Preetha Appan
35de47a06e
Fix incorrect default mode for restart stanza in docs
2018-09-05 09:11:24 -05:00
Alex Dadgar
4f89cabd34
Merge pull request #4631 from hashicorp/f-plugin-config
...
Parse plugin configs
2018-09-04 17:04:13 -07:00
Alex Dadgar
cc92cd92cd
Merge pull request #4642 from hashicorp/b-vet
...
Fix vet errors and use newer go version in travis
2018-09-04 17:04:02 -07:00
Alex Dadgar
e18a42c789
use latest go in travis
2018-09-04 16:04:13 -07:00
Alex Dadgar
c6576ddac1
Fix make check errors
2018-09-04 16:03:52 -07:00
Preetha
85be225ce4
Update CHANGELOG.md
2018-09-04 17:51:59 -05:00
Alex Dadgar
2c2a8322b5
Fix device launcher ctx cleanup
2018-09-04 15:48:38 -07:00
Preetha
ad7c9de2f5
Update CHANGELOG.md
2018-09-04 17:38:25 -05:00
Preetha Appan
c463b3a5c8
Update changelog
2018-09-04 17:31:02 -05:00
Preetha
94e4a5345e
Merge pull request #4640 from hashicorp/f-affinities-spread
...
Affinities and spread
2018-09-04 16:25:14 -06:00
Preetha Appan
26288b9522
Fix more review feedback
2018-09-04 16:10:11 -05:00
Preetha Appan
254e90ba0e
Fix linting
2018-09-04 16:10:11 -05:00
Preetha Appan
751c0eb5a5
code review feedback
2018-09-04 16:10:11 -05:00
Preetha Appan
4f8e925b54
Move topk and delay heap to separate packages under lib
2018-09-04 16:10:11 -05:00
Preetha Appan
9bc0962527
Track top k nodes by norm score rather than top k nodes per scorer
2018-09-04 16:10:11 -05:00
Preetha Appan
063004502a
Fix linting
2018-09-04 16:10:11 -05:00
Preetha Appan
6ed527c636
Use heap to store top K scoring nodes.
...
Scoring metadata is now aggregated by scorer type to make it easier
to parse when reading it in the CLI.
2018-09-04 16:10:11 -05:00
Preetha Appan
22e9035545
Min heap to store top K scoring elements
2018-09-04 16:10:11 -05:00
Preetha Appan
8581ed1e20
Parse test for spread
2018-09-04 16:10:11 -05:00
Preetha Appan
659cfa3f64
Parsing and API layer for spread stanza
2018-09-04 16:10:11 -05:00
Preetha Appan
65cf4373b3
fix linting error
2018-09-04 16:10:11 -05:00
Preetha Appan
dd5fe6373f
Fix scoring logic for uneven spread to incorporate current alloc count
...
Also addressed other small code review comments
2018-09-04 16:10:11 -05:00
Preetha Appan
e72c0fe527
more cleanup
2018-09-04 16:10:11 -05:00
Preetha Appan
4c624424e6
added some unit tests for -1 spread score
2018-09-04 16:10:11 -05:00
Preetha Appan
92d37acc2a
comment and formatting cleanup
2018-09-04 16:10:11 -05:00
Preetha Appan
7b0a27cad6
fix scoring algorithm when min count == current count
2018-09-04 16:10:11 -05:00
Preetha Appan
bad075f640
Remove hardcoded boosts for even spread.
...
instead, calculate them based on delta between current and minimum value
2018-09-04 16:10:11 -05:00
Preetha Appan
c56873ff37
Implement support for even spread across datacenters, with unit test
2018-09-04 16:10:11 -05:00
Preetha Appan
d091c00dd3
Support implicit spread target to account for remaining desired counts
2018-09-04 16:10:11 -05:00
Preetha Appan
33779abe5f
fix comments
2018-09-04 16:10:11 -05:00
Preetha Appan
5812f906c8
Allow empty spread targets, and validate target percentages.
2018-09-04 16:10:11 -05:00
Preetha Appan
71bff00326
validate spread from job/task group validate methods
2018-09-04 16:10:11 -05:00
Preetha Appan
55f276c189
Include spreads configured at job level when precomputing weights/desired counts.
2018-09-04 16:10:11 -05:00
Preetha Appan
fbd0004707
Fix warnings
2018-09-04 16:10:11 -05:00
Preetha Appan
db0d95b09c
Implement spread iterator that scores according to percentage of desired count in each target.
...
Added this as a new step in the stack and some unit tests
2018-09-04 16:10:11 -05:00
Preetha Appan
5eb82b6260
Validate method, and rename ratio field to percent
2018-09-04 16:10:11 -05:00
Preetha Appan
0037d72fa8
Structs and validation for spread
2018-09-04 16:10:11 -05:00
Preetha Appan
1c0b123777
Fix test
2018-09-04 16:10:11 -05:00
Preetha Appan
eccf128c5c
Some minor changes from code review
2018-09-04 16:10:11 -05:00
Preetha Appan
038ed52877
Fix after rename to ConstraintSetContainsAny
2018-09-04 16:10:11 -05:00
Preetha Appan
3a39db3902
Fix linting
2018-09-04 16:10:11 -05:00
Preetha Appan
d5cd2bbddb
Remove unnecessary reset
2018-09-04 16:10:11 -05:00