SEBA-726 suppress not-useful duplicate k8s synchronizer messages
Change-Id: I8435677345ea18bb11ae5241e4dacb70778c6afd
diff --git a/xos/synchronizer/steps/sync_service.py b/xos/synchronizer/steps/sync_service.py
index 9c483b1..1aa9266 100644
--- a/xos/synchronizer/steps/sync_service.py
+++ b/xos/synchronizer/steps/sync_service.py
@@ -25,9 +25,11 @@
from xosconfig import Config
from multistructlog import create_logger
+from helpers import debug_once
log = create_logger(Config().get('logging'))
+
class SyncService(SyncStep):
"""
@@ -65,11 +67,11 @@
# If this happens, then either the Service has no Slices, or it does have slices but none of
# those slices are associated with a TrustDomain. Assume the developer has done this on purpose
# and ignore the Service.
- log.debug("Unable to determine Trust Domain for service %s. Ignoring." % model.name)
+ debug_once("Service %s: Unable to determine Trust Domain. Ignoring." % model.name)
models.remove(model)
elif not model.serviceports.exists():
# If there are not ServicePorts, then there's not much for us to do at this time...
- log.debug("Service %s has no serviceports. Ignoring." % model.name)
+ debug_once("Service %s: Has no serviceports. Ignoring." % model.name)
models.remove(model)
return models