[ARVADOS] created: ae6b514a98d89ce0bdfd47edd4508c42761cb049

git at public.curoverse.com git at public.curoverse.com
Wed May 6 10:07:26 EDT 2015


        at  ae6b514a98d89ce0bdfd47edd4508c42761cb049 (commit)


commit ae6b514a98d89ce0bdfd47edd4508c42761cb049
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed May 6 10:09:21 2015 -0400

    5523: Say "notice" instead of "error" when stats file changes/appears/disappears.

diff --git a/services/crunchstat/crunchstat.go b/services/crunchstat/crunchstat.go
index 1a22e26..1982223 100644
--- a/services/crunchstat/crunchstat.go
+++ b/services/crunchstat/crunchstat.go
@@ -110,12 +110,14 @@ func OpenStatFile(cgroup Cgroup, statgroup string, stat string) (*os.File, error
 		// whether we happen to collect stats [a] before any
 		// processes have been created in the container and
 		// [b] after all contained processes have exited.
-		reportedStatFile[stat] = path
 		if path == "" {
-			statLog.Printf("error finding stats file: stat %s, statgroup %s, cid %s, parent %s, root %s\n", stat, statgroup, cgroup.cid, cgroup.parent, cgroup.root)
+			statLog.Printf("notice: stats not available: stat %s, statgroup %s, cid %s, parent %s, root %s\n", stat, statgroup, cgroup.cid, cgroup.parent, cgroup.root)
+		} else if ok {
+			statLog.Printf("notice: stats moved from %s to %s\n", reportedStatFile[stat], path)
 		} else {
-			statLog.Printf("error reading stats from %s\n", path)
+			statLog.Printf("notice: reading stats from %s\n", path)
 		}
+		reportedStatFile[stat] = path
 	}
 	return file, err
 }

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list