[ARVADOS] updated: 5ed4ae4302e70504580dafea4fd299757107b04f
git at public.curoverse.com
git at public.curoverse.com
Wed Oct 8 10:54:07 EDT 2014
Summary of changes:
sdk/cli/bin/crunch-job | 2 +-
services/crunchstat/crunchstat.go | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
via 5ed4ae4302e70504580dafea4fd299757107b04f (commit)
from 292856a6f1d26dcfd7a652a9a83cbe4a375588d4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 5ed4ae4302e70504580dafea4fd299757107b04f
Author: Tom Clegg <tom at curoverse.com>
Date: Wed Oct 8 10:53:32 2014 -0400
4044: Add comments to "continue" statements.
diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job
index 369bc3e..dcc0a2a 100755
--- a/sdk/cli/bin/crunch-job
+++ b/sdk/cli/bin/crunch-job
@@ -724,7 +724,7 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
if ($docker_hash)
{
$command .= "crunchstat -cgroup-root=/sys/fs/cgroup -cgroup-parent=docker -cgroup-cid=$ENV{TASK_WORK}/docker.cid -poll=10000 ";
- $command .= "$docker_bin run --rm=true --attach=stdout --attach=stderr --user=crunch --cidfile=$ENV{TASK_WORK}/docker.cid ";
+ $command .= "$docker_bin run --rm=true --attach=stdout --attach=stderr --user=crunch --cidfile=$ENV{TASK_WORK}/docker.cid -i ";
# Dynamically configure the container to use the host system as its
# DNS server. Get the host's global addresses from the ip command,
# and turn them into docker --dns options using gawk.
diff --git a/services/crunchstat/crunchstat.go b/services/crunchstat/crunchstat.go
index 79583b2..387f647 100644
--- a/services/crunchstat/crunchstat.go
+++ b/services/crunchstat/crunchstat.go
@@ -120,6 +120,7 @@ func PollCgroupStats(cgroup_root string, cgroup_parent string, container_id stri
c, err := os.Open(cpuset_cpus)
if err != nil {
stderr <- fmt.Sprintf("open %s: %s", cpuset_cpus, err)
+ // cgroup probably gone -- skip other stats too.
continue
}
b, _ := ioutil.ReadAll(c)
@@ -152,6 +153,8 @@ func PollCgroupStats(cgroup_root string, cgroup_parent string, container_id stri
// be >1 interval old, so stats will
// be incorrect. Start over instead.
last_user = -1
+
+ // cgroup probably gone -- skip other stats too.
continue
}
b, _ := ioutil.ReadAll(c)
@@ -188,6 +191,7 @@ func PollCgroupStats(cgroup_root string, cgroup_parent string, container_id stri
c, err := os.Open(blkio_io_service_bytes)
if err != nil {
stderr <- fmt.Sprintf("open %s: %s", blkio_io_service_bytes, err)
+ // cgroup probably gone -- skip other stats too.
continue
}
b := bufio.NewScanner(c)
@@ -221,6 +225,7 @@ func PollCgroupStats(cgroup_root string, cgroup_parent string, container_id stri
c, err := os.Open(memory_stat)
if err != nil {
stderr <- fmt.Sprintf("open %s: %s", memory_stat, err)
+ // cgroup probably gone -- skip other stats too.
continue
}
b := bufio.NewScanner(c)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list