Commit Graph

4148 Commits

Author SHA1 Message Date
Sean Chittenden af96cb23a5
Rename `mergedNomadMap` to `mergedPrimaryMap`. Gratuitous, but more correct. 2016-06-10 15:50:11 -04:00
Sean Chittenden f695d6d70d
Reconcile consul's address configuration section.
There were conflicting directives previously, both consul.addr and
consul.address were required to achieve the desired behavior.  The
documentation said `consul.address` was the canonical name for the
parameter, so consolidate configuration parameters to `consul.address`.
2016-06-10 15:50:11 -04:00
Sean Chittenden 9d5cdf4e68
Correct a mismerge
Somewhere along the lines when rebasing I mis-merged a patch.
2016-06-10 15:50:11 -04:00
Sean Chittenden 5e11e25639
Remove testing for an API that doesn't exist any more. 2016-06-10 15:50:11 -04:00
Sean Chittenden d58632e93f
Rename RpcProxy's internal filename to match 2016-06-10 15:50:11 -04:00
Sean Chittenden bd779c3719
Reconcile renamed structures during rebase 2016-06-10 15:50:11 -04:00
Sean Chittenden 108d2ca981
index on f-dyn-server-list: bd38cb4 Remove unused code 2016-06-10 15:50:11 -04:00
Sean Chittenden cbe77754df
Remove unused code 2016-06-10 15:50:11 -04:00
Sean Chittenden ec7c78f533
Only poll Consul for servers when Nomad heartbeats begin to fail
When a deadline timer of 2x Server's last requested TTL expires,
begin polling Consul for Nomad Servers.
2016-06-10 15:50:11 -04:00
Sean Chittenden 882364f4d9
An Agent's consulSyncer is always not nil now. 2016-06-10 15:50:11 -04:00
Sean Chittenden 98cea9ba07
Revise Agent.syncAgentServicesWithConsul()'s interface
Reduce down to its lowest common helper function denominator.
2016-06-10 15:50:11 -04:00
Sean Chittenden b5c70f3729
Alpha sort config keys for Consul 2016-06-10 15:50:11 -04:00
Sean Chittenden a4b32c62e2
s/availble/runChecks/g 2016-06-10 15:50:11 -04:00
Sean Chittenden d1442dc317
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 e60580b279
Define a type for the PeriodicCallback handlers and ShutdownChannel 2016-06-10 15:50:11 -04: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 88f3422d7c
Rename NewConsulService to NewSyncer 2016-06-10 15:49:37 -04:00
Sean Chittenden b9789e0cf7
Rename client/consul/sync.PeriodicSync to Run 2016-06-10 15:49:37 -04:00
Sean Chittenden 768aab015d
Rename client/consul/sync.ConsulService to client/consul/sync.Syncer
Syncer describes the responsibility and actions of the type.
2016-06-10 15:49:37 -04:00
Sean Chittenden b509da2d0c
Create a `nomad/structs/config` to break an import cycle.
Flattening and normalizing the various Consul config structures and
services has led to an import cycle.  Break this by creating a new package
that is intended to be terminal in the import DAG.
2016-06-10 15:48:36 -04:00
Sean Chittenden 6d162e1e03
Fix copy pasta comment.
These parameters are used to bootstrap Nomad servers, not Consul servers.
2016-06-10 15:48:36 -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 bfa4711df5
Rename ConsulConfig to ConsulAgentConfig 2016-06-10 15:48:36 -04:00
Sean Chittenden c7a680c28f
Rename consulConfig to consulAgentConfig 2016-06-10 15:48:36 -04:00
Sean Chittenden 73e173673e
Rename client/config/config's ConsulConfig to ConsulAgentConfig
A follow up commit to the previous rename.  More to come.
2016-06-10 15:48:36 -04:00
Sean Chittenden e97652bbfb
Rename consul.ConsulConfig to consul.AgentConfig
There were two `ConsulConfig` structs running around, one of them
needed to go away.  Rely on the package's path to provide context
for the type of AgentConfig.
2016-06-10 15:48:36 -04:00
Sean Chittenden 4e2835d5ff
Use the correctly typed `rand.Int*` variant 2016-06-10 15:48:36 -04:00
Sean Chittenden 49deaae2ae
Seed random once in main 2016-06-10 15:48:36 -04:00
Sean Chittenden db97a88f94
Fix small typo 2016-06-10 15:48:36 -04:00
Sean Chittenden 66b4b2a99f
Use `rand.Int*n()` where appropriate 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
Sean Chittenden e0e7d94450
Use consul/lib's RateScaledInterval 2016-06-10 15:48:36 -04:00
Alex Dadgar 26c9110e82 fix types 2016-06-10 11:52:15 -07:00
Alex Dadgar b4fa34a854 Merge pull request #1252 from hashicorp/f-blocked-eval-text
Better placement failure text for blocked evals
2016-06-10 11:41:41 -07:00
Alex Dadgar c2fa53346d Merge pull request #1251 from hashicorp/f-alloc-status-resources
Alloc-status only shows measured statistics and fixes to CPU calculations
2016-06-10 11:39:41 -07:00
Alex Dadgar a3d41f2312 use time.Second instead of our own const 2016-06-10 11:38:59 -07:00
Alex Dadgar f006aeeb20 helper 2016-06-10 11:02:15 -07:00
Alex Dadgar 93a8af1422 better placement failure text for blocked evals 2016-06-10 10:56:32 -07:00
Alex Dadgar 3cf74e7fd8 Alloc-status only shows measured statistics and fixes to CPU calculations 2016-06-10 10:38:29 -07:00
Diptanu Choudhury 3ab7d4a512 Merge pull request #1248 from hashicorp/fix-node-cpu-usage
Fixed calculation of cpu usage percent in user and sys mode for pids
2016-06-09 20:47:53 -07:00
Diptanu Choudhury 287e0eff22 Fixed merge conflicts 2016-06-10 04:47:34 +01:00
Diptanu Choudhury a69307cff2 Using named variables 2016-06-10 04:45:16 +01:00
Alex Dadgar 009863ee0d Merge pull request #1247 from hashicorp/f-measured-resources
Annotate what statistics are measured
2016-06-09 20:07:47 -07:00
Diptanu Choudhury 9056be6d86 Fixed calculation of cpu usage percent in user and sys mode for pids 2016-06-10 04:06:32 +01:00
Alex Dadgar 98d7547014 Annotate what is measured 2016-06-09 19:45:41 -07:00
Diptanu Choudhury 872957e015 Merge pull request #1246 from hashicorp/fix-node-cpu-usage
Changed the logic of calculation of node cpu usage
2016-06-09 19:29:12 -07:00
Diptanu Choudhury ef2d630ea4 Changed the logic of calculation of node cpu usage 2016-06-10 03:24:42 +01:00
Alex Dadgar 527afa5119 Merge pull request #1244 from hashicorp/b-eval-reblock-test-hardening
Don't dequeue requeued evals in tests
2016-06-09 11:35:42 -07:00
Alex Dadgar 82b26fb28a changelog 2016-06-08 14:12:23 -07:00
Alex Dadgar 5d43257ad5 Merge pull request #1241 from hashicorp/v-vendor-go-plugin
vendor go-plugin - removes tmp files used to communicate with plugin
2016-06-08 14:11:32 -07:00