case insensitive match on name
Change-Id: Id499471f3c374dadb3c7267d76cc2ddfd258fbd4
diff --git a/Dockerfile.synchronizer b/Dockerfile.synchronizer
index 5589b48..dda473d 100644
--- a/Dockerfile.synchronizer
+++ b/Dockerfile.synchronizer
@@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+# docker build -t xosproject/onos-synchronizer:candidate -f Dockerfile.synchronizer .
+
# xosproject/onos-synchronizer
FROM xosproject/xos-synchronizer-base:master
diff --git a/xos/synchronizer/event_steps/kubernetes_event.py b/xos/synchronizer/event_steps/kubernetes_event.py
index c692c43..41acbe7 100644
--- a/xos/synchronizer/event_steps/kubernetes_event.py
+++ b/xos/synchronizer/event_steps/kubernetes_event.py
@@ -42,9 +42,15 @@
xos_service = value["labels"].get("xos_service")
if not xos_service:
+ log.info("This pod has no xos_service label", labels=value["labels"])
return
- for service in ONOSService.objects.filter(name = xos_service):
+ log.info("Looking for ONOSServices", name=xos_service)
+ for service in ONOSService.objects.all():
+
+ if service.name.lower() != xos_service.lower():
+ continue
+
log.info("Dirtying ONOS Service", service=service)
service.backend_code=0
service.backend_status="resynchronize due to kubernetes event"