Commit Graph

228 Commits

Author SHA1 Message Date
Seth Hoenig 0e638b6014
Merge pull request #11836 from hashicorp/dependabot/go_modules/github.com/hashicorp/memberlist-0.3.1
chore(deps): bump github.com/hashicorp/memberlist from 0.2.2 to 0.3.1
2022-01-24 11:56:18 -06:00
Seth Hoenig 26ee04816b deps: upgrade containernetworking/plugins
Upgrade containernetworking/plugins to v1.0.1 release, along with
its transitive dependencies.

Closes #11108
2022-01-24 08:40:30 -06:00
Seth Hoenig f2a71fd0d9 deps: pty has new home
github.com/kr/pty was moved to github.com/creack/pty

Swap this dependency so we can upgrade to the latest version
and no longer need a replace directive.
2022-01-19 12:33:05 -06:00
Seth Hoenig 2a5f7c0386 deps: swap gzip handler for gorilla
This has been pinned since the Go modules migration, because the
nytimes gzip handler was modified in version v1.1.0 in a way that
is no longer compatible.

Pretty sure it is this commit: c551b6c3b4

Instead use handler.CompressHandler from gorilla, which is a web toolkit we already
make use of for other things.
2022-01-19 11:52:19 -06:00
dependabot[bot] d6d2c9ee7e
build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.7.1 to 1.12.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.7.1...v1.12.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-19 17:40:19 +00:00
Seth Hoenig 4650e97d29 deps: upgrade docker and runc
This PR upgrades
 - docker dependency to the latest tagged release (v20.10.12)
 - runc dependency to the latest tagged release (v1.0.3)

Docker does not abide by [semver](https://github.com/moby/moby/issues/39302), so it is marked +incompatible,
and transitive dependencies are upgrade manually.

Runc made three relevant breaking changes

 * cgroup manager .Set changed to accept Resources instead of Cgroup
   3f65946756

 * config.Device moved to devices.Device
   https://github.com/opencontainers/runc/pull/2679

 * mountinfo.Mounted now returns an error if the specified path does not exist
   https://github.com/moby/sys/blob/mountinfo/v0.5.0/mountinfo/mountinfo.go#L16
2022-01-18 08:35:26 -06:00
Luiz Aoqui d48e50da9a
Fix log level parsing from lines that include a timestamp (#11838) 2022-01-13 09:56:35 -05:00
dependabot[bot] 1d4c93c6ea
chore(deps): bump github.com/hashicorp/memberlist from 0.2.2 to 0.3.1
Bumps [github.com/hashicorp/memberlist](https://github.com/hashicorp/memberlist) from 0.2.2 to 0.3.1.
- [Release notes](https://github.com/hashicorp/memberlist/releases)
- [Commits](https://github.com/hashicorp/memberlist/compare/v0.2.2...v0.3.1)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/memberlist
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-13 00:45:05 +00:00
Michael Schurter 34c366d15c deps: update go-getter to v1.5.11
Pulls in https://github.com/hashicorp/go-getter/pull/348

Fixes the possibility to log an sshkey if a specific error condition is
hit.
2022-01-12 14:11:16 -08:00
Tim Gross 430d94b81d
deps: upgrade go-getter to 1.5.10 (#11740)
The `go-getter` library was updated to 1.5.9 in #11481 to pick up a
bug fix for automatically unpacking uncompressed tar archives. But
this version had a regression in git `ref` param behavior and was
patched in 1.5.10.
2021-12-23 10:37:52 -05:00
dependabot[bot] e6bfcc4d07
build(deps): bump github.com/hashicorp/cronexpr from 1.1.0 to 1.1.1 in /api (#11132)
* build(deps): bump github.com/hashicorp/cronexpr in /api

Bumps [github.com/hashicorp/cronexpr](https://github.com/hashicorp/cronexpr) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/hashicorp/cronexpr/releases)
- [Commits](https://github.com/hashicorp/cronexpr/compare/v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/cronexpr
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* go mod tidy

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tim Gross <tim@0x74696d.com>
2021-11-17 11:46:48 -05:00
Tim Gross 863486ffb0
deps: update go-getter to 1.5.9 (#11481)
go-getter 1.5.9 includes a patch in 1.5.6 that automatically unpacks
uncompressed tar archives. Previously Nomad only unpacked compressed
archives, but documented that it unpacked all archives.
2021-11-17 11:14:44 -05:00
dependabot[bot] 8f8d6c13cd
build(deps): bump github.com/kr/pretty from 0.1.0 to 0.3.0 in /api (#11135)
* build(deps): bump github.com/kr/pretty from 0.1.0 to 0.3.0 in /api

Bumps [github.com/kr/pretty](https://github.com/kr/pretty) from 0.1.0 to 0.3.0.
- [Release notes](https://github.com/kr/pretty/releases)
- [Commits](https://github.com/kr/pretty/compare/v0.1.0...v0.3.0)

---
updated-dependencies:
- dependency-name: github.com/kr/pretty
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* update in core as well and tidy

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tim Gross <tim@0x74696d.com>
2021-11-17 10:41:21 -05:00
dependabot[bot] fe857673da
build(deps): bump github.com/aws/aws-sdk-go from 1.38.20 to 1.42.6 (#11515)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.38.20 to 1.42.6.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.38.20...v1.42.6)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-17 10:20:48 -05:00
dependabot[bot] df907cd245
build(deps): bump github.com/mitchellh/mapstructure from 1.4.1 to 1.4.2 (#11325)
Bumps [github.com/mitchellh/mapstructure](https://github.com/mitchellh/mapstructure) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/mitchellh/mapstructure/releases)
- [Changelog](https://github.com/mitchellh/mapstructure/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitchellh/mapstructure/compare/v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: github.com/mitchellh/mapstructure
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-17 09:32:20 -05:00
dependabot[bot] 6a09befa78
build(deps): bump github.com/fatih/color from 1.9.0 to 1.13.0 (#11324)
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.9.0 to 1.13.0.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.9.0...v1.13.0)

---
updated-dependencies:
- dependency-name: github.com/fatih/color
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-17 09:16:12 -05:00
dependabot[bot] be4f84de94
build(deps): bump github.com/rs/cors from 1.7.0 to 1.8.0 (#11323)
Bumps [github.com/rs/cors](https://github.com/rs/cors) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/rs/cors/releases)
- [Commits](https://github.com/rs/cors/compare/v1.7.0...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/rs/cors
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-17 09:03:10 -05:00
James Rasell fbe1b8eb27
deps: update armon/go-metrics to v0.3.10. 2021-11-15 11:55:50 +01:00
Mahmood Ali f03d65062d
Fix arm64 panics by updating google/snappy library to latest, 0.0.4 (#11396)
Pick up https://github.com/golang/snappy/pull/56 to handle arm64 architectures to fix panics. tldr; Golang 1.16 changed `memmove` implementation for arm64 requiring additional cpu registers that snappy wasn't preserving in its assembly implementation.

Other projects have experienced this issue as well, searching for `encode_arm64.s:666` on your favorite search engine will reveal some.  Vault updated the dependency earlier this August: https://github.com/hashicorp/vault/pull/12371 .

I believe this issue affects Nomad 1.2.x and 1.1.x. Nomad 1.0.x use Golang 1.15 and isn't affected. However, backporting the change to 1.0.x should be harmless.

Fixed https://github.com/hashicorp/nomad/issues/11385 .
2021-10-27 06:39:16 -07:00
Florian Apolloner c762f64505
Follow up fixes for #11237 (#11260) 2021-10-14 17:23:38 -04:00
James Rasell 61a417d7e2
deps: update hashicorp/go-hclog to v1.0.0 2021-10-07 07:48:41 +01:00
Mahmood Ali 9668245c4c logmon: add a test for leaked goroutines 2021-10-05 12:11:42 -04:00
Tim Gross 6800485dcb devices: externalize nvidia device driver 2021-09-29 13:43:37 -07:00
Luiz Aoqui bbae221c8c
deps: update go-memdb to 1.3.2 (#11185) 2021-09-14 20:26:45 -04:00
James Rasell 89040d4835
deps: update go-plugin to v1.4.3 to fix Windows handle leak. 2021-09-07 09:27:00 +02:00
Roopak Venkatakrishnan dcf5981bcd
Update x/sys to support go 1.17 (#11065)
Co-authored-by: James Rasell <jrasell@hashicorp.com>
2021-08-25 17:23:01 +02:00
Mahmood Ali fdb82b9398
Update some dependencies to match Enterprise (#10940)
Noticed that the private Enterprise repository dependencies drifted a bit. Here, we update the OSS to the dependencies used by Enterprise.

We should update all dependencies as a matter of hygiene, but that's an issue for another time.
2021-07-27 16:33:18 -04:00
Michael Schurter ea996c321d
Merge pull request #10916 from hashicorp/f-audit-log-mode
Add audit log file mode config parameter
2021-07-27 12:16:37 -07:00
Mahmood Ali d97927ebcf
cli: Use glint to determine if os.Stdout is tty (#10926)
Use glint to determine if os.Stdout is a terminal.

glint Terminal renderer expects os.Stdout [not only to be a terminal, but also to have non-zero size](b492b545f6/renderer_term.go (L39-L46)). It's unclear how this condition arises, but this additional check causes Nomad to render deployments progress through glint when glint cannot support it.

By using golint to perform the check, we eliminate the risk of mis-judgement.
2021-07-23 11:27:47 -04:00
Seth Hoenig 06a272890a deps: upgrade consul api to 1.9.1 2021-07-22 09:26:20 -05:00
Michael Schurter 2260ff3684 deps: sync oss versions with enterprise
see hashicorp/nomad-enterprise#586 for audit logger related dependency
updates
2021-07-20 10:55:31 -07:00
James Rasell fd8685c32b
deps: update consul-template to v0.25.2. 2021-07-13 09:46:32 +02:00
Huan Wang 3da7a4e206
update-gopsutil (#10790) 2021-06-21 10:19:39 -04:00
Tim Gross 40a7b24dca
deps: bump go-getter to 1.5.4 (#10778) 2021-06-17 16:30:00 -04:00
Isabel Suchanek dfaef2468c cli: add monitor flag to deployment status
Adding '-verbose' will print out the allocation information for the
deployment. This also changes the job run command so that it now blocks
until deployment is complete and adds timestamps to the output so that
it's more in line with the output of node drain.

This uses glint to print in place in running in a tty. Because glint
doesn't yet support cmd/powershell, Windows workflows use a different
library to print in place, which results in slightly different
formatting: 1) different margins, and 2) no spinner indicating
deployment in progress.
2021-06-09 16:18:45 -07:00
Michael Schurter a6636723ee vendor: update aws-sdk-go and deps 2021-04-27 15:07:03 -07:00
Seth Hoenig 9c4e2e93d0 deps: update consul api for transparent proxy 2021-04-19 14:56:01 -06:00
Seth Hoenig f7251368fa Revert "deps: bump consul/api version for transparent proxy"
This reverts commit 12bb509242109770c8318ec8ca61e54f4fa2bd42.

This change is causing compatibility issues with Consul 1.9.X;
I suspect the change is only compatible with Consul 1.10 or higher
which is not released yet, and not something Nomad can require
for quite some time.

E.g. when registering an ingress gateway,

```
consul.sync: failed to update services in Consul: error="Unexpected response code: 400 (Request decode failed: json: unknown field "TransparentProxy")"
```
2021-04-16 13:13:56 -06:00
Seth Hoenig 0bd4514f01 deps: bump consul/api version for transparent proxy 2021-04-13 10:20:08 -06:00
Seth Hoenig c351e5566d deps: upgrade go-plugin dependency
This PR brings go-plugin up to date from ~v1.0.1 to v1.4.0 (about 18 months)
with a grab-bag of bux fixes.
2021-04-12 14:37:04 -06:00
Mahmood Ali 6de35bd1b7 update hcl2 to latest
Update hcl/v2 to point to https://github.com/hashicorp/hcl/commits/nomad-v2.9.1+tweaks1
2021-04-07 16:16:49 -04:00
Seth Hoenig f17ba33f61 consul: plubming for specifying consul namespace in job/group
This PR adds the common OSS changes for adding support for Consul Namespaces,
which is going to be a Nomad Enterprise feature. There is no new functionality
provided by this changeset and hopefully no new bugs.
2021-04-05 10:03:19 -06:00
zhsj 5a182e1d03
deps: update runc to v1.0.0-rc93
includes updates for breaking changes in runc v1.0.0-rc93
2021-03-31 10:57:02 -04:00
Tim Gross f820021f9e deps: bump gopsutil to v3.21.2 2021-03-30 16:02:51 -04:00
Tim Gross f000b460e4 csi: upgrade CSI protobufs to 1.4.0 2021-03-12 10:36:33 -05:00
Michael Dwan 2f2c8b9691 sync vendored modules 2021-02-22 21:10:46 -07:00
Seth Hoenig 29801c8e40 consul: upgrade consul/api to 1.8.1 2021-01-29 10:04:45 -06:00
Tim Gross 23cc8b4d77
interpolate maps in dynamic blocks (#9921)
Update hcl2 for patch to fix map interpolation in dynamic blocks
2021-01-29 10:16:07 -05:00
Kent 'picat' Gruber f0d1c4092b
Update go-getter to v1.5.2 with support for vhost style S3 paths (#9349) 2021-01-07 13:34:28 -05:00
Seth Hoenig 9ec1af5310 command: remove use of flag impls from consul
In a few places Nomad was using flag implementations directly
from Consul, lending to Nomad's need to import consul. Replace
those uses with helpers already in Nomad, and copy over the bare
minimum needed to make the autopilot flags behave as they have.
2020-12-11 07:58:20 -06:00
Ben Buzbee a8e4aa76c6 Use new go-connlimit with HTTP 429 response
This is essentially a port of Consul's similar fix
Changes are:
go get -u github.com/hashicorp/go-connlimit
go mod vendor
Use new HTTP429 handler

20d1ea7d2d
2020-12-09 17:57:16 -06:00
Drew Bailey cb689a8382
Api/event stream payload values (#9277)
* Get concrete types out of dynamic payload

wip

pull out value setting to func

* Add TestEventSTream_SetPayloadValue

Add more assertions

use alias type in unmarshalJSON to handle payload rawmessage

shorten unmarshal and remove anonymous wrap struct

* use map structure and helper functions to return concrete types

* ensure times are properly handled

* update test name

* put all decode logic in a single function

Co-authored-by: Kris Hicks <khicks@hashicorp.com>
2020-11-05 13:04:18 -05:00
Mahmood Ali f9290090e0 Update vendored libraries 2020-10-21 15:46:56 -04:00
Seth Hoenig 8e4df4ca51 deps: use upstream gopsutil once more
The PR we needed https://github.com/shirou/gopsutil/pull/889 has been merged
upstream, which means we can use upstream rather than our fork of psutil.
2020-10-17 08:54:50 -05:00
Mahmood Ali 90a0b5e558
vendor: update go-getter and x/net (#9099)
Update go-getter to the latest release now that hashicorp/go-getter#256 is merged.
Also, pick up a xz CVE fix that go-getter merged in hashicorp/go-getter#279 .
2020-10-15 10:24:24 -04:00
Drew Bailey 8ffe981357
go-memdb v1.3.0 2020-10-14 12:44:41 -04:00
Drew Bailey b4c135358d
use Events to wrap index and events, store in events table 2020-10-14 12:44:39 -04:00
Seth Hoenig 3f5ecd6f42 deps: update aws-sdk-go for ec2metadata bugfix
Newer versions of aws-sdk-go contain a bugfix for retrieving
region vs availability-zone information.
2020-10-06 13:05:29 -05:00
Fredrik Hoem Grelland 953d4de8dd
update consul-template to v0.25.1 (#8988) 2020-10-01 14:08:49 -04:00
Yoan Blanc 0f217a6b96
feat: upgrade consul 1.7, and go-discover
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
2020-09-13 11:40:47 +02:00
Tim Gross b927a4c061 remove direct dependency on ginkgo 2020-09-10 13:00:42 -04:00
Mahmood Ali 39e2c64a39 Update cronexpr to pick up month zero padding fix 2020-09-01 11:48:28 -04:00
Tim Gross 2c47299a67
fix committed go.sum merge conflict (#8764) 2020-08-27 15:35:52 -04:00
Seth Hoenig 9f1f2a5673 Merge branch 'master' into f-cc-ingress 2020-08-26 15:31:05 -05:00
Seth Hoenig 4bfe830074 consul/connect: update consul to match current 2020-08-24 10:48:27 -05:00
Seth Hoenig a09d1746bf
Merge branch 'master' into consul-v1.7.7 2020-08-24 10:43:00 -05:00
Yoan Blanc 7b873b7746
vendor: rs/cors v1.7.0
The Olivier Poitrey Go CORS handler through 1.3.0 actively converts
a wildcard CORS policy into reflecting an arbitrary Origin header
value, which is incompatible with the CORS security design, and
could lead to CORS misconfiguration security problems.

CVE-2018-20744

Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
2020-08-23 10:36:38 +02:00
Yoan Blanc 63b27d42a2
vendor: consul/api, consul/sdk v1.6.0
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
2020-08-23 09:43:37 +02:00
Yoan Blanc 5e629775ac
vendor: consul v1.7.7
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
2020-08-23 09:41:27 +02:00
Seth Hoenig 5b072029f2 consul/connect: add initial support for ingress gateways
This PR adds initial support for running Consul Connect Ingress Gateways (CIGs) in Nomad. These gateways are declared as part of a task group level service definition within the connect stanza.

```hcl
service {
  connect {
    gateway {
      proxy {
        // envoy proxy configuration
      }
      ingress {
        // ingress-gateway configuration entry
      }
    }
  }
}
```

A gateway can be run in `bridge` or `host` networking mode, with the caveat that host networking necessitates manually specifying the Envoy admin listener (which cannot be disabled) via the service port value.

Currently Envoy is the only supported gateway implementation in Consul, and Nomad only supports running Envoy as a gateway using the docker driver.

Aims to address #8294 and tangentially #8647
2020-08-21 16:21:54 -05:00
Shengjing Zhu c69984f853 Update runc to v1.0.0-rc92 2020-08-19 23:56:35 +08:00
Drew Bailey 1c95bdb616
upgrade go metrics to 0.3.4 (#8637) 2020-08-11 13:26:45 -04:00
Seth Hoenig fb1c85a956 deps: upgrade import of consul/api
Upgrade our consul/api import to the equivelent of consul@v1.8.1 which includes
a bug fix necessary for #6913. If consul would publish a proper api/ submodule tag
we could reference that.
2020-08-06 21:02:33 -05:00
Mahmood Ali e7a3d6e358 Update github.com/syndtr/gocapability
runc requires a more recent version
2020-06-22 17:10:41 -04:00
Mahmood Ali 7423f38771 Upgrade libcontainer dependency
Upgrade libcontainer dependency to pick up fix for CVE-2019-19921 .
2020-06-22 16:56:54 -04:00
Michael Schurter 0ed023c61a deps: updated libnetwork dep
Adding missing vendor files as well.
2020-06-18 11:05:31 -07:00
Mahmood Ali 82c87cf97b
Vendor gopsutil with go mod fix (#8108)
Point to gopsutil fork with shirou/gopsutil#889 changes. I used hashicorp/gopsutil rather than pointing to https://github.com/Lomanic/gopsutil/tree/issue832 directly just in case..
2020-06-03 16:09:27 -04:00
Seth Hoenig 435c0d9fc8 deps: Switch to Go modules for dependency management
This PR switches the Nomad repository from using govendor to Go modules
for managing dependencies. Aspects of the Nomad workflow remain pretty
much the same. The usual Makefile targets should continue to work as
they always did. The API submodule simply defers to the parent Nomad
version on the repository, keeping the semantics of API versioning that
currently exists.
2020-06-02 14:30:36 -05:00