From 18c5ac99c22a3bd5454cc5420401cf3403b87400 Mon Sep 17 00:00:00 2001 From: Thomas S Hatch Date: Fri, 28 Feb 2014 08:25:55 -0700 Subject: [PATCH] Fix ioflo master to read in from the correct queue --- salt/daemons/flo/master.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/salt/daemons/flo/master.py b/salt/daemons/flo/master.py index d5aa3c5ff6..02f57bc74e 100644 --- a/salt/daemons/flo/master.py +++ b/salt/daemons/flo/master.py @@ -83,8 +83,7 @@ class LocalMaster(ioflo.base.deeding.Deed): Abstract access to the core salt master api ''' Ioinits = {'opts': '.salt.etc.opts', - 'local_in': '.salt.net.local_in', - 'local_out': '.salt.net.local_out'} + 'rxmsgs': '.raet.udp.stack'} def __init__(self): ioflo.base.deeding.Deed.__init__(self) @@ -93,19 +92,24 @@ class LocalMaster(ioflo.base.deeding.Deed): ''' Set up required objects ''' - self.remote = salt.daemons.masterapi.LocalFuncs(self.opts.value) + self.local = salt.daemons.masterapi.LocalFuncs(self.opts.value) + self.remote = salt.daemons.masterapi.RemoteFuncs(self.opts.value) def action(self): ''' Perform an action ''' - if self.local_in.value: - exchange = self.local_in.value.pop() + while self.rxmsgs.value: + exchange = self.rxmsgs.value.pop(0) load = exchange.get('load') # If the load is invalid, just ignore the request if not 'cmd' in load: return False if load['cmd'].startswith('__'): return False - exchange['ret'] = getattr(self.local, load['cmd'])(load) + if hasattr(self.remote, load['cmd']): + exchange['ret'] = getattr(self.remote, load['cmd'])(load) + elif hasattr(self.local, load['cmd']): + exchange['ret'] = getattr(self.local, load['cmd'])(load) + self.local_out.value.append(exchange)