X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sliver_lxc.py;h=8a8ebed12101d342985c4afc85881a3d9328fbe1;hb=0fc41ff1973ac16a261c90767173cb8343f3faa2;hp=babac351500895504eeaa3dfb3a1b4b3030a2574;hpb=b30253ecb183f8419cffef4ac28dbba114d8815c;p=nodemanager.git diff --git a/sliver_lxc.py b/sliver_lxc.py index babac35..8a8ebed 100644 --- 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): + logger.log('========== sliver_lxc.configure {}'.format(self.name)) 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) + # 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): + 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 @@ -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) +# logger.log("NM is exiting for debug - just about to start {}".format(self.name)) +# exit(0) 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"""