mirror of
https://github.com/xcat2/confluent.git
synced 2025-03-11 06:36:48 +00:00
Reduce sensing responses
Do not respond to a node if we do not have any expectation of deploying to that system. Mitigates troubles of having multiple confluent servers with the same nodes.
This commit is contained in:
parent
762685459c
commit
8797189d5c
@ -28,6 +28,7 @@
|
||||
# NTS: ssdp:alive
|
||||
|
||||
|
||||
import confluent.config.configmanager as cfm
|
||||
import confluent.neighutil as neighutil
|
||||
import confluent.util as util
|
||||
import confluent.log as log
|
||||
@ -173,6 +174,15 @@ def snoop(handler, byehandler=None, protocol=None, uuidlookup=None):
|
||||
node = uuidlookup(curruuid)
|
||||
if not node:
|
||||
break
|
||||
# Do not bother replying to a node that
|
||||
# we have no deployment activity
|
||||
# planned for
|
||||
cfg = cfm.ConfigManager(None)
|
||||
cfd = cfg.get_node_attributes(
|
||||
node, 'deployment.pendingprofile')
|
||||
if not cfd.get(node, {}).get(
|
||||
'deployment.pendingprofile', {}).get('value', None):
|
||||
break
|
||||
currtime = time.time()
|
||||
seconds = int(currtime)
|
||||
msecs = int(currtime * 1000 % 1000)
|
||||
|
Loading…
x
Reference in New Issue
Block a user