Made the race condition detection at synchronizer launch time more general
diff --git a/xos/synchronizers/base/xos-synchronizer.py b/xos/synchronizers/base/xos-synchronizer.py
index 3fffd33..493b94a 100644
--- a/xos/synchronizers/base/xos-synchronizer.py
+++ b/xos/synchronizers/base/xos-synchronizer.py
@@ -8,7 +8,7 @@
 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "xos.settings")
 from synchronizers.base.backend import Backend
 from xos.config import Config, DEFAULT_CONFIG_FN
-from core.models import Instance
+from core.models import Instance,NetworkTemplate
 from xos.logger import Logger, logging, logger
 from django.db import ProgrammingError
 import time
@@ -67,9 +67,12 @@
     while not models_active:
         try:
             _ = Instance.objects.first()
+            _ = NetworkTemplate.objects.first()
             models_active = True
-        except ProgrammingError:
+        except Exception,e:
+            logger.info(str(e))
             logger.info('Waiting for data model to come up before starting...')
+            time.sleep(10)
             wait = True
 
     if (wait):
diff --git a/xos/synchronizers/openstack/xos-synchronizer.py b/xos/synchronizers/openstack/xos-synchronizer.py
index 3fffd33..493b94a 100644
--- a/xos/synchronizers/openstack/xos-synchronizer.py
+++ b/xos/synchronizers/openstack/xos-synchronizer.py
@@ -8,7 +8,7 @@
 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "xos.settings")
 from synchronizers.base.backend import Backend
 from xos.config import Config, DEFAULT_CONFIG_FN
-from core.models import Instance
+from core.models import Instance,NetworkTemplate
 from xos.logger import Logger, logging, logger
 from django.db import ProgrammingError
 import time
@@ -67,9 +67,12 @@
     while not models_active:
         try:
             _ = Instance.objects.first()
+            _ = NetworkTemplate.objects.first()
             models_active = True
-        except ProgrammingError:
+        except Exception,e:
+            logger.info(str(e))
             logger.info('Waiting for data model to come up before starting...')
+            time.sleep(10)
             wait = True
 
     if (wait):