mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Adding support for single LaneStack for RaetChannel
This commit is contained in:
parent
b5172ed0ac
commit
c3b09d3ecc
@ -18,6 +18,7 @@ from collections import deque
|
||||
# Import salt libs
|
||||
import salt.daemons.masterapi
|
||||
import salt.utils.args
|
||||
import salt.transport
|
||||
from raet import raeting, nacling
|
||||
from raet.road.stacking import RoadStack
|
||||
from raet.road.estating import LocalEstate
|
||||
@ -1032,7 +1033,7 @@ class NixExecutor(ioflo.base.deeding.Deed):
|
||||
salt.utils.daemonize_if(self.opts)
|
||||
|
||||
#import wingdbstub
|
||||
stack = self._setup_jobber_stack()
|
||||
salt.transport.jobber_stack = stack = self._setup_jobber_stack()
|
||||
|
||||
sdata = {'pid': os.getpid()}
|
||||
sdata.update(data)
|
||||
@ -1136,3 +1137,4 @@ class NixExecutor(ioflo.base.deeding.Deed):
|
||||
)
|
||||
)
|
||||
stack.server.close()
|
||||
salt.transport.jobber_stack = None
|
||||
|
@ -6,7 +6,7 @@ import time
|
||||
import os
|
||||
import threading
|
||||
|
||||
from collections import defaultdict
|
||||
from collections import defaultdict, deque
|
||||
|
||||
# Import Salt Libs
|
||||
import salt.payload
|
||||
@ -25,6 +25,9 @@ except ImportError:
|
||||
# Don't die on missing transport libs since only one transport is required
|
||||
pass
|
||||
|
||||
jobber_stack = None # global that holds raet jobber LaneStack
|
||||
jobber_rxMsgs = {} # dict of deques one for each RaetChannel
|
||||
|
||||
|
||||
class Channel(object):
|
||||
'''
|
||||
@ -66,6 +69,10 @@ class RAETChannel(Channel):
|
||||
'''
|
||||
Prepare the stack objects
|
||||
'''
|
||||
if not jobber_stack:
|
||||
log.error("Jobber Stack not setup\n")
|
||||
log.debug("Jobber Stack '{0}' at = {1}\n".format(jobber_stack.local.name,
|
||||
jobber_stack.local.ha))
|
||||
mid = self.opts.get('id', 'master')
|
||||
yid = nacling.uuid(size=18)
|
||||
stackname = 'raet' + yid
|
||||
|
Loading…
Reference in New Issue
Block a user