Commit graph

16706 commits

Author SHA1 Message Date
Drew Bailey 8726b685de
address feedback 2019-11-05 09:51:56 -05:00
Drew Bailey e4b3e1d7d4
allow more time for streaming message
remove unused struct
2019-11-05 09:51:55 -05:00
Drew Bailey 318b6c91bf
monitor command takes no args
rm extra new line

fix lint errors

return after close

fix, simplify test
2019-11-05 09:51:55 -05:00
Drew Bailey 0e759c401c
moving endpoints over to frames 2019-11-05 09:51:54 -05:00
Drew Bailey c7b633b6c1
lock in sub select
rm redundant lock

wip to use framing

wip switch to stream frames
2019-11-05 09:51:54 -05:00
Drew Bailey fb23c1325d
fix deadlock issue, switch to frames envelope 2019-11-05 09:51:54 -05:00
Drew Bailey 32f62edbb0
return 400 if invalid log_json param is given
Addresses feedback around monitor implementation

subselect on stopCh to prevent blocking forever.

Set up a separate goroutine to check every 3 seconds for dropped
messages.

rename returned ch to avoid confusion
2019-11-05 09:51:53 -05:00
Drew Bailey 17d876d5ef
rename function, initialize log level better
underscores instead of dashes for query params
2019-11-05 09:51:53 -05:00
Drew Bailey 8178beecf0
address feedback, use agent_endpoint instead of monitor 2019-11-05 09:51:53 -05:00
Drew Bailey 8e3915c7fc
use channel instead of empty string to determine close 2019-11-05 09:51:52 -05:00
Drew Bailey da6229d704
update go-hclog dep
remove duplicate lock
2019-11-05 09:51:52 -05:00
Drew Bailey db65b1f4a5
agent:read acl policy for monitor 2019-11-05 09:51:52 -05:00
Drew Bailey f46fd5b3e1
only look up rpchandler for node if we have nodeid
fix some comments and nomad monitor -h output
2019-11-05 09:51:51 -05:00
Drew Bailey 2533617888
rpc acl tests for both monitor endpoints 2019-11-05 09:51:51 -05:00
Drew Bailey 3c33747e1f
client monitor endpoint tests 2019-11-05 09:51:50 -05:00
Drew Bailey 4bc68855d0
use intercepting loggers for rpchandlers 2019-11-05 09:51:50 -05:00
Drew Bailey 3b9c33a5f0
new hclog with standardlogger intercept 2019-11-05 09:51:49 -05:00
Drew Bailey a45ae1cd58
enable json formatting, use queryoptions 2019-11-05 09:51:49 -05:00
Drew Bailey 786989dbe3
New monitor pkg for shared monitor functionality
Adds new package that can be used by client and server RPC endpoints to
facilitate monitoring based off of a logger

clean up old code

small comment about write

rm old comment about minsize

rename to Monitor

Removes connection logic from monitor command

Keep connection logic in endpoints, use a channel to send results from
monitoring

use new multisink logger and interfaces

small test for dropped messages

update go-hclogger and update sink/intercept logger interfaces
2019-11-05 09:51:49 -05:00
Drew Bailey e076204820
get local rpc endpoint working 2019-11-05 09:51:48 -05:00
Drew Bailey 976c43157c
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 0de94466b2
Display error when remote side ended monitor
multisink logger

remove usage of logwriter
2019-11-05 09:51:48 -05:00
Drew Bailey f60e44afc7
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 b386119d15
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 b0184e2032
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 8c3e1b382a
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
RJ Spiker d4d222383d feedback updates and some style cleanup 2019-11-04 14:31:54 -07:00
Michael Schurter 9f8721d7a7
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 05e9930e2a docs: bump website to Nomad 0.10.1 2019-11-04 12:01:43 -08:00
Michael Schurter 1bc6be12e0
Merge pull request #6616 from hashicorp/release-0101
Release 0101
2019-11-04 12:00:31 -08:00
Michael Schurter f9041e1b0e
Merge branch 'master' into release-0101 2019-11-04 11:57:12 -08:00
Michael Schurter 5fab3e6a2b release: prep for 0.10.2-dev 2019-11-04 19:45:40 +00:00
Drew Bailey bc570b6f98
Merge pull request #6615 from hashicorp/6609-changelog
add bug 6609 to changelog
2019-11-04 14:34:27 -05:00
Michael Schurter 9fca280bf8
Release v0.10.1 2019-11-04 19:29:55 +00:00
Drew Bailey 595d1685ff
add bug 6609 to changelog 2019-11-04 10:29:33 -05:00
Drew Bailey 3a11f1f23a
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 89453066ab Generate files for 0.10.1 release 2019-11-01 21:57:51 +00:00
Michael Schurter 780625786f docs: update changelog
Remove 0.10.1 release date until finalizing release
2019-11-01 14:34:18 -07:00
Michael Schurter 80c40ca0fa 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 8356c704fe
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 66a34a43cb
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 a7adc54235
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 9fed8d1bed 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 5ae7e07857 docs: prep changelog for 0.10.1 release 2019-10-31 09:19:04 -07:00
Mahmood Ali 4f9685e2d8 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 3354d5d715 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 fa2e73fdae
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 4ed9427c77 client/allocwatcher: fix dropped test error (#6592) 2019-10-31 08:29:25 -04:00
Lars Lehtonen 0a4542fadc nomad: fix test goroutine (#6593) 2019-10-31 08:23:32 -04:00
RJ Spiker 8f254b6e14 website - font and brand update 2019-10-30 16:17:54 -06:00