- # Watch for 5 mins to see if slice is running before setting the name
- # It would make sense to do this as part of start in VServer, but the name
- # comes from NM. Also, the name would only change in NM. Name can only be
- # set from root context, so overloading chcontext wont work; chcontext, setname
- # will fail, and in the converse the context isn't setup in the kernel.
- for i in range(0,60):
- time.sleep(5)
- if vserver.VServer.is_running(self):
- # Set the vciVHI_CONTEXT to slice_id for
- # fprobe-ulog to mark packets with.
- logger.log("%s: Setting name to %s" % (self.name, self.slice_id),2)
- self.setname(self.slice_id)
- break