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

docker: v18.09.9 #7350

Merged
merged 5 commits into from
Mar 15, 2020
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
72 changes: 36 additions & 36 deletions .circleci/config.yml

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

2 changes: 1 addition & 1 deletion .circleci/config/commands/install-consul.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
version:
type: string
default: 1.6.1
default: 1.6.4
steps:
- run:
name: Install Consul << parameters.version >>
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config/commands/install-vault.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
version:
type: string
default: 1.2.3
default: 1.2.4
steps:
- run:
name: Install Vault << parameters.version >>
Expand Down
29 changes: 29 additions & 0 deletions client/stats/cpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"time"

shelpers "github.com/hashicorp/nomad/helper/stats"
"github.com/shirou/gopsutil/cpu"
)

// CpuStats calculates cpu usage percentage
Expand Down Expand Up @@ -59,3 +60,31 @@ func (c *CpuStats) calculatePercent(t1, t2 float64, timeDelta int64) float64 {
overall_percent := (vDelta / float64(timeDelta)) * 100.0
return overall_percent
}

func (h *HostStatsCollector) collectCPUStats() (cpus []*CPUStats, totalTicks float64, err error) {

ticksConsumed := 0.0
cpuStats, err := cpu.Times(true)
if err != nil {
return nil, 0.0, err
}
cs := make([]*CPUStats, len(cpuStats))
for idx, cpuStat := range cpuStats {
percentCalculator, ok := h.statsCalculator[cpuStat.CPU]
if !ok {
percentCalculator = NewHostCpuStatsCalculator()
h.statsCalculator[cpuStat.CPU] = percentCalculator
}
idle, user, system, total := percentCalculator.Calculate(cpuStat)
cs[idx] = &CPUStats{
CPU: cpuStat.CPU,
User: user,
System: system,
Idle: idle,
Total: total,
}
ticksConsumed += (total / 100.0) * (shelpers.TotalTicksAvailable() / float64(len(cpuStats)))
}

return cs, ticksConsumed, nil
}
36 changes: 0 additions & 36 deletions client/stats/cpu_unix.go

This file was deleted.

53 changes: 0 additions & 53 deletions client/stats/cpu_windows.go

This file was deleted.

2 changes: 1 addition & 1 deletion client/stats/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func (h *HostCpuStatsCalculator) Calculate(times cpu.TimesStat) (idle float64, u
currentSystem := times.System
currentTotal := times.Total()
currentBusy := times.User + times.System + times.Nice + times.Iowait + times.Irq +
times.Softirq + times.Steal + times.Guest + times.GuestNice + times.Stolen
times.Softirq + times.Steal + times.Guest + times.GuestNice

deltaTotal := currentTotal - h.prevTotal
idle = ((currentIdle - h.prevIdle) / deltaTotal) * 100
Expand Down
2 changes: 1 addition & 1 deletion demo/vagrant/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ sudo chmod a+w /etc/nomad.d


echo "Installing Consul..."
CONSUL_VERSION=1.6.1
CONSUL_VERSION=1.6.4
curl -sSL https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip > consul.zip
unzip /tmp/consul.zip
sudo install consul /usr/bin/consul
Expand Down
2 changes: 1 addition & 1 deletion drivers/docker/driver_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
package docker

import (
"github.com/docker/docker/daemon/caps"
docker "github.com/fsouza/go-dockerclient"
"github.com/moby/moby/daemon/caps"
)

func getPortBinding(ip string, port string) []docker.PortBinding {
Expand Down
2 changes: 1 addition & 1 deletion scripts/vagrant-linux-priv-consul.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -o errexit

VERSION="1.6.1"
VERSION="1.6.4"
DOWNLOAD=https://releases.hashicorp.com/consul/${VERSION}/consul_${VERSION}_linux_amd64.zip

function install_consul() {
Expand Down
21 changes: 21 additions & 0 deletions vendor/github.com/Microsoft/hcsshim/LICENSE

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

Loading