jchaloup pushed to cadvisor (f21). "Update to 0.10.1 (..more)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Wed Apr 1 12:43:37 UTC 2015
>From cbdc9de0f58977c4b375b78be842374bc9d99d61 Mon Sep 17 00:00:00 2001
From: Jan Chaloupka <jchaloup at redhat.com>
Date: Tue, 31 Mar 2015 12:15:13 +0200
Subject: Update to 0.10.1 Add debug info - related: #1141896
diff --git a/.gitignore b/.gitignore
index 8fe634f..b7b1d35 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1 @@
-clog
-/cadvisor-6906a8c.tar.gz
-/cadvisor-8c4f650.tar.gz
-/cadvisor-89088df.tar.gz
+cadvisor-ef7dddf.tar.gz
diff --git a/0001-change-import-path.patch b/0001-change-import-path.patch
new file mode 100644
index 0000000..d13c851
--- /dev/null
+++ b/0001-change-import-path.patch
@@ -0,0 +1,25 @@
+From 652d686c4ac03d67c409a9093b554b8b264e46c4 Mon Sep 17 00:00:00 2001
+From: rpm-build <rpm-build>
+Date: Tue, 31 Mar 2015 12:20:14 +0200
+Subject: [PATCH] change import path
+
+---
+ integration/common/gce.go | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/integration/common/gce.go b/integration/common/gce.go
+index c563a5b..2ae5524 100644
+--- a/integration/common/gce.go
++++ b/integration/common/gce.go
+@@ -19,7 +19,7 @@ import (
+ "os/exec"
+ "regexp"
+
+- "github.com/GoogleCloudPlatform/gcloud-golang/compute/metadata"
++ "google.golang.org/cloud/compute/metadata"
+ )
+
+ var gceInternalIpRegexp = regexp.MustCompile(" +ip +\\| +([0-9.:]+) +")
+--
+1.9.3
+
diff --git a/0001-int64-to-float64-conversion.patch b/0001-int64-to-float64-conversion.patch
index b2957b4..78c255e 100644
--- a/0001-int64-to-float64-conversion.patch
+++ b/0001-int64-to-float64-conversion.patch
@@ -1,6 +1,6 @@
-From b77f46755189d6903f1b6c3432f86cd07dd05f6e Mon Sep 17 00:00:00 2001
+From 71be3494d7bb6ee0dcb68e9a0d241b500c296fe3 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
-Date: Fri, 27 Mar 2015 15:42:13 +0100
+Date: Tue, 31 Mar 2015 13:13:27 +0200
Subject: [PATCH] int64 to float64 conversion
---
@@ -8,16 +8,16 @@ Subject: [PATCH] int64 to float64 conversion
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/manager/container.go b/manager/container.go
-index e4e5b68..8a19794 100644
+index 6e08674..4e9ef03 100644
--- a/manager/container.go
+++ b/manager/container.go
-@@ -169,7 +169,7 @@ func (c *containerData) housekeeping() {
- usageMemory := stats[1].Memory.Usage
+@@ -222,7 +222,7 @@ func (c *containerData) housekeeping() {
- usageInCores := float64(usageCpuNs) / float64(stats[1].Timestamp.Sub(stats[0].Timestamp).Nanoseconds())
+ instantUsageInCores := float64(stats[numSamples-1].Cpu.Usage.Total-stats[numSamples-2].Cpu.Usage.Total) / float64(stats[numSamples-1].Timestamp.Sub(stats[numSamples-2].Timestamp).Nanoseconds())
+ usageInCores := float64(usageCpuNs) / float64(stats[numSamples-1].Timestamp.Sub(stats[0].Timestamp).Nanoseconds())
- usageInHuman := units.HumanSize(int64(usageMemory))
+ usageInHuman := units.HumanSize(float64(usageMemory))
- glog.Infof("[%s] %.3f cores, %s of memory", c.info.Name, usageInCores, usageInHuman)
+ glog.Infof("[%s] %.3f cores (average: %.3f cores), %s of memory", c.info.Name, instantUsageInCores, usageInCores, usageInHuman)
}
}
--
diff --git a/0001-support-the-new-libcontiner.patch b/0001-support-the-new-libcontiner.patch
deleted file mode 100644
index 91b4694..0000000
--- a/0001-support-the-new-libcontiner.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 22c88d96b0a9e80cf6ec5e538963d17b6d350443 Mon Sep 17 00:00:00 2001
-From: Eric Paris <eparis at redhat.com>
-Date: Fri, 5 Dec 2014 19:02:44 -0500
-Subject: [PATCH] "support" the new libcontiner
-
----
- container/libcontainer/helpers.go | 10 +---------
- container/raw/handler.go | 1 -
- 2 files changed, 1 insertion(+), 10 deletions(-)
-
-diff --git a/container/libcontainer/helpers.go b/container/libcontainer/helpers.go
-index 2d28e6f..156bbce 100644
---- a/container/libcontainer/helpers.go
-+++ b/container/libcontainer/helpers.go
-@@ -30,7 +30,7 @@ func GetStats(cgroup *cgroups.Cgroup, state *libcontainer.State) (*info.Containe
- stats := &libcontainer.ContainerStats{}
-
- var err error
-- stats.CgroupStats, err = cgroupfs.GetStats(cgroup)
-+ stats.CgroupStats, err = cgroupfs.GetStats(state.CgroupPaths)
- if err != nil {
- return &info.ContainerStats{}, err
- }
-@@ -39,14 +39,6 @@ func GetStats(cgroup *cgroups.Cgroup, state *libcontainer.State) (*info.Containe
- return toContainerStats(stats), nil
- }
-
--func GetStatsCgroupOnly(cgroup *cgroups.Cgroup) (*info.ContainerStats, error) {
-- s, err := cgroupfs.GetStats(cgroup)
-- if err != nil {
-- return nil, err
-- }
-- return toContainerStats(&libcontainer.ContainerStats{CgroupStats: s}), nil
--}
--
- func DiskStatsCopy(blkio_stats []cgroups.BlkioStatEntry) (stat []info.PerDiskStats) {
- if len(blkio_stats) == 0 {
- return
-diff --git a/container/raw/handler.go b/container/raw/handler.go
-index 433a07b..1bc3d1f 100644
---- a/container/raw/handler.go
-+++ b/container/raw/handler.go
-@@ -252,7 +252,6 @@ func (self *rawContainerHandler) GetStats() (*info.ContainerStats, error) {
- NetworkState: network.NetworkState{
- VethHost: self.networkInterface.VethHost,
- VethChild: self.networkInterface.VethChild,
-- NsPath: "unknown",
- },
- }
- }
---
-1.9.3
-
diff --git a/cadvisor.spec b/cadvisor.spec
index 92df715..98bf3b3 100644
--- a/cadvisor.spec
+++ b/cadvisor.spec
@@ -1,58 +1,55 @@
+# https://bugzilla.redhat.com/show_bug.cgi?id=995136#c12
+%global _dwz_low_mem_die_limit 0
%global provider github
%global provider_tld com
%global project google
%global repo cadvisor
-%global commit 89088df70eca64cf9d6b9a23a3d2bc21a30916d6
-
+%global commit ef7dddf4385dc5d0c42b872bdcdb5a4ee9170eb1
%global import_path %{provider}.%{provider_tld}/%{project}/%{repo}
%global shortcommit %(c=%{commit}; echo ${c:0:7})
-%global debug_package %{nil}
Name: %{repo}
-Version: 0.6.2
-Release: 0.3.git%{shortcommit}%{?dist}
+Version: 0.10.1
+Release: 0.1.git%{shortcommit}%{?dist}
Summary: Analyzes resource usage and performance characteristics of running containers
License: ASL 2.0
URL: https://%{import_path}
Source0: https://%{import_path}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
Source1: cadvisor
Source2: cadvisor.service
-
-Patch0: 0001-support-the-new-libcontiner.patch
-Patch1: 0001-int64-to-float64-conversion.patch
+Patch0: 0001-int64-to-float64-conversion.patch
+Patch1: 0001-change-import-path.patch
BuildRequires: docker-io-pkg-devel
+BuildRequires: docker-io-devel
BuildRequires: git
BuildRequires: systemd
BuildRequires: glibc-static
BuildRequires: golang >= 1.2.1-3
-BuildRequires: golang(code.google.com/p/goauth2/oauth)
-BuildRequires: golang(code.google.com/p/goauth2/oauth/jwt)
-BuildRequires: golang(code.google.com/p/go.exp)
-BuildRequires: golang(code.google.com/p/gomock)
-BuildRequires: golang(code.google.com/p/google-api-go-client/bigquery/v2)
-BuildRequires: golang(code.google.com/p/google-api-go-client/googleapi)
-BuildRequires: golang(code.google.com/p/google-api-go-client/googleapi/internal/uritemplates)
-BuildRequires: golang(github.com/codegangsta/cli)
-BuildRequires: golang(github.com/coreos/go-systemd/dbus)
-BuildRequires: golang(github.com/docker/docker)
+
+BuildRequires: golang(code.google.com/p/go.exp/inotify)
+BuildRequires: golang(code.google.com/p/goauth2/oauth)
+BuildRequires: golang(code.google.com/p/goauth2/oauth/jwt)
+BuildRequires: golang(code.google.com/p/gomock/gomock)
+BuildRequires: golang(code.google.com/p/google-api-go-client/bigquery/v2)
+BuildRequires: golang(github.com/SeanDolphin/bqschema)
+BuildRequires: golang(github.com/abbot/go-http-auth)
+BuildRequires: golang(github.com/docker/docker/pkg/units)
BuildRequires: golang(github.com/docker/libcontainer)
-BuildRequires: golang(github.com/docker/libcontainer) >= 1.2.0-3.git28cb5f9
+BuildRequires: golang(github.com/docker/libcontainer/cgroups)
+BuildRequires: golang(github.com/docker/libcontainer/cgroups/fs)
+BuildRequires: golang(github.com/docker/libcontainer/cgroups/systemd)
+BuildRequires: golang(github.com/docker/libcontainer/network)
BuildRequires: golang(github.com/fsouza/go-dockerclient)
-BuildRequires: golang(github.com/godbus/dbus)
BuildRequires: golang(github.com/golang/glog)
-BuildRequires: golang(github.com/gorilla/mux)
BuildRequires: golang(github.com/influxdb/influxdb/client)
BuildRequires: golang(github.com/kr/pretty)
-BuildRequires: golang(github.com/kr/pty)
-BuildRequires: golang(github.com/kr/text)
-BuildRequires: golang(github.com/onsi/ginkgo)
-BuildRequires: golang(github.com/onsi/gomega)
-BuildRequires: golang(github.com/SeanDolphin/bqschema)
+BuildRequires: golang(github.com/stretchr/testify/assert)
+BuildRequires: golang(github.com/stretchr/testify/mock)
+BuildRequires: golang(github.com/stretchr/testify/require)
+BuildRequires: golang(google.golang.org/cloud/compute/metadata)
+# indirect deps of docker
BuildRequires: golang(github.com/Sirupsen/logrus)
-BuildRequires: golang(github.com/stretchr/objx)
-BuildRequires: golang(github.com/stretchr/testify)
-BuildRequires: golang(github.com/syndtr/gocapability/capability)
ExclusiveArch: x86_64
@@ -73,31 +70,44 @@ can also be added. cAdvisor's container abstraction is based on lmctfy's
so containers are inherently nested hierarchically.
%package devel
-Requires: golang
+Requires: golang >= 1.2.1-3
Summary: Analyzes resource usage and performance characteristics of running containers
-Provides: golang(%{import_path}) = %{version}-%{release}
-Provides: golang(%{import_path}/api) = %{version}-%{release}
-Provides: golang(%{import_path}/client) = %{version}-%{release}
-Provides: golang(%{import_path}/container) = %{version}-%{release}
-Provides: golang(%{import_path}/container/docker) = %{version}-%{release}
-Provides: golang(%{import_path}/container/libcontainer) = %{version}-%{release}
-Provides: golang(%{import_path}/container/raw) = %{version}-%{release}
-Provides: golang(%{import_path}/deploy) = %{version}-%{release}
-Provides: golang(%{import_path}/fs) = %{version}-%{release}
-Provides: golang(%{import_path}/healthz) = %{version}-%{release}
-Provides: golang(%{import_path}/info) = %{version}-%{release}
-Provides: golang(%{import_path}/manager) = %{version}-%{release}
-Provides: golang(%{import_path}/pages) = %{version}-%{release}
-Provides: golang(%{import_path}/pages/static) = %{version}-%{release}
-Provides: golang(%{import_path}/storage) = %{version}-%{release}
-Provides: golang(%{import_path}/storage/bigquery) = %{version}-%{release}
-Provides: golang(%{import_path}/storage/bigquery/client) = %{version}-%{release}
-Provides: golang(%{import_path}/storage/influxdb) = %{version}-%{release}
-Provides: golang(%{import_path}/storage/memory) = %{version}-%{release}
-Provides: golang(%{import_path}/utils) = %{version}-%{release}
-Provides: golang(%{import_path}/utils/fs) = %{version}-%{release}
-Provides: golang(%{import_path}/utils/fs/mockfs) = %{version}-%{release}
-Provides: golang(%{import_path}/utils/procfs) = %{version}-%{release}
+Provides: golang(%{import_path}/api) = %{version}-%{release}
+Provides: golang(%{import_path}/client) = %{version}-%{release}
+Provides: golang(%{import_path}/container) = %{version}-%{release}
+Provides: golang(%{import_path}/container/docker) = %{version}-%{release}
+Provides: golang(%{import_path}/container/libcontainer) = %{version}-%{release}
+Provides: golang(%{import_path}/container/raw) = %{version}-%{release}
+Provides: golang(%{import_path}/events) = %{version}-%{release}
+Provides: golang(%{import_path}/fs) = %{version}-%{release}
+Provides: golang(%{import_path}/healthz) = %{version}-%{release}
+Provides: golang(%{import_path}/info) = %{version}-%{release}
+Provides: golang(%{import_path}/info/test) = %{version}-%{release}
+Provides: golang(%{import_path}/integration/common) = %{version}-%{release}
+Provides: golang(%{import_path}/integration/framework) = %{version}-%{release}
+Provides: golang(%{import_path}/integration/tests/api) = %{version}-%{release}
+Provides: golang(%{import_path}/manager) = %{version}-%{release}
+Provides: golang(%{import_path}/pages) = %{version}-%{release}
+Provides: golang(%{import_path}/pages/static) = %{version}-%{release}
+Provides: golang(%{import_path}/storage) = %{version}-%{release}
+Provides: golang(%{import_path}/storage/bigquery) = %{version}-%{release}
+Provides: golang(%{import_path}/storage/bigquery/client) = %{version}-%{release}
+Provides: golang(%{import_path}/storage/influxdb) = %{version}-%{release}
+Provides: golang(%{import_path}/storage/memory) = %{version}-%{release}
+Provides: golang(%{import_path}/storage/test) = %{version}-%{release}
+Provides: golang(%{import_path}/summary) = %{version}-%{release}
+Provides: golang(%{import_path}/utils) = %{version}-%{release}
+Provides: golang(%{import_path}/utils/cpuload) = %{version}-%{release}
+Provides: golang(%{import_path}/utils/cpuload/netlink) = %{version}-%{release}
+Provides: golang(%{import_path}/utils/cpuload/scheddebug) = %{version}-%{release}
+Provides: golang(%{import_path}/utils/fs) = %{version}-%{release}
+Provides: golang(%{import_path}/utils/fs/mockfs) = %{version}-%{release}
+Provides: golang(%{import_path}/utils/oomparser) = %{version}-%{release}
+Provides: golang(%{import_path}/utils/procfs) = %{version}-%{release}
+Provides: golang(%{import_path}/utils/sysfs) = %{version}-%{release}
+Provides: golang(%{import_path}/utils/sysfs/fakesysfs) = %{version}-%{release}
+Provides: golang(%{import_path}/utils/sysinfo) = %{version}-%{release}
+Provides: golang(%{import_path}/validate) = %{version}-%{release}
%description devel
%{summary}
@@ -127,7 +137,9 @@ pushd _build
popd
export GOPATH=$(pwd)/_build:%{gopath}
-go build --ldflags '-extldflags "-static"' github.com/google/cadvisor
+function gobuild { go build -a -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -v -x "$@"; }
+gobuild %{import_path}
+#go build --ldflags '-extldflags "-static"' github.com/google/cadvisor
%install
# main package binary
@@ -192,6 +204,11 @@ done
%{gopath}/src/%{import_path}/utils/*
%changelog
+* Mon Mar 30 2015 jchaloup <jchaloup at redhat.com> - 0.10.1-0.1.gitef7dddf
+- Update to 0.10.1
+- Add debug info
+ related: #1141896
+
* Thu Mar 26 2015 jchaloup <jchaloup at redhat.com> - 0.6.2-0.3.git89088df
- Fix broken dependencies
- Convert int64 to float64 when calling HumanSize
diff --git a/sources b/sources
index 6289238..a715357 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-b92e4aba83bce32777763d03378e02f7 cadvisor-89088df.tar.gz
+815b2f06336d01372619222f8b66ed8b cadvisor-ef7dddf.tar.gz
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/cadvisor.git/commit/?h=f21&id=cbdc9de0f58977c4b375b78be842374bc9d99d61
More information about the scm-commits
mailing list