Commit Graph

14412 Commits

Author SHA1 Message Date
Mahmood Ali
92af1caa28 document force_pull and :latest tag interaction 2019-04-02 08:48:34 -04:00
Mahmood Ali
12242b69f7 Merge pull request #5499 from hashicorp/r-fifo-plain-file
fifo: Use plain fifo file in Unix
2019-04-01 17:23:11 -04:00
Mahmood Ali
1450197936 comment configureTLogging 2019-04-01 16:52:58 -04:00
Mahmood Ali
714c41185c rename fifo methods for clarity 2019-04-01 16:52:58 -04:00
Mahmood Ali
7661857c6e clarify closeDone blocking and field name 2019-04-01 16:10:34 -04:00
Preetha Appan
9d4c84e663 Added nginx to e2e test 2019-04-01 14:52:58 -05:00
Mahmood Ali
3c68c946c4 no requires in a test goroutine 2019-04-01 15:38:39 -04:00
Michael Lange
816b348593 Merge pull request #5496 from hashicorp/b-ui/reattach-resources-to-stats-trackers
UI: Reattach resources to stats trackers in the event they were destroyed
2019-04-01 11:31:28 -07:00
Mahmood Ali
48259078df avoid opening files just to close them 2019-04-01 13:24:18 -04:00
Mahmood Ali
3fb377ae6e Add test cases for waiting on children
Also, make the test use files just like in the non-test case.
2019-04-01 13:24:18 -04:00
Mahmood Ali
9f1ee37687 log when fifo fails to open 2019-04-01 13:18:03 -04:00
Mahmood Ali
0517bcb403 run fifo tests on Windows 2019-04-01 13:18:03 -04:00
Mahmood Ali
5ca9b6eb37 fifo: Use plain fifo file in Unix
This PR switches to using plain fifo files instead of golang structs
managed by containerd/fifo library.

The library main benefit is management of opening fifo files.  In Linux,
a reader `open()` request would block until a writer opens the file (and
vice-versa).  The library uses goroutines so that it's the first IO
operation that blocks.

This benefit isn't really useful for us: Given that logmon simply
streams output in a separate process, blocking of opening or first read
is effectively the same.

The library additionally makes further complications for managing state
and tracking read/write permission that seems overhead for our use,
compared to using a file directly.

Looking here, I made the following incidental changes:
* document that we do handle if fifo files are already created, as we
rely on that behavior for logmon restarts
* use type system to lock read vs write: currently, fifo library returns
`io.ReadWriteCloser` even if fifo is opened for writing only!
2019-04-01 13:18:03 -04:00
Mahmood Ali
da430f86c5 Merge pull request #5497 from hashicorp/b-exec-cpu-stats
exec: report cpu usage summary stat
2019-04-01 12:37:01 -04:00
Preetha Appan
05637ae076 Remove unnecessary step in getting node client
All allocation stats are routable from the server
2019-04-01 10:45:41 -05:00
Mahmood Ali
af25b6b146 Merge pull request #5468 from hashicorp/b-test-exec-kill-wait
Adding tests for killing task without grace
2019-03-31 20:37:15 -04:00
Michael Schurter
e162e3b631 Update drivers/shared/executor/executor_test.go
Co-Authored-By: notnoop <mahmood@notnoop.com>
2019-03-31 20:34:24 -04:00
Preetha Appan
46b012fd3b Add e2e test with raw exec job for verifying allocation resource stats 2019-03-31 09:46:23 -05:00
Mahmood Ali
b8f80e5124 Simplify proto conversion and handle swap
Convert all cpu and memory usage fields regardless of stated measured
fields, and handle swap fields
2019-03-30 15:18:28 -04:00
Mahmood Ali
484ccfafab deserialize total ticks 2019-03-30 07:14:57 -04:00
Mahmood Ali
a880f93a61 Always report TotalTicks when percent is measured
Fix a case where TotalTicks doesn't get serialized across executor grpc
calls.

Here, I opted to implicit add field, rather than explicitly mark it as a
measured field, because it's a derived field and to preserve 0.8
behavior where total ticks aren't explicitly marked as a measured field.
2019-03-29 22:34:28 -04:00
Michael Lange
a0e893ed84 Reattach resources to stats trackers in the event they were destroyed 2019-03-29 16:09:14 -07:00
Michael Schurter
f75f5c9b3b Merge pull request #5491 from hashicorp/b-docker-container-name
docker: restore pre-0.9 container names
2019-03-29 15:41:04 -07:00
Michael Schurter
010a1973a9 docker: restore pre-0.9 container names
As far as I can tell Nomad itself does not use the container name after
container creation, so this should be safe.

OP: https://groups.google.com/d/topic/nomad-tool/kYkyERfVRXE/discussion
v0.8.7 code: https://github.com/hashicorp/nomad/blob/v0.8.7/client/driver/docker.go#L1530-L1531
2019-03-29 13:55:43 -07:00
Jeff Mitchell
b5d8053635 Add go.mod/go.sum (#5493) 2019-03-29 15:02:32 -04:00
Jeff Mitchell
5676986196 Divest api/ package of deps elsewhere in the nomad repo. (#5488)
* Divest api/ package of deps elsewhere in the nomad repo.

This will allow making api/ a module without then pulling in the
external repo, leading to a package name conflict.

This required some migration of tests to an apitests/ folder (can be
moved anywhere as it has no deps on it). It also required some
duplication of code, notably some test helpers from api/ -> apitests/
and part (but not all) of testutil/ -> api/testutil/.

Once there's more separation and an e.g. sdk/ folder those can be
removed in favor of a dep on the sdk/ folder, provided the sdk/ folder
doesn't depend on api/ or /.

* Also remove consul dep from api/ package

* Fix stupid linters

* Some restructuring
2019-03-29 14:47:40 -04:00
Preetha
654c96bf10 Merge pull request #5480 from hashicorp/docs-centos6
docs: mention support for centos6 is dropped
2019-03-29 09:21:08 -05:00
Preetha
2bbd05d18f Merge pull request #5489 from hashicorp/b-plugin-config-bugfix
Fix json parsing bug with plugins that don't provide args
2019-03-29 09:13:26 -05:00
Preetha Appan
ff1bac9f48 Address review comments 2019-03-29 08:57:49 -05:00
Preetha Appan
7490af2194 fix linting 2019-03-28 18:01:40 -05:00
Preetha Appan
1f88ccec55 Fix json parsing bug with plugins that don't provide args
This fixes a bug with JSON agent configuration parsing where the AST
for the plugin stanza had unnecessary flattening originating from hcl parsing
library. The workaround fixes the AST by popping off the flattened element and wrapping
it in a list. The workaround comes from similar code in terraform.

There were no existing test cases for json parsing so I added a few.
2019-03-28 16:33:30 -05:00
Preetha
7feee07d8f Merge pull request #5478 from hashicorp/b-e2e_metrics
Use specific url prefix for metrics test
2019-03-27 22:17:15 -05:00
Michael Schurter
2e92eecbe0 docs: mention support for centos6 is dropped 2019-03-27 11:21:16 -07:00
Preetha Appan
6c1d69bab4 Use specific url prefix for metrics test
Also changed the output to show client node IP addresses
2019-03-27 11:04:06 -05:00
Michael Schurter
27efdc4116 Merge pull request #5474 from briancain/fix-mixed-intend
Fixup mixed tabs in script for Vagrantfile demo
2019-03-27 07:18:31 -07:00
Brian Cain
29d577d4d8 Fixup mixed tabs in script for Vagrantfile demo
This commit replaces a hard tab with two spaces to match the intendation
of the rest of the defined script
2019-03-26 15:23:38 -07:00
Preetha
1ea9a1cd7e Merge pull request #5473 from hashicorp/f-spread-docs-fix
minor fixes to spread stanza documentation
2019-03-26 17:13:43 -05:00
Preetha Appan
ba8c5c67e1 minor fixes to spread stanza documentation 2019-03-26 15:01:56 -05:00
Mahmood Ali
d5eea3424a fix test setup 2019-03-26 09:15:22 -04:00
Mahmood Ali
f57cf5a365 test kill wait 2019-03-26 09:15:22 -04:00
Mahmood Ali
4ca6cda6c1 clarify unknown signal log line (#5466) 2019-03-25 17:19:43 -04:00
Michael Schurter
6674b270ff Merge pull request #5456 from hashicorp/test-taskenv
tests: port pre-0.9 task env tests
2019-03-25 10:41:38 -07:00
Michael Schurter
2dbc06de61 tests: port pre-0.9 task env tests
I chose to make them more of integration tests since there's a lot more
plumbing involved. The internal implementation details of how we craft
task envs can now change and these tests will still properly assert the
task runtime environment is setup properly.
2019-03-25 09:46:53 -07:00
Mahmood Ali
68dc573faf Merge pull request #5460 from hashicorp/test-skip-clientstate
test: properly skip client state in beforeall
2019-03-22 17:37:45 -04:00
Mahmood Ali
14151c93b6 Merge pull request #5457 from hashicorp/r-skip-prerelease-check
release: skip check step when cutting release
2019-03-22 12:29:13 -04:00
Preetha Appan
613707b32c Update release candidate download link on website 2019-03-22 10:46:49 -05:00
Michael Schurter
a77f769f1e Bump to dev post-0.9.0-rc1 release 2019-03-22 08:26:30 -07:00
Michael Schurter
8f8a18b4fa Release v0.9.0-rc1 2019-03-22 08:14:55 -07:00
Michael Schurter
8cd191dd39 test: properly skip client state in beforeall 2019-03-22 06:42:04 -07:00
Nomad Release bot
7c00ab4f3f Generate files for 0.9.0-rc1 release 2019-03-21 19:06:13 +00:00