Skip to content

Commit

Permalink
Merge pull request #360 from Tendrl/develop
Browse files Browse the repository at this point in the history
Merge develop onto master
  • Loading branch information
r0h4n authored Mar 30, 2017
2 parents a376096 + 0a4d190 commit ec02279
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions tendrl/node_agent/node_sync/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,6 @@
"ceph-osd@*"
]

TENDRL_SERVICE_TAGS = {
"tendrl-node-agent": "tendrl/node",
"etcd": "tendrl/central-store",
"tendrl-apid": "tendrl/server",
"tendrl-gluster-integration": "tendrl/integration/gluster",
"tendrl-ceph-integration": "tendrl/integration/ceph",
"glusterd": "gluster/server",
"ceph-mon": "ceph/mon",
"ceph-osd": "ceph/osd"
}


class NodeAgentSyncThread(sds_sync.StateSyncThread):
def _run(self):
Expand All @@ -49,10 +38,9 @@ def _run(self):
while not self._complete.is_set():
try:
priority = "debug"
interval = 10
interval = 2
if NS.first_node_inventory_sync:
priority = "info"
interval = 2
NS.first_node_inventory_sync = False

gevent.sleep(interval)
Expand All @@ -68,7 +56,10 @@ def _run(self):
for service in TENDRL_SERVICES:
s = NS.tendrl.objects.Service(service=service)
if s.running:
tags.append(TENDRL_SERVICE_TAGS[service.strip("@*")])
service_tag = NS.compiled_definitions.get_parsed_defs()[
'namespace.tendrl'
]['tags'][service.strip("@*")]
tags.append(service_tag)
s.save()
gevent.sleep(interval)

Expand Down

0 comments on commit ec02279

Please sign in to comment.