Index: tools/syntax-checker.py
===================================================================
--- tools/syntax-checker.py	(revision 12570)
+++ tools/syntax-checker.py	(revision 12574)
@@ -7,4 +7,6 @@
 import sys
 
+from collections import defaultdict
+
 __version__ = '$Id$'
 
@@ -12,10 +14,11 @@
 
 def check_double_ip():
-  pool = {}
+  pool = defaultdict(list)
   try:
     for host in gformat.get_hostlist():
-      print "## Processing host %-20s: " % host,
+      print "## Processing host %-25s: " % host,
       datadump = gformat.get_yaml(host,add_version_info=False)
       try:
+        # Process interfaces
         iface_keys = [elem for elem in datadump.keys() if (elem.startswith('iface_') and not "lo0" in elem)]
         for iface_key in iface_keys:
@@ -23,12 +26,15 @@
           addr, mask = l.split('/')
 
-          label = "%s - %s" % (host, iface_key)
-          if pool.has_key(addr): 
-            pool[addr] += [label]
-          else: 
-            pool[addr] = [label]
+          pool[addr].append((host, iface_key))
+
+        iface_key = 'masterip'
+        addr = datadump['masterip']
+        # Add masterip to the list if IP has not been defined at interface
+        if not host in [x[0] for x in pool[addr]]:
+          pool[addr].append((host, 'masterip'))
+
         print "OK"
       except (KeyError, ValueError), e:
-        print "[ERROR] in '%s' interface '%s' (%s)" % (host,iface_key, e) 
+        print "[ERROR] in '%s' interface '%s' (%s)" % (host, iface_key, e) 
         raise
   except Exception as e:
@@ -41,5 +47,6 @@
       if not any(map(lambda x: addr.startswith(x), allowed_multi_use)):
         print "[ERROR] Multiple usages of IP %s:" % (addr)
-        print "  -", "\n  - ".join(leden)
+        for host, key in leden:
+          print "  - %s - %s" % (host, key)
         error = True
 
