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

[Power Support] Enable weaveworks scope on Power. #3231

Merged
merged 1 commit into from
Aug 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
32 changes: 24 additions & 8 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
FROM golang:1.10.2-stretch
FROM golang:1.10.2

This comment was marked as abuse.

This comment was marked as abuse.

ENV SCOPE_SKIP_UI_ASSETS true
RUN apt-get update && \
apt-get install -y libpcap-dev time file shellcheck git gcc-arm-linux-gnueabihf curl build-essential python-pip && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN set -eux; \
export arch_val="$(dpkg --print-architecture)"; \
apt-get update && \
if [ "$arch_val" = "amd64" ]; then \
apt-get install -y libpcap-dev python-requests time file shellcheck git gcc-arm-linux-gnueabihf curl build-essential python-pip; \
else \
apt-get install -y libpcap-dev python-requests time file shellcheck git curl build-essential python-pip; \
fi; \
\
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN go clean -i net && \
go install -tags netgo std && \
go install -race -tags netgo std
RUN curl -fsSL -o shfmt https://github.com/mvdan/sh/releases/download/v1.3.0/shfmt_v1.3.0_linux_amd64 && \
chmod +x shfmt && \
mv shfmt /usr/bin
export arch_val="$(dpkg --print-architecture)"; \
if [ "$arch_val" != "ppc64el" ]; then \

This comment was marked as abuse.

This comment was marked as abuse.

go install -race -tags netgo std; \
fi;
RUN export arch_val="$(dpkg --print-architecture)"; \
if [ "$arch_val" = "amd64" ]; then \
curl -fsSL -o shfmt https://github.com/mvdan/sh/releases/download/v1.3.0/shfmt_v1.3.0_linux_amd64 && \
chmod +x shfmt && \
mv shfmt /usr/bin; \
fi;
# Skipped installing shfmt, as the version v1.3.0 isn't supported for ppc64le
# and the later version of shfmt doesn't work with the application well
RUN go get -tags netgo \
github.com/fzipp/gocyclo \
github.com/golang/lint/golint \
Expand Down
2 changes: 1 addition & 1 deletion client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:8.4.0
FROM node:8.11

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

WORKDIR /home/weave
COPY package.json yarn.lock /home/weave/
ENV NPM_CONFIG_LOGLEVEL=warn NPM_CONFIG_PROGRESS=false
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.cloud-agent
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.5
FROM alpine:3.7
WORKDIR /home/weave
RUN apk add --update bash conntrack-tools iproute2 util-linux curl && \
rm -rf /var/cache/apk/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// +build linux,amd64 linux,ppc64le

// Build constraint to use this file for amd64 & ppc64le on Linux

package endpoint

import (
Expand Down
5 changes: 4 additions & 1 deletion probe/process/walker_linux_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package process_test

import (
"os"
"reflect"
"testing"

Expand Down Expand Up @@ -79,9 +80,11 @@ var mockFS = fs.Dir("",
func TestWalker(t *testing.T) {
fs_hook.Mock(mockFS)
defer fs_hook.Restore()
var pageSize uint64
pageSize = (uint64)(os.Getpagesize() * 2)

want := map[int]process.Process{
3: {PID: 3, PPID: 2, Name: "curl", Cmdline: "curl google.com", Threads: 1, RSSBytes: 8192, RSSBytesLimit: 2048, OpenFilesCount: 3, OpenFilesLimit: 32768},
3: {PID: 3, PPID: 2, Name: "curl", Cmdline: "curl google.com", Threads: 1, RSSBytes: pageSize, RSSBytesLimit: 2048, OpenFilesCount: 3, OpenFilesLimit: 32768},
2: {PID: 2, PPID: 1, Name: "bash", Cmdline: "bash", Threads: 1, OpenFilesCount: 2},
4: {PID: 4, PPID: 3, Name: "apache", Cmdline: "apache", Threads: 1, OpenFilesCount: 1},
1: {PID: 1, PPID: 0, Name: "init", Cmdline: "init", Threads: 1, OpenFilesCount: 0},
Expand Down