Commit Graph

13896 Commits

Author SHA1 Message Date
Chris Baker
0502f255c7 renamed mispelled function, fixed incorrect comment 2019-01-18 20:00:49 +00:00
Michael Schurter
4e4ecc949f Merge pull request #5203 from hashicorp/b-terminated
client: restore Terminated event on every exit
2019-01-18 08:54:15 -08:00
Mahmood Ali
cb6b5dd075 fix vendor entry field name 2019-01-18 10:05:21 -05:00
Danielle Tomlinson
9b3456011a Merge pull request #5204 from hashicorp/dani/loader-typo-2
Fix typo in PluginLoader
2019-01-18 11:22:22 +01:00
Danielle Tomlinson
2c8c1c4529 Merge pull request #5174 from hashicorp/dani/windows
Some Windows fixes and CI
2019-01-18 11:21:53 +01:00
Preetha
ce44b93f97 Merge pull request #5208 from hashicorp/b-tr-taskresources
Fix one more place that should be using taskResources
2019-01-17 19:40:37 -06:00
Preetha Appan
eb7663697b Fix one more place that should be using taskResources
taskResources handles new resource fields in a backwards compatible way
2019-01-17 15:52:51 -06:00
Danielle Tomlinson
1d5c04ee1d pluginloader: typo: s/validePluginConfig/validatePluginConfig 2019-01-17 19:10:32 +01:00
Michael Schurter
64e531e7bb client: restore Terminated event on every exit
v0.9.0-dev started emitting a Terminated event every time a task process
exited. While this wasn't true in previous versions, it's a useful task
event because it's the only place for job operators to view the task's
exit code.

This behavior is asserted in the e2e/taskevents tests.
2019-01-17 10:02:25 -08:00
Danielle Tomlinson
5637d81642 docker: Fix missing import 2019-01-17 18:44:27 +01:00
Danielle Tomlinson
8ffd94ca55 plugins: Require an exe extension on windows 2019-01-17 18:43:14 +01:00
Danielle Tomlinson
3287c3f019 chore: General Cleanup 2019-01-17 18:43:14 +01:00
Michael Schurter
f40d243cbd Update testutil/vault.go
Co-Authored-By: dantoml <dani@tomlinson.io>
2019-01-17 18:43:14 +01:00
Michael Schurter
9e4e2d812d Update helper/testtask/testtask_windows.go
Co-Authored-By: dantoml <dani@tomlinson.io>
2019-01-17 18:43:14 +01:00
Mahmood Ali
fe8c60e157 chore: Stylistic cleanup
Co-Authored-By: dantoml <dani@tomlinson.io>
2019-01-17 18:43:14 +01:00
Danielle Tomlinson
06ea0b5377 appveyor: disable tests on windows again 2019-01-17 18:43:14 +01:00
Danielle Tomlinson
db76db4b18 allocwatcher: Stat_t is unavailable on win 2019-01-17 18:43:14 +01:00
Danielle Tomlinson
8966c20155 docker: Only run Cleanup test on unix os' 2019-01-17 18:43:14 +01:00
Danielle Tomlinson
2b3f5f2cb7 chore: goimports exec driver 2019-01-17 18:43:14 +01:00
Danielle Tomlinson
070558e18d fixup: Typo in docker test 2019-01-17 18:43:14 +01:00
Danielle Tomlinson
0bc1dbef56 chore: Fix docklog linting 2019-01-17 18:43:14 +01:00
Danielle Tomlinson
3f3eb68a27 chore: Fix docker test linting
Due to https://github.com/tsenart/deadcode/issues/3 we can't specify
these consts on their own. This moves them into the _platform_test.go
files to avoid creating a package that only exposes a couple of values.
2019-01-17 18:43:14 +01:00
Danielle Tomlinson
8731fe3730 drivers/exec: SIGINT unavailable on windows 2019-01-17 18:43:14 +01:00
Danielle Tomlinson
0ecef70715 rawexec: Fix Exec test on windows 2019-01-17 18:43:14 +01:00
Danielle Tomlinson
ffcd76f03f rawexec: SIGINT is not available on Windows 2019-01-17 18:43:14 +01:00
Danielle Tomlinson
1e0825388e docker: Test cleanup for windows
* Docker for Windows does not support ulimits
* Use filepath.ToSlash to test workdir
* Convert expected mount paths to system style
* Skip security-opt test on windows
  - Windows does not support seccomp, and it's unclear which options are
    available.
* Skip StartN due to lack of sigint
* docker: Use api to get image info on windows
* No bridge on windows
* Stop hardcoding /bin/
2019-01-17 18:43:14 +01:00
Danielle Tomlinson
76ee0240ab docker: ExpandPath tests validate slashpath 2019-01-17 18:43:13 +01:00
Danielle Tomlinson
8a4ffea94a chore: Cleanup formatting 2019-01-17 18:43:13 +01:00
Danielle Tomlinson
a587be44a7 dockerlogger: Fix tests on windows
Uses the home directory and windows path expansion, as c:\tmp doesn't
necessarily exist, and mktemp would involve unnecessarily complicating
the commands.
2019-01-17 18:43:13 +01:00
Danielle Tomlinson
347b4ad247 Expand unix build definition 2019-01-17 18:43:13 +01:00
Danielle Tomlinson
08267885ab appveyor: GOMAXPROCS: 1 2019-01-17 18:43:13 +01:00
Danielle Tomlinson
041c01d583 client/fs: Skip delete-while-streaming test on win 2019-01-17 18:43:13 +01:00
Danielle Tomlinson
20f40eada8 client/fs: windows error message for not found 2019-01-17 18:43:13 +01:00
Danielle Tomlinson
cf08f85413 api: Validate the slash variant of a given path
This validates the slash variant of a RelativeDest, rather than the
platform native version, to support test execution on windows.
2019-01-17 18:43:13 +01:00
Danielle Tomlinson
4014ee30ae appveyor: Add gopath/bin to PATH 2019-01-17 18:43:13 +01:00
Danielle Tomlinson
4ce7cc1ee4 appveyor: Push test results as an artifact 2019-01-17 18:43:13 +01:00
Danielle Tomlinson
c9edd612ef appveyor: Fix env access? 2019-01-17 18:43:13 +01:00
Danielle Tomlinson
8547428807 plugins: Load plugins on windows 2019-01-17 18:43:13 +01:00
Danielle Tomlinson
e9a7978367 DROP: disable consul tests on windows 2019-01-17 18:43:13 +01:00
Danielle Tomlinson
d81e632157 testutil: Start vault in the same routine as waiting
This is a workaround for the windows process model.

Go os/exec does not pass the parent process handle to the child
processes STARTUPINFO struct, this means that unless we wait in
the _same_ execution context as Starting the process, the
handle will be lost, and we cannot kill it without regaining
a handle.

A better long term solution would be a higher level process
abstraction that uses windows.CreateProcess on windows.
2019-01-17 18:43:13 +01:00
Danielle Tomlinson
dcce2d7247 vaultclient: use require for error assertions 2019-01-17 18:43:13 +01:00
Danielle Tomlinson
d33809b886 fingerprint: Limit vault shutdown waiting
When vault is installed through chocolatey, it also installs a shim that
will not pass kill signals to the child. This means the process will
never actually terminate, and we lose the process handle.

Here, rather than waiting forever, we timeout fast.
2019-01-17 18:43:13 +01:00
Danielle Tomlinson
3078c24f79 vaultclient: Update tests for vault 1.0 2019-01-17 18:43:13 +01:00
Danielle Tomlinson
b05d362eb1 fingerprinter: Use HCLogger for windows 2019-01-17 18:43:13 +01:00
Danielle Tomlinson
a51aeb224f testtask: Build on windows 2019-01-17 18:43:13 +01:00
Danielle Tomlinson
eab62662de chore: Setup appveyor for windows test execution 2019-01-17 18:43:13 +01:00
Mahmood Ali
4ff1e16706 Merge pull request #5202 from hashicorp/b-no-gpl-gopsutil
Update shirou/gopsutil dep to use non-GPL code
2019-01-17 11:40:04 -05:00
Mahmood Ali
d6c3626d16 Update shirou/gopsutil dep to use non-GPL code
Previously used `github.com/shirou/gopsutil`[1], used some GPL code [2].
This was somewhat unintentional, and was addressed later [3].

Due to being late in the cycle of Nomad release when this is noticed,
and time elapsed since we updated the dependency, we want to be
conservative in our package updates.

As such, we opted to go with forking the repo to use the previously used
version with the GPL removal code commit, done in [4].

[1] 5776ff9c7c
[2] 5776ff9c7c/host/include/smc.c
[3] c95755e4bc
[4] 62d5761ddb
2019-01-17 11:08:30 -05:00
Mahmood Ali
3c9de20820 fix imports 2019-01-16 19:53:48 -05:00
Michael Schurter
10068422e0 Merge pull request #5197 from hashicorp/b-rkt-cpu
rkt: revert to pre-0.9 --cpu flag
2019-01-16 15:05:21 -08:00