Commit Graph

343 Commits

Author SHA1 Message Date
Filip Barl
2e9255b190 Addressed the comments and fixed the tests. 2017-02-20 11:40:40 +01:00
jpellizzari
39114a8ddb Changed container-label-filters-group url param to system 2017-01-23 15:54:49 -08:00
jpellizzari
08010bcff6 Change topologies option from 'notsystem' to 'application' 2017-01-20 13:30:10 -08:00
Jonathan Lange
1020fc5f85 Use test.Diff from common 2016-12-07 11:22:40 +00:00
Jonathan Lange
e8085b01b6 Use 'common' library 2016-12-07 11:22:38 +00:00
Alfonso Acosta
b4d5665fd8 Merge pull request #2021 from kinvolk/alban/linter
linter: fix punctuation and capitalization
2016-12-05 15:45:01 +01:00
Alfonso Acosta
9c7282231f Fix tests
Also, refactor some tests and MakeRegistry in api_topologies
2016-11-29 07:18:08 -08:00
Alfonso Acosta
747577f414 Review feedback 2016-11-29 07:18:08 -08:00
Mike Lang
d20381d30b merger: Pass reports via closure, instead of by reference in args
This is an alternate way of solving the same problem as 4007a902a264e5ff2c3be6b269ade515c9c1c145,
but in a nicer way. Compared to using pointers, this approach more obviously preserves the original
behaviour, and is arguably more readable than the original code.

Credit to @rade for this approach.
2016-11-29 07:18:08 -08:00
Mike Lang
8f2e3e7d9b merger: Fix a pointer bug that trashed the merge process
Turns out that when iterating in go, &loop_var is the same address every time
2016-11-29 07:18:08 -08:00
Alfonso Acosta
f8b1f71f06 Finish rendering for ECS topologies 2016-11-29 07:18:08 -08:00
Alfonso Acosta
78775bbdb8 Initial rendering for ECS
(not working yet)
2016-11-29 07:18:05 -08:00
Mike Lang
7d93e2cfe7 merger: Pass pointers, not structs
just in one function, where two of them are passed at once.
This was causing errors because it was too large to fit the stack.
2016-11-29 07:17:16 -08:00
Alfonso Acosta
bf4747f132 Hide Weave topology if empty
Also, make name consistent with other subtopologies
2016-11-28 16:34:02 +00:00
Alban Crequy
3c40892add linter: fix punctuation and capitalization
Symptoms:
> app/control_router.go:44:38: error strings should not be capitalized or end with punctuation or a newline

This is blocking the build on:
https://circleci.com/gh/kinvolk/scope/363
2016-11-23 17:17:14 +01:00
Tom Wilkie
21ee72a384 Add OpenTracing support to TimeRequestHistogram (#2023)
* Vendor open tracing

* Extend TimeRequestHistorgram to also emit opentracing spans.

* Update some of the labels
2016-11-22 14:43:15 +00:00
CarltonSemple
a5859ba218 Addressed final comments 2016-11-15 22:18:55 +00:00
CarltonSemple
9833a854b1 Added container filters as CLI arguments
gofmt load_container_filters.go

removed the environment variable for container label filters

Added the --app.container-label-filter command line argument, and load_container_filters.go now uses the results from that

Changed init() to InitializeTopologies()

Changed init() to InitializeTopologies() so that it can be called after the container filters are loaded from the command line argument. init() executes before main() in prog/main.go, so the flag parsing isn't finished before init() is called

Applied lint fixes

fixed lint issues

brought back the init function for api_topologies.go

Addressed many of the PR comments, except escaping colons

Renamed IsDesired to HasLabel in render/filters.go

Allows for the user to escape colons

added registry function for modifying the container filters

created a separate function that parses the container filter flags

simplified registry.addContainerFilters()

addressed review comments

switched API Topology Description IDs to constants

addressed review comments

joined constants

added test functions

addressed most of the review comments

Changed containerLabelFilters to an array of APItopologyOptions, placing the parsing in the Set() function. Removed parsing from HasLabel in render/filters.go

refactored code

added test that applies to the container filtering by labels

applied golint

made Registry items private and added a MakeRegistry() function

fixed usage of topologyRegistry.RendererForTopology

Added container label filters by exclusion

minor update to report_fixture

Modified container labels test to use existing report

I added labels to the existing containers in the fixed report for testing.

refactored code

refactored code

further code refactoring

addressed @ijsnellf's review comments

unexported Registry, and reduced duplicate code

addressed @ijsnellf's review comments

Addressed review comments

Addressed final review comments
2016-11-15 19:13:35 +00:00
Matthias Radestock
0610936296 plug goroutine leak in control
Fixes #2002.
2016-11-10 17:45:16 +00:00
Alfonso Acosta
37ba071feb Allow passing arguments to controls 2016-10-31 11:04:40 +01:00
Alfonso Acosta
403b70dde8 Disable pipes endpoint, we are going for controls instead 2016-10-31 11:04:40 +01:00
Alfonso Acosta
c2f2a90b61 Implement App endpoint /pipe/{id}/resize_tty/{height}/{width} to resize ttys 2016-10-31 11:04:39 +01:00
Alfonso Acosta
b458c4c0c8 Merge pull request #1182 from weaveworks/1132-weave-topology
Add the basics for a Weave-specific topology.
2016-10-28 12:23:55 +02:00
Alfonso Acosta
b6b343cbfd Review feedback 2016-10-28 08:58:45 +00:00
Alfonso Acosta
7771625a25 Change topology title to Weave Net 2016-10-26 08:28:45 +00:00
Alfonso Acosta
3023f4be80 Add Weave summary generator and fix Weave renderer 2016-10-26 07:40:14 +00:00
Alfonso Acosta
8e4dfd7987 Add Weave peers view 2016-10-24 15:33:30 +00:00
Alfonso Acosta
9881a6b631 Fix tests 2016-10-24 09:41:53 +00:00
Alfonso Acosta
8c70630a74 Merge pull request #1921 from kinvolk/lint-ctx-key
Fix linter error for string in context.WithValue
2016-10-20 11:32:44 +02:00
Alfonso Acosta
3829784967 Merge pull request #1904 from weaveworks/1864-apply-filters-to-details-panel
Apply filters from current view to details panel
2016-10-18 15:10:29 +02:00
Lorenzo Manacorda
2a682dd7b0 Fix linter error for strings in context.WithValue 2016-10-13 14:28:30 +02:00
Tom Wilkie
2a00fd2d78 Allow user to specify URLs on the command line, and use that to allow per-target tokens. (#1901)
Also:
- Parse targets on startup and catch badly formed ones before Scope can start.
- If no port is specified, use default port for scheme; if no scheme is specificed, use 4040.
- Use username as probe token
2016-10-05 10:59:56 -07:00
Alfonso Acosta
3250b7289e Do not apply filters if no filtering options are provided 2016-10-05 14:04:53 +00:00
Alfonso Acosta
5eabf5436c Make linter happy 2016-10-05 13:07:17 +00:00
Alfonso Acosta
3f27d5f6cc Do not filter out the target nodes when obtaining the details panel 2016-10-05 12:22:50 +00:00
Alfonso Acosta
bbb2c10975 Apply filters to details panel 2016-10-05 08:51:26 +00:00
Matthias Radestock
902ba88479 make smartMerger.Merge merge reports in parallel
for reduced latency
2016-08-24 08:02:23 +01:00
Tom Wilkie
32edfc9112 Don't reencode reports in the collector (#1819)
* Don't reencode reports in the collector

* Review feedback

* Fix comment

* Update alpine URLs so it will build

* Fix tests
2016-08-22 17:37:41 +01:00
Matthias Radestock
6ba812e82f restore compatibility of old probes with new m/t app
This got broken in #1682
2016-08-16 23:53:07 +01:00
Paul Bellamy
6e2fe78cab Merge pull request #1682 from kinvolk/krnowak/plugin-controls
RFC: forwarding control requests to plugins
2016-08-16 13:44:42 +01:00
Matthias Radestock
e6a474ead7 fix report store query chaining
We fell victim to variable shadowing here. Each store would be fed the
original list of report keys, instead of only the ones that weren't
found in the previous store. So if a single report was missing from the
in-process cache, we would then fetch all reports from memcache. And if
that in turn was missing a single report we would fetch all reports from
S3.

We chain report stores for a reason - to reduce latency and, in case of
the in-process cache, eliminate decoding costs. So this bug has a huge
impact on query service performance.

To make matters worse, we return *all* the reports - now possibly in
triplicate. Fortunately, the SmartMerger filters these out, so at least
we were not incurring extra merge costs.
2016-08-16 00:55:39 +01:00
Matthias Radestock
d6e5f0a154 allow more accurate reporting of memcache hit ratio
A lot of time could pass between recording the request count and hit
count pertaining to a particular report fetching batch, which skewed
calculations cache hit ratios.

Fix that by defering the request count recording to the end, which is
when we record the hit count.
2016-08-15 16:25:12 +01:00
Matthias Radestock
9cf178f130 fix MemcacheClient.FetchReports miss & leak on corrupt report
Problem: Decoding a corrupt report grows the 'missing' list. Since we
are waiting for 'len(keys)-len(missing)' decoder go-routines, this
results in waiting for fewer go-routines than we should. The surplus
go-routines leak and we ignore their reports. And since the keys of the
ignored reports are not included in 'missing', we won't attempt to fetch
them from S3 either. Oops.

Fix: calculate the number of go-routines once, at the beginning.
2016-08-15 10:44:29 +01:00
Krzesimir Nowak
0ecb908c22 Ensure backward compatilibity in report's node controls
The new probe will convert all node's LatestControls to Controls, so
the old app can consume them. Also, the new app will convert all
node's Controls to LatestControl, so it can consume the reports from
old probes.
2016-08-12 17:15:43 +02:00
Matthias Radestock
6334836f69 Merge pull request #1768 from weaveworks/1202-silence-abnormal-close
silence abnormal websocket close

Fixes #1202.
2016-08-12 13:53:51 +01:00
Matthias Radestock
c3315f9c99 reduce log level for absent pipe
since we can get this when a pipe has been closed normally
2016-08-05 23:47:35 +01:00
Matthias Radestock
df467d80de log error as error 2016-08-05 23:37:33 +01:00
Matthias Radestock
6d9194cfaf treat EOF and ErrClosedPipe in websocket connections as uninteresting
both occur in various states of disconnectedness
2016-08-05 23:32:34 +01:00
Matthias Radestock
190e840484 reduce some pipe log noise
NB: the m/t version remains unchanged since it is generally a lot
noisier
2016-08-05 19:16:15 +01:00
Krzesimir Nowak
dcaa7503b8 Fix a typo
The typo is here from March, 2016. It is strange that it wasn't
detected earlier.
2016-08-04 11:36:04 +02:00