From 501c5d20678de74fdce6618821659be41b3c0004 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Wed, 8 Oct 2014 10:58:11 -0400 Subject: [PATCH] 4044: Add comments to "continue" statements. --- services/crunchstat/crunchstat.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/crunchstat/crunchstat.go b/services/crunchstat/crunchstat.go index 79583b2c69..387f6478d9 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) -- 2.39.5