Commit graph

14496 commits

Author SHA1 Message Date
Michael Schurter b8d1dd95a0
Update drivers/shared/executor/executor_test.go
Co-Authored-By: notnoop <mahmood@notnoop.com>
2019-03-31 20:34:24 -04:00
Preetha Appan f9019ae605
Add e2e test with raw exec job for verifying allocation resource stats 2019-03-31 09:46:23 -05:00
Mahmood Ali 0c8ee8c404 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 f4a68f556f deserialize total ticks 2019-03-30 07:14:57 -04:00
Mahmood Ali 9656d79eba 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 5bfd1d0ddd Reattach resources to stats trackers in the event they were destroyed 2019-03-29 16:09:14 -07:00
Michael Schurter 3b72db6e26
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 294d405397 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 8da6684568
Add go.mod/go.sum (#5493) 2019-03-29 15:02:32 -04:00
Jeff Mitchell 13dab7dd24
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 43270647c2
Merge pull request #5480 from hashicorp/docs-centos6
docs: mention support for centos6 is dropped
2019-03-29 09:21:08 -05:00
Preetha e4139b00bf
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 71e6550f81
Address review comments 2019-03-29 08:57:49 -05:00
Preetha Appan e0566237a4
fix linting 2019-03-28 18:01:40 -05:00
Preetha Appan cc07256bb5
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 24d3d723a8
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 a91d590503 docs: mention support for centos6 is dropped 2019-03-27 11:21:16 -07:00
Preetha Appan dc370d2e6f
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 2636df1877
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 5d129e1368
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 f9bd698801
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 bd2e6b5bf9
minor fixes to spread stanza documentation 2019-03-26 15:01:56 -05:00
Mahmood Ali df5d7ba50d fix test setup 2019-03-26 09:15:22 -04:00
Mahmood Ali d737a9836a test kill wait 2019-03-26 09:15:22 -04:00
Mahmood Ali b2b7618a1c
clarify unknown signal log line (#5466) 2019-03-25 17:19:43 -04:00
Michael Schurter a4572919cd
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 8efad12538 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 68fa20cfe3
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 6a10f085fe
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 02e4a590e3
Update release candidate download link on website 2019-03-22 10:46:49 -05:00
Michael Schurter 9afbc45cff Bump to dev post-0.9.0-rc1 release 2019-03-22 08:26:30 -07:00
Michael Schurter 7f2e6726d1
Release v0.9.0-rc1 2019-03-22 08:14:55 -07:00
Michael Schurter 1fab175b26 test: properly skip client state in beforeall 2019-03-22 06:42:04 -07:00
Nomad Release bot 3ab3dd4105 Generate files for 0.9.0-rc1 release 2019-03-21 19:06:13 +00:00
Mahmood Ali d09815a42e release: only install deps when installing
Now `prerelease` no longer requires linters
2019-03-21 15:02:09 -04:00
Mahmood Ali 922c66df4b release: skip check step when cutting release
`make check` runs very intensive linters that slow and seem to behave
differently on different machines.

Linting is still a part of our CI and we shouldn't be cutting a release
when CI isn't green anyway.
2019-03-21 14:57:03 -04:00
Mahmood Ali e80eaf752c allow configurable release target in mac 2019-03-21 14:46:35 -04:00
Mahmood Ali b08a2744f8
Merge pull request #5428 from hashicorp/b-dropped-logs-on-task-restart
client/logmon: restart log collection correctly when a task is restarted
2019-03-21 14:02:08 -04:00
Mahmood Ali 729458f110 fix TestLogmon_Start_restart 2019-03-21 13:36:46 -04:00
Preetha fac6d8c918
Merge pull request #5405 from hashicorp/e2e_metrics
Prometheus metrics for the e2e environment
2019-03-21 09:30:12 -05:00
Preetha Appan bf8483c960
remove stray println 2019-03-21 09:23:37 -05:00
Michael Schurter 9b1f6a028d
Merge pull request #5247 from hashicorp/test-state-corruption
Test state corruption
2019-03-21 07:18:29 -07:00
Michael Schurter 555d6d35ce test: skip slow state test without flag 2019-03-21 07:17:02 -07:00
Michael Schurter cd87afd15f e2e: add NomadAgent and basic client state test
The e2e test code is absolutely hideous and leaks processes and files
on disk. NomadAgent seems useful, but the clientstate e2e tests are very
messy and slow. The last test "Corrupt" is probably the most useful as
it explicitly corrupts the state file whereas the other tests attempt to
reproduce steps thought to cause corruption in earlier releases of
Nomad.
2019-03-21 07:14:34 -07:00
Nick Ethier b252d712df
logmon: fix test assertion 2019-03-20 21:37:17 -04:00
Nick Ethier 83936bea3c
logmon: fix logmon handling in driver test harness 2019-03-20 21:14:08 -04:00
Michael Schurter f1ce2fa1ec
Merge pull request #5443 from hashicorp/f-systemd-fixes
docs: sync systemd unit files; update deploy guide
2019-03-20 10:40:53 -07:00
Michael Schurter 3c78271ea2 docs: remove partial sig/checksum verification
Point users to security doc instead. Right now it takes a lot of
explaining to describe to users exactly how to validate the binary and
what the output of the tools used means.

For example, this is the output when validating according to the
instructions in this guide and the linked doc:

```
vagrant@linux:/tmp$ gpg --verify nomad_0.8.7_SHA256SUMS.sig
nomad_0.8.7_SHA256SUMS
gpg: Signature made Fri 11 Jan 2019 09:47:56 PM UTC using RSA key ID
348FFC4C
gpg: Good signature from "HashiCorp Security <security@hashicorp.com>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the
owner.
Primary key fingerprint: 91A6 E7F8 5D05 C656 30BE  F189 5185 2D87 348F
FC4C
vagrant@linux:/tmp$ shasum -a 256 -c nomad_0.8.7_SHA256SUMS
shasum: ./nomad_0.8.7_darwin_amd64.zip:
./nomad_0.8.7_darwin_amd64.zip: FAILED open or read
shasum: ./nomad_0.8.7_linux_386.zip: No such file or directory
./nomad_0.8.7_linux_386.zip: FAILED open or read
shasum: ./nomad_0.8.7_linux_amd64-lxc.zip: No such file or directory
./nomad_0.8.7_linux_amd64-lxc.zip: FAILED open or read
./nomad_0.8.7_linux_amd64.zip: OK
shasum: ./nomad_0.8.7_linux_arm64.zip: No such file or directory
./nomad_0.8.7_linux_arm64.zip: FAILED open or read
shasum: ./nomad_0.8.7_linux_arm.zip: No such file or directory
./nomad_0.8.7_linux_arm.zip: FAILED open or read
shasum: ./nomad_0.8.7_windows_386.zip: No such file or directory
./nomad_0.8.7_windows_386.zip: FAILED open or read
shasum: ./nomad_0.8.7_windows_amd64.zip: No such file or directory
./nomad_0.8.7_windows_amd64.zip: FAILED open or read
shasum: WARNING: 7 listed files could not be read
```

There are only two lines that matter in all of that output:

```
...
gpg: Good signature from "HashiCorp Security <security@hashicorp.com>"
...
./nomad_0.8.7_linux_amd64.zip: OK
...
```

I feel like trying to teach users how to use and interpret these tools
in our deployment guide may be as likely to reduce confidence as
increase it.
2019-03-20 09:36:29 -07:00
Mahmood Ali d9a3c92610
doc: fix tls_cipher_suites type (#5441)
tls_cipher_suites only accept a comma-separated string, as evident in:

0535dfd414/nomad/structs/config/tls.go (L61)
d37ed5c193/helper/tlsutil/config.go (L405)
2019-03-20 12:17:38 -04:00
Mahmood Ali 32454b9fde update some changelog items 2019-03-20 11:20:25 -04:00