Commit Graph

407 Commits

Author SHA1 Message Date
Mahmood Ali cd6f1d3102 Update consul-template dependency to latest
To pick up the fix in
https://github.com/hashicorp/consul-template/pull/1231 .
2019-07-18 07:32:03 +07:00
Danielle c6872cdf12
Merge pull request #5864 from hashicorp/dani/win-pipe-cleaner
windows: Fix restarts using the raw_exec driver
2019-07-02 13:58:56 +02:00
Danielle Lancashire 0ff27cfc0f
vendor: Use dani fork of go-winio 2019-06-28 13:47:18 +02:00
Chris Baker 0436f70975
Merge branch 'master' into b-5345-prometheus-metric-label-conflict 2019-06-19 12:50:03 -04:00
Mahmood Ali 4c3798c82a
Merge pull request #5844 from hashicorp/b-hcl-parse-unknown-vars
Upgrade hcl2 to validate arrays for unknown values
2019-06-19 10:44:21 -04:00
Mahmood Ali 0c8a1623f3 update logrus and go-windows-terminal-sequences 2019-06-18 14:55:19 -04:00
Mahmood Ali 3dd3195d45 Update github.com/opencontainers/selinux
Or github.com/opencontainers/selinux/go-selinux, a dependency of
libcontainer.
2019-06-18 14:49:11 -04:00
Mahmood Ali 0848f577bb Update libcontainer to 6cc5158
To pick up the fix in https://github.com/opencontainers/runc/pull/2023

Fixes https://github.com/hashicorp/nomad/issues/5836
2019-06-18 14:48:13 -04:00
Chris Baker 50b491564d metrics: upgraded prometheus http client to 0.9.4 to address label conflict in Nomad 0.9.x reported in #5345 2019-06-18 18:34:22 +00:00
Mahmood Ali c1f6c7b457 Upgrade hcl2 to validate arrays for unknown values
This upgrades hcl2 library dependency to pick up
https://github.com/hashicorp/hcl2/pull/113 .

Prior to this change, parsing and decoding array attributes containing
invalid errors (e.g. references to unknown variables) are silently
dropped, with `cty.Unknown` being assigned to the bad element.  Rather
than showing a type/meaningful error from hcl2, we get a very decrypted
error message from msgpack layer trying to handle `cty.unknown`.

This ensures that we propagate diagnostics correctly and report
meaningful errors to users.

Fixes https://github.com/hashicorp/nomad/issues/5694
Fixes https://github.com/hashicorp/nomad/issues/5680
2019-06-17 12:28:14 -04:00
Lang Martin a337488b5c config parse update hcl with support for decoding bool to string 2019-06-10 13:12:38 -04:00
Mahmood Ali 78602461c1 remove github.com/RackSec/srslog dependency
No longer used
2019-05-21 10:56:08 -04:00
Mahmood Ali 7fdb7564e8 vendor github.com/kr/pty 2019-05-10 19:17:14 -04:00
Mahmood Ali 919827f2df
Merge pull request #5632 from hashicorp/f-nomad-exec-parts-01-base
nomad exec part 1: plumbing and docker driver
2019-05-09 18:09:27 -04:00
Mahmood Ali 050e88c668 vendor github.com/gorilla/websocket 2019-05-09 16:49:08 -04:00
Lang Martin 9f3f11df97
Merge pull request #5601 from hashicorp/b-config-parse-direct-hcl
config parse direct hcl
2019-05-06 12:05:19 -04:00
Mahmood Ali 7b72105802 Update hashicorp/go-msgpack/codec
To pick up the fix in https://github.com/hashicorp/go-msgpack/pull/8 .
2019-05-02 10:59:09 -04:00
Chris Baker a40477a7b8
test case for 5540 (#5590)
* client/metrics: modified metrics to use (updated) client copy of allocation instead of (unupdated) server copy

* updated armon/go-metrics to address race condition in DisplayMetrics
2019-04-30 10:31:35 -04:00
Lang Martin 7e0e9b1ec1 govendor fetch github.com/hashicorp/hcl@99e2f22 2019-04-30 10:30:12 -04:00
Mahmood Ali d314db54d8 vendor docker/docker volume utils 2019-04-25 08:55:21 -04:00
Lang Martin 0c9b9c4815 update vendor/github.com/hashicorp/hcl 2019-04-23 11:56:07 -04:00
Mahmood Ali e0c7063697 vendor upstream opencontainers/runc 2019-04-19 09:49:04 -04:00
Chris Baker 829a972693
vault client test: minor formatting
vendor: using upstream circonus-gometrics
2019-04-10 10:34:10 -05:00
Chris Baker 01c79666f0
vendor: updated consul-template and downstream
consul-template -> v0.20.0
consul/api -> v1.2.1
vault/api -> v1.0.3
go-retryablehttp -> v0.5.2
circonus-gometrics: modified local source for compat with go-retryablehttp
2019-04-10 10:34:10 -05: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
Mahmood Ali bb32ba8784
Support driver config fields being set to nil (#5391)
To pick up https://github.com/hashicorp/hcl2/pull/90
2019-03-05 21:47:06 -05:00
Danielle Tomlinson 3ae58eba84 vendor: Update to latest go-colorable 2019-02-20 13:56:15 +01:00
Mahmood Ali a394cd63f4
CVE-2019-5736: Update libcontainer depedencies (#5334)
* CVE-2019-5736: Update libcontainer depedencies

Libcontainer is vulnerable to a runc container breakout, that was
reported as CVE-2019-5736[1].  Upgrading vendored libcontainer with the fix.

The runc changes are captured in 369b920277 .

[1] https://seclists.org/oss-sec/2019/q1/119
2019-02-19 20:21:18 -05:00
Danielle Tomlinson b59ed9d6c9 vendor: Update to latest hcl2
* Includes fixes for handling null blocks https://github.com/hashicorp/hcl2/pull/87
* Updates go-cty as a newer version is required by hcl2
2019-02-14 13:34:46 +01:00
Michael Schurter 17a8c6639c Install versioned release of codecgen
Gets us one step closer to a reproducible build. Also removes the unused
vendored version.
2019-01-30 08:00:17 -08:00
Mahmood Ali 08db847aa8 drivers/rkt: Remove unused github.com/rkt/rkt 2019-01-23 10:53:49 -05:00
Mahmood Ali a8cd7003d7 fix vendor entry field name 2019-01-18 10:05:21 -05:00
Mahmood Ali 21e193ecf4 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
oleksii.shyman 7393e91145 Update go-dockerclient and docker dependencies
- go-dockerclient is updated because of lack of "runtime" API field
 - docker/docker is updated because go-dockerclient depends on docker
 master branch
2019-01-15 11:28:57 -08:00
Mahmood Ali b08f59cdda
Merge pull request #5162 from hashicorp/f-extract-lxc
Extract LXC from nomad
2019-01-09 13:07:05 -05:00
Danielle Tomlinson cca5f41360 vendor: Update go-plugin
This fixes a bug related to shutting down of GRPC plugin interfaces
(more info: https://github.com/hashicorp/go-plugin/pull/88)

This does not yet fix all test cases for subprocess leaking, but is a
useful independant change.
2019-01-08 17:43:20 +01:00
Mahmood Ali 04f787d3fa remove unused go-lxc vendored library 2019-01-08 09:28:21 -05:00
Danielle Tomlinson 734574bc25 deps: Update x/net/context
This allows std context to be used in place of an x/net/context and
unblocks updating to the latest version of go-plugin.
2019-01-08 13:45:10 +01:00
Chris Baker 4109306fff updated serf along with raft 2019-01-04 16:56:26 +00:00
Chris Baker 11c4496a4d updated to latest hashicorp/raft and hashicorp/memberlist to pull
upstream fixes for accept-loop error handling
2019-01-04 14:01:36 +00:00
Alex Dadgar 4c57d2ec4d Add plugin API versioning to plugin loader and plugins 2018-12-18 16:48:00 -08:00
Chris Baker 4bbb8106c1 updated memberlist dependency to latest, which is missing NMD-1173 error 2018-12-07 22:15:05 +00:00
Mahmood Ali 91a67f347d Vendor libcontainer/devices 2018-12-07 09:13:27 -05:00
Mahmood Ali 3f1887db8c Update go-lxc library to handle LXC 3.0 2018-11-27 21:40:43 -05:00
Preetha Appan cba7ed58e0
update consul template 2018-11-15 14:15:12 -06:00
Mahmood Ali 1010213db2 format vendor.json 2018-11-14 20:17:11 -05:00
Mahmood Ali 713c9fe683 Move Stat{Object|Value} to plugins/shared/structs
Moving them as they may be useful for other packages/plugins besides
devices.
2018-11-14 09:01:26 -05:00
Alex Dadgar 204ca8230c Device manager
Introduce a device manager that manages the lifecycle of device plugins
on the client. It fingerprints, collects stats, and forwards Reserve
requests to the correct plugin. The manager, also handles device plugins
failing and validates their output.
2018-11-07 10:43:15 -08:00
Nick Ethier 5dee1141d1 executor v2 (#4656)
* client/executor: refactor client to remove interpolation

* executor: POC libcontainer based executor

* vendor: use hashicorp libcontainer fork

* vendor: add libcontainer/nsenter dep

* executor: updated executor interface to simplify operations

* executor: implement logging pipe

* logmon: new logmon plugin to manage task logs

* driver/executor: use logmon for log management

* executor: fix tests and windows build

* executor: fix logging key names

* executor: fix test failures

* executor: add config field to toggle between using libcontainer and standard executors

* logmon: use discover utility to discover nomad executable

* executor: only call libcontainer-shim on main in linux

* logmon: use seperate path configs for stdout/stderr fifos

* executor: windows fixes

* executor: created reusable pid stats collection utility that can be used in an executor

* executor: update fifo.Open calls

* executor: fix build

* remove executor from docker driver

* executor: Shutdown func to kill and cleanup executor and its children

* executor: move linux specific universal executor funcs to seperate file

* move logmon initialization to a task runner hook

* client: doc fixes and renaming from code review


* taskrunner: use shared config struct for logmon fifo fields

* taskrunner: logmon only needs to be started once per task
2018-10-16 16:53:31 -07:00
Nick Ethier 03422aa529 fifo: add new fifo package for named pipes (#4665)
* fifo: add new fifo package for named pipes
2018-10-16 16:53:30 -07:00