Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase mdap-rc1 with upstream updates #170

Merged
merged 56 commits into from
Aug 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
a097b7a
refactor(logs): Add reporter name to error logs.
Sep 30, 2018
1e6a6a7
fix: handle errors reported by the conntrack package
bboreham Jul 4, 2019
8a414d7
Merge pull request #3648 from weaveworks/handle-conntrack-error
bboreham Jul 4, 2019
c1e110a
fix: remove unused metric SpyDuration
bboreham Jul 1, 2019
89363f5
Defer metrics registration until we need it
bboreham May 15, 2019
3483765
docs: Release 1.11.3
bboreham Jul 4, 2019
4d642ff
Merge pull request #3649 from weaveworks/release-1.11
bboreham Jul 4, 2019
1610148
Merge pull request #3646 from weaveworks/remove-useless-metric
bboreham Jul 4, 2019
24dcb67
docs: remove mention of long-deprecated boot2docker
bboreham Jul 9, 2019
8e93cce
docs: help users to avoid opening their computer to the Internet
bboreham Jul 9, 2019
26c8760
Merge pull request #3605 from weaveworks/defer-metrics-registration
bboreham Jul 16, 2019
d956150
bump_license
foreversunyao Jul 24, 2019
670ea0e
Merge pull request #3654 from foreversunyao/bump_license
Jul 24, 2019
b22bde4
fix(probe): Update tcptracer-bpf package to cure out-of-order events
bboreham Jul 16, 2019
86bb931
Add another warning about exposing on the Internet
bboreham Jul 31, 2019
2ebbb1c
Remove quay.io from release script
bboreham Jul 31, 2019
cbdaeee
Merge pull request #3653 from weaveworks/ebpf-time-offset
bboreham Jul 31, 2019
87754c4
Merge pull request #3657 from weaveworks/less-quay2
bboreham Jul 31, 2019
609d9a7
Merge pull request #3363 from princerachit/format-error-log
bboreham Jul 31, 2019
bdbc502
Bold the warning about exposing on the Internet
bboreham Jul 31, 2019
c3ff3ca
Release 1.11.4
bboreham Jul 31, 2019
5313209
Merge pull request #3650 from weaveworks/warn-open-port
Jul 31, 2019
c99a5e6
Merge branch 'release-1.11'
bboreham Aug 1, 2019
c377040
Update with latest changes
qiell Nov 22, 2018
29cdf34
update circle-ci for image-tag. (#118)
Nov 22, 2018
20e557a
Add cStor support in Scope
satyamz Nov 23, 2018
eff42b5
Fix snapshot filter for show customer resources
satyamz Nov 23, 2018
0e0b54d
Add node tag and status support
qiell Nov 23, 2018
6b58d50
Add unknown state if status is empty (#123)
qiell Nov 24, 2018
367a9c8
Add adjacency for the CSP, Disk & SPC
satyamz Nov 26, 2018
d5c51e8
Change favicon.ico and title (#129)
qiell Nov 28, 2018
efedf24
Add adjacency between volumeSnapshot and clonedPVC (#132)
qiell Dec 3, 2018
b761f6e
Read status only once
qiell Dec 4, 2018
0eb4571
Fix UI balnkout issue
qiell Dec 5, 2018
1f14cd6
Add disk status and creation time in Disk Node
satyamz Dec 6, 2018
b1abf78
Add more details to cv volume (#137)
satyamz Dec 7, 2018
b5d49e9
Update clientset for disk CR
qiell Dec 7, 2018
67e7229
Add new metadata in disk
qiell Dec 7, 2018
ccea3cf
Update logic to add adjacency between pod and pvc (#141)
qiell Dec 7, 2018
ec0bf7b
Remove repititive columns (#144)
qiell Dec 18, 2018
9395041
Change log level from warn to debug (#147)
satyamz Dec 22, 2018
ff7df58
Remove checkpoint to preserve system info of users (#149) (#150)
satyamz Dec 27, 2018
06b6484
Allow filtering controls on basis of user kind (#153)
qiell Jan 15, 2019
82bdd6e
Add Block Device support (#162)
qiell Jun 21, 2019
0d0b8e0
Update webpack and package.json
qiell Jul 5, 2019
bb8aa4a
Update ui-components dependency from openebs to mayadata
qiell Jul 5, 2019
b675485
Fix table view
AVRahul Nov 22, 2018
c40d3fe
fixed the table view for larger table headers and sidebar issue
AVRahul Dec 12, 2018
53d5002
fixes the table header when scrolled
AVRahul Mar 12, 2019
79b63ce
fixes the table header z-index issues
AVRahul Mar 12, 2019
ddb78d4
Update circle ci config (#165)
qiell Jul 9, 2019
2ac6bbd
Update pvc size to read from status (#166)
qiell Jul 24, 2019
12c6a97
Add spec and clientset of bdc
qiell Jul 26, 2019
17da83a
Add support to visualize bdc
qiell Jul 27, 2019
c0ecd7f
Add adjacency between pv and bdc
qiell Jul 27, 2019
c4fa78e
Merge branch 'mdap-rc1' into rebase-mdap
qiell Aug 7, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## Release 1.11.4

This release contains a few fixes, one of which should improve
resource usage on hosts that have a lot of TCP connections.

- Improve eBPF connection tracker to reduce the number of times it
restarts and falls back to a less efficient mechanism.
[#3653](https://github.com/weaveworks/scope/pull/3653)
- Add reporter name to probe error logs. Thanks to @princerachit
[#3363](https://github.com/weaveworks/scope/pull/3363)
- Defer metrics registration until we need it
[#3605](https://github.com/weaveworks/scope/pull/3605)
- Remove unused metric SpyDuration
[#3646](https://github.com/weaveworks/scope/pull/3646)
- Remove quay.io from release script
[#3657](https://github.com/weaveworks/scope/pull/3657)

## Release 1.11.3

This is a bugfix release, which should improve some cases where
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@

END OF TERMS AND CONDITIONS

Copyright 2014-2018 Weaveworks Ltd.
Copyright 2014-2019 Weaveworks Ltd.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,16 @@ If you would like to see your name added, let us know on Slack, or send a PR ple

## <a name="getting-started"></a>Getting Started

**Ensure your computer is behind a firewall that blocks port 4040** then,

```console
sudo curl -L git.io/scope -o /usr/local/bin/scope
sudo chmod a+x /usr/local/bin/scope
scope launch
```

This script downloads and runs a recent Scope image from Docker Hub.
Now, open your web browser to **http://localhost:4040**. (If you're using
boot2docker, replace localhost with the output of `boot2docker ip`.)
Now, open your web browser to **http://localhost:4040**.

For instructions on installing Scope on [Kubernetes](https://www.weave.works/docs/scope/latest/installing/#k8s), [DCOS](https://www.weave.works/docs/scope/latest/installing/#dcos), or [ECS](https://www.weave.works/docs/scope/latest/installing/#ecs), see [the docs](https://www.weave.works/docs/scope/latest/introducing/).

Expand Down
5 changes: 4 additions & 1 deletion app/multitenant/aws_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ var (
}, []string{"method", "status_code"})
)

func init() {
func registerAWSCollectorMetrics() {
prometheus.MustRegister(dynamoRequestDuration)
prometheus.MustRegister(dynamoConsumedCapacity)
prometheus.MustRegister(dynamoValueSize)
Expand All @@ -98,6 +98,8 @@ func init() {
prometheus.MustRegister(natsRequests)
}

var registerAWSCollectorMetricsOnce sync.Once

// AWSCollector is a Collector which can also CreateTables
type AWSCollector interface {
app.Collector
Expand Down Expand Up @@ -149,6 +151,7 @@ type watchKey struct {
// NewAWSCollector the elastic reaper of souls
// https://github.com/aws/aws-sdk-go/wiki/common-examples
func NewAWSCollector(config AWSCollectorConfig) (AWSCollector, error) {
registerAWSCollectorMetricsOnce.Do(registerAWSCollectorMetrics)
var nc *nats.Conn
if config.NatsHost != "" {
var err error
Expand Down
5 changes: 4 additions & 1 deletion app/multitenant/memcache_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ var (
}, []string{"method", "status_code"})
)

func init() {
func registerMemcacheClientMetrics() {
prometheus.MustRegister(memcacheRequests)
prometheus.MustRegister(memcacheHits)
prometheus.MustRegister(memcacheRequestDuration)
}

var registerMemcacheClientMetricsOnce sync.Once

// MemcacheClient is a memcache client that gets its server list from SRV
// records, and periodically updates that ServerList.
type MemcacheClient struct {
Expand Down Expand Up @@ -72,6 +74,7 @@ type MemcacheConfig struct {
// NewMemcacheClient creates a new MemcacheClient that gets its server list
// from SRV and updates the server list on a regular basis.
func NewMemcacheClient(config MemcacheConfig) *MemcacheClient {
registerMemcacheClientMetricsOnce.Do(registerMemcacheClientMetrics)
var servers memcache.ServerList
client := memcache.NewFromSelector(&servers)
client.Timeout = config.Timeout
Expand Down
6 changes: 5 additions & 1 deletion app/multitenant/s3_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package multitenant

import (
"bytes"
"sync"

"context"
"github.com/aws/aws-sdk-go/aws"
Expand All @@ -28,12 +29,15 @@ type S3Store struct {
bucketName string
}

func init() {
func registerS3ClientMetrics() {
prometheus.MustRegister(s3RequestDuration)
}

var registerS3ClientMetricsOnce sync.Once

// NewS3Client creates a new S3 client.
func NewS3Client(config *aws.Config, bucketName string) S3Store {
registerS3ClientMetricsOnce.Do(registerS3ClientMetrics)
return S3Store{
s3: s3.New(session.New(config)),
bucketName: bucketName,
Expand Down
5 changes: 4 additions & 1 deletion app/multitenant/sqs_control_router.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ var (
}, []string{"method", "status_code"})
)

func init() {
func registerSQSMetrics() {
prometheus.MustRegister(sqsRequestDuration)
}

var registerSQSMetricsOnce sync.Once

// sqsControlRouter:
// Creates a queue for every probe that connects to it, and a queue for
// responses back to it. When it receives a request, posts it to the
Expand Down Expand Up @@ -64,6 +66,7 @@ type sqsResponseMessage struct {

// NewSQSControlRouter the harbinger of death
func NewSQSControlRouter(config *aws.Config, userIDer UserIDer, prefix string, rpcTimeout time.Duration) app.ControlRouter {
registerSQSMetricsOnce.Do(registerSQSMetrics)
result := &sqsControlRouter{
service: sqs.New(session.New(config)),
responseQueueURL: nil,
Expand Down
6 changes: 2 additions & 4 deletions bin/release
Original file line number Diff line number Diff line change
Expand Up @@ -235,21 +235,19 @@ publish() {
}

tag_images() {
echo "== Tagging images for docker hub and quay.io as user $DOCKERHUB_USER"
echo "== Tagging images for docker hub as user $DOCKERHUB_USER"
for IMAGE in "scope" "cloud-agent"; do
$SUDO docker tag "$DOCKERHUB_USER/$IMAGE" "$DOCKERHUB_USER/$IMAGE:$VERSION"
$SUDO docker tag "$DOCKERHUB_USER/$IMAGE:$VERSION" "$DOCKERHUB_USER/$IMAGE:latest_release"
$SUDO docker tag "$DOCKERHUB_USER/$IMAGE:$VERSION" "quay.io/$DOCKERHUB_USER/$IMAGE:$VERSION"
done
echo "** Docker images tagged"
}

push_images() {
echo "== Pushing images on docker hub and quay.io as user $DOCKERHUB_USER"
echo "== Pushing images on docker hub as user $DOCKERHUB_USER"
for IMAGE in "scope" "cloud-agent"; do
$SUDO docker push "$DOCKERHUB_USER/$IMAGE:$VERSION"
$SUDO docker push "$DOCKERHUB_USER/$IMAGE:latest_release"
$SUDO docker push "quay.io/$DOCKERHUB_USER/$IMAGE:$VERSION"
done
echo "** Docker images pushed"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/cri/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
args:
- '--no-probe'
env: []
image: weaveworks/scope:1.11.3
image: weaveworks/scope:1.11.4
imagePullPolicy: IfNotPresent
ports:
- containerPort: 4040
Expand Down
2 changes: 1 addition & 1 deletion examples/cri/ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
image: weaveworks/scope:1.11.3
image: weaveworks/scope:1.11.4
imagePullPolicy: IfNotPresent
securityContext:
privileged: true
Expand Down
2 changes: 1 addition & 1 deletion examples/docker/docker-compose-probe-v1.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
probe:
image: weaveworks/scope:1.11.3
image: weaveworks/scope:1.11.4
net: "host"
pid: "host"
privileged: true
Expand Down
2 changes: 1 addition & 1 deletion examples/docker/docker-compose-probe-v2.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '2'
services:
probe:
image: weaveworks/scope:1.11.3
image: weaveworks/scope:1.11.4
network_mode: "host"
pid: "host"
privileged: true
Expand Down
2 changes: 1 addition & 1 deletion examples/k8s/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
args:
- '--no-probe'
env: []
image: weaveworks/scope:1.11.3
image: weaveworks/scope:1.11.4
imagePullPolicy: IfNotPresent
ports:
- containerPort: 4040
Expand Down
2 changes: 1 addition & 1 deletion examples/k8s/ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
- '--probe.docker.bridge=docker0'
- '--probe.docker=true'
- 'weave-scope-app.weave.svc.cluster.local.:80'
image: weaveworks/scope:1.11.3
image: weaveworks/scope:1.11.4
imagePullPolicy: IfNotPresent
resources:
requests:
Expand Down
2 changes: 1 addition & 1 deletion examples/k8s/probe-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
- 'weave-scope-app.weave.svc.cluster.local.:80'
command:
- /home/weave/scope
image: 'docker.io/weaveworks/scope:1.11.3'
image: 'docker.io/weaveworks/scope:1.11.4'
imagePullPolicy: IfNotPresent
resources:
requests:
Expand Down
2 changes: 1 addition & 1 deletion examples/mesos/minimesos.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"container": {
"type": "DOCKER",
"docker": {
"image": "weaveworks/scope:1.11.3",
"image": "weaveworks/scope:1.11.4",
"network": "HOST",
"privileged": true,
"parameters": [
Expand Down
8 changes: 4 additions & 4 deletions probe/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func (p *Probe) tick() {
err := ticker.Tick()
metrics.MeasureSince([]string{ticker.Name(), "ticker"}, t)
if err != nil {
log.Errorf("error doing ticker: %v", err)
log.Errorf("Error doing ticker: %v", err)
}
}
}
Expand All @@ -173,7 +173,7 @@ func (p *Probe) report() report.Report {
}
metrics.MeasureSince([]string{rep.Name(), "reporter"}, t)
if err != nil {
log.Errorf("error generating report: %v", err)
log.Errorf("Error generating %s report: %v", rep.Name(), err)
newReport = report.MakeReport() // empty is OK to merge
}
reports <- newReport
Expand All @@ -198,7 +198,7 @@ func (p *Probe) tag(r report.Report) report.Report {
}
metrics.MeasureSince([]string{tagger.Name(), "tagger"}, t)
if err != nil {
log.Errorf("error applying tagger: %v", err)
log.Errorf("Error applying tagger: %v", err)
}
}
return r
Expand Down Expand Up @@ -227,7 +227,7 @@ ForLoop:
})
}
if err := p.publisher.Publish(rpt); err != nil {
log.Infof("publish: %v", err)
log.Infof("Publish: %v", err)
}
}

Expand Down
7 changes: 6 additions & 1 deletion prog/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"runtime"
"strconv"
"strings"
"sync"
"time"

"github.com/goji/httpauth"
Expand Down Expand Up @@ -46,11 +47,13 @@ var (
}, []string{"method", "route", "status_code", "ws"})
)

func init() {
func registerAppMetrics() {
prometheus.MustRegister(requestDuration)
billing.MustRegisterMetrics()
}

var registerAppMetricsOnce sync.Once

// Router creates the mux for all the various app components.
func router(collector app.Collector, controlRouter app.ControlRouter, pipeRouter app.PipeRouter, externalUI bool, capabilities map[string]bool, metricsGraphURL string) http.Handler {
router := mux.NewRouter().SkipClean(true)
Expand Down Expand Up @@ -208,6 +211,8 @@ func appMain(flags appFlags) {
setLogFormatter(flags.logPrefix)
runtime.SetBlockProfileRate(flags.blockProfileRate)

registerAppMetricsOnce.Do(registerAppMetrics)

traceCloser := tracing.NewFromEnv(fmt.Sprintf("scope-%s", flags.serviceName))
defer traceCloser.Close()

Expand Down
9 changes: 7 additions & 2 deletions site/installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ After it’s been launched, open your browser to `http://localhost:4040`.
**Docker Compose Format Version 1:**

scope:
image: weaveworks/scope:1.11.3
image: weaveworks/scope:1.11.4
net: "host"
pid: "host"
privileged: true
Expand All @@ -128,7 +128,7 @@ After it’s been launched, open your browser to `http://localhost:4040`.
version: '2'
services:
scope:
image: weaveworks/scope:1.11.3
image: weaveworks/scope:1.11.4
network_mode: "host"
pid: "host"
privileged: true
Expand Down Expand Up @@ -168,6 +168,11 @@ Allowable parameters for the launcher URL:

The URL is: http://localhost:4040.

>**Note:** Do not expose the Scope service to the Internet, e.g. by
changing the type to NodePort or LoadBalancer. Scope allows anyone
with access to the user interface control over your hosts and
containers.

### Kubernetes (local clone)

A simple way to get Scope running in a Kubernetes setting is to
Expand Down
2 changes: 1 addition & 1 deletion site/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Official Weave Scope plugins can be found at [Weaveworks Plugins](https://github
* Number of HTTP requests per seconds.
* Number of HTTP responses code per second (per code).

>**Note:** The HTTP Statistics plugin requires a [recent kernel version with ebpf support](https://github.com/iovisor/bcc/blob/master/INSTALL.md#kernel-configuration) and it will not compile on [dlite](https://github.com/nlf/dlite) or on boot2docker hosts.
>**Note:** The HTTP Statistics plugin requires a [recent kernel version with ebpf support](https://github.com/iovisor/bcc/blob/master/INSTALL.md#kernel-configuration) and it will not compile on [dlite](https://github.com/nlf/dlite) hosts.

* [Traffic Control](https://github.com/weaveworks-plugins/scope-traffic-control): This plugin allows you to modify latency and packet loss for a specific container via controls from the container's detailed view in the Scope user interface.

Expand Down
12 changes: 10 additions & 2 deletions vendor/github.com/weaveworks/tcptracer-bpf/pkg/tracer/event.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading