+

Added touch on not found objects

Benjamin Renard [2013-05-26 11:54:46]
Added touch on not found objects
Filename
check_syncrepl_extended
diff --git a/check_syncrepl_extended b/check_syncrepl_extended
index e36053f..3a7207f 100755
--- a/check_syncrepl_extended
+++ b/check_syncrepl_extended
@@ -324,6 +324,11 @@ for obj in LdapObjects[options.provider]:
 		else:
 			logging.debug('Obj %s : not found on %s' % (obj,srv))
 			not_found[srv].append(obj)
+			if options.touch:
+				orig_value=[]
+				if options.touch in LdapObjects[options.provider][obj]:
+					orig_value=LdapObjects[options.provider][obj][options.touch]
+				LdapServers[options.provider].touch_object(obj,options.touch,orig_value)

 for obj in LdapObjects[options.consumer]:
 	logging.debug('Check obj %s of consumer' % obj)
ViewGit