Commit Graph

16316 Commits

Author SHA1 Message Date
Drew Bailey
12819975ee remove log_writer
prefix output with proper spacing

update gzip handler, adjust first byte flow to allow gzip handler bypass

wip, first stab at wiring up rpc endpoint
2019-11-05 09:51:48 -05:00
Drew Bailey
a828c92403 Display error when remote side ended monitor
multisink logger

remove usage of logwriter
2019-11-05 09:51:48 -05:00
Drew Bailey
74cfdf55bb Adds nomad monitor command
Adds nomad monitor command. Like consul monitor, this command allows you
to stream logs from a nomad agent in real time with a a specified log
level

add endpoint tests

Upgrade go-hclog to latest version

The current version of go-hclog pads log prefixes to equal lengths
so info becomes [INFO ] and debug becomes [DEBUG]. This breaks
hashicorp/logutils/level.go Check function. Upgrading to the latest
version removes this padding and fixes log filtering that uses logutils
Check
2019-11-05 09:51:47 -05:00
Drew Bailey
dc3286481a Add Agent Monitor to receive streaming logs
Queries /v1/agent/monitor and receives streaming logs from client
2019-11-05 09:51:47 -05:00
Drew Bailey
91c0184773 Adds AgentMonitor Endpoint
AgentMonitor is an endpoint to stream logs for a given agent. It allows
callers to pass in a supplied log level, which may be different than the
agents config allowing for temporary debugging with lower log levels.

Pass in logWriter when setting up Agent
2019-11-05 09:51:46 -05:00
Drew Bailey
5e03fec048 Update gziphandler to latest version
This version of gziphandler includes a fix that fixes GzipResponseWriter
to implement CloseNotifier

https://github.com/nytimes/gziphandler/pull/63
2019-11-05 09:51:46 -05:00
Michael Schurter
1848073a62 Merge pull request #6617 from hashicorp/docs-0.10.1
docs: bump website to Nomad 0.10.1
2019-11-04 12:46:39 -08:00
Michael Schurter
381cdb6526 docs: bump website to Nomad 0.10.1 2019-11-04 12:01:43 -08:00
Michael Schurter
bba4f4c495 Merge pull request #6616 from hashicorp/release-0101
Release 0101
2019-11-04 12:00:31 -08:00
Michael Schurter
fa96554ba9 Merge branch 'master' into release-0101 2019-11-04 11:57:12 -08:00
Michael Schurter
e45f28840b release: prep for 0.10.2-dev 2019-11-04 19:45:40 +00:00
Drew Bailey
d77e47d562 Merge pull request #6615 from hashicorp/6609-changelog
add bug 6609 to changelog
2019-11-04 14:34:27 -05:00
Michael Schurter
8aab33b63b Release v0.10.1 2019-11-04 19:29:55 +00:00
Drew Bailey
e02b4c131c add bug 6609 to changelog 2019-11-04 10:29:33 -05:00
Drew Bailey
b20fb9e7bb Merge pull request #6609 from hashicorp/b-alloc-status-consistency
Prevent nomad alloc status output inconsistency
2019-11-04 10:12:04 -05:00
Nomad Release bot
0d4e5d949f Generate files for 0.10.1 release 2019-11-01 21:57:51 +00:00
Michael Schurter
b74146ef82 docs: update changelog
Remove 0.10.1 release date until finalizing release
2019-11-01 14:34:18 -07:00
Michael Schurter
4dee31eec1 Merge pull request #6605 from hashicorp/b-allocres-panic
client: fix panic from 0.8 -> 0.10 upgrade
2019-11-01 14:33:19 -07:00
Michael Schurter
179b8f457e Merge pull request #6605 from hashicorp/b-allocres-panic
client: fix panic from 0.8 -> 0.10 upgrade
2019-11-01 12:58:59 -07:00
Tim Gross
9b4e22a836 docs: note bridge-nf-call-iptables requirement for Connect (#6607)
The Connect integration uses bridge networking and iptables to send
traffic between containers, but the RedHat family of Linux distros
sets some of the kernel tunables this requires to be optimized for VMs
rather than containers. We can document this behavior for now and
consider better operator feedback for pre-flight checking later.
2019-11-01 14:41:21 -04:00
Drew Bailey
6980ab0a81 Prevent nomad alloc status output inconsistency
Prevent random map ordering and sort alphabetically

better variable name
2019-11-01 14:01:32 -04:00
Michael Schurter
0fcb0d4016 client: fix panic from 0.8 -> 0.10 upgrade
makeAllocTaskServices did not do a nil check on AllocatedResources
which causes a panic when upgrading directly from 0.8 to 0.10. While
skipping 0.9 is not supported we intend to fix serious crashers caused
by such upgrades to prevent cluster outages.

I did a quick audit of the client package and everywhere else that
accesses AllocatedResources appears to be properly guarded by a nil
check.
2019-11-01 07:47:03 -07:00
Michael Schurter
cd16a7c177 docs: prep changelog for 0.10.1 release 2019-10-31 09:19:04 -07:00
Mahmood Ali
d64bffbf3b Merge pull request #6575 from hashicorp/b-gh-6571-missing-service-network
Fix some connect connect validation
2019-10-31 08:57:44 -07:00
Michael Schurter
7a5640874a Merge pull request #6541 from hashicorp/release-0100-net-panic
core: fix panic when AllocatedResources is nil
2019-10-31 08:49:01 -07:00
Michael Schurter
20bb9f04d5 Merge pull request #6541 from hashicorp/release-0100-net-panic
core: fix panic when AllocatedResources is nil
2019-10-31 08:46:34 -07:00
Lars Lehtonen
d0d18b2a85 client/allocwatcher: fix dropped test error (#6592) 2019-10-31 08:29:25 -04:00
Lars Lehtonen
9254b353f0 nomad: fix test goroutine (#6593) 2019-10-31 08:23:32 -04:00
Tim Gross
b9eaf6119e remove misleading networking log line (#6588)
When a job has a task group network, this log line ends up being
misleading if you're trying to debug networking issues. We really only
care about this when there's no port map set, in which case we get the
error returned anyways.
2019-10-30 13:23:33 -04:00
Charlie Voiselle
32f64d3698 Merge pull request #6532 from hashicorp/docs-fixup-command
Fixup for command section of website
2019-10-30 10:32:37 -04:00
Tim Gross
889ca90bde run 'make hclfmt' so that 'make dev' is idempotent (#6587) 2019-10-30 09:37:18 -04:00
Michael Schurter
5b27fd2047 docs: update references 2019-10-29 15:38:48 -07:00
Seth Hoenig
cb12218ad9 Merge pull request #6582 from hashicorp/b-vault-createToken-log-msg
nomad: fix vault.CreateToken log message printing wrong error
2019-10-29 17:35:05 -05:00
Michael Schurter
a9dd409207 Merge pull request #6568 from hashicorp/r-vault-deadcode
vault: remove dead lease code
2019-10-29 10:33:35 -07:00
Mahmood Ali
f010fe22fa Merge pull request #6047 from hashicorp/b-ignore-server-if-disabled
Only warn against BootstrapExpect set in CLI flag
2019-10-29 10:55:44 -04:00
Mahmood Ali
6d59938530 Merge pull request #6574 from hashicorp/b-gh-6570-vault-role-validation
vault: honor new `token_period` in vault token role
2019-10-29 10:18:59 -04:00
Seth Hoenig
ed823822a8 nomad: fix vault.CreateToken log message printing wrong error
Fixes typo in word "failed".

Fixes bug where incorrect error is printed. The old code would only
ever print a nil error, instead of the validationErr which is being
created.
2019-10-28 23:05:32 -05:00
Michael Schurter
08a17854ce core: fix panic when AllocatedResources is nil
Fix for #6540
2019-10-28 14:38:21 -07:00
Mahmood Ali
ac44517f50 Merge pull request #6575 from hashicorp/b-gh-6571-missing-service-network
Fix some connect connect validation
2019-10-28 11:45:09 -04:00
Mahmood Ali
ba7f4fbcd9 Fix admissionValidators
`admissionValidators` doesn't aggregate errors correctly, as it
aggregates errors in `errs` reference yet it always returns the nil
`err`.

Here, we avoid shadowing `err`, and move variable declarations to where
they are used.
2019-10-28 10:52:53 -04:00
Mahmood Ali
51484bf2a6 consul connect: do basic validation before mutating job
`groupConnectHook` assumes that Networks is a non-empty slice, but TG
hasn't been validated yet and validation may depend on mutation results.
As such, we do basic check here before dereferencing network slice
elements.
2019-10-28 10:49:02 -04:00
Mahmood Ali
766f1bfca8 add tests for consul connect validation 2019-10-28 10:41:51 -04:00
Mahmood Ali
008ae5bd7c Test with Vault latest, 1.2.3
To ensure we test with latest with latest configuration.
2019-10-28 09:37:06 -04:00
Mahmood Ali
321fd4145d vault: Support new role field token_role
Vault 1.2.0 deprecated `period` field in favor of `token_period` in auth
role:

>  * Token store roles use new, common token fields for the values
>    that overlap with other auth backends. `period`, `explicit_max_ttl`, and
>    `bound_cidrs` will continue to work, with priority being given to the
>    `token_` prefixed versions of those parameters. They will also be returned
>    when doing a read on the role if they were used to provide values initially;
>    however, in Vault 1.4 if `period` or `explicit_max_ttl` is zero they will no
>    longer be returned. (`explicit_max_ttl` was already not returned if empty.)
https://github.com/hashicorp/vault/blob/master/CHANGELOG.md#120-july-30th-2019
2019-10-28 09:33:26 -04:00
Tim Gross
4abb6b5786 e2e: refactor Consul configurations (#6559)
Ensure that we're reusing the base configuration between client and
servers without the possibility of drift. Reduce the amount of `sed`
mangling of the configuration file, and make recommended changes from
`shellcheck` for this section of the provisioning script.

Fixes some rebase errors on the Nomad config as well.
2019-10-28 09:27:40 -04:00
Tim Gross
56bfcddba7 e2e: refactor Nomad configuration (#6560)
Share base configuration for telemetry and consul. Have the server
configurations respect the `var.server_count` config. Make changes
recommended by `shellcheck` in the provisioning scripts for this section.

Switch to OS/arch-tagged release bundles on S3 for compatibility with
adding Windows builds in the near future.
2019-10-28 08:21:02 -04:00
Michael Schurter
523586a6e6 vault: remove dead lease code 2019-10-25 15:08:35 -07:00
Tim Gross
5239e69e33 e2e: refactor Vault configuration (#6561)
Match the configuration directory layout we're using for Consul and
other services. Make recommended changes from `shellcheck` for this
section of the provisioning script.
2019-10-25 15:29:01 -04:00
Omar Khawaja
71cac63f28 separate vars and outputs into their own files and update default link in nomad binary variable to 0.10.0 release (#6550) 2019-10-25 14:15:30 -04:00
Tim Gross
a7861b7637 e2e: use sockaddr for IP address configuration (#6548)
Update the Consul and Vault configs to take advantage of their
included `go-sockaddr` library for getting the IP addresses we need in
a portable way. This particularly avoids problems with "predictable"
interface names provided by systemd.

Also adds the `sockaddr` binary to the Packer build so we can use it
in our provisioning scripts.
2019-10-25 14:08:38 -04:00