Alex Dadgar
bcb1a2e216
Do not allow path to escape the alloc dir for the FS commands
2016-10-03 14:58:44 -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
Alex Dadgar
2143ee15a0
Merge pull request #1762 from hashicorp/b-scan-pids
...
Constant size space tracking of pids
2016-09-27 17:28:35 -07:00
Alex Dadgar
42c4346dcf
Constant time space tracking of pids
2016-09-27 16:57:26 -07:00
Michael Schurter
95af8374f0
Merge pull request #1735 from hashicorp/b-bootstrap-flapping
...
Retry all servers on RPC call failure
2016-09-27 16:33:15 -07:00
Michael Schurter
ac29e9cffe
Remove unused const
2016-09-27 16:04:01 -07:00
Diptanu Choudhury
50e3217211
Avoiding copying files if they are already present in chrootw ( #1753 )
2016-09-27 11:43:27 -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
Alex Dadgar
b097191ec6
Test fix
2016-09-26 15:35:59 -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
Diptanu Choudhury
bc82dd67b5
Closing files when files are removed
2016-09-23 22:17:53 -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
Diptanu Choudhury
dd3af85114
Adding a snapshot endpoint on the client ( #1730 )
2016-09-21 21:28:12 -07:00
Alex Dadgar
ee67630889
Struct and parse
2016-09-21 11:31:09 -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
Diptanu Choudhury
0150970620
Ensuring that we are not emitting stats when handle is nil ( #1723 )
...
* Ensuring that we are not emitting stats when handle is nil
* Updated the changelog
2016-09-20 11:29:34 -07:00
Alex Dadgar
5c3acf1b78
Fix comment
2016-09-17 11:31:17 -07:00
Alex Dadgar
00243e8a01
Task runner test
2016-09-15 17:39:08 -07:00
Alex Dadgar
cd8784894d
Alloc runner tests
2016-09-15 17:24:09 -07:00
Alex Dadgar
038991b5e3
Handle recovery failure
2016-09-15 12:50:44 -07:00
Alex Dadgar
5532e911cb
Fix token renewal
2016-09-15 11:20:51 -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
Michael Schurter
bbe884a02b
Merge pull request #1682 from hashicorp/b-sanity-check-state-file
...
Prevent state file corruption and check state file sanity on save
2016-09-13 11:24:34 -07:00
Michael Schurter
78a4befa71
Revert "A nil context isn't an error"
...
This reverts commit fe9fe4c262 .
2016-09-12 12:56:12 -07:00
Diptanu Choudhury
612a16abc3
Fixing alloc runner tests
2016-09-04 19:09:08 -07:00
Diptanu Choudhury
47144fe5e9
Merge pull request #1683 from mwieczorek/enable-syslog-for-windows
...
Enable syslog for windows
2016-09-04 17:07:25 -07:00
Michal Wieczorek
78eaeafc15
Enable syslog server and universal collector for windows
2016-09-05 00:26:36 +02:00
Michael Schurter
fe9fe4c262
A nil context isn't an error
2016-09-02 16:24:53 -07:00
Michael Schurter
8cb85ed120
Don't serialize task states twice in state files
2016-09-02 16:07:06 -07:00
Michael Schurter
8d9468d4c3
Lock around saving state
...
Prevent interleaving state syncs as it could conceivably lead to
empty state files as per #1367
2016-09-02 16:07:06 -07:00
Michael Schurter
6f2b09f676
Add sanity check to SaveState
...
Also just reuse the task states snapshot taken by `Alloc()` instead of
doing a redundant copy.
2016-09-02 16:07:06 -07:00
Alex Dadgar
afee832f2c
syscall error
2016-09-02 15:00:46 -07:00
Alex Dadgar
4bae54741e
Secret dir materialized in alloc/task directory
2016-09-02 12:44:05 -07:00
Alex Dadgar
335cababe1
Revert "Introduce a Secret/ directory"
2016-09-01 17:23:15 -07:00
Alex Dadgar
ca906ac660
small fixes
2016-09-01 13:38:31 -07:00
Alex Dadgar
cf5cc4f74a
Allow root token
2016-09-01 12:05:08 -07:00
Alex Dadgar
f9391f041c
Fingerprint
2016-09-01 11:10:14 -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