diff --git a/management/univention-directory-manager-rest/src/univention/admin/rest/module.py b/management/univention-directory-manager-rest/src/univention/admin/rest/module.py index d48038f282..c61cbb591d 100755 --- a/management/univention-directory-manager-rest/src/univention/admin/rest/module.py +++ b/management/univention-directory-manager-rest/src/univention/admin/rest/module.py @@ -405,6 +405,7 @@ class ResourceBase(object): def parse_authorization(self, authorization): if authorization in self.authenticated: (self.request.user_dn, self.request.username, self.ldap_connection, self.ldap_position) = self.authenticated[authorization] + MODULE.warn("[{}] Using cached LDAP connection.".format(os.getpid())) if self.ldap_connection.whoami(): return # the ldap connection is still valid and bound try: @@ -414,6 +415,7 @@ class ResourceBase(object): except (ValueError, IndexError, binascii.Error): raise HTTPError(400) + MODULE.warn("[{}] Getting fresh LDAP connection.".format(os.getpid())) lo, po = get_machine_connection(write=False) try: userdn = lo.searchDn(filter_format('(&(objectClass=person)(uid=%s))', [username]), unique=True)[0] @@ -2540,6 +2542,7 @@ class Object(FormBase, Resource): """Get a representation of the {} object {} with all its properties, policies, options, metadata and references. Includes also instructions how to modify, remove or move the object. """ + MODULE.warn("[{}] Get {}...".format(os.getpid(), object_type)) dn = unquote_dn(dn) copy = bool(self.get_query_argument('copy', None)) # TODO: move into own resource: ./copy @@ -2719,6 +2722,7 @@ class Object(FormBase, Resource): @tornado.gen.coroutine def put(self, object_type, dn): """Modify or move the {} object {}.""" + MODULE.warn("[{}] Put {}...".format(os.getpid(), object_type)) dn = unquote_dn(dn) module = get_module(object_type, dn, self.ldap_connection) if not module: @@ -2757,6 +2761,7 @@ class Object(FormBase, Resource): @tornado.gen.coroutine def patch(self, object_type, dn): """Modify partial properties of the {} object {}.""" + MODULE.warn("[{}] Patch {}...".format(os.getpid(), object_type)) dn = unquote_dn(dn) module = get_module(object_type, dn, self.ldap_connection) if not module: @@ -2786,6 +2791,7 @@ class Object(FormBase, Resource): @tornado.gen.coroutine def create(self, object_type, dn=None): + MODULE.warn("[{}] Create {}...".format(os.getpid(), object_type)) module = self.get_module(object_type) container = self.request.body_arguments['position'] superordinate = self.request.body_arguments['superordinate'] @@ -2905,6 +2911,7 @@ class Object(FormBase, Resource): @tornado.gen.coroutine def delete(self, object_type, dn): """Remove the {} object {}.""" + MODULE.warn("[{}] Delete {}...".format(os.getpid(), object_type)) dn = unquote_dn(dn) module = get_module(object_type, dn, self.ldap_connection) if not module: @@ -3688,6 +3695,7 @@ class Application(tornado.web.Application): (r"/udm/progress/([a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12})", Operations), # TODO: decorator for dn argument, which makes sure no invalid dn syntax is used ], default_handler_class=Nothing, **kwargs) + MODULE.warn("[{}] Initialized.".format(os.getpid())) def multi_regex(self, chars): # Bug in tornado: requests go against the raw url; https://github.com/tornadoweb/tornado/issues/2548, therefore we must match =, %3d, %3D