git://git.onelab.eu
/
lxc-userspace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
11cbb2f
)
show more in debug mode
author
Thierry Parmentelat
<thierry.parmentelat@inria.fr>
Fri, 10 Jan 2014 10:34:29 +0000
(11:34 +0100)
committer
Thierry Parmentelat
<thierry.parmentelat@inria.fr>
Fri, 10 Jan 2014 10:34:29 +0000
(11:34 +0100)
lxcsu
patch
|
blob
|
history
diff --git
a/lxcsu
b/lxcsu
index
95e1bcd
..
dc75b71
100755
(executable)
--- a/
lxcsu
+++ b/
lxcsu
@@
-91,6
+91,7
@@
def main ():
exit(1)
pid = '%s'%pidnum
exit(1)
pid = '%s'%pidnum
+ if debug: print "Found pidnum",pidnum
cmdline = open('/proc/%s/cmdline'%pidnum).read().rstrip('\n\x00')
arch = getarch('/proc/%s/exe'%pid)
cmdline = open('/proc/%s/cmdline'%pidnum).read().rstrip('\n\x00')
arch = getarch('/proc/%s/exe'%pid)
@@
-119,13
+120,15
@@
def main ():
for subsystem in ['cpuset','memory','blkio']:
open('/sys/fs/cgroup/%s/libvirt/lxc/%s/tasks'%(subsystem,slice_name),'w').write(str(os.getpid()))
for subsystem in ['cpuset','memory','blkio']:
open('/sys/fs/cgroup/%s/libvirt/lxc/%s/tasks'%(subsystem,slice_name),'w').write(str(os.getpid()))
- except:
+ except Exception,e:
+ if debug: print e
print "Error assigning resources: %s"%slice_name
exit(1)
try:
open('/sys/fs/cgroup/cpuacct/system/libvirtd.service/libvirt/lxc/%s/tasks'%slice_name,'w').write(str(os.getpid()))
print "Error assigning resources: %s"%slice_name
exit(1)
try:
open('/sys/fs/cgroup/cpuacct/system/libvirtd.service/libvirt/lxc/%s/tasks'%slice_name,'w').write(str(os.getpid()))
- except:
+ except Exception,e:
+ if debug: print e
print "Error assigning cpuacct: %s" % slice_name
exit(1)
print "Error assigning cpuacct: %s" % slice_name
exit(1)
@@
-139,7
+142,8
@@
def main ():
# note: we need to call f.close() explicitly, or we'll get an exception in
# the object destructor, which will not be caught
f.close()
# note: we need to call f.close() explicitly, or we'll get an exception in
# the object destructor, which will not be caught
f.close()
- except:
+ except Exception,e:
+ if debug: print e
print "Error adding task to freezer cgroup. Slice is probably frozen: %s" % slice_name
exit(1)
print "Error adding task to freezer cgroup. Slice is probably frozen: %s" % slice_name
exit(1)