Alex Dadgar
859f4c5d5e
Increase the timeout to be greater than the RPC hold threshold
2016-08-26 11:13:20 -07:00
Alex Dadgar
4efecc01ea
Pass Vault config to client
2016-08-17 16:23:29 -07:00
Alex Dadgar
be93647df0
Add Vault config to server
2016-08-17 16:23:29 -07:00
Diptanu Choudhury
6811e084f4
Merge pull request #1518 from pubnub/feature/chroot-map-rebase
...
Add config field to specify chroot mapping for exec driver
2016-08-10 17:00:03 -07:00
Jay Oster
1876fc2b10
Add config field to specify chroot mapping for exec driver
...
- Same format as used by the internal chroot mapping
- Map: source_path -> dest_path
- Example HCL:
client {
chroot_env {
"/etc" = "/etc"
"/lib" = "/lib"
"/opt/projects/foo/bin" = "/usr/bin"
}
}
2016-08-03 17:17:17 -07:00
Diptanu Choudhury
3593649e18
Allow operators to opt into publishing node and alloc metrics
2016-08-01 19:52:20 -07:00
Wim
c576c2339b
Use net.JoinHostPort
2016-07-25 23:34:08 +02:00
Wim
b3df64c976
Fix IPv6 advertise addresses
2016-07-25 22:52:18 +02:00
Alex Dadgar
dddf376a04
use microsecond granularity
2016-06-22 15:20:56 -07:00
Alex Dadgar
213f21df45
remove resolving client rpc addr
2016-06-17 14:55:37 -07:00
Sean Chittenden
451c685f1c
Provide nomad.Config with a default LogOutput of os.StdErr
2016-06-17 06:44:10 -07:00
Sean Chittenden
bcf0929c95
Pass a logger arg to NewClient and NewServer
2016-06-16 23:29:23 -07:00
Sean Chittenden
d8d78d72f2
Remove the shutdownCh as an argument, it was already present in the receiver
2016-06-16 23:15:41 -07:00
Sean Chittenden
d82de05b57
Remove client registration of RPC services, only servers have an RPC interface
2016-06-16 18:14:59 -07:00
Sean Chittenden
25aed9826a
Use /v1/agent/servers (vs /v1/agent/self).
2016-06-16 17:40:47 -07:00
Sean Chittenden
6035dbfbe4
Automatically register service checks for HTTP, RPC, and Serf.
2016-06-16 17:34:25 -07:00
Sean Chittenden
5708560527
Merge pull request #1276 from hashicorp/f-consul-server-autojoin
...
Teach Nomad servers how to fall back to Consul.
2016-06-16 14:40:45 -07:00
Diptanu Choudhury
f10df99e5d
Removed the stats block from client configuration
2016-06-16 21:30:29 +01:00
Sean Chittenden
4d149888cc
Define BootstrapExepct as an int32 so it can be manipulated atomically.
2016-06-16 12:00:15 -07:00
Sean Chittenden
ea89976d9d
Teach Nomad servers how to fall back to Consul.
2016-06-15 12:40:51 -07:00
Diptanu Choudhury
eb4a719f67
Added a warn message for deprecated consul options
2016-06-15 02:31:57 +02:00
Sean Chittenden
f1a40c0deb
Disambiguate auto_join from auto_register, rename reg to auto_advertise.
...
Provide an option that describes the value to the user vs the
operation performed by the software. Momentarily introducing
`auto_join`
2016-06-14 12:11:38 -07:00
Alex Dadgar
f320b5a76f
address comments
2016-06-13 17:32:18 -07:00
Alex Dadgar
1e4ec6b2b3
Fix IDs and domain scoping
2016-06-13 16:30:58 -07:00
Diptanu Choudhury
02b320c81e
implemented reconciliation of unwanted services
2016-06-13 14:52:26 +02:00
Alex Dadgar
73600066c4
agent just calls run
2016-06-12 22:30:52 -07:00
Alex Dadgar
c5059fc7c4
Rename ConsulService back to Service
2016-06-12 16:36:49 -07:00
Alex Dadgar
020f8b05d3
only support latest and remove ring buffer
2016-06-12 09:32:38 -07:00
Sean Chittenden
a8b53b05b4
Prefer %+q over %q in log messages.
2016-06-11 18:17:20 -04:00
Sean Chittenden
5331ea7bc6
goling(1) compliance pass (e.g. Rpc* -> RPC)
2016-06-10 23:38:28 -04:00
Sean Chittenden
a423f07d63
Stash client and server registration behind consul.auto_register
2016-06-10 15:54:39 -04:00
Sean Chittenden
05e713cfca
Skip nil check for agent's consulSyncer is always not nil
2016-06-10 15:54:39 -04:00
Sean Chittenden
a4f605a789
Initialize Consul for the Nomad Agent in a more uniform way.
...
Decompose Client and Server registration into `setupClient()` and
`setupServer()`, respectively.
2016-06-10 15:54:39 -04:00
Sean Chittenden
7ad5cd571c
Begin leveraging the Agent-level consul.Syncer
2016-06-10 15:54:39 -04:00
Sean Chittenden
57c2c819e8
Move package client/consul/sync to command/agent/consul.
...
This has been done to allow the Server and Client to reuse the same
Syncer because the Agent may be running Client, Server, or both
simultaneously and we only want one Syncer object alive in the agent.
2016-06-10 15:54:39 -04:00
Sean Chittenden
74e691cab1
Change the API signature of Syncer.SyncServices().
...
SyncServices() immediately attempts to sync whatever information
the process has with Consul. Previously this method would take an
argument of the exclusive list of services that should exist,
however this is not condusive to having a Nomad Client and Nomad
Server share the same consul.Syncer.
2016-06-10 15:54:39 -04:00
Sean Chittenden
acb3d58b82
Refine Nomad's Consul port handling.
...
Previously this would immediately default to '127.0.0.1' if the
config was set to `:some-port-number`. Now it uses the BindAddr
if available. Also, if the `port` option is set to just a port`
number (e.g. '1234'), attempt to parse the port number by itself
to allow statically configured ports to work, even when no host is
specified.
2016-06-10 15:54:39 -04:00
Sean Chittenden
1352f7f0e6
Change client/consul.NewSyncer() to accept a shutdown channel
...
In addition to the API changing, consul.Syncer can now be signaled
to shutdown via the Shutdown() method, which will call the Run()'ing
sync task to exit gracefully.
2016-06-10 15:54:39 -04:00
Sean Chittenden
ab434b4079
Fix typo in comment
2016-06-10 15:50:11 -04:00
Sean Chittenden
a55395678f
Fix tests for client.TestAgent_ServerConfig
...
Add similar logic in Agent `serverConfig()` to set up the
`serverSerfAddr` the same as `serverHttpAddr` and `serverRpcAddr`.
2016-06-10 15:50:11 -04:00
Sean Chittenden
b9f230b7b2
Move client.DefaultConfig() to client/config.DefaultConfig()
...
Resolves an import cycle in testing and is more appropriate because
the default should reside next to its struct definition.
2016-06-10 15:50:11 -04:00
Sean Chittenden
b2357598ba
Register the serf service with the Nomad server service.
...
This will be unused in this PR.
2016-06-10 15:50:11 -04:00
Sean Chittenden
ca0f2d982d
Nuke a.consulConfig in favor of a.consul.Config
2016-06-10 15:50:11 -04:00
Sean Chittenden
3d22c22bf5
Remove types.ShutdownChannel and replace with chan struct{}
2016-06-10 15:50:11 -04:00
Sean Chittenden
4d47eedd58
Teach Client to reuse an Agent's consulSyncer.
...
"There can be only one."
2016-06-10 15:50:11 -04:00
Sean Chittenden
bc86e897ed
Register two services each for clients and servers, http and rpc.
...
In order to give clients a fighting chance to talk to the right port,
differentiate RPC services from HTTP services by registering two
services with different tags. This yields
`rpc.nomad-server.service.consul` and
`http.nomad-server.service.consul` which is immensely more useful to
clients attempting to bootstrap their world.
2016-06-10 15:50:11 -04:00
Sean Chittenden
ce8c03d708
Advertise the server's RPC endpoint, not its HTTP endpoint.
...
Rename c.serverRpcAddr to serverRpcAddr. This will be broken out
into in additional set of services in a subsequent commit.
2016-06-10 15:50:11 -04:00
Sean Chittenden
1fa43a09dd
Reduce all forms of ConsulConfig down to a single struct
...
nomad/structs/config/consul.go's ConsulConfig is the canonical definition
for all things Consul now.
2016-06-10 15:50:11 -04:00
Sean Chittenden
4d30c98aa6
Rename consulConfig to consulAgentConfig
2016-06-10 15:50:11 -04:00
Sean Chittenden
5e0d76f7ce
Rename client/config/config's ConsulConfig to ConsulAgentConfig
...
A follow up commit to the previous rename. More to come.
2016-06-10 15:50:11 -04:00