Commit Graph

14385 Commits

Author SHA1 Message Date
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 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
Mahmood Ali 4c3dbd2f84
Don't use "datacenter" in a confusing way
Co-Authored-By: schmichael <michael.schurter@gmail.com>
2019-03-20 08:08:37 -07:00
Michael Schurter d63c2aefd9
Merge pull request #5450 from hashicorp/docs-changelog
docs: add #5381 to changelog
2019-03-20 07:53:49 -07:00
Nick Ethier c1f5011181
logmon: remove sleeps from tests 2019-03-20 10:45:09 -04:00
Michael Schurter d920812750 docs: add #5381 to changelog 2019-03-20 07:05:05 -07:00
Mahmood Ali eb88e36593
Merge pull request #5430 from HashedDan/server-typo
server: inconsistent receiver notation corrected
2019-03-20 08:48:17 -04:00
Mahmood Ali 2a7b18aec4
Revert "executor: synchronize exitState accesses" (#5449)
Reverts hashicorp/nomad#5433

Apparently, channel communications can constitute Happens-Before even for proximate variables, so this syncing isn't necessary.

> _The closing of a channel happens before a receive that returns a zero value because the channel is closed._
https://golang.org/ref/mem#tmp_7
2019-03-20 07:33:05 -04:00
Mahmood Ali d4ed7aecbf
Merge pull request #5435 from hashicorp/release-scripts-20190318
Scripts for automating binary building
2019-03-20 07:26:10 -04:00
Mahmood Ali 4a9f29c1a6 release: Upgrade to use 1.11.6 golang on macOS
To correspond to the Linux scripts in 855761a5dff9b447152e8ea75a410aafa46e66dc
2019-03-19 21:18:44 -04:00
Mahmood Ali 7f911555b5 Add some release script comments 2019-03-19 21:18:27 -04:00
Michael Schurter 30db07cccb docs: sync systemd unit files; update deploy guide
The systemd configs spread across our repo were fairly out of sync. This
should get them on our best practices.

The deployment guide also had some strange things like running Nomad as
a non-root user. It would be fine for servers but completely breaks
clients. For simplicity I simply removed the non-root user references.
2019-03-19 15:18:12 -07:00
Nick Ethier 505e36ff7a
Merge pull request #5429 from hashicorp/b-blocking-executor-shutdown
executor: block shutdown on process exiting
2019-03-19 15:18:01 -04:00