[ARVADOS] updated: 9fd2051619bf6246708489e39515fb94b43a3199
git at public.curoverse.com
git at public.curoverse.com
Wed Jun 4 14:52:13 EDT 2014
Summary of changes:
.../crunch/crunchstat/src/arvados.org/crunchstat/crunchstat.go | 10 +++++-----
services/fuse/bin/arv-mount | 10 +++++++++-
2 files changed, 14 insertions(+), 6 deletions(-)
via 9fd2051619bf6246708489e39515fb94b43a3199 (commit)
from 618a868118721baa683d151949759e1e9e516b4a (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 9fd2051619bf6246708489e39515fb94b43a3199
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Wed Jun 4 14:52:07 2014 -0400
2882: arv-mount restores signal handlers after sp.wait(). Fixed spelling ellapsed -> elapsed.
diff --git a/services/crunch/crunchstat/src/arvados.org/crunchstat/crunchstat.go b/services/crunch/crunchstat/src/arvados.org/crunchstat/crunchstat.go
index f11b93e..7528485 100644
--- a/services/crunch/crunchstat/src/arvados.org/crunchstat/crunchstat.go
+++ b/services/crunch/crunchstat/src/arvados.org/crunchstat/crunchstat.go
@@ -63,7 +63,7 @@ func PollCgroupStats(cgroup_path string, stderr chan string, poll int64) {
cpuset_cpus := fmt.Sprintf("%s/cpuset.cpus", cgroup_path)
memory_stat := fmt.Sprintf("%s/memory.stat", cgroup_path)
- var ellapsed int64 = poll
+ var elapsed int64 = poll
for {
/*{
@@ -119,11 +119,11 @@ func PollCgroupStats(cgroup_path string, stderr chan string, poll int64) {
// time is in milliseconds, we need to boost
// that to 1000 jiffies per second, then boost
// it by another 100x to get a percentage, then
- // finally divide by the actual ellapsed time
+ // finally divide by the actual elapsed time
// and the number of cpus to get average load
// over the polling period.
- user_pct := (user_diff * 10 * 100) / (ellapsed * cpus)
- sys_pct := (sys_diff * 10 * 100) / (ellapsed * cpus)
+ user_pct := (user_diff * 10 * 100) / (elapsed * cpus)
+ sys_pct := (sys_diff * 10 * 100) / (elapsed * cpus)
stderr <- fmt.Sprintf("crunchstat: cpuacct.stat user %v", user_pct)
stderr <- fmt.Sprintf("crunchstat: cpuacct.stat sys %v", sys_pct)
@@ -182,7 +182,7 @@ func PollCgroupStats(cgroup_path string, stderr chan string, poll int64) {
bedtime := time.Now()
time.Sleep(time.Duration(poll) * time.Millisecond)
morning := time.Now()
- ellapsed = morning.Sub(bedtime).Nanoseconds() / int64(time.Millisecond)
+ elapsed = morning.Sub(bedtime).Nanoseconds() / int64(time.Millisecond)
}
}
diff --git a/services/fuse/bin/arv-mount b/services/fuse/bin/arv-mount
index 4f1d23f..b4afffa 100755
--- a/services/fuse/bin/arv-mount
+++ b/services/fuse/bin/arv-mount
@@ -65,14 +65,22 @@ collections on the server.""")
# wait until the driver is finished initializing
operations.initlock.wait()
+ rc = 255
try:
sp = subprocess.Popen(args.exec_args, shell=False)
+
# forward signals to the process.
signal.signal(signal.SIGINT, lambda signum, frame: sp.send_signal(signum))
signal.signal(signal.SIGTERM, lambda signum, frame: sp.send_signal(signum))
signal.signal(signal.SIGQUIT, lambda signum, frame: sp.send_signal(signum))
- rc = 255
+
+ # wait for process to complete.
rc = sp.wait()
+
+ # restore default signal handlers.
+ signal.signal(signal.SIGINT, signal.SIG_DFL)
+ signal.signal(signal.SIGTERM, signal.SIG_DFL)
+ signal.signal(signal.SIGQUIT, signal.SIG_DFL)
except OSError as e:
sys.stderr.write('arv-mount: %s -- exec %s\n' % (str(e), args.exec_args))
rc = e.errno
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list