File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ def load_and_execute_sds_discovery_plugins(self):
7979
8080def main ():
8181 tendrl_ns .central_store_thread = central_store .NodeAgentEtcdCentralStore ()
82+ tendrl_ns .first_node_inventory_sync = True
8283 tendrl_ns .state_sync_thread = node_sync .NodeAgentSyncThread ()
8384
8485 tendrl_ns .node_context .save ()
Original file line number Diff line number Diff line change @@ -40,7 +40,12 @@ def _run(self):
4040
4141 while not self ._complete .is_set ():
4242 try :
43- gevent .sleep (3 )
43+ interval = 10
44+ if tendrl_ns .first_node_inventory_sync :
45+ interval = 2
46+ tendrl_ns .first_node_inventory_sync = False
47+
48+ gevent .sleep (interval )
4449 tags = []
4550 # update node agent service details
4651 LOG .info ("node_sync, Updating Service data" )
@@ -49,20 +54,25 @@ def _run(self):
4954 if s .running :
5055 tags .append (TENDRL_SERVICE_TAGS [service .strip ("@*" )])
5156 s .save ()
57+ gevent .sleep (interval )
5258
5359 # updating node context with latest tags
5460 LOG .info ("node_sync, updating node context data with tags" )
5561 tags = "\n " .join (tags )
5662 tendrl_ns .node_agent .objects .NodeContext (tags = tags ).save ()
63+ gevent .sleep (interval )
5764
5865 LOG .info ("node_sync, Updating OS data" )
5966 tendrl_ns .node_agent .objects .Os ().save ()
67+ gevent .sleep (interval )
6068
6169 LOG .info ("node_sync, Updating cpu" )
6270 tendrl_ns .node_agent .objects .Cpu ().save ()
71+ gevent .sleep (interval )
6372
6473 LOG .info ("node_sync, Updating memory" )
6574 tendrl_ns .node_agent .objects .Memory ().save ()
75+ gevent .sleep (interval )
6676
6777 LOG .info ("node_sync, Updating disks" )
6878 try :
You can’t perform that action at this time.
0 commit comments