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
Needed to define a password for the slice user (e.g. *) to allow ssh access. If not...
[nodemanager.git]
/
sliver_libvirt.py
diff --git
a/sliver_libvirt.py
b/sliver_libvirt.py
index
89f7324
..
d835336
100644
(file)
--- a/
sliver_libvirt.py
+++ b/
sliver_libvirt.py
@@
-66,8
+66,11
@@
class Sliver_LV(accounts.Account):
# Set hostname
file('/vservers/%s/etc/hostname' % name, 'w').write(name)
# Set hostname
file('/vservers/%s/etc/hostname' % name, 'w').write(name)
+ # Add slices group if not already present
+ command = ['/usr/sbin/groupadd slices']
+ logger.log_call(command, timeout=15*60)
# Add unix account
# Add unix account
- command = ['/usr/sbin/useradd', '-
s', '/bin/sh', name
]
+ command = ['/usr/sbin/useradd', '-
g', 'slices', '-s', '/bin/sh', name, '-p', '*'
]
logger.log_call(command, timeout=15*60)
# Get a connection and lookup for the sliver before actually
logger.log_call(command, timeout=15*60)
# Get a connection and lookup for the sliver before actually
@@
-89,7
+92,7
@@
class Sliver_LV(accounts.Account):
conn = Sliver_LV.getConnection()
try:
conn = Sliver_LV.getConnection()
try:
- command = ['/usr/sbin/userdel', name]
+ command = ['/usr/sbin/userdel',
'-r',
name]
logger.log_call(command, timeout=15*60)
# Destroy libvirt domain
logger.log_call(command, timeout=15*60)
# Destroy libvirt domain