Michael Schurter
4f45aece4b
Fingerprint rkt volume support and make periodic
...
Fix rkt docs and custom volume mounting
2016-10-25 09:46:49 -07:00
Michael Schurter
5d358c7eba
Allow mounting alloc-dir-relative paths in docker
2016-10-25 09:46:49 -07:00
Michael Schurter
49ed6da0ad
Enable rkt and docker volume mounting by default
2016-10-25 09:46:49 -07:00
Michael Schurter
f075bda9b9
Make volume name unique
2016-10-25 09:46:49 -07:00
Michael Schurter
83a11fc93b
Bump minimum required rkt version; update docs
...
Make section names match between docker and rkt
2016-10-25 09:46:49 -07:00
Michael Schurter
edf657b58a
Fix docker reference in rkt test
2016-10-25 09:46:49 -07:00
Michael Schurter
02ed35bd1c
Add arbitrary volume support to rkt
2016-10-25 09:46:49 -07:00
Michael Schurter
473c28824c
Fix standard mounts in rkt and tests
2016-10-25 09:46:49 -07:00
Alex Dadgar
03eba049ed
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
5577e53b20
Merge pull request #1845 from hashicorp/f-remove-disk-usage-acct
...
Remove disk usage enforcement
2016-10-22 19:01:51 -07:00
Alex Dadgar
e85a67a49a
Fix signal test for docker
2016-10-22 18:32:48 -07:00
Alex Dadgar
0070178741
Thread through whether DeriveToken error is recoverable or not
2016-10-22 18:08:30 -07:00
Michael Schurter
d937d3aede
Fix comment form
2016-10-21 16:56:33 -07:00
Michael Schurter
285e80ac0f
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
41b5679015
Advertise signalling abilities
2016-10-19 15:06:23 -07:00
Alex Dadgar
ae1ea0e5ba
Actually mount the local directory
2016-10-18 15:57:12 -07:00
Alex Dadgar
36cfe6e89e
Large refactor of task runner and Vault token rehandling
2016-10-18 11:24:20 -07:00
Alex Dadgar
53eeec9bc1
Merge pull request #1801 from hashicorp/f-signals
...
Consul-template signal change mode
2016-10-18 11:23:47 -07:00
Michael Schurter
34f7cbd10f
Disable lxc by default
2016-10-13 13:22:12 -07:00
Michael Schurter
1dbb2b7164
Cleanup comments/whitespace
2016-10-13 13:05:55 -07:00
Michael Schurter
38b2020291
Mount secret dir
2016-10-13 12:45:33 -07:00
Diptanu Choudhury
4e86a5f906
throwing an error if stats line can't be converted to k/v pair
2016-10-12 17:18:58 -07:00
Diptanu Choudhury
ea5d9d959a
Bind mounting alloc dir into container
2016-10-12 17:18:58 -07:00
Diptanu Choudhury
6312ea3f8f
Setting the network type
2016-10-12 17:18:58 -07:00
Diptanu Choudhury
ce334e0e04
Adding cpu resource limits
2016-10-12 17:18:58 -07:00
Diptanu Choudhury
bb2a580ef1
Implemented an LXC Driver
2016-10-12 17:18:58 -07:00
Evan Phoenix
8864a506aa
Disable the syslog logging system on Docker For Mac
...
The syslog logging system depends on the ability for a unix socket to be
accessed by the docker daemon in the $TMPDIR of the host. This doesn't
work on Docker For Mac because the docker daemon is running inside a VM,
and while /tmp is accessible, the filesystem used to share them doesn't
support unix socket files, and thus it doesn't work.
2016-10-12 17:07:21 -07:00
Alex Dadgar
eec1a154ec
add plugin kill
2016-10-12 13:24:22 -07:00
Alex Dadgar
86238387e7
Send Executor Ctx separately
2016-10-12 11:35:29 -07:00
Michael Schurter
ca5439eca1
Add NOMAD_JOB_NAME to environment
2016-10-11 11:20:42 -07:00
Alex Dadgar
bc35eaee21
Task runner sends signals
2016-10-10 15:09:00 -07:00
Alex Dadgar
00a1234c55
Executor + Java/Raw Exec/Exec
2016-10-10 11:47:04 -07:00
Alex Dadgar
5b01b1be1b
Rkt
2016-10-10 11:47:04 -07:00
Alex Dadgar
280af8f4d1
Docker + Qemu
2016-10-10 11:47:04 -07:00
Michael Schurter
f0d04bd798
Add comment and fix log line code style
2016-10-07 11:58:21 -07:00
Michael Schurter
523dbfcc81
Remove VolumesFrom feature
...
Since containers are named with alloc ids it's difficult to use safely.
Not to mention task scheduling ordering issues could break it as well.
2016-10-07 11:58:13 -07:00
Michael Schurter
f777faba00
Add comments to config key constants
2016-10-03 16:04:33 -07:00
Michael Schurter
0d66b8aef0
Only launch syslog server if container uses syslog
2016-10-03 15:22:10 -07:00
Michael Schurter
44219cc083
Put docker volume support behind conf flag
...
Also add tests and fix bug with logging driver configuration.
2016-10-03 15:02:50 -07:00
Jan-Hendrik Lendholt
a26a501120
Fixed a bug when giving in another logging driver than syslog.
...
Before this commit, if the Logging config did not contain a logging option "syslog-address", it would definitely insert this option.
If then, you decide to take another logdriver than syslog, docker would fail because it received a wrong log option for the selected driver.
Now, nomad will only insert the syslog address in a hard way if there are no logging options at all - this way it keeps the default nomad settings.
2016-10-03 15:02:50 -07:00
Jan-Hendrik Lendholt
6c7cbe5fcb
Added support to mount host folders into container. For example if you don't want to bake certificates into the container, you can mount them into the directory directly.
...
Furthermore, I added support for volumes-from.
Currently, there is no support to move the data from one container to another, hence: If a container spawns on another host, it is very likely, that the data will not be found.
2016-10-03 15:02:49 -07:00
Jan-Hendrik Lendholt
ac5cde4641
Added logging options support for docker driver
2016-10-03 15:02:49 -07:00
Alex Dadgar
320b89d57a
Constant time space tracking of pids
2016-09-27 16:57:26 -07:00
Alex Dadgar
b28e817b1d
Test fix
2016-09-26 15:35:59 -07:00
Alex Dadgar
12de69a66f
Struct and parse
2016-09-21 11:31:09 -07:00
Alex Dadgar
50efdb00e9
Merge pull request #1713 from hashicorp/f-alloc-runner-vault
...
Vault integration in client
2016-09-20 16:15:55 -07:00
Alex Dadgar
0fefaef008
Alloc runner tests
2016-09-15 17:24:09 -07:00
Alex Dadgar
6702a29071
Vault token threaded
2016-09-14 13:30:01 -07:00
Diptanu Choudhury
0f77d81f7d
Merge pull request #1683 from mwieczorek/enable-syslog-for-windows
...
Enable syslog for windows
2016-09-04 17:07:25 -07:00
Michal Wieczorek
94071fc294
Enable syslog server and universal collector for windows
2016-09-05 00:26:36 +02:00
Alex Dadgar
eef786dd9d
Secret dir materialized in alloc/task directory
2016-09-02 12:44:05 -07:00
Alex Dadgar
2c8dd8bbd3
Revert "Introduce a Secret/ directory"
2016-09-01 17:23:15 -07:00
Alex Dadgar
1ed454dd60
Merge pull request #1671 from hashicorp/f-secret-dir2
...
Introduce a Secret/ directory
2016-09-01 09:56:17 -07:00
Alex Dadgar
5d3b47e648
Address comments and reserve
2016-08-31 18:11:02 -07:00
Alex Dadgar
0626eb9619
environment variables
2016-08-31 13:56:11 -07:00
Alex Dadgar
d59e14eed4
Interface + tests
2016-08-30 21:40:32 -07:00
Michael Schurter
32626ac608
Remove unused embedded lock on ExecContext
2016-08-26 11:58:03 -07:00
Diptanu Choudhury
e9b27a528c
Fixed the raw_exec fingerprint test
2016-08-24 13:38:43 -05:00
Diptanu Choudhury
10e10b2fe1
fixed the qemu fingerprinter test
2016-08-24 12:25:02 -05:00
Diptanu Choudhury
9309247f9d
Fixed a java test
2016-08-23 16:51:09 -05:00
Diptanu Choudhury
05fe72e89e
fixed the exec fingerprinter test
2016-08-23 16:40:56 -05:00
Diptanu Choudhury
588a4802c1
removing driver_mock
2016-08-23 16:05:03 -05:00
Alex Dadgar
0f3ec9c759
Fix TestDockerDriver_Fingerprint
2016-08-23 10:39:40 -07:00
Alex Dadgar
1da8566322
Merge pull request #1580 from hashicorp/f-disk-usage-monitoring
...
Monitor and enforce shared allocation directory disk usage
2016-08-23 09:49:53 -07:00
Diptanu Choudhury
1e1eef56a1
Putting the mock driver behind a build flag
2016-08-22 15:02:28 -05:00
Diptanu Choudhury
4ca623bcfe
blocking chained allocations until previous allocation hasn't terminated
2016-08-22 11:34:24 -05:00
Kenjiro Nakayama
b06c6d9311
driver.docker: tiny: debug messages output task name instead of image name
2016-08-21 19:51:32 +09:00
Ivo Verberk
2a17895a83
Disk resource monitoring and enforcement
2016-08-18 07:59:03 +02:00
Diptanu Choudhury
dc0e395982
re-using copyimage
2016-08-17 15:25:03 -07:00
Diptanu Choudhury
0d7cd53c63
Fixed docker tests
2016-08-17 15:25:03 -07:00
Diptanu Choudhury
ab7f8847c1
changing error statement
2016-08-17 13:48:31 -07:00
Diptanu Choudhury
2968ce9399
Fixed the docker script check
2016-08-17 13:23:48 -07:00
Alex Dadgar
3b9188fcf0
Merge pull request #1598 from nak3/rkt-fix5
...
driver.rkt: Remove unnecessary job validation
2016-08-16 15:12:45 -07:00
Kenjiro Nakayama
c97beb8deb
driver.rkt: Remove unnecessary job validation
2016-08-16 23:33:34 +09:00
ramukima
4f18963a97
go fmt performed code when copied from another directory got messed up again ? Ok, ran go fmt again
2016-08-16 09:20:13 -04:00
ramukima
17b902f20f
issue-1588 : Allow extra driver config args as a passthrough for qemu executable from a task specification
2016-08-15 23:36:13 -04:00
Alex Dadgar
64b86bed0d
Merge pull request #1581 from nak3/fix-rkt2
...
Set host environment variables to taskEnv of rkt driver
2016-08-15 10:31:10 -07:00
Alex Dadgar
a2b603bd82
Merge pull request #1586 from nak3/rkt-fix3
...
tiny: Catch error returned from SyncServices in rkt driver
2016-08-15 10:29:28 -07:00
Kenjiro Nakayama
d0ccdacd08
rkt.driver: Fix wrong MB calculation
2016-08-14 14:27:42 +09:00
Kenjiro Nakayama
906526fbe0
tiny: Catch error returned from SyncServices in rkt driver
2016-08-14 13:11:17 +09:00
Kenjiro Nakayama
0efc0e0231
Set host environment variables to taskEnv of rkt driver
2016-08-14 00:42:53 +09:00
Diptanu Choudhury
8c8d00dd5b
Merge pull request #1572 from hashicorp/fix-docker-test
...
Fixed docker tests
2016-08-12 13:04:33 -07:00
Diptanu Choudhury
f3420c65e3
Updated the busybox images
2016-08-12 11:39:58 -07:00
Diptanu Choudhury
dd7e69006e
Not running tests parallal
2016-08-11 21:53:27 -07:00
Alex Dadgar
b34d65f1a5
Update test.sh
2016-08-11 21:35:50 -07:00
Diptanu Choudhury
839ecd1df6
Fixed docker tests
2016-08-11 19:28:41 -07:00
Alex Dadgar
b3dca54a1a
Wrap file rotator tests in wait for
2016-08-11 19:23:03 -07:00
Diptanu Choudhury
b71f687f62
Merge pull request #1413 from hashicorp/b-tests
...
Fix flaky tests
2016-08-11 18:15:29 -07:00
Diptanu Choudhury
9a75052d2c
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
Kenjiro Nakayama
6ec6c27cb4
Update debug option from string to bool
2016-08-09 16:51:00 +09:00
Kenjiro Nakayama
11a8a7218e
Add debug option to rkt task config
2016-08-09 09:01:05 +09:00
Jay Oster
09113ffbc8
Fix Linux executor isolation test
...
- Properly expects the hard-coded mounts (alloc, dev, and proc) and hardcoded local directories (local and tmp)
- Also verifies that etc contains only the requested paths
2016-08-08 14:04:09 -07:00
Diptanu Choudhury
fb178a1f5f
Merge pull request #1477 from nak3/add-syslog_server-test
...
Add Syslog server start shutdown test
2016-08-05 12:01:24 -07:00
Alex Dadgar
ddd8adce96
changelog + use driver config
2016-08-05 10:55:20 -07:00
Alex Dadgar
f8e4bc73c9
Merge pull request #1493 from nak3/rkt-fix1
...
Pass command and trust_prefix to the validation of rkt task configuration
2016-08-05 10:52:02 -07:00
Alex Dadgar
096956257d
changelog
2016-08-05 10:47:44 -07:00
Kenjiro Nakayama
fc1195b7ea
Add Syslog server start shutdown test
2016-08-06 02:01:33 +09:00
Michal Wieczorek
b688261a99
Set windows containers default network mode to 'nat'
2016-08-05 06:01:26 +02:00
Jay Oster
2ae059b41d
Address review comments
...
- Simplify map length check in Linux Executor
- Added a `chroot_env` test for config parser
- Moved `ChrootEnv` field from ExecutorCommand to ExecutorContext
- Added a test for `chroot_env` functionality
2016-08-04 15:33:06 -07:00
Diptanu Choudhury
531b619ce4
Merge pull request #1475 from mwieczorek/windows-hostIp-portBindings
...
Empty host ip for windows containers port bindings
2016-08-04 13:30:43 -07:00
Alex Dadgar
1fe4158097
Merge pull request #1519 from vrenjith/master
...
Remove docker volumes while removing container
2016-08-04 12:54:00 -07:00
Jay Oster
24e8f752ab
Add chroot_env to Java driver (which uses the exec driver internally)
2016-08-04 11:15:35 -07:00
Kenjiro Nakayama
cd12645e4c
Add TestRktTaskValidate
2016-08-04 23:15:13 +09:00
Kenjiro Nakayama
bf27963903
Add TestRktTrustPrefix
2016-08-04 17:26:10 +09:00
Kenjiro Nakayama
1176fd123e
Pass command and trust_prefix to the validation of rkt task configuration
2016-08-04 17:24:56 +09:00
vrenjith
41cf7cc623
Update docker.go
...
Remove container volumes
2016-08-04 11:43:50 +05:30
vrenjith
4e603e1306
Update checks_test.go
...
Remove docker volumes while exiting container
2016-08-04 11:42:47 +05:30
Jay Oster
7df692226a
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
Mathias Lafeldt
0727db4ca0
Test configuration of Docker working directory
2016-08-03 16:35:49 +02:00
Mathias Lafeldt
d91f7dbdf8
Docker driver: allow to configure working directory
2016-08-03 16:18:15 +02:00
Alex Dadgar
47f5c8f523
use priviledge of the config
2016-08-02 16:10:15 -07:00
Alex Dadgar
cec6d8a1eb
remove gating of ipc, user ns and pidmode based on hosts priviledge mode config
2016-08-02 16:02:34 -07:00
Alex Dadgar
2999c12ef1
disable swap
2016-07-28 12:17:00 -07:00
Michal Wieczorek
4b82b6c3d4
Empty host ip for windows containers port bindings
2016-07-28 00:00:57 +02:00
Diptanu Choudhury
22af229cef
Merge pull request #1321 from mwieczorek/f-windows-binds
...
Volume binds for windows containers
2016-07-18 10:20:44 -06:00
Alex Dadgar
807bf3cf6c
tests wait for the container to start
2016-07-12 11:36:06 -06:00
Alex Dadgar
e1d68f3e9b
Docker host network test
2016-07-12 10:59:34 -06:00
Diptanu Choudhury
ed3be34105
Introduced an env var for rkt tests
2016-07-11 15:48:16 -06:00
Diptanu Choudhury
4e0b621ffa
Skipping travis tests and not installing rkt on travis
2016-07-11 15:10:09 -06:00
Sean Chittenden
a9b3f5e552
Alpha-sort the build platforms
2016-07-11 12:23:46 -07:00
Sean Chittenden
267198742f
Merge branch 'master' into f-resource-isolation-fingerprinter
2016-07-11 12:23:09 -07:00
Diptanu Choudhury
e2909db9ef
Merge pull request #1388 from novilabs/support-docker-syslog-unixformat-and-defaultformat
...
Support docker syslog unixformat and defaultformat
2016-07-11 11:17:30 -07:00
Alex Dadgar
f11b1ce079
Get windows to build
2016-07-11 11:52:41 -06:00
Sean Chittenden
9966169596
Merge branch 'f-resource-isolation-cleanup' into f-resource-isolation-fingerprinter
2016-07-11 00:10:21 -07:00
Sean Chittenden
d20c5fc327
Merge pull request #1402 from hashicorp/f-resource-isolation-cleanup
...
Resource isolation cleanup
2016-07-11 02:09:35 -05:00
Sean Chittenden
be272168c7
Rename resourceContainer{,Context} and resCon{,Ctx}.
2016-07-11 00:02:55 -07:00
Sean Chittenden
1c14e01ac0
Add a comment describing IsolationConfig
2016-07-10 23:45:44 -07:00
Sean Chittenden
2983bd6fce
Fix test for non-Linux platforms.
...
The following tests now check a whitelist for whether or not their
driver is present or not, or if the OS is supported or not.
* `TestAllocDir_MountSharedAlloc`
* `TestClient_Drivers_InWhitelist` (`exec` driver)
* `TestClient_Drivers` (`exec` driver)
* `TestJavaDriver_Fingerprint` (`java` driver)
2016-07-10 15:19:49 -07:00
Sean Chittenden
d4fe69ddf9
Update comments and pushdown a lock into the resource container
2016-07-10 00:12:59 -07:00
Sean Chittenden
fc9cd8d4af
Push down the Linux-specific bits into resourceContainer
2016-07-10 00:06:53 -07:00
Sean Chittenden
6fc269d2a6
Move unit tests around into per-platform where appropriate.
2016-07-09 23:56:31 -07:00
Sean Chittenden
a5dc6c2da9
Push the Client's cleanup of Cgroups down
2016-07-09 23:45:33 -07:00
Sean Chittenden
5dbc0bf382
Rename resourceContainer.cleanup() to executorCleanup()
...
Not to be confused with the imminent ClientCleanup().
2016-07-09 23:25:33 -07:00
Sean Chittenden
5f8f0a50ac
Begin cgroup pushdown into platform specific files
2016-07-09 23:01:14 -07:00
Diptanu Choudhury
e5310b76a6
Merge pull request #1399 from hashicorp/b-exec-cleanup
...
WIP: Cleanup exec driver
2016-07-09 00:08:43 -07:00
Sean Chittenden
7530b27014
Move all non-Linux Fingerprinter items to the default exec driver
2016-07-08 18:35:46 -07:00
Diptanu Choudhury
5d61fa01f1
Fixed tests
2016-07-08 18:27:51 -07:00
Diptanu Choudhury
3c4002c48b
Fixed the client tests
2016-07-08 17:49:58 -07:00
Diptanu Choudhury
1784d98182
Fixed the host port environment variable
2016-07-08 15:37:44 -07:00
Cameron Davison
921a6c889c
remove the expected leading space, after the colon in syslog
2016-07-06 11:08:24 -05:00
Cameron Davison
07a9e15560
get into the hour minute second part of the time before looking for spaces, and then looking for the : seperator
2016-07-06 11:08:24 -05:00
Wojciech Bederski
a73422b4ff
Fix docker driver lockup during nomad boot
...
Unit mismatch caused docker driver to wait almost indefinitely during boot
(when one or more containers were a bit uncooperative during StopContainer())
This should fix problems described in #1202
2016-06-28 14:26:47 +02:00
Diptanu Choudhury
0a10873aa6
Merge pull request #1335 from hashicorp/f-set-docker-timeout
...
Setting a timeout in the docker client
2016-06-21 17:00:14 -07:00
Diptanu Choudhury
2837d3395d
Setting a timeout in the docker client
2016-06-21 16:58:21 -07:00
Diptanu Choudhury
1d5c5b18f3
Making SSL default
2016-06-21 16:41:14 -07:00
Alex Dadgar
661dc200f3
Make line copy to avoid being overriden by subsequent scans
2016-06-20 13:14:43 -07:00
Michal Wieczorek
67a04bb1cc
Volume binds for windows containers
2016-06-20 21:46:33 +02:00
Alex Dadgar
c9f7467ccb
Driver tests use client default config
2016-06-17 14:24:49 -07:00
Sean Chittenden
7b9961f09b
Initialize the stats helpers before accessing them for the first time
2016-06-17 13:23:30 -07:00
Alex Dadgar
27c6398639
debug message when stopping container
2016-06-17 11:52:44 -07:00
Diptanu Choudhury
266c417ac8
Changed the client options for docker volume selinux labels
2016-06-16 21:41:02 +01:00
Diptanu Choudhury
fa216199ce
Added documentation
2016-06-15 02:42:15 +02:00
Diptanu Choudhury
e08083acfe
Added a client options for setting selinux options
2016-06-15 02:33:09 +02:00
Alex Dadgar
4b04e503f3
address comments
2016-06-13 17:32:18 -07:00
Alex Dadgar
8bbf4a55e5
Fix IDs and domain scoping
2016-06-13 16:30:58 -07:00
Diptanu Choudhury
d019d8ef8e
implemented reconciliation of unwanted services
2016-06-13 14:52:26 +02:00
Alex Dadgar
232654cdee
register checks
2016-06-12 21:28:56 -07:00
Alex Dadgar
a82c2bb058
Do not reconcile in client and cleanup executor a bit
2016-06-12 18:22:07 -07:00
Alex Dadgar
8e231fa382
Rename ConsulService back to Service
2016-06-12 16:36:49 -07:00
Alex Dadgar
e931b42473
unify cli output
2016-06-12 13:16:07 -07:00
Alex Dadgar
6ef4bfd6bf
skip docker test if no docker found
2016-06-12 11:28:43 -07:00
Alex Dadgar
2628827b7c
Merge pull request #1262 from hashicorp/remove-artifact-check
...
Removing artifact check for java and qemu drivers
2016-06-12 11:21:18 -07:00
Alex Dadgar
c4a819528a
Merge pull request #1260 from hashicorp/f-alloc-stats-struct
...
Allocation resources returned in a struct
2016-06-12 11:18:57 -07:00
Diptanu Choudhury
34f85baab0
Fix the calculation of total ticks for docker and exec
2016-06-12 18:08:35 +02:00
Diptanu Choudhury
beb362e202
Setting a flag to indicate whether fs isolation is indeed happening
2016-06-12 15:43:24 +02:00
Diptanu Choudhury
641cf50682
Not converting the abs path relative to task dir for drivers which enforce FS isolation only in linux
2016-06-12 13:54:30 +02:00
Alex Dadgar
e952540f6f
Allocation resources returned in a struct
2016-06-11 21:04:10 -07:00
Sean Chittenden
2f036231e5
Merge pull request #1201 from hashicorp/f-dyn-server-list
...
Dynamic Server Lists/Client Bootstrapping via consul.
2016-06-11 18:58:25 -04:00
Sean Chittenden
445783889b
Remove default values and use nil for the executor. Much better.
2016-06-11 17:52:09 -04:00
Diptanu Choudhury
19f4adbcf1
Using a different client for collecting stats and waiting on containers
2016-06-11 20:37:29 +02:00
Diptanu Choudhury
7fb507e810
Moving the clkspeed code to helper
2016-06-11 17:31:49 +02:00
Sean Chittenden
f891fa0ec8
Perform a nil-check for Executor's consulServices.
...
Executors can `Shutdown()` before calling `SyncServices()`.
2016-06-10 23:43:54 -04:00
Diptanu Choudhury
59540c3e93
Extracted a method for getting clock speed
2016-06-11 02:07:28 +02:00
Diptanu Choudhury
f94f89b6d7
Pruning out pids which are no longer present
2016-06-11 01:40:52 +02:00
Diptanu Choudhury
0a9a3918d6
Not reset-ing the list of pids if they don't change
2016-06-11 01:19:50 +02:00
Diptanu Choudhury
c38a6fb3c5
Implementing the total ticks per task for the docker driver
2016-06-10 23:33:25 +02:00
Diptanu Choudhury
2d3798b076
Calculating the cpu ticks in nomad client
2016-06-10 22:22:32 +02:00
Sean Chittenden
d99467ef5e
Always create a consul.Syncer. Use a default Consul Config if necessary.
2016-06-10 15:55:27 -04:00
Sean Chittenden
f6a0459ae5
Always create a consul.Syncer. Use a default Consul Config if necessary.
2016-06-10 15:55:27 -04:00
Sean Chittenden
cc6e8792e0
Create a consulContext using a client's consul config.
...
This is wrong and should be the Agent's Consul Config. This is a
step in the right direction, so committing to mark the necessary
future change.
2016-06-10 15:54:39 -04:00
Sean Chittenden
9a223936bb
Generate and sync Consul ServiceIDs consistently
2016-06-10 15:54:39 -04:00
Sean Chittenden
3892a0433e
Move the start of the UniversalExecutor's consulSyncer to initialize once
...
This should be handled via a sync.Once primative, but I don't want to
unpack that atm.
2016-06-10 15:54:39 -04:00
Sean Chittenden
7956eb0c80
Rename structs.Task's `Service` attribute to `ConsulService`
2016-06-10 15:54:39 -04:00
Sean Chittenden
8c813630e6
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
d6ef97911b
Rename Syncer.SetServiceIdentifier to SetServiceRegPrefix()
...
This attribute isn't actually an identifier because it can represent
a collection of services. Rename `serviceIdentifier` to
`serviceRegPrefix which more accurately conveys the intention of this
Syncer attribute.
While here, also rename `SetServiceIdentifier()` to `SetServiceRegPrefix()`
and `GenerateServiceIdentifier()` to `GenerateServicePrefix()`.
2016-06-10 15:54:39 -04:00
Sean Chittenden
6b126ce488
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
555f4fe135
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
82d537fbd9
Update the `nomad_server_service` default from `nomad-server` to just `nomad`.
2016-06-10 15:50:11 -04:00
Sean Chittenden
10d1b6ba9b
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
0dbd16aa5d
Rebalance Nomad client RPCs among different Nomad servers.
...
Implement client/rpc_proxy.RpcProxy.
2016-06-10 15:50:11 -04:00
Sean Chittenden
a13cbe73c3
Rename ConsulConfig to ConsulAgentConfig
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
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
bfa4711df5
Rename ConsulConfig to ConsulAgentConfig
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
Alex Dadgar
26c9110e82
fix types
2016-06-10 11:52:15 -07:00
Alex Dadgar
a3d41f2312
use time.Second instead of our own const
2016-06-10 11:38:59 -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
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
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
4027ff56f0
Returning an error if stats collection hasn't started yet for a new docker container
2016-06-06 18:52:54 -07:00
Alex Dadgar
4e15611339
fix wait result being nil and some panics in the cli
2016-05-31 23:09:05 +00:00
Diptanu Choudhury
f95b1d00c3
Renamed error message in alloc endpoint
2016-05-28 20:03:52 -07:00
Diptanu Choudhury
11d1dd113b
Added a test for docker
2016-05-28 19:59:20 -07:00
Diptanu Choudhury
c0dc6cfbf2
Changing the api of the stats endpoints
2016-05-28 19:59:20 -07:00
Diptanu Choudhury
a0c279f3b2
comments
2016-05-28 19:59:20 -07:00
Diptanu Choudhury
4c85f02072
Stopping the metrics collector timers using defer and starting to collect host stats right away
2016-05-28 19:59:20 -07:00
Diptanu Choudhury
40e60ce920
Making the call to Stats on a go-routine
2016-05-28 19:59:20 -07:00
Diptanu Choudhury
c8f5527158
Added a test to validate we are collecting stats
2016-05-28 19:59:20 -07:00
Diptanu Choudhury
a64062d6a6
Fixed the compilation on linux
2016-05-28 19:59:20 -07:00
Diptanu Choudhury
2ff43788a0
simplified the stats method in basic executor
2016-05-28 19:59:20 -07:00
Diptanu Choudhury
097bab52a9
Fixed the logic of scanpids
2016-05-28 19:59:20 -07:00
Diptanu Choudhury
75c7f84490
Simplified the docker stats collection
2016-05-28 19:59:20 -07:00
Diptanu Choudhury
98016ec066
Incorporated review comments for executor
2016-05-28 19:59:20 -07:00
Diptanu Choudhury
313c61b9db
Added pidstats in task resource usage struct
2016-05-28 19:59:20 -07:00
Diptanu Choudhury
cfd3016747
Renamed CpuUsage to CpuStats
2016-05-28 19:59:20 -07:00
Diptanu Choudhury
77357ccf80
Added a test for calculating cpu stats
2016-05-28 19:59:20 -07:00
Diptanu Choudhury
84cd943c48
Stopping stats collection of tasks which has been destroyed
2016-05-28 19:59:20 -07:00
Diptanu Choudhury
193bbc10f8
Fixed the percentage calculation for cgroups
2016-05-28 19:59:20 -07:00
Diptanu Choudhury
7744a41358
Added some docs
2016-05-28 19:59:03 -07:00
Diptanu Choudhury
b884253d39
Added locks to RingBuf
2016-05-28 19:59:03 -07:00
Diptanu Choudhury
22c3f6fee0
Implemented nomad cpu percentage calculator
2016-05-28 19:59:03 -07:00
Diptanu Choudhury
e37a108b4c
Implemented cpu stats
2016-05-28 19:51:22 -07:00
Diptanu Choudhury
1789dbd1ff
Fixed implementation of the docker stats
2016-05-28 19:51:22 -07:00
Diptanu Choudhury
9790516a22
Added the PidStats method on the executor
2016-05-28 19:42:34 -07:00
Diptanu Choudhury
63166d0e46
Adding a query param to return time series of stats
2016-05-28 19:42:34 -07:00
Diptanu Choudhury
c347b27e6a
Implemented stats for raw_exec
2016-05-28 19:42:34 -07:00
Diptanu Choudhury
91d2cf319e
Added some documentation
2016-05-28 19:42:34 -07:00
Diptanu Choudhury
f3d0aecafe
Reporting time series of stats
2016-05-28 19:42:34 -07:00
Diptanu Choudhury
13825f434e
Added the nomad stats command
2016-05-28 19:42:34 -07:00
Diptanu Choudhury
2b86bb3396
Added cpu stats
2016-05-28 19:42:34 -07:00
Diptanu Choudhury
0fb0e0237f
Added a client API to display resource usage of an allocation
2016-05-28 19:42:34 -07:00
Diptanu Choudhury
6c1b60ff07
Add the Stats api to driverhandle
2016-05-28 19:42:34 -07:00
Daniel Kerwin
df7f5175a8
Add support for shm_size to docker driver. Required update of go-dockerclient
...
to more recent version (ba4298ecf4cfa216f1cce2befbf653359f62c722).
2016-05-27 12:30:04 +02:00
Diptanu Choudhury
76509eb230
Fixed docker test
2016-05-22 02:49:33 -07:00
Sean Chittenden
dc28ab0cb5
Speling police
2016-05-15 09:41:34 -07:00
Diptanu Choudhury
2e2e2e500e
Using a helper method to create service identifiers
2016-05-14 00:43:25 -07:00
Diptanu Choudhury
347cb890d2
Removed allocID and task name from consul service
2016-05-11 16:26:41 -07:00
Diptanu Choudhury
2f8a3532ad
Refactored the signature of NewConsulService
2016-05-11 15:22:58 -07:00
Sean Chittenden
cb9b4eca83
Merge pull request #1156 from hashicorp/f-x-sys-unix
...
Use x/sys/unix vs syscall package where appropriate
2016-05-09 11:56:00 -07:00
Sean Chittenden
d86a6a029a
Rename the windows exec driver file to be the default exec driver.
...
No functional difference in practice, but results in a more clean build.
2016-05-09 11:32:05 -07:00
capone212
cc246b30d9
Added java
2016-05-09 17:27:01 +03:00
capone212
503f552477
Reverted blank line
2016-05-09 17:23:38 +03:00
capone212
99e7581742
Fixed CR defect
2016-05-09 17:22:01 +03:00
capone212
875df91e0b
Added consul script check support for raw_exec driver
2016-05-09 13:35:19 +03:00