Diptanu Choudhury
e37a108b4c
Implemented cpu 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
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
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
Sean Chittenden
d9ba6d8bff
Re-sort functions back to the same ordering as `master`
2016-05-08 11:46:20 -07:00
Sean Chittenden
b249aaf8bb
Remove stray debugging fmt.Printf
2016-05-08 11:43:43 -07:00
Sean Chittenden
2cba09843c
Revert making UniversalExecutor.wait() platform specific
2016-05-08 11:17:27 -07:00
Sean Chittenden
e8fbfc7976
Revert making UniversalExecutor.wait() platform specific
2016-05-08 00:13:28 -07:00
Sean Chittenden
19c64fb94c
Fix executor builds on Windows
2016-05-07 12:07:27 -07:00
Sean Chittenden
d10623aaea
Implement a Windows-specific UniversalExecutor `wait()`
2016-05-07 12:00:44 -07:00
Sean Chittenden
f79b872ed2
Windows needs a stub chroot command
2016-05-07 11:59:55 -07:00
Sean Chittenden
a78a9b3531
Build checks per-platform
2016-05-07 11:18:13 -07:00
Sean Chittenden
09f7d5e595
Prefer `golang.org/x/sys/unix` where appropriate
...
Favor the `unix` package on *NIX platforms vs the now frozen `syscall` package.
2016-05-07 11:01:45 -07:00
Sean Chittenden
1314227863
Explicitly enumaret the build targets in _unix
...
`!windows` was being used as the synonym for `darwin dragonfly freebsd linux netbsd openbsd solaris`. While I don't imagine `android` will be a prime target for Nomad in the near term, favor explicit build targets.
List of build targets generated by Go 1.7's dist command: `go tool dist list | sort | cut -d '/' -f 1 | sort | uniq`
2016-05-07 10:42:01 -07:00
Sean Chittenden
cfd76aaf15
Rename from posix to unix to parallel x/sys/unix
...
Use the `_unix` file suffix to denote *NIX-like semantics in order to parallel the designation given by the package `golang.org/x/sys/unix`.
2016-05-07 10:33:43 -07:00
Diptanu Choudhury
3a6ee08a32
Added some docs
2016-05-05 11:52:22 -07:00
Diptanu Choudhury
9a8ad773b3
Added logs to indicate when checks timeout
2016-05-05 10:01:38 -07:00
Alex Dadgar
c66370bf40
Add debug message on Wait() error
2016-04-19 15:54:21 -07:00
Alex Dadgar
ca94d25cb4
Freeze the cgroup and cleanup around Shutdown
2016-04-19 13:48:02 -07:00
Alex Dadgar
736ef76cc1
Put the executor into the cgroup to avoid a fork race
2016-04-18 17:59:08 -07:00
Alex Dadgar
dba8712b45
remove systemd cgroup manager
2016-04-15 14:55:30 -07:00
Diptanu Choudhury
bfcb5015a1
Adding a test to check whether constraints are applied and cgroups are removed
2016-04-02 12:39:34 -07:00
Diptanu Choudhury
34d9e8aa8e
Setting the cg path after application of pid
2016-04-02 12:37:19 -07:00
Diptanu Choudhury
6778f29513
Setting the cgroup config after applying pid
2016-04-02 12:37:19 -07:00
Diptanu Choudhury
d9afcc1293
Using the paths of cgroups to reconstruct the manager
2016-04-02 12:37:19 -07:00
Diptanu Choudhury
d8b1303790
Adding 128 to exit code when a child was terminated by a signal
2016-04-02 02:05:56 -07:00
Diptanu Choudhury
e47ead97da
Capturing signals from wait
2016-04-01 14:31:19 -07:00
Alex Dadgar
2e88933eb1
Merge pull request #1009 from hashicorp/b-more-chroot
...
Chroot all of /usr/
2016-03-30 11:33:53 -07:00
Diptanu Choudhury
f517eb16de
Added version to executor
2016-03-29 22:24:22 -07:00
Diptanu Choudhury
2b773b0a39
Added the Version method to executor
2016-03-29 22:23:03 -07:00
Alex Dadgar
8e762ab1ee
include all of usr
2016-03-29 16:14:56 -07:00
Alex Dadgar
3b2b3f95ca
Merge branch 'master' of github.com:hashicorp/nomad
2016-03-28 17:24:17 -07:00
Alex Dadgar
23c1173269
ArtifactDownloaded in task runner state
2016-03-28 17:24:10 -07:00
Diptanu Choudhury
802844397d
Supporting interpolation in service name, check name/protocol/path
2016-03-28 15:52:57 -07:00
Diptanu Choudhury
b791c91c6f
Added support for interpolation in check cmd and args
2016-03-28 15:02:00 -07:00
Diptanu Choudhury
e0263d3013
Added docs to interpolateServices method
2016-03-28 15:02:00 -07:00
Diptanu Choudhury
5439d4c23c
Interpolating service tags
2016-03-28 15:02:00 -07:00
Diptanu Choudhury
2963c3f1f4
Renamed checks cmd to command to be consistent with exec driver config
2016-03-28 14:05:12 -07:00
Diptanu Choudhury
f167a4c910
Using latest busybox
2016-03-25 18:21:43 -07:00
Diptanu Choudhury
a4e81d751d
Fixing the exec script check to run within the chroot
2016-03-25 17:53:22 -07:00
Diptanu Choudhury
e893e71e21
Moved the dockerIsConnected to testutils
2016-03-25 17:15:51 -07:00
Diptanu Choudhury
439a86f194
Removing the container after running script check
2016-03-25 17:02:53 -07:00
Diptanu Choudhury
44a3f2ae1f
Added more tests for the checks
2016-03-25 16:56:40 -07:00
Diptanu Choudhury
853c5120d0
Using a single timer to run checks
2016-03-25 16:11:45 -07:00
Diptanu Choudhury
b08d80379c
Added some more docs to the executor
2016-03-24 19:34:22 -07:00
Diptanu Choudhury
61469a1b7a
Added some docs
2016-03-24 19:30:02 -07:00
Diptanu Choudhury
2a9e522ed4
Added an impl for Nomad Checks
2016-03-24 19:00:24 -07:00
Diptanu Choudhury
b3cfbbf9fd
Added a test for the exec script check
2016-03-24 16:33:04 -07:00
Diptanu Choudhury
7ab6ad1ef5
Creating the docker driver in the executor properly
2016-03-24 16:15:22 -07:00
Diptanu Choudhury
a6711ea25f
Introducing ConsulContext
2016-03-24 15:57:16 -07:00
Diptanu Choudhury
d6588013f8
Running script checks periodically
2016-03-24 14:54:26 -07:00
Diptanu Choudhury
2a5f300f92
Added a check type for consul service to delegate certain checks
2016-03-24 14:54:26 -07:00
Diptanu Choudhury
62853a1627
Added implementation to run checks for docker, exec and raw_exec
2016-03-24 14:54:26 -07:00
Alex Dadgar
fc0e48b0ec
Merge pull request #950 from mssola/raw-exec-user
...
client: added the "user" option to tasks
2016-03-24 08:57:13 -07:00
Diptanu Choudhury
fc156a736b
Changed a log line
2016-03-23 19:20:08 -07:00
Diptanu Choudhury
e98f5e4ee3
Locking the task states
2016-03-23 19:02:29 -07:00
Diptanu Choudhury
6649829c93
Renaming the SyncWithConsul method
2016-03-23 18:13:13 -07:00
Diptanu Choudhury
46da4ba469
Fixing log and statements
2016-03-23 18:08:32 -07:00
Diptanu Choudhury
62242595fc
Using the name of the task and the alloc id in the service name
2016-03-23 17:35:29 -07:00
Diptanu Choudhury
664ff44e85
Re-syncing task when it's updated
2016-03-23 14:34:43 -07:00
Diptanu Choudhury
83976a4b96
Syncing consul periodically
2016-03-23 14:27:49 -07:00
Diptanu Choudhury
bf748a522b
Handling errors during service and check registration
2016-03-23 14:23:32 -07:00
Diptanu Choudhury
54a5e795a5
Hooking up the executor in all drivers
2016-03-23 13:19:45 -07:00
Diptanu Choudhury
8b91606b22
Making the docker driver register services and checks
2016-03-23 12:59:22 -07:00
Diptanu Choudhury
f6a932194f
Removing references to old consul services and adding consul config to executor context
2016-03-23 12:19:19 -07:00
Miquel Sabaté Solà
8c56c64615
client/driver: added the `user` config value
...
This way Nomad allows to set which user has to run the task.
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
2016-03-23 12:57:31 +01:00
Alex Dadgar
7b36d7ec55
Reduce verbosity of alloc-status
2016-03-20 16:52:24 -07:00
Alex Dadgar
c85dfdf9a0
Merge branch 'master' into f-artifact-location
2016-03-19 12:50:44 -07:00
Alex Dadgar
f4bb3a9801
binary lookup path
2016-03-19 12:18:10 -07:00
Abhishek Chanda
2d3ccc1898
Fix missing import
2016-03-18 23:00:34 -07:00
Diptanu Choudhury
038a1bc2f9
Added some comments
2016-03-18 15:04:15 -07:00
Diptanu Choudhury
ddbf18f02a
Removing all the destroy logic from wait and calling exit after wait on all drivers
2016-03-18 12:04:11 -07:00
Diptanu Choudhury
3c7b83b393
Introduced a method in executor to launch syslog server
2016-03-18 11:49:10 -07:00
Alex Dadgar
40adf40549
document artifact downloading
2016-03-16 09:56:04 -07:00
Alex Dadgar
393807a677
Make user specified tasks executable
2016-03-15 19:22:40 -07:00
Alex Dadgar
79d7553cbf
executor: add /run/resolvconf to chroot
2016-03-10 15:05:49 -08:00
Alex Dadgar
0b12e74a6e
Add /sbin and /usr/sbin/ to chroot
2016-03-02 16:32:31 -08:00
Diptanu Choudhury
395d10eafc
Added a comment
2016-03-02 12:56:56 -08:00
Diptanu Choudhury
04cb13f3a5
Added a test for making sure executor destroy works
2016-03-02 11:05:08 -08:00
Diptanu Choudhury
aaa23154aa
Not killing the plugin while destroying the cgroup
2016-03-01 17:51:54 -08:00
Diptanu Choudhury
5748bd0516
Fixed the logic of cgroup creation
2016-03-01 17:01:45 -08:00
Diptanu Choudhury
47da0b02b3
Writing logs to alloc dir
2016-02-24 20:06:43 -08:00
Alex Dadgar
cc1b35a90c
client: standardize error logging format
2016-02-24 15:57:58 -08:00
Diptanu Choudhury
7fcbdf5a9b
Closing the rotators when the process finishes
2016-02-23 13:32:17 -08:00
Diptanu Choudhury
4873118cef
Making the log rotator a writer
2016-02-19 14:01:07 -08:00
Abhishek Chanda
2059cf221b
Separate arguments with a space while writing
2016-02-16 17:13:19 -08:00
Diptanu Choudhury
0d362c39e7
Fixed more client executor tests
2016-02-11 11:13:45 -08:00
Diptanu Choudhury
cd957a739a
Fixed the executor test
2016-02-11 10:58:18 -08:00
Diptanu Choudhury
3a12204ce5
Updated comments
2016-02-10 08:13:08 -08:00
Diptanu Choudhury
9d6eed1fb4
Merge branch 'master' into f-logrotator
2016-02-09 12:25:44 -08:00
Alex Dadgar
e7e7348727
Don't error killing exited process
2016-02-09 10:00:42 -08:00
Alex Dadgar
75473e88d2
Unmount special directories when task finishes
2016-02-08 18:51:11 -08:00
Diptanu Choudhury
1a13400f2d
Moved the destroycgroup method into executor
2016-02-08 16:08:29 -08:00
Diptanu Choudhury
32e24e257a
Appending names of sub-system before log lines
2016-02-08 14:47:10 -08:00
Diptanu Choudhury
6c85ed6c8e
Removing pathExists from executor
2016-02-08 14:40:54 -08:00
Diptanu Choudhury
e89bcf52b8
Moving code to mount and unmount chroot into allocdir
2016-02-08 14:11:53 -08:00
Diptanu Choudhury
e53ebc9e3c
Extracted the cgroup info into isolation struct
2016-02-08 13:48:26 -08:00
Diptanu Choudhury
088d2cba53
Making the plugin server return the same instance of executor rpc server
2016-02-08 11:56:48 -08:00
Diptanu Choudhury
b8e4941862
Fixed merge conflicts
2016-02-08 10:24:27 -08:00
Diptanu Choudhury
ea5a8c66ab
Implemented the UpdateLogConfig method
2016-02-08 10:10:01 -08:00
Diptanu Choudhury
f6f51a6926
Destroying the cgroup if we can't to executor in exec and java drivers
2016-02-08 10:05:39 -08:00
Diptanu Choudhury
1b9a54abec
Updated comment
2016-02-05 17:40:06 -08:00
Diptanu Choudhury
370dc41ca2
Renamed the plugin log file
2016-02-05 17:07:02 -08:00
Diptanu Choudhury
f4b32ae5fc
Entering the plugin pid into the cgroup after creating it
2016-02-05 13:16:29 -08:00
Diptanu Choudhury
918cc46d30
Added a test which isolates and constraints a process using the executor
2016-02-05 11:07:16 -08:00
Diptanu Choudhury
b788017574
Corrected comments and making the plugins write to unique log files
2016-02-05 10:49:54 -08:00
Diptanu Choudhury
08932e5bbc
Putting the plugin in the same cgroup as the user process
2016-02-05 00:11:09 -08:00
Diptanu Choudhury
91e7922f3b
Implemented log rotator for exec based drivers
2016-02-04 23:54:15 -08:00
Diptanu Choudhury
30d5bba131
Not syncing stdout and stderr of pluging with client
2016-02-04 17:36:31 -08:00
Diptanu Choudhury
a0ff83f44c
Added some docs
2016-02-04 17:00:41 -08:00
Diptanu Choudhury
f95b973c2c
Moved packages around
2016-02-04 17:00:41 -08:00
Diptanu Choudhury
356fb6abdb
Removed executor and spawn daemon
2016-02-04 17:00:39 -08:00
Alex Dadgar
a3c22258cd
Use TestMultiplier on all waits
2016-01-21 15:24:24 -08:00
Alex Dadgar
0406a3a190
Handle case that pid is dead in ForceStop
2016-01-21 14:09:04 -08:00
Alex Dadgar
1ceb6f012a
Fix a bunch of tests
...
Up timeouts
trusty travis beta
Increase timeouts
2016-01-20 16:03:53 -08:00
Alex Dadgar
6d157a0337
Fix tests
2016-01-11 09:58:31 -08:00
Alex Dadgar
3ba1c9b76b
merge
2016-01-11 09:58:26 -08:00
Kenneth Feng
a85b2c0e90
linux/exec: add /usr/share to ChrootEnv
2015-12-28 13:39:34 -05:00
Clint Shryock
77b5639160
Executors/Linux: Update Executor config struct
2015-12-17 10:25:42 -06:00
Diptanu Choudhury
f6fb42835e
Using cgo dependencies to look up users
2015-12-15 11:12:13 -08:00
Diptanu Choudhury
de06482506
Sending the user process sigint during shutdown on linux
2015-12-08 08:14:13 -08:00
Chris Bednarski
9292a97062
Merge branch 'user-lookup-nocgo' of https://github.com/carlosdp/nomad into b-user-lookup
2015-12-01 13:44:56 -08:00
Carlos Diaz-Padron
55e49506f0
Refactor out userLookup to helper package
...
Also replaces user.Lookup in exec driver
2015-12-01 11:59:55 -08:00
Diptanu Choudhury
29915ddd16
Moving the args to helper
2015-11-26 14:13:19 -08:00
Chris Hines
37745f66c9
Speed up tests by allowing parallel execution.
2015-11-25 15:56:55 -05:00
Chris Hines
5b2168bb12
Use package testtask and httptest.Server to make client/driver tests OS independent.
2015-11-25 15:56:20 -05:00
Chris Hines
46e848c8ec
Eliminate special case in production code for embedding test binary into chroot.
2015-11-25 15:31:29 -05:00
Chris Hines
d7ebe099c1
Factor portable test task out of client/driver/executor.
2015-11-24 20:59:42 -05:00
Alex Dadgar
c7cd7abe22
Inject the current binary into the chroot in test mode
2015-11-24 16:30:53 -08:00
Chris Hines
ea5a60629a
Fix Executor_Open_Invalid test for Windows.
2015-11-24 16:30:53 -08:00
Chris Hines
cb262d787f
Include Executor_Open_Invalid in test suite.
2015-11-24 16:30:53 -08:00
Chris Hines
769415dbd2
Improve names and documentation in test code.
2015-11-24 16:30:53 -08:00
Chris Hines
ec7e78680d
Use TestMain to provide portable echo, sleep, and write commands.
2015-11-24 16:30:53 -08:00
Chris Bednarski
655a4bf334
Fix some issues caught by go vet
2015-11-20 16:01:27 -08:00
Alex Dadgar
4d817f5cbc
Revert "Revert "Make drivers take arguments as a list and not as a string""
2015-11-18 15:16:42 -08:00
Alex Dadgar
0e51375285
Revert "Make drivers take arguments as a list and not as a string"
2015-11-18 13:46:43 -08:00