git://git.onelab.eu
/
nodemanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Setting tag nodemanager-5.2-10
[nodemanager.git]
/
sliver_lxc.py
diff --git
a/sliver_lxc.py
b/sliver_lxc.py
index
a4f65f0
..
92c6b6c
100644
(file)
--- a/
sliver_lxc.py
+++ b/
sliver_lxc.py
@@
-83,7
+83,7
@@
class Sliver_LXC(Sliver_Libvirt, Initscript):
vref = rec['vref']
if vref is None:
vref = rec['vref']
if vref is None:
- vref = "lxc-f1
4
-x86_64"
+ vref = "lxc-f1
8
-x86_64"
logger.log("sliver_libvirt: %s: WARNING - no vref attached, using hard-wired default %s" % (name,vref))
refImgDir = os.path.join(Sliver_LXC.REF_IMG_BASE_DIR, vref)
logger.log("sliver_libvirt: %s: WARNING - no vref attached, using hard-wired default %s" % (name,vref))
refImgDir = os.path.join(Sliver_LXC.REF_IMG_BASE_DIR, vref)
@@
-229,6
+229,10
@@
unset pathmunge
if not found:
with open(from_root,"a") as user_profile:
user_profile.write(enforced_line)
if not found:
with open(from_root,"a") as user_profile:
user_profile.write(enforced_line)
+ # in case we create the slice's .profile when writing
+ if from_root.find("/home")>=0:
+ command=['chown','%s:slices'%name,from_root]
+ logger.log_call(command,timeout=5)
# Lookup for xid and create template after the user is created so we
# can get the correct xid based on the name of the slice
# Lookup for xid and create template after the user is created so we
# can get the correct xid based on the name of the slice
@@
-259,7
+263,7
@@
unset pathmunge
dom = conn.lookupByName(name)
except:
dom = conn.defineXML(xml)
dom = conn.lookupByName(name)
except:
dom = conn.defineXML(xml)
- logger.verbose('lxc_create: %s -> %s'%(name, Sliver_Libvirt.d
ebuginfo
(dom)))
+ logger.verbose('lxc_create: %s -> %s'%(name, Sliver_Libvirt.d
om_details
(dom)))
@staticmethod
@staticmethod