Commit Graph

273 Commits

Author SHA1 Message Date
Diptanu Choudhury
afa7e5dca4 Making the client use tls if the node from which migration has to be made has enabled tls 2016-10-31 10:20:04 -07:00
Michael Schurter
c4c06d3fe2 Swap log line classifiers to be consistent 2016-10-28 14:59:48 -07:00
Diptanu Choudhury
c8afc418c9 Adding the alloc if we can't find the TG 2016-10-27 15:45:10 -07:00
Diptanu Choudhury
a9f5799f5a Not blocking for remote alloc if the alloc is not sticky 2016-10-27 12:04:55 -07:00
Alex Dadgar
a186f7a26d Merge pull request #1806 from hashicorp/f-docker4mac-fixes
A couple fixes to make Docker For Mac work
2016-10-27 09:29:40 -07:00
Diptanu Choudhury
70ec22fadf Merge pull request #1853 from hashicorp/f-rpc-http-tls
TLS support for http and RPC
2016-10-25 16:14:43 -07:00
Diptanu Choudhury
f416ac7419 Moved tlsutil into helpers 2016-10-25 16:05:37 -07:00
Diptanu Choudhury
ac5f6fcbe1 Moving the certs into tlsutil package 2016-10-25 16:01:53 -07:00
Diptanu Choudhury
ecfb24d521 Moving the TLSConfig to structs 2016-10-25 15:57:38 -07:00
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
Diptanu Choudhury
11c1583467 Implemented TLS support for http and rpc 2016-10-23 22:22:00 -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
Evan Phoenix
e2c0abd281 Make EvalSymlink errors more verbose 2016-10-12 17:07:21 -07:00
Evan Phoenix
04e1e0275c Resolve alloc/state directories to make Docker For Mac happy
* In -dev mode, `ioutil.TempDir` is used for the alloc and state
directories.
* `TempDir` uses `$TMPDIR`, which os OS X contains a per user
directory which is under `/var/folder`.
* `/var` is actually a symlink to `/private/var`
* Docker For Mac validates the directories that are passed to bind and on
OS X. That whitelist contains `/private`, but not `/var`. It does not
expand the path, and so any paths in `$TMPDIR` fail the whitelist check.

And thusly, by expanding the alloc/state directories the value passed
for binding does contain `/private` and Docker For Mac is happy.
2016-10-12 17:06:25 -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