Commit Graph

261 Commits

Author SHA1 Message Date
Alex Dadgar
7c3a2d08a3 Merge pull request #1848 from hashicorp/f-vault-error
Thread through whether DeriveToken error is recoverable or not
2016-10-24 15:01:18 -07:00
Alex Dadgar
a877e320c0 Merge pull request #1842 from hashicorp/f-version-and-id
Print the version and client node ID
2016-10-24 10:13:33 -07:00
Alex Dadgar
4d99c19428 Small fixes 2016-10-22 18:20:50 -07:00
Alex Dadgar
42f7bc8e81 Thread through whether DeriveToken error is recoverable or not 2016-10-22 18:08:30 -07:00
Michael Schurter
4d3187bc7e Remove disk usage enforcement
Many thanks to @iverberk for the original PR (#1609), but we ended up
not wanting to ship this implementation with 0.5.

We'll come back to it after 0.5 and hopefully find a way to leverage
filesystem accounting and quotas, so we can skip the expensive polling.
2016-10-21 13:55:51 -07:00
Alex Dadgar
902c3973db Print the version and client node ID 2016-10-20 17:46:04 -07:00
Michael Schurter
96038e85cc Restore lost chan inits 2016-10-03 14:56:50 -07:00
Diptanu Choudhury
c29861b418 Getting snapshot of allocation from remote node (#1741)
* Added the alloc dir move

* Moving allocdirs when starting allocations

* Added the migrate flag to ephemeral disk

* Stopping migration if the allocation doesn't need migration any more

* Added the GetAllocDir method

* refactored code

* Added a test for alloc runner

* Incorporated review comments
2016-10-03 09:59:57 -07:00
Michael Schurter
39219c2ad5 Only log consul errors once since last succesful run 2016-09-28 17:18:45 -07:00
Michael Schurter
ac29e9cffe Remove unused const 2016-09-27 16:04:01 -07:00
Michael Schurter
ec81fc9baf Fix lies found in comments by fact checkers 2016-09-26 16:51:53 -07:00
Michael Schurter
ac90d1de76 No need to put reaper ticker on the struct 2016-09-26 16:15:19 -07:00
Michael Schurter
d6b149678e Drop clumsy timeout on discovery notifications
It's better to just let goroutines fallback to their longer retry
intervals then try to be clever here.
2016-09-26 16:05:21 -07:00
Michael Schurter
93fbc12401 Flip disco chan; clarify method names/comments 2016-09-26 15:52:40 -07:00
Michael Schurter
a4a61e81d5 Return csv of servers from Stats, not just count 2016-09-26 15:40:26 -07:00
Michael Schurter
a35fb33f8f doDisco -> triggerDiscoveryCh; discovered -> serversDiscoveredCh
Also fix log line formatting
2016-09-26 15:21:28 -07:00
Michael Schurter
3bac14324f noServers -> noServersErr 2016-09-26 15:12:35 -07:00
Michael Schurter
01ff307c3e consul -> Consul 2016-09-26 15:06:57 -07:00
Michael Schurter
6d9670e9ab Replace periodic handlers with event driven disco
Remove use of periodic consul handlers in the client and just use
goroutines. Consul Discovery is now triggered with a chan instead of
using a timer and deadline to trigger.

Once discovery is complete a chan is ticked so all goroutines waiting
for servers will run.

Should speed up bootstraping and recovery while decreasing spinning on
timers.
2016-09-23 17:02:48 -07:00
Michael Schurter
64ac9b9359 Retry all servers on RPC call failure
rpcproxy is refactored into serverlist which prioritizes good servers
over servers in a remote DC or who have had a failure.

Registration, heartbeating, and alloc status updating will retry faster
when new servers are discovered.

Consul discovery will be retried more quickly when no servers are
available (eg on startup or an outage).
2016-09-23 11:44:48 -07:00
Alex Dadgar
d49dda45e3 Merge pull request #1713 from hashicorp/f-alloc-runner-vault
Vault integration in client
2016-09-20 16:15:55 -07:00
Alex Dadgar
e5fd8e60a2 Merge pull request #1677 from hashicorp/f-vault-implicit-constraint
Vault implicit Task Group constraint + allow root tokens
2016-09-20 16:15:32 -07:00
Alex Dadgar
c89fd0eb08 Clean up vault client 2016-09-14 18:10:56 -07:00
Alex Dadgar
bec6adb2ee Vault token threaded 2016-09-14 13:30:01 -07:00
Robert Neumayer
0c48c11df2 Log adding of servers at INFO level 2016-09-14 22:24:17 +02:00
Alex Dadgar
335cababe1 Revert "Introduce a Secret/ directory" 2016-09-01 17:23:15 -07:00
Alex Dadgar
cf5cc4f74a Allow root token 2016-09-01 12:05:08 -07:00
Alex Dadgar
7f18d94976 Merge pull request #1671 from hashicorp/f-secret-dir2
Introduce a Secret/ directory
2016-09-01 09:56:17 -07:00
Alex Dadgar
0c050bd62b Symlink on windows 2016-08-31 21:41:44 -07:00
Alex Dadgar
0b07ef93c1 Address comments and reserve 2016-08-31 18:11:02 -07:00
vishalnayak
68b1b30bf5 Addressed review feedback 2016-08-30 13:08:13 -04:00
vishalnayak
082d5e58a4 Return only fatal error to renewal error channel 2016-08-30 12:46:59 -04:00
vishalnayak
dd26f9b4bf Fix tests 2016-08-29 21:30:06 -04:00
vishalnayak
72d2e9d2dd tokenDeriver function pointer to derive tokens.
Remove rpc*, connPool, node and region from vaultclient.
2016-08-29 20:32:05 -04:00
Alex Dadgar
0ebdff2bb7 Secret dir, hello world 2016-08-29 15:41:52 -07:00
vishalnayak
04fab3bc81 Employ DeriveVaultToken API and flesh-up DeriveToken 2016-08-24 12:29:59 -04:00
vishalnayak
6b83d07070 VaultClient for Nomad Client 2016-08-24 09:43:45 -04:00
Diptanu Choudhury
92fc6ba32f Putting the mock driver behind a build flag 2016-08-22 15:02:28 -05:00
Diptanu Choudhury
025f3b424a blocking chained allocations until previous allocation hasn't terminated 2016-08-22 11:34:24 -05:00
Alex Dadgar
1cafd04c94 handle the upgrade case 2016-08-18 19:01:24 -07:00
Alex Dadgar
ba51037fd6 Nodes generate Secret ID and used for retrieving allocations and registering 2016-08-17 16:31:47 -07:00
Alex Dadgar
134dbb1f06 If the client detects that a heartbeat has failed because it is not registered, reregister 2016-08-15 17:24:09 -07:00
Diptanu Choudhury
724a2a2111 Fixed some error messages 2016-08-10 15:17:32 -07:00
Kenjiro Nakayama
a02267ac75 Update after review 2016-08-09 08:57:26 +09:00
Kenjiro Nakayama
59c05eb64b tiny: Return fmt.Errorf instead of duplicated error messages 2016-08-09 08:57:26 +09:00
Diptanu Choudhury
3593649e18 Allow operators to opt into publishing node and alloc metrics 2016-08-01 19:52:20 -07:00
Cameron Davison
d866002f82 fix setup consul syncer error message 2016-07-28 22:14:52 -05:00
Alex Dadgar
cb84b61bfa Node.Register handles the case of transistioning to ready and creating evals 2016-07-21 15:22:02 -07:00
Diptanu Choudhury
5e4d6e1c46 Fixed a debug message 2016-07-09 00:12:53 -07:00
Sean Chittenden
762973e15f Consolidate fingerprinters into a single map. 2016-07-08 23:37:14 -07:00