root@dc33:/usr/share/ucs-test# 63_udm-containers/01_test_udm_containers.py -vf 2021-09-14 21:15:46,263 INFO:test.case:Loading test /usr/share/ucs-test/63_udm-containers/01_test_udm_containers.py 2021-09-14 21:15:46,265 INFO:test.case:Checking test /usr/share/ucs-test/63_udm-containers/01_test_udm_containers.py ============================= test session starts ============================== platform linux -- Python 3.7.3, pytest-3.10.1, py-1.7.0, pluggy-0.8.0 rootdir: /usr/share/ucs-test/63_udm-containers, inifile: collected 37 items 01_test_udm_containers.py ...................................F. [100%] =================================== FAILURES =================================== Test_ContainerCN.test_container_cn_rename_uppercase_rollback_with_special_characters baseDn = 'cn=SSYV|}SS}\\+ÛÄ,dc=phahn,dc=dev', expected_attr = {}, strict = True should_exist = True, primary = False def __verify_ldap_object(baseDn, expected_attr=None, strict=True, should_exist=True, primary=False): # type: (str, Optional[Dict[str, str]], Optional[bool], Optional[bool], Optional[bool]) -> None if expected_attr is None: expected_attr = {} try: dn, attr = get_ldap_connection(primary=primary).search( filter='(objectClass=*)', base=baseDn, scope=ldap.SCOPE_BASE, > attr=expected_attr.keys() )[0] /usr/lib/python3/dist-packages/univention/testing/utils.py:237: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = () kwargs = {'attr': dict_keys([]), 'base': 'cn=SSYV|}SS}\\+ÛÄ,dc=phahn,dc=dev', 'filter': '(objectClass=*)', 'scope': 0} @wraps(func) def _decorated(self, *args, **kwargs): if not self.reconnect: return func(self, *args, **kwargs) try: > return func(self, *args, **kwargs) /usr/lib/python3/dist-packages/univention/uldap.py:208: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = filter = '(objectClass=*)', base = 'cn=SSYV|}SS}\\+ÛÄ,dc=phahn,dc=dev' scope = 0, attr = dict_keys([]), unique = False, required = False, timeout = -1 sizelimit = 0, serverctrls = None, response = None @_fix_reconnect_handling def search(self, filter='(objectClass=*)', base='', scope='sub', attr=[], unique=False, required=False, timeout=-1, sizelimit=0, serverctrls=None, response=None): # type: (str, str, str, List[str], bool, bool, int, int, Optional[List[ldap.controls.LDAPControl]], Optional[Dict[str, ldap.controls.LDAPControl]]) -> List[Tuple[str, Dict[str, List[str]]]] """ Perform LDAP search and return values. :param str filter: LDAP search filter. :param str base: the starting point for the search. :param str scope: Specify the scope of the search to be one of `base`, `base+one`, `one`, `sub`, or `domain` to specify a base object, base plus one-level, one-level, subtree, or children search. :param attr: The list of attributes to fetch. :type attr: list[str] :param bool unique: Raise an exception if more than one object matches. :param bool required: Raise an exception instead of returning an empty dictionary. :param int timeout: wait at most timeout seconds for a search to complete. `-1` for no limit. :param int sizelimit: retrieve at most sizelimit entries for a search. `0` for no limit. :param serverctrls: a list of :py:class:`ldap.controls.LDAPControl` instances sent to the server along with the LDAP request. :type serverctrls: list[ldap.controls.LDAPControl] :param dict response: An optional dictionary to receive the server controls of the result. :returns: A list of 2-tuples (dn, values) for each LDAP object, where values is a dictionary mapping attribute names to a list of values. :rtype: list[tuple[str, dict[str, list[str]]]] :raises ldap.NO_SUCH_OBJECT: Indicates the target object cannot be found. :raises ldap.INAPPROPRIATE_MATCHING: Indicates that the matching rule specified in the search filter does not match a rule defined for the attribute's syntax. """ univention.debug.debug(univention.debug.LDAP, univention.debug.INFO, 'uldap.search filter=%s base=%s scope=%s attr=%s unique=%d required=%d timeout=%d sizelimit=%d' % ( filter, base, scope, attr, unique, required, timeout, sizelimit)) if not base: base = self.base if scope == 'base+one': res = self.lo.search_ext_s(base, ldap.SCOPE_BASE, filter, attr, serverctrls=serverctrls, clientctrls=None, timeout=timeout, sizelimit=sizelimit) + \ self.lo.search_ext_s(base, ldap.SCOPE_ONELEVEL, filter, attr, serverctrls=serverctrls, clientctrls=None, timeout=timeout, sizelimit=sizelimit) else: if scope == 'sub' or scope == 'domain': ldap_scope = ldap.SCOPE_SUBTREE elif scope == 'one': ldap_scope = ldap.SCOPE_ONELEVEL else: ldap_scope = ldap.SCOPE_BASE > res = self.lo.search_ext_s(base, ldap_scope, filter, attr, serverctrls=serverctrls, clientctrls=None, timeout=timeout, sizelimit=sizelimit) /usr/lib/python3/dist-packages/univention/uldap.py:516: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ('cn=SSYV|}SS}\\+ÛÄ,dc=phahn,dc=dev', 0, '(objectClass=*)', dict_keys([])) kwargs = {'clientctrls': None, 'serverctrls': None, 'sizelimit': 0, 'timeout': -1} def search_ext_s(self,*args,**kwargs): > return self._apply_method_s(SimpleLDAPObject.search_ext_s,*args,**kwargs) /usr/lib/python3/dist-packages/ldap/ldapobject.py:1259: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = func = args = ('cn=SSYV|}SS}\\+ÛÄ,dc=phahn,dc=dev', 0, '(objectClass=*)', dict_keys([])) kwargs = {'clientctrls': None, 'serverctrls': None, 'sizelimit': 0, 'timeout': -1} def _apply_method_s(self,func,*args,**kwargs): if not hasattr(self,'_l'): self.reconnect(self._uri,retry_max=self._retry_max,retry_delay=self._retry_delay) try: > return func(self,*args,**kwargs) /usr/lib/python3/dist-packages/ldap/ldapobject.py:1197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = base = 'cn=SSYV|}SS}\\+ÛÄ,dc=phahn,dc=dev', scope = 0 filterstr = '(objectClass=*)', attrlist = dict_keys([]), attrsonly = 0 serverctrls = None, clientctrls = None, timeout = -1, sizelimit = 0 def search_ext_s(self,base,scope,filterstr=None,attrlist=None,attrsonly=0,serverctrls=None,clientctrls=None,timeout=-1,sizelimit=0): msgid = self.search_ext(base,scope,filterstr,attrlist,attrsonly,serverctrls,clientctrls,timeout,sizelimit) > return self.result(msgid,all=1,timeout=timeout)[1] /usr/lib/python3/dist-packages/ldap/ldapobject.py:846: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , msgid = 3 all = 1, timeout = -1 def result(self,msgid=ldap.RES_ANY,all=1,timeout=None): """ result([msgid=RES_ANY [,all=1 [,timeout=None]]]) -> (result_type, result_data) This method is used to wait for and return the result of an operation previously initiated by one of the LDAP asynchronous operation routines (e.g. search(), modify(), etc.) They all returned an invocation identifier (a message id) upon successful initiation of their operation. This id is guaranteed to be unique across an LDAP session, and can be used to request the result of a specific operation via the msgid parameter of the result() method. If the result of a specific operation is required, msgid should be set to the invocation message id returned when the operation was initiated; otherwise RES_ANY should be supplied. The all parameter only has meaning for search() responses and is used to select whether a single entry of the search response should be returned, or to wait for all the results of the search before returning. A search response is made up of zero or more search entries followed by a search result. If all is 0, search entries will be returned one at a time as they come in, via separate calls to result(). If all is 1, the search response will be returned in its entirety, i.e. after all entries and the final search result have been received. For all set to 0, result tuples trickle in (with the same message id), and with the result type RES_SEARCH_ENTRY, until the final result which has a result type of RES_SEARCH_RESULT and a (usually) empty data field. When all is set to 1, only one result is returned, with a result type of RES_SEARCH_RESULT, and all the result tuples listed in the data field. The method returns a tuple of the form (result_type, result_data). The result_type is one of the constants RES_*. See search() for a description of the search result's result_data, otherwise the result_data is normally meaningless. The result() method will block for timeout seconds, or indefinitely if timeout is negative. A timeout of 0 will effect a poll. The timeout can be expressed as a floating-point value. If timeout is None the default in self.timeout is used. If a timeout occurs, a TIMEOUT exception is raised, unless polling (timeout = 0), in which case (None, None) is returned. """ > resp_type, resp_data, resp_msgid = self.result2(msgid,all,timeout) /usr/lib/python3/dist-packages/ldap/ldapobject.py:738: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , msgid = 3 all = 1, timeout = -1 def result2(self,msgid=ldap.RES_ANY,all=1,timeout=None): > resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all,timeout) /usr/lib/python3/dist-packages/ldap/ldapobject.py:742: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , msgid = 3 all = 1, timeout = -1, resp_ctrl_classes = None def result3(self,msgid=ldap.RES_ANY,all=1,timeout=None,resp_ctrl_classes=None): resp_type, resp_data, resp_msgid, decoded_resp_ctrls, retoid, retval = self.result4( msgid,all,timeout, add_ctrls=0,add_intermediates=0,add_extop=0, > resp_ctrl_classes=resp_ctrl_classes ) /usr/lib/python3/dist-packages/ldap/ldapobject.py:749: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , msgid = 3 all = 1, timeout = -1, add_ctrls = 0, add_intermediates = 0, add_extop = 0 resp_ctrl_classes = None def result4(self,msgid=ldap.RES_ANY,all=1,timeout=None,add_ctrls=0,add_intermediates=0,add_extop=0,resp_ctrl_classes=None): if timeout is None: timeout = self.timeout > ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop) /usr/lib/python3/dist-packages/ldap/ldapobject.py:756: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = func = args = (3, 1, -1, 0, 0, 0), kwargs = {}, diagnostic_message_success = None exc_type = None, exc_value = None, exc_traceback = None def _ldap_call(self,func,*args,**kwargs): """ Wrapper method mainly for serializing calls into OpenLDAP libs and trace logs """ self._ldap_object_lock.acquire() if __debug__: if self._trace_level>=1: self._trace_file.write('*** %s %s - %s\n%s\n' % ( repr(self), self._uri, '.'.join((self.__class__.__name__,func.__name__)), pprint.pformat((args,kwargs)) )) if self._trace_level>=9: traceback.print_stack(limit=self._trace_stack_limit,file=self._trace_file) diagnostic_message_success = None try: try: result = func(*args,**kwargs) if __debug__ and self._trace_level>=2: if func.__name__!="unbind_ext": diagnostic_message_success = self._l.get_option(ldap.OPT_DIAGNOSTIC_MESSAGE) finally: self._ldap_object_lock.release() except LDAPError as e: exc_type,exc_value,exc_traceback = sys.exc_info() try: if 'info' not in e.args[0] and 'errno' in e.args[0]: e.args[0]['info'] = strerror(e.args[0]['errno']) except IndexError: pass if __debug__ and self._trace_level>=2: self._trace_file.write('=> LDAPError - %s: %s\n' % (e.__class__.__name__,str(e))) try: > reraise(exc_type, exc_value, exc_traceback) /usr/lib/python3/dist-packages/ldap/ldapobject.py:329: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ exc_type = exc_value = NO_SUCH_OBJECT({'desc': 'No such object', 'matched': 'dc=phahn,dc=dev'}) exc_traceback = def reraise(exc_type, exc_value, exc_traceback): """Re-raise an exception given information from sys.exc_info() Note that unlike six.reraise, this does not support replacing the traceback. All arguments must come from a single sys.exc_info() call. """ # In Python 3, all exception info is contained in one object. > raise exc_value /usr/lib/python3/dist-packages/ldap/compat.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = func = args = (3, 1, -1, 0, 0, 0), kwargs = {}, diagnostic_message_success = None exc_type = None, exc_value = None, exc_traceback = None def _ldap_call(self,func,*args,**kwargs): """ Wrapper method mainly for serializing calls into OpenLDAP libs and trace logs """ self._ldap_object_lock.acquire() if __debug__: if self._trace_level>=1: self._trace_file.write('*** %s %s - %s\n%s\n' % ( repr(self), self._uri, '.'.join((self.__class__.__name__,func.__name__)), pprint.pformat((args,kwargs)) )) if self._trace_level>=9: traceback.print_stack(limit=self._trace_stack_limit,file=self._trace_file) diagnostic_message_success = None try: try: > result = func(*args,**kwargs) E ldap.NO_SUCH_OBJECT: {'desc': 'No such object', 'matched': 'dc=phahn,dc=dev'} /usr/lib/python3/dist-packages/ldap/ldapobject.py:313: NO_SUCH_OBJECT During handling of the above exception, another exception occurred: self = <01_test_udm_containers.Test_ContainerCN object at 0x7fb2210eb7b8> udm = ucr = def test_container_cn_rename_uppercase_rollback_with_special_characters(self, udm, ucr): """Rename a container/cn with un-moveable subobjects from lower to upper case special characters""" user_name = uts.random_string() network_name = uts.random_string() cn_name = uts.random_name_special_characters() cn_name_new = cn_name.upper() cn = udm.create_object('container/cn', name=cn_name) wait_for_drs_replication(ldap.filter.filter_format('cn=%s', [cn_name])) udm.create_user(position=cn, username=user_name) udm.create_object('networks/network', position=cn, name=network_name, network='1.1.1.1', netmask='24') with pytest.raises(udm_test.UCSTestUDM_ModifyUDMObjectFailed): udm.modify_object('container/cn', dn=cn, name=cn_name_new) utils.wait_for_replication_and_postrun() new_cn = 'cn=%s,%s' % (ldap.dn.escape_dn_chars(cn_name_new), ucr.get('ldap/base')) new_user = 'uid=%s,cn=%s,%s' % (ldap.dn.escape_dn_chars(user_name), ldap.dn.escape_dn_chars(cn_name_new), ucr.get('ldap/base')) > utils.verify_ldap_object(new_cn, should_exist=True) 01_test_udm_containers.py:677: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/univention/testing/utils.py:225: in verify_ldap_object delay) /usr/lib/python3/dist-packages/univention/testing/utils.py:175: in retry_on_error six.reraise(*exc_info) /usr/lib/python3/dist-packages/six.py:693: in reraise raise value /usr/lib/python3/dist-packages/univention/testing/utils.py:166: in retry_on_error return func() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ baseDn = 'cn=SSYV|}SS}\\+ÛÄ,dc=phahn,dc=dev', expected_attr = {}, strict = True should_exist = True, primary = False def __verify_ldap_object(baseDn, expected_attr=None, strict=True, should_exist=True, primary=False): # type: (str, Optional[Dict[str, str]], Optional[bool], Optional[bool], Optional[bool]) -> None if expected_attr is None: expected_attr = {} try: dn, attr = get_ldap_connection(primary=primary).search( filter='(objectClass=*)', base=baseDn, scope=ldap.SCOPE_BASE, attr=expected_attr.keys() )[0] except (ldap.NO_SUCH_OBJECT, IndexError): if should_exist: > raise LDAPObjectNotFound('DN: %s' % baseDn) E univention.testing.utils.LDAPObjectNotFound: DN: cn=SSYV|}SS}\+ÛÄ,dc=phahn,dc=dev /usr/lib/python3/dist-packages/univention/testing/utils.py:241: LDAPObjectNotFound ----------------------------- Captured stdout call ----------------------------- Creating container/cn object with /usr/sbin/udm-test container/cn create --set 'name=ßyv|}ß}+ûä' wait_for_drs_replication(): skip, univention-samba4 not installed. Creating users/user object with /usr/sbin/udm-test users/user create --position 'cn=ßyv|}ß}\+ûä,dc=phahn,dc=dev' --set username=bdg1b85bjo --set password=univention --set lastname=sb1ex3w7rv --set firstname=uylv4eqtiy Creating networks/network object with /usr/sbin/udm-test networks/network create --position 'cn=ßyv|}ß}\+ûä,dc=phahn,dc=dev' --set name=1gj0tg8fb8 --set network=1.1.1.1 --set netmask=24 Modifying container/cn object with /usr/sbin/udm-test container/cn modify --dn 'cn=ßyv|}ß}\+ûä,dc=phahn,dc=dev' --set 'name=SSYV|}SS}+ÛÄ' Waiting for replication... Done: replication complete. Waiting for postrun... . . . . . . . . . . . . . Postrun should have run Exception occurred: (DN: cn=SSYV|}SS}\+ÛÄ,dc=phahn,dc=dev). Retrying in 10.00 seconds (retry 0/20). Exception occurred: (DN: cn=SSYV|}SS}\+ÛÄ,dc=phahn,dc=dev). Retrying in 10.00 seconds (retry 1/20). Exception occurred: (DN: cn=SSYV|}SS}\+ÛÄ,dc=phahn,dc=dev). Retrying in 10.00 seconds (retry 2/20). Exception occurred: (DN: cn=SSYV|}SS}\+ÛÄ,dc=phahn,dc=dev). Retrying in 10.00 seconds (retry 3/20). Exception occurred: (DN: cn=SSYV|}SS}\+ÛÄ,dc=phahn,dc=dev). Retrying in 10.00 seconds (retry 4/20). Exception occurred: (DN: cn=SSYV|}SS}\+ÛÄ,dc=phahn,dc=dev). Retrying in 10.00 seconds (retry 5/20). Exception occurred: (DN: cn=SSYV|}SS}\+ÛÄ,dc=phahn,dc=dev). Retrying in 10.00 seconds (retry 6/20). Exception occurred: (DN: cn=SSYV|}SS}\+ÛÄ,dc=phahn,dc=dev). Retrying in 10.00 seconds (retry 7/20). Exception occurred: (DN: cn=SSYV|}SS}\+ÛÄ,dc=phahn,dc=dev). Retrying in 10.00 seconds (retry 8/20). Exception occurred: (DN: cn=SSYV|}SS}\+ÛÄ,dc=phahn,dc=dev). Retrying in 10.00 seconds (retry 9/20). Exception occurred: (DN: cn=SSYV|}SS}\+ÛÄ,dc=phahn,dc=dev). Retrying in 10.00 seconds (retry 10/20). Exception occurred: (DN: cn=SSYV|}SS}\+ÛÄ,dc=phahn,dc=dev). Retrying in 10.00 seconds (retry 11/20). Exception occurred: (DN: cn=SSYV|}SS}\+ÛÄ,dc=phahn,dc=dev). Retrying in 10.00 seconds (retry 12/20). Exception occurred: (DN: cn=SSYV|}SS}\+ÛÄ,dc=phahn,dc=dev). Retrying in 10.00 seconds (retry 13/20). Exception occurred: (DN: cn=SSYV|}SS}\+ÛÄ,dc=phahn,dc=dev). Retrying in 10.00 seconds (retry 14/20). Exception occurred: (DN: cn=SSYV|}SS}\+ÛÄ,dc=phahn,dc=dev). Retrying in 10.00 seconds (retry 15/20). Exception occurred: (DN: cn=SSYV|}SS}\+ÛÄ,dc=phahn,dc=dev). Retrying in 10.00 seconds (retry 16/20). Exception occurred: (DN: cn=SSYV|}SS}\+ÛÄ,dc=phahn,dc=dev). Retrying in 10.00 seconds (retry 17/20). Exception occurred: (DN: cn=SSYV|}SS}\+ÛÄ,dc=phahn,dc=dev). Retrying in 10.00 seconds (retry 18/20). Exception occurred: (DN: cn=SSYV|}SS}\+ÛÄ,dc=phahn,dc=dev). Retrying in 10.00 seconds (retry 19/20). Exception occurred: (DN: cn=SSYV|}SS}\+�2021-09-14 21:24:36,461 INFO:test.case:Test ['/usr/bin/pytest-3', '01_test_udm_containers.py', '--ucs-test-default-tags', 'apptest', '--ucs-test-default-tags', 'udm', '--ucs-test-exposure', 'dangerous', '--ucs-test-default-exposure', 'careful'] using /usr/bin/pytest-3 in /usr/share/ucs-test/63_udm-containers returned 1 in 530195.248 ms �Ä,dc=phahn,dc=dev). This was the last retry (retry 20/20). --------------------------- Captured stdout teardown --------------------------- Performing UCSTestUDM cleanup... removing DN: uid=bdg1b85bjo,cn=ßyv|}ß}\+ûä,dc=phahn,dc=dev removing DN: cn=1gj0tg8fb8,cn=ßyv|}ß}\+ûä,dc=phahn,dc=dev removing DN: cn=ßyv|}ß}\+ûä,dc=phahn,dc=dev Cleanup: wait for replication and drs removal OpenLDAP object to check against S4-Connector match_filter doesn't exist: uid=bdg1b85bjo,cn=ßyv|}ß}\+ûä,dc=phahn,dc=dev DRS wait not required, S4-Connector match_filter did not match the OpenLDAP object: uid=bdg1b85bjo,cn=ßyv|}ß}\+ûä,dc=phahn,dc=dev trying to restart UDM CLI server sending signal 15 to process 31782 (['/usr/bin/python3', '/usr/share/univention-directory-manager-tools/univention-cli-server']) process already terminated UCSTestUDM cleanup done ==================== 1 failed, 36 passed in 529.69 seconds ===================== Starting 1 ucs-test at 2021-09-14 21:24:36 to /dev/null UCS 5.0-0-e84 ucs-test 10.0.6-45 Create container/ou....................................................................................................................................................................................................................... Test failed