Alex Dadgar
c0386819b3
bump version/lint/generated files
2018-06-01 15:23:10 -07:00
Alex Dadgar
247f1edb11
spelling
2018-06-01 14:53:08 -07:00
Preetha Appan
ce6d4a8d7a
Fix tests and move isClient to constructor
2018-06-01 15:59:53 -05:00
Preetha Appan
a5bfaa098c
Fix unnecessary deregistration in consul sync
...
This commit fixes an issue where if a nomad client and server shared the same consul instance, the server would deregister any services and checks registered by clients for running tasks.
2018-06-01 14:48:25 -05:00
Alex Dadgar
40fec81315
Merge pull request #4277 from hashicorp/f-retry-join-clients
...
Add go-discover support to Nomad clients
2018-06-01 16:57:40 +00:00
Alex Dadgar
62665d8619
Fix node drain monitor
2018-05-31 15:50:05 -07:00
Alex Dadgar
aca8d5cece
Actually disable the schedulers
2018-05-31 13:11:11 -07:00
Alex Dadgar
d098885b79
Disable schedulers for TestHTTP_AllocSnapshot_Atomic
2018-05-31 12:05:44 -07:00
Alex Dadgar
4765b62284
Improve validation/defaulting, handle start-join
...
This commit:
* Improves how we combine the old retry-* fields and the new stanza and
how it is validated
* Handles the new stanza setting start_join
* Fixes integration test to not bind to the standard port and instead be
randomized.
* Simplifies parsing of the old retry_interval
* Fixes the errors from retry join being masked
* Flags get parsed into new server_join stanza
2018-05-31 10:53:26 -07:00
Alex Dadgar
e1bf8780b5
validation errors
2018-05-31 10:53:26 -07:00
Alex Dadgar
a02fbe3e0f
indentation
2018-05-31 10:53:26 -07:00
Chelsea Holland Komlo
2bf2af4378
ensure default value of 30s is set for server_join stanza
2018-05-31 10:50:04 -07:00
Chelsea Holland Komlo
307458d4a3
ignore default values for retry interval
...
add additional validation case
2018-05-31 10:50:04 -07:00
Chelsea Holland Komlo
ebc758aa0e
add stronger protections for nil pointers in server join merge
2018-05-31 10:50:04 -07:00
Chelsea Holland Komlo
10aff14509
update config parse test
...
documentation fixes
2018-05-31 10:50:04 -07:00
Chelsea Holland Komlo
ac1411ce95
RetryInterval should be a time.Duration
2018-05-31 10:50:04 -07:00
Chelsea Holland Komlo
e79bc29e1a
set retryInterval and other code feedback
2018-05-31 10:50:04 -07:00
Chelsea Holland Komlo
de03c884bc
add further configuration validation for server_join
2018-05-31 10:50:04 -07:00
Chelsea Holland Komlo
df7539b9d0
update documentation for server_join
2018-05-31 10:50:04 -07:00
Chelsea Holland Komlo
a4e514e07f
update server_join naming and improve logging
2018-05-31 10:50:03 -07:00
Chelsea Holland Komlo
064b5481e0
add server join info to server and client
2018-05-31 10:50:03 -07:00
Preetha Appan
7414395daa
Use constant in test
2018-05-30 17:27:04 -05:00
Preetha Appan
6cbd25945c
Add unit test to verify compatibility code for node drains
2018-05-30 17:14:53 -05:00
Preetha Appan
4f835790d7
Set node eligibility to true when old client calls disable
2018-05-30 16:54:07 -05:00
Preetha Appan
34db410b74
Fix failing test TestClientStatusRequest
2018-05-30 15:11:54 -05:00
Preetha Appan
2752204f26
Fix failing test TestHTTP_AllocAllGC
2018-05-30 15:11:54 -05:00
Chelsea Holland Komlo
19e4a5489b
add support for tls PreferServerCipherSuites
...
add further tests for tls configuration
2018-05-25 13:20:00 -04:00
Chelsea Komlo
af15dda45a
Merge pull request #4328 from hashicorp/r-single-tls-config-constructor
...
Refactor to prefer using NewTLSConfiguration constructor
2018-05-24 13:46:29 -04:00
Alex Dadgar
b1de61e012
Merge pull request #4321 from hashicorp/f-network-info
...
Display bind/advertise addresses on agent startup
2018-05-24 17:30:56 +00:00
Charlie Voiselle
bbbd385dff
Fixed typo in deployment help text
2018-05-24 12:44:21 -04:00
Nick Ethier
b62825b49c
command: fix node drain monitor case
2018-05-24 06:39:12 -04:00
Nick Ethier
b1d2437cf6
command: add docs for node drain -monitor flag
2018-05-24 06:37:28 -04:00
Nick Ethier
3c55f89738
command: use 0 as index for monitor request
2018-05-24 06:37:28 -04:00
Nick Ethier
b52d2e3e74
command: add '-monitor' flag to node drain
2018-05-24 06:37:25 -04:00
Chelsea Holland Komlo
38f611a7f2
refactor NewTLSConfiguration to pass in verifyIncoming/verifyOutgoing
...
add missing fields to TLS merge method
2018-05-23 18:35:30 -04:00
Alex Dadgar
51e67daf69
Use Tags when CanaryTags isn't specified
...
This PR fixes a bug where we weren't defaulting to `tags` when
`canary_tags` was empty and adds documentation.
2018-05-23 13:07:47 -07:00
Alex Dadgar
dd52ec402c
Display bind/advertise addresses on agent startup
...
Sample outputs from demo/vagrant/(server/client1).hcl and `nomad agent -dev` mode
Server:
```
==> Nomad agent configuration:
Advertise Addrs: HTTP: 192.168.1.75:4646; RPC: 192.168.1.75:4647; Serf: 192.168.1.75:4648
Bind Addrs: HTTP: 0.0.0.0:4646; RPC: 0.0.0.0:4647; Serf: 0.0.0.0:4648
Client: false
Log Level: DEBUG
Region: global (DC: dc1)
Server: true
Version: 0.8.4-dev
```
Client:
```
==> Nomad agent configuration:
Advertise Addrs: HTTP: 192.168.1.75:5656
Bind Addrs: HTTP: 0.0.0.0:5656
Client: true
Log Level: DEBUG
Region: global (DC: dc1)
Server: false
Version: 0.8.4-dev
```
Dev:
```
==> Nomad agent configuration:
Advertise Addrs: HTTP: 127.0.0.1:4646; RPC: 127.0.0.1:4647; Serf: 127.0.0.1:4648
Bind Addrs: HTTP: 127.0.0.1:4646; RPC: 127.0.0.1:4647; Serf: 127.0.0.1:4648
Client: true
Log Level: DEBUG
Region: global (DC: dc1)
Server: true
Version: 0.8.4-dev
```
2018-05-22 15:14:33 -07:00
Alex Dadgar
44697efd9a
safety guard
2018-05-22 14:45:34 -07:00
Alex Dadgar
586895965c
Unit test for dev agent
2018-05-22 14:45:34 -07:00
Alex Dadgar
58d2a4c7c2
Do not bypass normal RPC codepath when running both client and server at once
2018-05-22 14:45:34 -07:00
Alex Dadgar
21c5ed850d
Register events
2018-05-22 14:06:33 -07:00
Preetha
159888a856
Merge pull request #4274 from hashicorp/f-force-rescheduling
...
Add CLI and API support for forcing rescheduling of failed allocs
2018-05-21 16:24:22 -07:00
Preetha Appan
64ae37e19f
remove extra return
2018-05-21 18:00:14 -05:00
Chelsea Holland Komlo
f0a5018a91
Add autocomplete where missing
2018-05-11 18:05:43 -04:00
Preetha Appan
3a8040e36f
Add new method EvaluateWithOptions to avoid breaking go API client
2018-05-11 14:18:53 -05:00
Preetha Appan
e7d8ae70b2
more review feedback
2018-05-11 13:39:55 -05:00
Chelsea Komlo
687c26093c
Merge pull request #4269 from hashicorp/f-tls-remove-weak-standards
...
Configurable TLS cipher suites and versions; disallow weak ciphers
2018-05-11 08:11:46 -04:00
Nick Ethier
b3612824ed
Merge pull request #4279 from hashicorp/f-short-init
...
Add job init '-short' command docs to website
2018-05-10 23:20:59 -04:00
Nick Ethier
29ddef040d
command: add autocomplete for init -short flag
2018-05-10 23:19:08 -04:00
Preetha Appan
24115138e8
unit test for job eval should detach
2018-05-10 15:30:44 -05:00
Preetha Appan
e4ea18aee7
Add support for monitoring evals, and -detach/-verbose support
2018-05-10 15:02:58 -05:00
Preetha Appan
bfa0937bbb
Code review feedback
2018-05-10 14:42:24 -05:00
Nick Ethier
5881e785c5
command: remove ephemeral disk from short init jobspec
2018-05-10 13:16:45 -04:00
Chelsea Holland Komlo
44f536f18e
add support for configurable TLS minimum version
2018-05-09 18:07:12 -04:00
Chelsea Holland Komlo
796bae6f1b
allow configurable cipher suites
...
disallow 3DES and RC4 ciphers
add documentation for tls_cipher_suites
2018-05-09 17:15:31 -04:00
Preetha Appan
b12df3c64b
Added CLI for evaluating job given ID, and modified client API for evaluate to take a request payload
2018-05-09 15:04:27 -05:00
Preetha Appan
c1b92c284e
Work in progress - force rescheduling of failed allocs
2018-05-08 17:26:57 -05:00
Preetha
e7ae6e98d9
Merge pull request #4259 from hashicorp/f-deployment-improvements
2018-05-08 16:37:10 -05:00
Chelsea Holland Komlo
136635f04d
only write error log line on error
2018-05-07 16:57:07 -04:00
Chelsea Holland Komlo
30584639b5
remove log line for empty addresses which could confuse on initalization
2018-05-07 16:57:07 -04:00
Chelsea Holland Komlo
24ff40df01
retry until all options are exhausted
2018-05-07 16:57:07 -04:00
Chelsea Holland Komlo
ec4be4f871
ensure provider= is always the string prefix
2018-05-07 16:57:07 -04:00
Chelsea Holland Komlo
5422b1b088
update test for more realistic IP address from go-discover
2018-05-07 16:57:07 -04:00
Chelsea Holland Komlo
7e4d4f8088
comments and other fixups
2018-05-07 16:57:06 -04:00
Chelsea Holland Komlo
8f584f6474
add go-discover
2018-05-07 16:57:06 -04:00
Chelsea Holland Komlo
25ad6eaf96
refactor to retryJoiner interface
2018-05-07 16:57:06 -04:00
Michael Schurter
f1d13683e6
consul: remove services with/without canary tags
...
Guard against Canary being set to false at the same time as an
allocation is being stopped: this could cause RemoveTask to be called
with the wrong Canary value and leaking a service.
Deleting both Canary values is the safest route.
2018-05-07 14:55:01 -05:00
Michael Schurter
50e04c976e
consul: support canary tags for services
...
Also refactor Consul ServiceClient to take a struct instead of a massive
set of arguments. Meant updating a lot of code but it should be far
easier to extend in the future as you will only need to update a single
struct instead of every single call site.
Adds an e2e test for canary tags.
2018-05-07 14:55:01 -05:00
Alex Dadgar
f4af30fbb5
Canary tags structs
2018-05-07 14:50:01 -05:00
Alex Dadgar
f95ab4ade8
Mark canaries on creation, and unmark on promotion
2018-05-07 14:50:01 -05:00
Alex Dadgar
6f92e0711c
CLI
2018-05-07 14:50:01 -05:00
Alex Dadgar
ee50789c22
Initial implementation
2018-05-07 14:50:01 -05:00
Michael Schurter
0d534d30d6
Merge pull request #4251 from hashicorp/f-grpc-checks
...
Support Consul gRPC Health Checks
2018-05-04 14:55:16 -07:00
Michael Schurter
70b02875b7
Merge pull request #4234 from hashicorp/b-4159
...
Fix race in StreamFramer and truncation in api/AllocFS.Logs
2018-05-04 14:24:07 -07:00
Michael Schurter
f6a4713141
consul: make grpc checks more like http checks
2018-05-04 11:08:11 -07:00
Michael Schurter
382caec1e1
consul: initial grpc implementation
...
Needs to be more like http.
2018-05-04 11:08:11 -07:00
Michael Schurter
cc13e733ac
cli: expand drain info for node status
2018-05-04 10:32:25 -07:00
Nick Ethier
8d73d90cd7
command: remove all comments from short init jobspec
2018-05-03 15:34:56 -04:00
Michael Schurter
526af6a246
framer: fix early exit/truncation in framer
2018-05-02 10:46:16 -07:00
Michael Schurter
5d6bf2938f
client: use a bytes.Reader for reading a []byte
2018-05-02 10:46:16 -07:00
Michael Schurter
e00e265da5
client: ensure cancel is always called when func exits
2018-05-02 10:46:16 -07:00
Michael Schurter
d21b749c68
client: give pipe conns meaningful names
2018-05-02 10:46:16 -07:00
Michael Schurter
5ef0a82e6e
client: reset encoders between uses
...
According to go/codec's docs, Reset(...) should be called on
Decoders/Encoders before reuse:
https://godoc.org/github.com/ugorji/go/codec
I could find no evidence that *not* calling Reset() caused bugs, but
might as well do what the docs say?
2018-05-02 10:46:16 -07:00
Nick Ethier
842ed14e3f
command: add '-short' flag to init command that emits minimal jobspec
2018-05-01 12:51:13 -04:00
Alex Dadgar
43192cefae
generated files
2018-04-26 16:28:58 -07:00
Alex Dadgar
15ad3f94af
Fix command line
2018-04-26 15:46:22 -07:00
James Rasell
b7c2ce2991
Update node-drain logging message to clearer for operators.
...
This change updates the console log message when performing a node
drain and particulary when a node has marked all allocs for
migration. Previously it logged 'drain complete' which was a little
confusing to operators as the node is not drained at this point.
Closes #4183
2018-04-24 07:50:01 +01:00
Michael Schurter
ec201d5f19
Merge pull request #4178 from hashicorp/f-sort-drivers
...
cli: sort drivers in `node status <node_id>`
2018-04-20 14:03:26 -07:00
Michael Schurter
cfcbb9fa21
consul: periodically reconcile services/checks
...
Periodically sync services and checks from Nomad to Consul. This is
mostly useful when testing with the Consul dev agent which does not
persist state across restarts. However, this is a reasonable safety
measure to prevent skew between Consul's state and Nomad's
services+checks.
Also modernized the test suite a bit.
2018-04-19 15:45:42 -07:00
Nick Ethier
2e6c95f511
Merge pull request #4138 from hashicorp/i-hcl-json-endpoint
...
HCL to JSON api endpoint
2018-04-19 14:18:34 -04:00
Nick Ethier
c67c4f2d6e
Merge pull request #4176 from hashicorp/i-cli-error-help
...
Improve help text when invalid arguments are given
2018-04-19 12:45:22 -04:00
Nick Ethier
50bab2dd83
command: fix job dispatch arg check
2018-04-18 21:21:43 -04:00
Michael Schurter
d3650fb2cd
test: build with mock_driver by default
...
`make release` and `make prerelease` set a `release` tag to disable
enabling the `mock_driver`
2018-04-18 14:45:33 -07:00
Michael Schurter
8ece6b7163
cli: sort drivers in `node status <node_id>`
2018-04-18 14:30:44 -07:00
Nick Ethier
d0326503ac
command: use ':' instead of ',' in error msg
2018-04-18 13:55:51 -04:00
Nick Ethier
bde560a863
command: update tests to check for new error message
2018-04-18 13:51:17 -04:00
Nick Ethier
71fd07d4d0
command: fix misspelling in comment
2018-04-18 12:19:53 -04:00
Nick Ethier
182e3bec1b
command: improve help text when invalid arguments are given
2018-04-18 12:02:11 -04:00
Nick Ethier
555b036369
command/agent: fix url in jobs parse ep test
2018-04-16 19:21:09 -04:00
Nick Ethier
0baf9ba385
command/agent: fix ptr ref in job endpoint test
2018-04-16 19:21:09 -04:00