Drew Bailey
f46fd5b3e1
only look up rpchandler for node if we have nodeid
...
fix some comments and nomad monitor -h output
2019-11-05 09:51:51 -05:00
Drew Bailey
786989dbe3
New monitor pkg for shared monitor functionality
...
Adds new package that can be used by client and server RPC endpoints to
facilitate monitoring based off of a logger
clean up old code
small comment about write
rm old comment about minsize
rename to Monitor
Removes connection logic from monitor command
Keep connection logic in endpoints, use a channel to send results from
monitoring
use new multisink logger and interfaces
small test for dropped messages
update go-hclogger and update sink/intercept logger interfaces
2019-11-05 09:51:49 -05:00
Drew Bailey
976c43157c
remove log_writer
...
prefix output with proper spacing
update gzip handler, adjust first byte flow to allow gzip handler bypass
wip, first stab at wiring up rpc endpoint
2019-11-05 09:51:48 -05:00
Drew Bailey
0de94466b2
Display error when remote side ended monitor
...
multisink logger
remove usage of logwriter
2019-11-05 09:51:48 -05:00
Drew Bailey
b0184e2032
Adds AgentMonitor Endpoint
...
AgentMonitor is an endpoint to stream logs for a given agent. It allows
callers to pass in a supplied log level, which may be different than the
agents config allowing for temporary debugging with lower log levels.
Pass in logWriter when setting up Agent
2019-11-05 09:51:46 -05:00
Mahmood Ali
3f6e50617a
Merge pull request #6047 from hashicorp/b-ignore-server-if-disabled
...
Only warn against BootstrapExpect set in CLI flag
2019-10-29 10:55:44 -04:00
Danielle Lancashire
9eaac48f25
agent: Refactor log setup to support log-to-file
2019-10-07 14:42:32 +02:00
Lang Martin
fb41dd86ba
default raft protocol v2
2019-09-24 14:37:55 -04:00
Mahmood Ali
6d73ca0cfb
Merge pull request #6250 from hashicorp/f-raft-protocol-v3
...
Update default raft protocol to version 3
2019-09-04 09:34:41 -04:00
Tim Gross
b79021adfd
cli: split -dev and -dev-connect flags
2019-08-30 09:33:30 -04:00
Mahmood Ali
6eabf53b91
Default raft protocol to version 3
2019-08-28 15:56:59 -04:00
Tim Gross
2a592a2e0c
agent: add optional param to -dev flag for connect ( #6126 )
...
Consul Connect must route traffic between network namespaces through a
public interface (i.e. not localhost). In order to support testing in
dev mode, users needed to manually set the interface which doesn't
make for a smooth experience.
This commit adds a facility for adding optional parameters to the
`nomad agent -dev` flag and uses it to add a `-dev=connect` flag that
binds to a public interface on the host.
2019-08-14 15:29:37 -04:00
Mahmood Ali
31ad8161ab
Only warn against BootstrapExpect set in CLI flag
...
If server.enabled is false, we ought to ignore all other values in
the server stanza.
However, I opted to preserve current error when `--bootstrap-expect` is
passed to the CLI when server is not enabled, to maintain current
behavior.
2019-07-31 03:19:15 -05:00
Chris Baker
ce0c330c7c
agent config: cleaner VAULT_ env lookup
2019-04-10 10:34:10 -05:00
Chris Baker
a26d4fe1e5
docs: -vault-namespace, VAULT_NAMESPACE, and config
...
agent: added VAULT_NAMESPACE env-based configuration
2019-04-10 10:34:10 -05:00
Chris Baker
d3041cdb17
wip: added config parsing support, CLI flag, still need more testing, VAULT_ var, documentation
2019-04-10 10:34:10 -05:00
Preetha Appan
3ab2e431b6
Move logger initialization to earlier step
2019-02-21 12:41:54 -06:00
Preetha Appan
0149bbc608
cli Ui implementation that logs to a hclogger
...
This makes it so any messages output to the UI *after* the agent has started
will be logged in json format correctly
2019-02-19 17:53:14 -06:00
Alex Dadgar
4bdccab550
goimports
2019-01-22 15:44:31 -08:00
Alex Dadgar
5621086f50
Enable json logs
2019-01-11 11:36:37 -08:00
Chris Baker
d5b1a56f3b
increased config validation coverage for dev mode
2019-01-09 18:56:40 +00:00
Chris Baker
d8a3a74c43
move `if dev` check into config validation, to support dev-mod
...
validation in the future
2019-01-08 22:21:48 +00:00
Chris Baker
220e9e838f
refactored config validation into a new method, modified Meta.Client
...
tests appropriately
2019-01-08 15:07:36 +00:00
Chris Baker
bf00f93d87
moved interp key regex out to a helper function
2019-01-08 00:11:47 +00:00
Chris Baker
a61afad5bb
added validation on client metadata keys
2019-01-07 17:16:38 +00:00
Nick Ethier
b81e4e18f0
agent: suppose filter_default telemetry option
2018-11-19 23:21:48 -05:00
Nick Ethier
85b221a1d6
nomad: add flag to disable publishing of job_summary metrics for dispatched jobs
2018-11-19 23:21:19 -05:00
Alex Dadgar
204ca8230c
Device manager
...
Introduce a device manager that manages the lifecycle of device plugins
on the client. It fingerprints, collects stats, and forwards Reserve
requests to the correct plugin. The manager, also handles device plugins
failing and validates their output.
2018-11-07 10:43:15 -08:00
Alex Dadgar
6f0ed6184b
Fix client reloading and pass the plugin loaders to server and client
2018-10-16 16:56:55 -07:00
Alex Dadgar
3c19d01d7a
server
2018-09-15 16:23:13 -07:00
Alex Dadgar
7739ef51ce
agent + consul
2018-09-13 10:43:40 -07:00
Alex Dadgar
c0de218747
plugin dir parsing
2018-08-30 13:43:09 -07:00
Chelsea Holland Komlo
e8379c9059
skip update checking if DisableUpdateCheck is set to true
2018-08-10 13:08:13 -04:00
Chelsea Holland Komlo
75d631a1c8
fix reload issue for tls certificates in dev mode
2018-07-05 17:08:31 -04:00
Chelsea Holland Komlo
3b5d5c7be8
remove logic to reload RPC connections from agent
2018-06-08 13:14:40 -04:00
Alex Dadgar
8efe9696ad
move log line
2018-06-07 15:12:51 -07:00
Chelsea Holland Komlo
dcc9cdfeb7
fixup! comment and move to always log server reload operation
2018-06-07 17:12:36 -04:00
Chelsea Holland Komlo
9f6bd7bf3a
move logic for testing equality for vault config
2018-06-07 16:23:50 -04:00
Chelsea Holland Komlo
282f37b1ee
fix for dynamically reloading vault
2018-06-07 15:34:18 -04: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
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