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
an attempt to see if avoiding to run initscripts altogether solves the slice re-creat...
[nodemanager.git]
/
sliver_lxc.py
diff --git
a/sliver_lxc.py
b/sliver_lxc.py
index
babac35
..
8a8ebed
100644
(file)
--- a/
sliver_lxc.py
+++ b/
sliver_lxc.py
@@
-44,6
+44,7
@@
class Sliver_LXC(Sliver_Libvirt, Initscript):
Initscript.__init__(self,name)
def configure(self, rec):
Initscript.__init__(self,name)
def configure(self, rec):
+ logger.log('========== sliver_lxc.configure {}'.format(self.name))
Sliver_Libvirt.configure(self, rec)
# in case we update nodemanager..
Sliver_Libvirt.configure(self, rec)
# in case we update nodemanager..
@@
-51,7
+52,11
@@
class Sliver_LXC(Sliver_Libvirt, Initscript):
# do the configure part from Initscript
Initscript.configure(self, rec)
# do the configure part from Initscript
Initscript.configure(self, rec)
+ # remember configure() always gets called *before* start()
+ # in particular the slice initscript
+ # is expected to be in place already at this point
def start(self, delay=0):
def start(self, delay=0):
+ logger.log('==================== sliver_lxc.start {}'.format(self.name))
if 'enabled' in self.rspec and self.rspec['enabled'] <= 0:
logger.log('sliver_lxc: not starting %s, is not enabled'%self.name)
return
if 'enabled' in self.rspec and self.rspec['enabled'] <= 0:
logger.log('sliver_lxc: not starting %s, is not enabled'%self.name)
return
@@
-60,9
+65,9
@@
class Sliver_LXC(Sliver_Libvirt, Initscript):
# expose .ssh for omf_friendly slivers
if 'tags' in self.rspec and 'omf_control' in self.rspec['tags']:
Account.mount_ssh_dir(self.name)
# expose .ssh for omf_friendly slivers
if 'tags' in self.rspec and 'omf_control' in self.rspec['tags']:
Account.mount_ssh_dir(self.name)
+# logger.log("NM is exiting for debug - just about to start {}".format(self.name))
+# exit(0)
Sliver_Libvirt.start(self, delay)
Sliver_Libvirt.start(self, delay)
- # if a change has occured in the slice initscript, reflect this in /etc/init.d/vinit.slice
- self.refresh_slice_vinit()
def rerun_slice_vinit(self):
"""This is called at startup, and whenever the initscript code changes"""
def rerun_slice_vinit(self):
"""This is called at startup, and whenever the initscript code changes"""