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
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
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
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
Chelsea Holland Komlo
25ad6eaf96
refactor to retryJoiner interface
2018-05-07 16:57:06 -04:00
Alex Dadgar
6871a068cb
Fix prefix output of agent metadata
2018-03-30 16:27:18 -07:00
Michael Schurter
7199a2b960
cli: differentiate normal output vs info
2018-03-30 11:42:11 -07:00
Chelsea Holland Komlo
38c7a38549
output warning for error in creating TLS checksum
2018-03-28 17:44:23 -04:00
Chelsea Holland Komlo
770ac13bc4
check for nil, remove unnecessary set checksum call
2018-03-28 13:29:53 -04:00
Chelsea Holland Komlo
2d5af7ff4d
set TLS checksum when parsing config
...
Refactor checksum comparison, always set checksum if it is empty
2018-03-28 09:56:11 -04:00
Chelsea Komlo
57e2cd04bd
Merge pull request #4025 from hashicorp/reload-http-tls
...
Allow TLS configurations for HTTP and RPC connections to be reloaded …
2018-03-26 18:00:30 -04:00
Alex Dadgar
34211f00a7
Allow separate enterprise config overlay
2018-03-22 13:53:08 -07:00
Chelsea Holland Komlo
66e44cdb73
Allow TLS configurations for HTTP and RPC connections to be reloaded separately
2018-03-21 17:51:08 -04:00
James Rasell
121c3bc997
Update Consul check params from using health-check to check.
2018-03-20 16:03:58 +01:00
James Rasell
15afef9b77
Allow Nomads Consul health checks to be configurable.
...
This change allows the client HTTP and the server HTTP, Serf and
RPC health check names within Consul to be configurable with the
defaults as previous. The configuration can be done via either a
config file or using CLI flags.
Closes #3988
2018-03-19 19:37:56 +01:00
Josh Soref
c808dc3095
spelling: submitted
2018-03-11 18:59:27 +00:00
Josh Soref
8978caea28
spelling: shutdown
2018-03-11 18:55:49 +00:00
Josh Soref
1f927cd343
spelling: each other
2018-03-11 17:56:50 +00:00
Josh Soref
455eb1aeb3
spelling: authoritative
2018-03-11 17:42:05 +00:00
Josh Soref
58b794875f
spelling: artifact
2018-03-11 17:41:02 +00:00
Mahmood Ali
bebafb5234
Add tags option to datadog telemetry
...
Expose an global tags option in telemetry config for dogstatsd, for
purposes of distinguishing between multiple nomad cluster metrics.
2018-02-06 12:08:37 -05:00
Chelsea Holland Komlo
7d3c240871
swap raft layer tls wrapper
2018-01-19 17:00:15 -05:00
Chelsea Holland Komlo
35466a331a
fixing up raft reload tests
...
close second goroutine in raft-net
2018-01-17 10:29:15 -05:00
Chelsea Holland Komlo
6c9f9c8ac3
adding additional test assertions; differentiate reloading agent and http server
2018-01-16 07:34:39 -05:00
Chelsea Holland Komlo
214d128eb9
reload raft transport layer
...
fix up linting
2018-01-08 14:52:28 -05:00
Chelsea Holland Komlo
0708d34135
call reload on agent, client, and server separately
2018-01-08 09:56:31 -05:00
Chelsea Holland Komlo
d9ec538d6a
don't ignore error in http reloading
...
code review feedback
2018-01-08 09:21:06 -05:00
Chelsea Holland Komlo
6a2432659a
code review fixups
2018-01-08 09:21:06 -05:00
Chelsea Holland Komlo
ae7fc4695e
fixups from code review
...
Revert "close raft long-lived connections"
This reverts commit 3ffda28206fcb3d63ad117fd1d27ae6f832b6625.
reload raft connections on changing tls
2018-01-08 09:21:06 -05:00
Chelsea Holland Komlo
c0ad9a4627
add ability to upgrade/downgrade nomad agents tls configurations via sighup
2018-01-08 09:21:06 -05:00
Kyle Havlovitz
b775fc7b33
Added support for v2 raft APIs and -raft-protocol option
2017-12-12 10:17:16 -06:00
Alex Dadgar
0bec137561
Merge pull request #3555 from PagerDuty/fix-loop-on-sigpipe
...
Do not emit logs on SIGPIPE since logging service could be unavailable
2017-12-04 14:11:05 -08:00
Alex Dadgar
ab67a98c13
Emit hostname as a label
2017-12-04 10:42:31 -08:00
Max Timchenko
8b7e61d055
Do not emit logs on SIGPIPE since logging service could be unavailable
...
This should fix https://github.com/hashicorp/nomad/issues/3554
2017-11-15 18:01:41 +02:00
Chelsea Komlo
2dfda33703
Nomad agent reload TLS configuration on SIGHUP ( #3479 )
...
* Allow server TLS configuration to be reloaded via SIGHUP
* dynamic tls reloading for nomad agents
* code cleanup and refactoring
* ensure keyloader is initialized, add comments
* allow downgrading from TLS
* initalize keyloader if necessary
* integration test for tls reload
* fix up test to assert success on reloaded TLS configuration
* failure in loading a new TLS config should remain at current
Reload only the config if agent is already using TLS
* reload agent configuration before specific server/client
lock keyloader before loading/caching a new certificate
* introduce a get-or-set method for keyloader
* fixups from code review
* fix up linting errors
* fixups from code review
* add lock for config updates; improve copy of tls config
* GetCertificate only reloads certificates dynamically for the server
* config updates/copies should be on agent
* improve http integration test
* simplify agent reloading storing a local copy of config
* reuse the same keyloader when reloading
* Test that server and client get reloaded but keep keyloader
* Keyloader exposes GetClientCertificate as well for outgoing connections
* Fix spelling
* correct changelog style
2017-11-14 17:53:23 -08:00
Alex Dadgar
8324ef3bc4
format
2017-11-10 12:47:59 -08:00
James Powis
4bf9e6a3ab
[3503] adding consul-address flag to command.go
2017-11-04 18:05:20 -06:00
Alex Dadgar
701f462d33
remove atlas
2017-11-02 11:27:21 -07:00
Alex Dadgar
0b538ded83
403 instead of 500 for permission denied
2017-10-12 14:10:20 -07:00
Alex Dadgar
b5fc557253
ACL command options
2017-10-12 13:51:39 -07:00
James Rasell
4628637b54
Update agent CLI to include Consul config option flags.
...
This update introduces command line flags for all Consul options
thus allowing users to both use a config file and CLI options to
configure Consul.
Website documentation has also been updated.
Closes #3304
2017-10-05 14:26:26 +01:00
Chelsea Holland Komlo
c014cb014f
fix bug to return prometheus sink
2017-09-13 19:21:21 +00:00
Chelsea Holland Komlo
035fab0c8d
enabling prometheus metrics should be a config option
2017-09-13 19:21:21 +00:00
Chelsea Holland Komlo
d8e9f2fef7
add endpoint for prometheus
2017-09-13 19:21:21 +00:00
Chelsea Holland Komlo
751fc5324e
add http endpoint for in memory metrics
...
prevent against flaky test due to timing/initialization issues
2017-09-06 13:51:19 +00:00
Alex Dadgar
1a86aecf55
Add version package
...
This PR adds a version package and consolidates version strings into a
Version struct.
2017-08-16 15:44:21 -07:00
Alex Dadgar
9a2a5af608
Don't print atlas
2017-07-19 20:25:06 -07:00
Alex Dadgar
b4b50b636f
Fix predictor
2017-07-19 11:51:01 -07:00
Alex Dadgar
871cdcb932
Agent command autocompletes to hcl/json files
2017-07-19 11:28:16 -07:00
Adam Stankiewicz
4daf4cb8c9
Remove unnecessary parameter from NewHTTPServer
2017-04-10 16:24:49 +02:00
Alex Dadgar
40d0f3ce7d
Flush logs on err
2017-03-14 14:48:39 -07:00
Sean Chittenden
9cde9296da
Change the default display name from the Circonus Instance ID to
...
`Nomad`.
The display name is already scoped to target/host.
2017-02-24 14:59:11 -08:00
Alex Dadgar
15ffdff497
Vault Client on Server handles SIGHUP
...
This PR allows the Vault client on the server to handle a SIGHUP. This
allows updating the Vault token and any other configuration without
downtime.
2017-02-01 14:24:10 -08:00
Alex Dadgar
08a32cb93c
Add command line flag for create-from-role
2017-01-27 14:11:34 -08:00
Jorge Marey
189a49b74d
Add option to set nodename instead of hostname on telemetry values
2016-12-21 09:53:29 +01:00
Alex Dadgar
e322f5c070
Move parsing of vault token above validation such that it works in dev mode
2016-11-10 11:47:43 -08:00
Michael Schurter
8b0511713f
Merge pull request #1955 from hashicorp/b-fix-default-advertise
...
Choose safer default advertise address
2016-11-09 16:03:17 -08:00
matt maier
c6504f3418
Update Circonus integration expose Check Display Name and Check Tags
...
configuration options.
2016-11-09 15:12:30 -05:00
Michael Schurter
a75e5b5803
Addresses are just addresses - no ports
...
Store address+port in an unexported field for ease-of-use
2016-11-09 11:49:55 -08:00
Michael Schurter
4235d65011
Move config normalization into config.go to ease testing
2016-11-08 15:44:10 -08:00
Michael Schurter
ad07eef9ab
Handle missing ports in addresses
2016-11-08 13:44:41 -08:00
Michael Schurter
2960380055
Refactor getAdvertise into a func
2016-11-08 13:06:56 -08:00
Michael Schurter
fbcc0ddbf5
Failure to resolve advertise address isn't fatal
2016-11-08 11:17:22 -08:00
Michael Schurter
c735589f41
Choose safer default advertise address
...
* -dev mode defaults bind & advertise to localhost
* Normal mode defaults bind to 0.0.0.0 & advertise to the resolved
hostname. If the hostname resolves to localhost it will refuse to
start and advertise must be manually set.
2016-11-08 11:17:16 -08:00
Alex Dadgar
1156c79e1b
Read from env
2016-11-01 12:37:27 -07:00
Alex Dadgar
1abc708c1d
Vault flags
2016-10-24 17:23:48 -07:00
Alex Dadgar
aa0d8d0d8d
Print the version and client node ID
2016-10-20 17:46:04 -07:00
Alex Dadgar
703b8423a3
Merge pull request #1816 from jippi/add-datadog-telemetry
...
Add datadog telemetry
2016-10-18 09:53:37 -07:00
Diptanu Choudhury
0f6e0d10b6
Enable serf encryption ( #1791 )
...
* Added the keygen command
* Added support for gossip encryption
* Changed the URL for keyring management
* Fixed the cli
* Added some tests
* Added tests for keyring operations
* Added a test for removal of keys
* Added some docs
* Fixed some docs
* Added general options
2016-10-17 10:48:04 -07:00
Christian Winther
3e953d725a
initial work on datadog telemetry
2016-10-15 10:49:33 +02:00
Alex Dadgar
db4e676d73
Merge pull request #1803 from hashicorp/b-vault-parse
...
Fix Vault Config parsing of booleans
2016-10-11 13:47:46 -07:00
Alex Dadgar
751aa114bf
Fix Vault parsing of booleans
2016-10-10 18:04:39 -07:00
Alex Dadgar
d0731a466f
Skip SIGPIPE
2016-10-10 15:12:56 -07:00
Robert Neumayer
e57d20d825
Fix typo
...
Telementry -> Telemetry
2016-09-11 09:46:05 +02:00
Alex Dadgar
1ce5457ac0
Vault config flags
2016-09-01 15:41:07 -07:00
Mathias Lafeldt
4143a9059a
Fix reload of retry_join server addresses on SIGHUP
...
The current code does not update the actual config, but only the local
reference to it.
2016-08-11 16:03:21 +02:00
matt maier
02d71eb6d3
Circonus integration for telemetry metrics
2016-07-22 12:33:10 -04:00
Diptanu Choudhury
69e046f63f
Fixed parsing of consul agent service names
2016-06-22 13:52:43 -07:00
Sean Chittenden
d17af396ca
Create config.DefaultConsulConfig()
2016-06-16 20:41:05 -07:00
Diptanu Choudhury
14747848f7
Removed the stats block from client configuration
2016-06-16 21:30:29 +01:00
Sean Chittenden
17116fc5a7
Rebalance Nomad client RPCs among different Nomad servers.
...
Implement client/rpc_proxy.RpcProxy.
2016-06-10 15:50:11 -04:00
Sean Chittenden
840b49a720
Distill config.Config.ConsulConfig down to config.Config.Consul
...
The enclosed struct provides the necessary context
2016-06-10 15:48:36 -04:00
Sean Chittenden
e36686a17d
Use consul/lib's RandomStagger
...
Removes four redundant copies of the method in the process.
2016-06-10 15:48:36 -04:00
Jeff Mitchell
b4f25e0b04
Use upstream high-level SCADA provider
2016-06-01 18:25:09 -04:00
Diptanu Choudhury
c46400597e
Making the stats collection interval and number of data points to keep in memory configurable
2016-05-28 19:59:20 -07:00
Diptanu Choudhury
83fed62a0a
Implemented registering client and server services
2016-05-11 16:07:02 -07:00
Sean Chittenden
09729cf706
When checkpoint emits a log message indicating an agent is out of
...
date, include the current version along with the available version
according to checkpoint.
Inspired by: log output in hashicorp/consul#993
2016-05-04 23:56:37 -07:00
Dmitry Smirnov
7c3bb51cfa
codespell: minor spelling corrections
...
Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
2016-03-16 05:28:31 +11:00
Alex Dadgar
82d8210287
Remove documentation about assigning node-id
2016-03-04 10:36:30 -08:00
Alex Dadgar
cc1b35a90c
client: standardize error logging format
2016-02-24 15:57:58 -08:00
Diptanu Choudhury
0016b2f82d
Setting the output for default logger to nomad's logoutput
2016-02-11 16:05:31 -08:00
Ivo Verberk
91a9f2c4ce
Shorten CLI identifiers
...
* Truncate all UUID identifiers to eight characters by default
* Refactor the node identifier to an auto-generated UUID
* Created and updated tests and mocks
2016-01-14 21:57:43 +01:00
Alex Dadgar
2d16cb86ce
Enforce absolute paths for alloc/state/data directories
2015-12-22 11:14:41 -08:00
Alex Dadgar
06e84205da
Fix retry interval not applying sleep duration
2015-12-17 16:33:09 -08:00
Chris Bednarski
40d2eb0628
Check length 0 (no configs) instead of 1 (some configs)
2015-12-14 17:46:52 -08:00