report.html

Report generated on 18-Jun-2018 at 21:56:46 by pytest-html v1.19.0

Environment

389-ds-base 1.4.0.10-20180618gita518313.fc28
Packages {'pytest': '3.6.1', 'py': '1.5.3', 'pluggy': '0.6.0'}
Platform Linux-4.16.12-300.fc28.x86_64-x86_64-with-fedora-28-Twenty_Eight
Plugins {'metadata': '1.7.0', 'html': '1.19.0'}
Python 3.6.5
cyrus-sasl 2.1.27-0.2rc7.fc28
nspr 4.19.0-1.fc28
nss 3.36.1-1.1.fc28
openldap 2.4.46-1.fc28

Summary

777 tests ran in 9492.12 seconds.

516 passed, 17 skipped, 261 failed, 1 errors, 0 expected failures, 0 unexpected passes

Results

Result Test Duration Links
Error suites/replication/conflict_resolve_test.py::TestThreeMasters::()::test_nested_entries::teardown 24.15
def fin():
if not DEBUGGING:
> _delete_test_base(topology_m3.ms["master1"], tb.dn)

suites/replication/conflict_resolve_test.py:160:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
suites/replication/conflict_resolve_test.py:137: in _delete_test_base
inst.delete_ext_s(ent.dn)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:551: in delete_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de635208>
func = <built-in method result4 of LDAP object at 0x7f20ee7b2170>
args = (153, 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.NOT_ALLOWED_ON_NONLEAF: {'desc': 'Operation not allowed on non-leaf', 'info': 'Entry has replication conflicts as children'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: NOT_ALLOWED_ON_NONLEAF
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists OK group dirsrv exists OK user dirsrv exists OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Instance with parameters {'ldap-port': 39003, 'ldap-secureport': 63703, 'server-id': 'master3', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Creating replication topology. INFO:lib389.topologies:Joining master master2 to master1 ... INFO:lib389.replica:SUCCESS: bootstrap to ldap://server.example.com:39002 completed INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 INFO:lib389.topologies:Joining master master3 to master1 ... INFO:lib389.replica:SUCCESS: bootstrap to ldap://server.example.com:39003 completed INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39003 is was created INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39003 to ldap://server.example.com:39001 is was created INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39003 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39003 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39003 INFO:lib389.topologies:Ensuring master master1 to master2 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists INFO:lib389.topologies:Ensuring master master1 to master3 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39003 already exists INFO:lib389.topologies:Ensuring master master2 to master1 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists INFO:lib389.topologies:Ensuring master master2 to master3 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39003 is was created INFO:lib389.topologies:Ensuring master master3 to master1 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39003 to ldap://server.example.com:39001 already exists INFO:lib389.topologies:Ensuring master master3 to master2 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39003 to ldap://server.example.com:39002 is was created ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. topologies.py 106 INFO Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. topologies.py 106 INFO Instance with parameters {'ldap-port': 39003, 'ldap-secureport': 63703, 'server-id': 'master3', 'suffix': 'dc=example,dc=com'} was created. topologies.py 139 INFO Creating replication topology. topologies.py 153 INFO Joining master master2 to master1 ... replica.py 1461 INFO SUCCESS: bootstrap to ldap://server.example.com:39002 completed replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working replica.py 1530 INFO SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 topologies.py 153 INFO Joining master master3 to master1 ... replica.py 1461 INFO SUCCESS: bootstrap to ldap://server.example.com:39003 completed replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39003 is was created replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39003 to ldap://server.example.com:39001 is was created replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39003 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39003 to ldap://server.example.com:39001 is working replica.py 1530 INFO SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39003 topologies.py 161 INFO Ensuring master master1 to master2 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists topologies.py 161 INFO Ensuring master master1 to master3 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39003 already exists topologies.py 161 INFO Ensuring master master2 to master1 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists topologies.py 161 INFO Ensuring master master2 to master3 ... replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39003 is was created topologies.py 161 INFO Ensuring master master3 to master1 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39003 to ldap://server.example.com:39001 already exists topologies.py 161 INFO Ensuring master master3 to master2 ... replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39003 to ldap://server.example.com:39002 is was created----------------------------- Captured stderr call -----------------------------
INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39003 is working INFO:tests.suites.replication.conflict_resolve_test:Create two child entries under each of two entries INFO:tests.suites.replication.conflict_resolve_test:Create three child entries under each of three entries INFO:tests.suites.replication.conflict_resolve_test:Create two parents on m1 and m2, then on m1 - create a child and delete one parent,on m2 - delete one parent and create a child INFO:tests.suites.replication.conflict_resolve_test:Test a few more parent-child combinations on three instances INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39003 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39003 is working ------------------------------ Captured log call -------------------------------
replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39003 is working conflict_resolve_test.py 803 INFO Create two child entries under each of two entries conflict_resolve_test.py 810 INFO Create three child entries under each of three entries conflict_resolve_test.py 817 INFO Create two parents on m1 and m2, then on m1 - create a child and delete one parent,on m2 - delete one parent and create a child conflict_resolve_test.py 830 INFO Test a few more parent-child combinations on three instances replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39003 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39003 is working
Failed suites/ds_tools/replcheck_test.py::test_check_ruv 16.21
topo_tls_ldapi = <lib389.topologies.TopologyMain object at 0x7f20ee3149b0>

def test_check_ruv(topo_tls_ldapi):
"""Check that the report has RUV

:id: 1cc6b28b-8a42-45fb-ab50-9552db0ac179
:setup: Two master replication
:steps:
1. Get RUV from master and replica
2. Generate the report
3. Check that the RUV is mentioned in the report
:expectedresults:
1. It should be successful
2. It should be successful
3. The RUV should be mentioned in the report
"""

m1 = topo_tls_ldapi.ms["master1"]

replicas_m1 = Replica(m1, DEFAULT_SUFFIX)
ruv_entries = replicas_m1.get_attr_vals_utf8('nsds50ruv')

for tool_cmd in replcheck_cmd_list(topo_tls_ldapi):
> result = subprocess.check_output(tool_cmd, encoding='utf-8')

suites/ds_tools/replcheck_test.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.6/subprocess.py:336: in check_output
**kwargs).stdout
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input = None, timeout = None, check = True
popenargs = (['/usr/bin/ds-replcheck', '-b', 'dc=example,dc=com', '-D', 'cn=Directory Manager', '-w', ...],)
kwargs = {'encoding': 'utf-8', 'stdout': -1}
process = <subprocess.Popen object at 0x7f20ee2ac4a8>, stdout = ''
stderr = None, retcode = 1

def run(*popenargs, input=None, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.

The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them.

If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.

If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.

There is an optional argument "input", allowing you to
pass a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.

The other arguments are the same as for the Popen constructor.

If universal_newlines=True is passed, the "input" argument must be a
string and stdout/stderr in the returned object will be strings rather than
bytes.
"""
if input is not None:
if 'stdin' in kwargs:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE

with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired:
process.kill()
stdout, stderr = process.communicate()
raise TimeoutExpired(process.args, timeout, output=stdout,
stderr=stderr)
except:
process.kill()
process.wait()
raise
retcode = process.poll()
if check and retcode:
raise CalledProcessError(retcode, process.args,
> output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['/usr/bin/ds-replcheck', '-b', 'dc=example,dc=com', '-D', 'cn=Directory Manager', '-w', 'password', '-l', '1', '-m', 'ldap://server.example.com:39001', '--conflict', '-r', 'ldap://server.example.com:39002']' returned non-zero exit status 1.

/usr/lib64/python3.6/subprocess.py:418: CalledProcessError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Creating replication topology. INFO:lib389.topologies:Joining master master2 to master1 ... INFO:lib389.replica:SUCCESS: bootstrap to ldap://server.example.com:39002 completed INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 INFO:lib389.topologies:Ensuring master master1 to master2 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists INFO:lib389.topologies:Ensuring master master2 to master1 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists INFO:lib389.replica:SUCCESS: Replication from ldaps://server.example.com:63701 to ldaps://server.example.com:63702 is working INFO:replcheck_test:Export LDAPTLS_CACERTDIR env variable for ds-replcheck INFO:lib389.replica:SUCCESS: Replication from ldaps://server.example.com:63701 to ldaps://server.example.com:63702 is working INFO:lib389.replica:SUCCESS: Replication from ldaps://server.example.com:63702 to ldaps://server.example.com:63701 is working ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. topologies.py 106 INFO Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. topologies.py 139 INFO Creating replication topology. topologies.py 153 INFO Joining master master2 to master1 ... replica.py 1461 INFO SUCCESS: bootstrap to ldap://server.example.com:39002 completed replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working replica.py 1530 INFO SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 topologies.py 161 INFO Ensuring master master1 to master2 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists topologies.py 161 INFO Ensuring master master2 to master1 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists replica.py 1873 INFO SUCCESS: Replication from ldaps://server.example.com:63701 to ldaps://server.example.com:63702 is working replcheck_test.py 99 INFO Export LDAPTLS_CACERTDIR env variable for ds-replcheck replica.py 1873 INFO SUCCESS: Replication from ldaps://server.example.com:63701 to ldaps://server.example.com:63702 is working replica.py 1873 INFO SUCCESS: Replication from ldaps://server.example.com:63702 to ldaps://server.example.com:63701 is working----------------------------- Captured stdout call -----------------------------
OK group dirsrv exists OK user dirsrv exists OK group dirsrv exists OK user dirsrv exists ----------------------------- Captured stderr call -----------------------------
Traceback (most recent call last): File "/usr/bin/ds-replcheck", line 15, in <module> import ldap ImportError: No module named ldap
Failed suites/ds_tools/replcheck_test.py::test_missing_entries 15.61
topo_tls_ldapi = <lib389.topologies.TopologyMain object at 0x7f20ee3149b0>

def test_missing_entries(topo_tls_ldapi):
"""Check that the report has missing entries

:id: bd27de78-0046-431c-8240-a93052df1cdc
:setup: Two master replication
:steps:
1. Pause replication between master and replica
2. Add two entries to master and two entries to replica
3. Generate the report
4. Check that the entries DN are mentioned in the report
:expectedresults:
1. It should be successful
2. It should be successful
3. It should be successful
4. The entries DN should be mentioned in the report
"""

m1 = topo_tls_ldapi.ms["master1"]
m2 = topo_tls_ldapi.ms["master2"]

try:
topo_tls_ldapi.pause_all_replicas()
users_m1 = UserAccounts(m1, DEFAULT_SUFFIX)
user0 = users_m1.create_test_user(1000)
user1 = users_m1.create_test_user(1001)
users_m2 = UserAccounts(m2, DEFAULT_SUFFIX)
user2 = users_m2.create_test_user(1002)
user3 = users_m2.create_test_user(1003)

for tool_cmd in replcheck_cmd_list(topo_tls_ldapi):
> result = subprocess.check_output(tool_cmd, encoding='utf-8').lower()

suites/ds_tools/replcheck_test.py:201:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.6/subprocess.py:336: in check_output
**kwargs).stdout
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input = None, timeout = None, check = True
popenargs = (['/usr/bin/ds-replcheck', '-b', 'dc=example,dc=com', '-D', 'cn=Directory Manager', '-w', ...],)
kwargs = {'encoding': 'utf-8', 'stdout': -1}
process = <subprocess.Popen object at 0x7f20ee2e8c18>, stdout = ''
stderr = None, retcode = 1

def run(*popenargs, input=None, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.

The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them.

If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.

If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.

There is an optional argument "input", allowing you to
pass a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.

The other arguments are the same as for the Popen constructor.

If universal_newlines=True is passed, the "input" argument must be a
string and stdout/stderr in the returned object will be strings rather than
bytes.
"""
if input is not None:
if 'stdin' in kwargs:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE

with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired:
process.kill()
stdout, stderr = process.communicate()
raise TimeoutExpired(process.args, timeout, output=stdout,
stderr=stderr)
except:
process.kill()
process.wait()
raise
retcode = process.poll()
if check and retcode:
raise CalledProcessError(retcode, process.args,
> output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['/usr/bin/ds-replcheck', '-b', 'dc=example,dc=com', '-D', 'cn=Directory Manager', '-w', 'password', '-l', '1', '-m', 'ldap://server.example.com:39001', '--conflict', '-r', 'ldap://server.example.com:39002']' returned non-zero exit status 1.

/usr/lib64/python3.6/subprocess.py:418: CalledProcessError
----------------------------- Captured stdout call -----------------------------
OK group dirsrv exists OK user dirsrv exists OK group dirsrv exists OK user dirsrv exists ----------------------------- Captured stderr call -----------------------------
Traceback (most recent call last): File "/usr/bin/ds-replcheck", line 15, in <module> import ldap ImportError: No module named ldap
Failed suites/ds_tools/replcheck_test.py::test_tombstones 17.97
topo_tls_ldapi = <lib389.topologies.TopologyMain object at 0x7f20ee3149b0>

def test_tombstones(topo_tls_ldapi):
"""Check that the report mentions right number of tombstones

:id: bd27de78-0046-431c-8240-a93052df1cdc
:setup: Two master replication
:steps:
1. Add an entry to master and wait for replication
2. Pause replication between master and replica
3. Delete the entry from master
4. Generate the report
5. Check that we have different number of tombstones in the report
:expectedresults:
1. It should be successful
2. It should be successful
3. It should be successful
4. It should be successful
5. It should be successful
"""

m1 = topo_tls_ldapi.ms["master1"]

try:
users_m1 = UserAccounts(m1, DEFAULT_SUFFIX)
user_m1 = users_m1.create(properties=TEST_USER_PROPERTIES)
time.sleep(1)
topo_tls_ldapi.pause_all_replicas()
user_m1.delete()
time.sleep(2)

for tool_cmd in replcheck_cmd_list(topo_tls_ldapi):
> result = subprocess.check_output(tool_cmd, encoding='utf-8').lower()

suites/ds_tools/replcheck_test.py:242:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.6/subprocess.py:336: in check_output
**kwargs).stdout
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input = None, timeout = None, check = True
popenargs = (['/usr/bin/ds-replcheck', '-b', 'dc=example,dc=com', '-D', 'cn=Directory Manager', '-w', ...],)
kwargs = {'encoding': 'utf-8', 'stdout': -1}
process = <subprocess.Popen object at 0x7f20ee2db470>, stdout = ''
stderr = None, retcode = 1

def run(*popenargs, input=None, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.

The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them.

If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.

If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.

There is an optional argument "input", allowing you to
pass a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.

The other arguments are the same as for the Popen constructor.

If universal_newlines=True is passed, the "input" argument must be a
string and stdout/stderr in the returned object will be strings rather than
bytes.
"""
if input is not None:
if 'stdin' in kwargs:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE

with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired:
process.kill()
stdout, stderr = process.communicate()
raise TimeoutExpired(process.args, timeout, output=stdout,
stderr=stderr)
except:
process.kill()
process.wait()
raise
retcode = process.poll()
if check and retcode:
raise CalledProcessError(retcode, process.args,
> output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['/usr/bin/ds-replcheck', '-b', 'dc=example,dc=com', '-D', 'cn=Directory Manager', '-w', 'password', '-l', '1', '-m', 'ldap://server.example.com:39001', '--conflict', '-r', 'ldap://server.example.com:39002']' returned non-zero exit status 1.

/usr/lib64/python3.6/subprocess.py:418: CalledProcessError
----------------------------- Captured stdout call -----------------------------
OK group dirsrv exists OK user dirsrv exists OK group dirsrv exists OK user dirsrv exists ----------------------------- Captured stderr call -----------------------------
Traceback (most recent call last): File "/usr/bin/ds-replcheck", line 15, in <module> import ldap ImportError: No module named ldap
Failed suites/ds_tools/replcheck_test.py::test_conflict_entries 25.79
topo_tls_ldapi = <lib389.topologies.TopologyMain object at 0x7f20ee3149b0>

def test_conflict_entries(topo_tls_ldapi):
"""Check that the report has conflict entries

:id: c8fe3e84-b346-4969-8f5d-3462b643a1d2
:setup: Two master replication
:steps:
1. Pause replication between master and replica
2. Add two entries to master and two entries to replica
3. Delete first entry from master
4. Add a child to the first entry
5. Resume replication between master and replica
6. Generate the report
7. Check that the entries DN are mentioned in the report
:expectedresults:
1. It should be successful
2. It should be successful
3. It should be successful
4. It should be successful
5. It should be successful
6. It should be successful
7. The entries DN should be mentioned in the report
"""

m1 = topo_tls_ldapi.ms["master1"]
m2 = topo_tls_ldapi.ms["master2"]

topo_tls_ldapi.pause_all_replicas()

_create_container(m1, DEFAULT_SUFFIX, 'conflict_parent0')
_create_container(m2, DEFAULT_SUFFIX, 'conflict_parent0')
cont_p_m1 = _create_container(m1, DEFAULT_SUFFIX, 'conflict_parent1')
cont_p_m2 = _create_container(m2, DEFAULT_SUFFIX, 'conflict_parent1')
_delete_container(cont_p_m1)
_create_container(m2, cont_p_m2.dn, 'conflict_child0')

topo_tls_ldapi.resume_all_replicas()
time.sleep(5)

for tool_cmd in replcheck_cmd_list(topo_tls_ldapi):
> result = subprocess.check_output(tool_cmd, encoding='utf-8')

suites/ds_tools/replcheck_test.py:287:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.6/subprocess.py:336: in check_output
**kwargs).stdout
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input = None, timeout = None, check = True
popenargs = (['/usr/bin/ds-replcheck', '-b', 'dc=example,dc=com', '-D', 'cn=Directory Manager', '-w', ...],)
kwargs = {'encoding': 'utf-8', 'stdout': -1}
process = <subprocess.Popen object at 0x7f20ee2db0b8>, stdout = ''
stderr = None, retcode = 1

def run(*popenargs, input=None, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.

The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them.

If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.

If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.

There is an optional argument "input", allowing you to
pass a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.

The other arguments are the same as for the Popen constructor.

If universal_newlines=True is passed, the "input" argument must be a
string and stdout/stderr in the returned object will be strings rather than
bytes.
"""
if input is not None:
if 'stdin' in kwargs:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE

with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired:
process.kill()
stdout, stderr = process.communicate()
raise TimeoutExpired(process.args, timeout, output=stdout,
stderr=stderr)
except:
process.kill()
process.wait()
raise
retcode = process.poll()
if check and retcode:
raise CalledProcessError(retcode, process.args,
> output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['/usr/bin/ds-replcheck', '-b', 'dc=example,dc=com', '-D', 'cn=Directory Manager', '-w', 'password', '-l', '1', '-m', 'ldap://server.example.com:39001', '--conflict', '-r', 'ldap://server.example.com:39002']' returned non-zero exit status 1.

/usr/lib64/python3.6/subprocess.py:418: CalledProcessError
----------------------------- Captured stdout call -----------------------------
OK group dirsrv exists OK user dirsrv exists OK group dirsrv exists OK user dirsrv exists ----------------------------- Captured stderr call -----------------------------
Traceback (most recent call last): File "/usr/bin/ds-replcheck", line 15, in <module> import ldap ImportError: No module named ldap
Failed suites/ds_tools/replcheck_test.py::test_inconsistencies 18.04
topo_tls_ldapi = <lib389.topologies.TopologyMain object at 0x7f20ee3149b0>

def test_inconsistencies(topo_tls_ldapi):
"""Check that the report mentions inconsistencies with attributes

:id: c8fe3e84-b346-4969-8f5d-3462b643a1d2
:setup: Two master replication
:steps:
1. Add an entry to master and wait for replication
2. Pause replication between master and replica
3. Set different description attr values to master and replica
4. Add telephoneNumber attribute to master and not to replica
5. Generate the report
6. Check that attribute values are mentioned in the report
7. Generate the report with -i option to ignore some attributes
8. Check that attribute values are mentioned in the report
:expectedresults:
1. It should be successful
2. It should be successful
3. It should be successful
4. It should be successful
5. It should be successful
6. The attribute values should be mentioned in the report
7. It should be successful
8. The attribute values should not be mentioned in the report
"""

m1 = topo_tls_ldapi.ms["master1"]
m2 = topo_tls_ldapi.ms["master2"]
attr_m1 = "m1_inconsistency"
attr_m2 = "m2_inconsistency"
attr_m1_only = "123123123"

try:
users_m1 = UserAccounts(m1, DEFAULT_SUFFIX)
users_m2 = UserAccounts(m2, DEFAULT_SUFFIX)
user_m1 = users_m1.create(properties=TEST_USER_PROPERTIES)
time.sleep(1)
user_m2 = users_m2.get(user_m1.rdn)
topo_tls_ldapi.pause_all_replicas()
user_m1.set("description", attr_m1)
user_m2.set("description", attr_m2)
user_m1.set("telephonenumber", attr_m1_only)
time.sleep(2)

for tool_cmd in replcheck_cmd_list(topo_tls_ldapi):
> result = subprocess.check_output(tool_cmd, encoding='utf-8').lower()

suites/ds_tools/replcheck_test.py:335:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.6/subprocess.py:336: in check_output
**kwargs).stdout
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input = None, timeout = None, check = True
popenargs = (['/usr/bin/ds-replcheck', '-b', 'dc=example,dc=com', '-D', 'cn=Directory Manager', '-w', ...],)
kwargs = {'encoding': 'utf-8', 'stdout': -1}
process = <subprocess.Popen object at 0x7f20ee321908>, stdout = ''
stderr = None, retcode = 1

def run(*popenargs, input=None, timeout=None, check=False, **kwargs):
"""Run command with arguments and return a CompletedProcess instance.

The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them.

If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.

If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.

There is an optional argument "input", allowing you to
pass a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.

The other arguments are the same as for the Popen constructor.

If universal_newlines=True is passed, the "input" argument must be a
string and stdout/stderr in the returned object will be strings rather than
bytes.
"""
if input is not None:
if 'stdin' in kwargs:
raise ValueError('stdin and input arguments may not both be used.')
kwargs['stdin'] = PIPE

with Popen(*popenargs, **kwargs) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired:
process.kill()
stdout, stderr = process.communicate()
raise TimeoutExpired(process.args, timeout, output=stdout,
stderr=stderr)
except:
process.kill()
process.wait()
raise
retcode = process.poll()
if check and retcode:
raise CalledProcessError(retcode, process.args,
> output=stdout, stderr=stderr)
E subprocess.CalledProcessError: Command '['/usr/bin/ds-replcheck', '-b', 'dc=example,dc=com', '-D', 'cn=Directory Manager', '-w', 'password', '-l', '1', '-m', 'ldap://server.example.com:39001', '--conflict', '-r', 'ldap://server.example.com:39002']' returned non-zero exit status 1.

/usr/lib64/python3.6/subprocess.py:418: CalledProcessError
----------------------------- Captured stdout call -----------------------------
OK group dirsrv exists OK user dirsrv exists OK group dirsrv exists OK user dirsrv exists ----------------------------- Captured stderr call -----------------------------
Traceback (most recent call last): File "/usr/bin/ds-replcheck", line 15, in <module> import ldap ImportError: No module named ldap
Failed suites/paged_results/paged_results_test.py::test_search_dns_ip_aci[ip = "10.8.247.128"] 6.30
topology_st = <lib389.topologies.TopologyMain object at 0x7f20de64c1d0>
test_user = <lib389.idm.user.UserAccount object at 0x7f20de64c438>
aci_subject = 'ip = "10.8.247.128"'

@pytest.mark.parametrize('aci_subject',
('dns = "{}"'.format(HOSTNAME),
'ip = "{}"'.format(IP_ADDRESS)))
def test_search_dns_ip_aci(topology_st, test_user, aci_subject):
"""Verify that after performing multiple simple paged searches
to completion on the suffix with DNS or IP based ACI

:id: bbfddc46-a8c8-49ae-8c90-7265d05b22a9
:setup: Standalone instance, test user for binding,
varying number of users for the search base
:steps:
1. Back up and remove all previous ACI from suffix
2. Add an anonymous ACI for DNS check
3. Bind as test user
4. Search through added users with a simple paged control
5. Perform steps 4 three times in a row
6. Return ACI to the initial state
7. Go through all steps once again, but use IP subject dn
instead of DNS
:expectedresults:
1. Operation should be successful
2. Anonymous ACI should be successfully added
3. Bind should be successful
4. No error happens, all users should be found and sorted
5. Results should remain the same
6. ACI should be successfully returned
7. Results should be the same with ACI with IP subject dn
"""

users_num = 100
page_size = 5
users_list = add_users(topology_st, users_num, DEFAULT_SUFFIX)
search_flt = r'(uid=test*)'
searchreq_attrlist = ['dn', 'sn']

try:
log.info('Back up current suffix ACI')
acis_bck = topology_st.standalone.aci.list(DEFAULT_SUFFIX, ldap.SCOPE_BASE)

log.info('Add test ACI')
ACI_TARGET = '(targetattr != "userPassword")'
ACI_ALLOW = '(version 3.0;acl "Anonymous access within domain"; allow (read,compare,search)'
ACI_SUBJECT = '(userdn = "ldap:///anyone") and (%s);)' % aci_subject
ACI_BODY = ensure_bytes(ACI_TARGET + ACI_ALLOW + ACI_SUBJECT)
topology_st.standalone.modify_s(DEFAULT_SUFFIX, [(ldap.MOD_REPLACE, 'aci', ACI_BODY)])
log.info('Set user bind')
conn = test_user.bind(TEST_USER_PWD)

log.info('Create simple paged results control instance')
req_ctrl = SimplePagedResultsControl(True, size=page_size, cookie='')
controls = [req_ctrl]

log.info('Initiate three searches with a paged results control')
for ii in range(3):
log.info('%d search' % (ii + 1))
all_results = paged_search(conn, DEFAULT_SUFFIX, controls,
search_flt, searchreq_attrlist)
log.info('%d results' % len(all_results))
> assert len(all_results) == len(users_list)
E assert 0 == 100
E + where 0 = len([])
E + and 100 = len([<lib389.idm.user.UserAccount object at 0x7f20de698710>, <lib389.idm.user.UserAccount object at 0x7f20de6bf860>, <lib3...>, <lib389.idm.user.UserAccount object at 0x7f20de51fdd8>, <lib389.idm.user.UserAccount object at 0x7f20de40ecf8>, ...])

suites/paged_results/paged_results_test.py:564: AssertionError
----------------------------- Captured stderr call -----------------------------
INFO:tests.suites.paged_results.paged_results_test:Adding 100 users INFO:tests.suites.paged_results.paged_results_test:Back up current suffix ACI INFO:tests.suites.paged_results.paged_results_test:Add test ACI INFO:tests.suites.paged_results.paged_results_test:Set user bind INFO:tests.suites.paged_results.paged_results_test:Create simple paged results control instance INFO:tests.suites.paged_results.paged_results_test:Initiate three searches with a paged results control INFO:tests.suites.paged_results.paged_results_test:1 search INFO:tests.suites.paged_results.paged_results_test:Running simple paged result search with - search suffix: dc=example,dc=com; filter: (uid=test*); attr list ['dn', 'sn']; page_size = 5; controls: [<ldap.controls.libldap.SimplePagedResultsControl object at 0x7f20de6bfe10>]. INFO:tests.suites.paged_results.paged_results_test:Getting page 0 INFO:tests.suites.paged_results.paged_results_test:0 results INFO:tests.suites.paged_results.paged_results_test:Restore ACI INFO:tests.suites.paged_results.paged_results_test:Deleting 100 users ------------------------------ Captured log call -------------------------------
paged_results_test.py 131 INFO Adding 100 users paged_results_test.py 542 INFO Back up current suffix ACI paged_results_test.py 545 INFO Add test ACI paged_results_test.py 551 INFO Set user bind paged_results_test.py 554 INFO Create simple paged results control instance paged_results_test.py 558 INFO Initiate three searches with a paged results control paged_results_test.py 560 INFO 1 search paged_results_test.py 194 INFO Running simple paged result search with - search suffix: dc=example,dc=com; filter: (uid=test*); attr list ['dn', 'sn']; page_size = 5; controls: [<ldap.controls.libldap.SimplePagedResultsControl object at 0x7f20de6bfe10>]. paged_results_test.py 197 INFO Getting page 0 paged_results_test.py 563 INFO 0 results paged_results_test.py 568 INFO Restore ACI paged_results_test.py 153 INFO Deleting 100 users
Failed suites/password/pbkdf2_upgrade_plugin_test.py::test_pbkdf2_upgrade 3.61
topology_st = <lib389.topologies.TopologyMain object at 0x7f20de503198>

def test_pbkdf2_upgrade(topology_st):
"""On upgrade pbkdf2 doesn't ship. We need to be able to
provide this on upgrade to make sure default hashes work.
However, password plugins are special - they need really
early bootstap so that setting the default has specs work.

This tests that the removal of the pbkdf2 plugin causes
it to be re-bootstrapped and added.

:id: c2198692-7c02-433b-af5b-3be54920571a
:setup: Single instance
:steps: 1. Remove the PBKDF2 plugin
2. Restart the server
3. Restart the server
:expectedresults:
1. Plugin is removed (IE pre-upgrade state)
2. The plugin is bootstrapped and added
3. No change (already bootstrapped)

"""
# Remove the pbkdf2 plugin config
p1 = PBKDF2Plugin(topology_st.standalone)
assert(p1.exists())
p1._protected = False
p1.delete()
# Restart
> topology_st.standalone.restart()

suites/password/pbkdf2_upgrade_plugin_test.py:39:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:1327: in restart
self.start(timeout, post_open)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:1197: in start
"dirsrv@%s" % self.serverid])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

popenargs = (['/usr/bin/systemctl', 'start', 'dirsrv@standalone1'],)
kwargs = {}, retcode = 1
cmd = ['/usr/bin/systemctl', 'start', 'dirsrv@standalone1']

def check_call(*popenargs, **kwargs):
"""Run command with arguments. Wait for command to complete. If
the exit code was zero then return, otherwise raise
CalledProcessError. The CalledProcessError object will have the
return code in the returncode attribute.

The arguments are the same as for the call function. Example:

check_call(["ls", "-l"])
"""
retcode = call(*popenargs, **kwargs)
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E subprocess.CalledProcessError: Command '['/usr/bin/systemctl', 'start', 'dirsrv@standalone1']' returned non-zero exit status 1.

/usr/lib64/python3.6/subprocess.py:291: CalledProcessError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.----------------------------- Captured stderr call -----------------------------
Job for dirsrv@standalone1.service failed because the control process exited with error code. See "systemctl status dirsrv@standalone1.service" and "journalctl -xe" for details.
Failed suites/plugins/rootdn_plugin_test.py::test_rootdn_access_day_of_week 0.04
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee8d6400>

def test_rootdn_access_day_of_week(topology_st):
'''
Test the days of week feature
'''

log.info('Running test_rootdn_access_day_of_week...')

days = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat')
day = int(time.strftime("%w", time.gmtime()))

if day == 6:
# Handle the roll over from Saturday into Sunday
deny_days = days[1] + ', ' + days[2]
allow_days = days[6] + ',' + days[0]
elif day > 3:
deny_days = days[0] + ', ' + days[1]
allow_days = days[day] + ',' + days[day - 1]
else:
deny_days = days[4] + ',' + days[5]
allow_days = days[day] + ',' + days[day + 1]

log.info('Today: ' + days[day])
log.info('Allowed days: ' + allow_days)
log.info('Deny days: ' + deny_days)

#
# Set the deny days
#
try:
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_REPLACE, 'rootdn-days-allowed',
ensure_bytes(deny_days))])
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_day_of_week: Failed to set the deny days: error {}'
.format(e))
assert False

#
# Bind as Root DN - should fail
#
try:
topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
succeeded = True
except ldap.LDAPError as e:
succeeded = False

if succeeded:
log.fatal('test_rootdn_access_day_of_week: Root DN was incorrectly able to bind')
assert False

#
# Set the allow days
#
try:
topology_st.standalone.simple_bind_s(USER1_DN, PASSWORD)
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_day_of_week: : failed to bind as user1')
assert False

try:
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_REPLACE, 'rootdn-days-allowed',
ensure_bytes(allow_days))])
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_day_of_week: Failed to set the deny days: error {}'
.format(e))
assert False

try:
> topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)

suites/plugins/rootdn_plugin_test.py:235:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = ('cn=Directory Manager', 'password'), kwargs = {}

def inner(*args, **kwargs):
if name == 'result':
objtype, data = f(*args, **kwargs)
# data is either a 2-tuple or a list of 2-tuples
# print data
if data:
if isinstance(data, tuple):
return objtype, Entry(data)
elif isinstance(data, list):
# AD sends back these search references
# if objtype == ldap.RES_SEARCH_RESULT and \
# isinstance(data[-1],tuple) and \
# not data[-1][0]:
# print "Received search reference: "
# pprint.pprint(data[-1][1])
# data.pop() # remove the last non-entry element

return objtype, [Entry(x) for x in data]
else:
raise TypeError("unknown data type %s returned by result" %
type(data))
else:
return objtype, data
elif name.startswith('add'):
# the first arg is self
# the second and third arg are the dn and the data to send
# We need to convert the Entry into the format used by
# python-ldap
ent = args[0]
if isinstance(ent, Entry):
return f(ent.dn, ent.toTupleList(), *args[2:])
else:
return f(*args, **kwargs)
else:
> return f(*args, **kwargs)

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>, who = 'cn=Directory Manager'
cred = 'password', serverctrls = None, clientctrls = None

def simple_bind_s(self,who=None,cred=None,serverctrls=None,clientctrls=None):
"""
simple_bind_s([who='' [,cred='']]) -> 4-tuple
"""
msgid = self.simple_bind(who,cred,serverctrls,clientctrls)
> resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:444:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (18,), kwargs = {'all': 1, 'timeout': -1}

def inner(*args, **kwargs):
if name == 'result':
objtype, data = f(*args, **kwargs)
# data is either a 2-tuple or a list of 2-tuples
# print data
if data:
if isinstance(data, tuple):
return objtype, Entry(data)
elif isinstance(data, list):
# AD sends back these search references
# if objtype == ldap.RES_SEARCH_RESULT and \
# isinstance(data[-1],tuple) and \
# not data[-1][0]:
# print "Received search reference: "
# pprint.pprint(data[-1][1])
# data.pop() # remove the last non-entry element

return objtype, [Entry(x) for x in data]
else:
raise TypeError("unknown data type %s returned by result" %
type(data))
else:
return objtype, data
elif name.startswith('add'):
# the first arg is self
# the second and third arg are the dn and the data to send
# We need to convert the Entry into the format used by
# python-ldap
ent = args[0]
if isinstance(ent, Entry):
return f(ent.dn, ent.toTupleList(), *args[2:])
else:
return f(*args, **kwargs)
else:
> return f(*args, **kwargs)

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>, msgid = 18, 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/lib64/python3.6/site-packages/ldap/ldapobject.py:749:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (18, 1, -1)
kwargs = {'add_ctrls': 0, 'add_extop': 0, 'add_intermediates': 0, 'resp_ctrl_classes': None}

def inner(*args, **kwargs):
if name == 'result':
objtype, data = f(*args, **kwargs)
# data is either a 2-tuple or a list of 2-tuples
# print data
if data:
if isinstance(data, tuple):
return objtype, Entry(data)
elif isinstance(data, list):
# AD sends back these search references
# if objtype == ldap.RES_SEARCH_RESULT and \
# isinstance(data[-1],tuple) and \
# not data[-1][0]:
# print "Received search reference: "
# pprint.pprint(data[-1][1])
# data.pop() # remove the last non-entry element

return objtype, [Entry(x) for x in data]
else:
raise TypeError("unknown data type %s returned by result" %
type(data))
else:
return objtype, data
elif name.startswith('add'):
# the first arg is self
# the second and third arg are the dn and the data to send
# We need to convert the Entry into the format used by
# python-ldap
ent = args[0]
if isinstance(ent, Entry):
return f(ent.dn, ent.toTupleList(), *args[2:])
else:
return f(*args, **kwargs)
else:
> return f(*args, **kwargs)

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>, msgid = 18, 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/lib64/python3.6/site-packages/ldap/ldapobject.py:756:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (<built-in method result4 of LDAP object at 0x7f20de5c2df0>, 18, 1, -1, 0, 0, ...)
kwargs = {}

def inner(*args, **kwargs):
if name == 'result':
objtype, data = f(*args, **kwargs)
# data is either a 2-tuple or a list of 2-tuples
# print data
if data:
if isinstance(data, tuple):
return objtype, Entry(data)
elif isinstance(data, list):
# AD sends back these search references
# if objtype == ldap.RES_SEARCH_RESULT and \
# isinstance(data[-1],tuple) and \
# not data[-1][0]:
# print "Received search reference: "
# pprint.pprint(data[-1][1])
# data.pop() # remove the last non-entry element

return objtype, [Entry(x) for x in data]
else:
raise TypeError("unknown data type %s returned by result" %
type(data))
else:
return objtype, data
elif name.startswith('add'):
# the first arg is self
# the second and third arg are the dn and the data to send
# We need to convert the Entry into the format used by
# python-ldap
ent = args[0]
if isinstance(ent, Entry):
return f(ent.dn, ent.toTupleList(), *args[2:])
else:
return f(*args, **kwargs)
else:
> return f(*args, **kwargs)

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>
func = <built-in method result4 of LDAP object at 0x7f20de5c2df0>
args = (18, 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/lib64/python3.6/site-packages/ldap/ldapobject.py:329:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

exc_type = <class 'ldap.UNWILLING_TO_PERFORM'>
exc_value = UNWILLING_TO_PERFORM({'desc': 'Server is unwilling to perform', 'info': 'RootDN access control violation'},)
exc_traceback = <traceback object at 0x7f20eeb78988>

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/lib64/python3.6/site-packages/ldap/compat.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>
func = <built-in method result4 of LDAP object at 0x7f20de5c2df0>
args = (18, 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.UNWILLING_TO_PERFORM: {'desc': 'Server is unwilling to perform', 'info': 'RootDN access control violation'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: UNWILLING_TO_PERFORM

During handling of the above exception, another exception occurred:

topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee8d6400>

def test_rootdn_access_day_of_week(topology_st):
'''
Test the days of week feature
'''

log.info('Running test_rootdn_access_day_of_week...')

days = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat')
day = int(time.strftime("%w", time.gmtime()))

if day == 6:
# Handle the roll over from Saturday into Sunday
deny_days = days[1] + ', ' + days[2]
allow_days = days[6] + ',' + days[0]
elif day > 3:
deny_days = days[0] + ', ' + days[1]
allow_days = days[day] + ',' + days[day - 1]
else:
deny_days = days[4] + ',' + days[5]
allow_days = days[day] + ',' + days[day + 1]

log.info('Today: ' + days[day])
log.info('Allowed days: ' + allow_days)
log.info('Deny days: ' + deny_days)

#
# Set the deny days
#
try:
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_REPLACE, 'rootdn-days-allowed',
ensure_bytes(deny_days))])
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_day_of_week: Failed to set the deny days: error {}'
.format(e))
assert False

#
# Bind as Root DN - should fail
#
try:
topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
succeeded = True
except ldap.LDAPError as e:
succeeded = False

if succeeded:
log.fatal('test_rootdn_access_day_of_week: Root DN was incorrectly able to bind')
assert False

#
# Set the allow days
#
try:
topology_st.standalone.simple_bind_s(USER1_DN, PASSWORD)
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_day_of_week: : failed to bind as user1')
assert False

try:
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_REPLACE, 'rootdn-days-allowed',
ensure_bytes(allow_days))])
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_day_of_week: Failed to set the deny days: error {}'
.format(e))
assert False

try:
topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_day_of_week: Root DN bind failed unexpectedly failed: error {}'
.format(e))
> assert False
E assert False

suites/plugins/rootdn_plugin_test.py:239: AssertionError
----------------------------- Captured stderr call -----------------------------
INFO:tests.suites.plugins.rootdn_plugin_test:Running test_rootdn_access_day_of_week... INFO:tests.suites.plugins.rootdn_plugin_test:Today: Tue INFO:tests.suites.plugins.rootdn_plugin_test:Allowed days: Tue,Wed INFO:tests.suites.plugins.rootdn_plugin_test:Deny days: Thu,Fri CRITICAL:tests.suites.plugins.rootdn_plugin_test:test_rootdn_access_day_of_week: Root DN bind failed unexpectedly failed: error {'desc': 'Server is unwilling to perform', 'info': 'RootDN access control violation'} ------------------------------ Captured log call -------------------------------
rootdn_plugin_test.py 173 INFO Running test_rootdn_access_day_of_week... rootdn_plugin_test.py 189 INFO Today: Tue rootdn_plugin_test.py 190 INFO Allowed days: Tue,Wed rootdn_plugin_test.py 191 INFO Deny days: Thu,Fri rootdn_plugin_test.py 238 CRITICAL test_rootdn_access_day_of_week: Root DN bind failed unexpectedly failed: error {'desc': 'Server is unwilling to perform', 'info': 'RootDN access control violation'}
Failed suites/plugins/rootdn_plugin_test.py::test_rootdn_access_denied_ip 3.88
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee8d6400>

def test_rootdn_access_denied_ip(topology_st):
'''
Test denied IP feature - we can just test denying 127.0.0.1
'''

log.info('Running test_rootdn_access_denied_ip...')
try:
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_REPLACE,
'rootdn-deny-ip',
b'127.0.0.1'),
(ldap.MOD_ADD,
'rootdn-deny-ip',
b'::1')])
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_denied_ip: Failed to set rootDN plugin config: error {}'
.format(e))
assert False

#
# Bind as Root DN - should fail
#
try:
conn = ldap.initialize('ldap://{}:{}'.format(LOCALHOST_IP, topology_st.standalone.port))
topology_st.standalone.restart()
conn.simple_bind_s(DN_DM, PASSWORD)
succeeded = True
except ldap.LDAPError as e:
succeeded = False
if succeeded:
log.fatal('test_rootdn_access_denied_ip: Root DN was incorrectly able to bind')
assert False

#
# Change the denied IP so root DN succeeds
#
try:
topology_st.standalone.simple_bind_s(USER1_DN, PASSWORD)
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_denied_ip: failed to bind as user1')
assert False

try:
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_REPLACE, 'rootdn-deny-ip', b'255.255.255.255')])
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_denied_ip: Failed to set rootDN plugin config: error {}'
.format(e))
assert False

try:
> topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)

suites/plugins/rootdn_plugin_test.py:310:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = ('cn=Directory Manager', 'password'), kwargs = {}

def inner(*args, **kwargs):
if name == 'result':
objtype, data = f(*args, **kwargs)
# data is either a 2-tuple or a list of 2-tuples
# print data
if data:
if isinstance(data, tuple):
return objtype, Entry(data)
elif isinstance(data, list):
# AD sends back these search references
# if objtype == ldap.RES_SEARCH_RESULT and \
# isinstance(data[-1],tuple) and \
# not data[-1][0]:
# print "Received search reference: "
# pprint.pprint(data[-1][1])
# data.pop() # remove the last non-entry element

return objtype, [Entry(x) for x in data]
else:
raise TypeError("unknown data type %s returned by result" %
type(data))
else:
return objtype, data
elif name.startswith('add'):
# the first arg is self
# the second and third arg are the dn and the data to send
# We need to convert the Entry into the format used by
# python-ldap
ent = args[0]
if isinstance(ent, Entry):
return f(ent.dn, ent.toTupleList(), *args[2:])
else:
return f(*args, **kwargs)
else:
> return f(*args, **kwargs)

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>, who = 'cn=Directory Manager'
cred = 'password', serverctrls = None, clientctrls = None

def simple_bind_s(self,who=None,cred=None,serverctrls=None,clientctrls=None):
"""
simple_bind_s([who='' [,cred='']]) -> 4-tuple
"""
msgid = self.simple_bind(who,cred,serverctrls,clientctrls)
> resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:444:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (4,), kwargs = {'all': 1, 'timeout': -1}

def inner(*args, **kwargs):
if name == 'result':
objtype, data = f(*args, **kwargs)
# data is either a 2-tuple or a list of 2-tuples
# print data
if data:
if isinstance(data, tuple):
return objtype, Entry(data)
elif isinstance(data, list):
# AD sends back these search references
# if objtype == ldap.RES_SEARCH_RESULT and \
# isinstance(data[-1],tuple) and \
# not data[-1][0]:
# print "Received search reference: "
# pprint.pprint(data[-1][1])
# data.pop() # remove the last non-entry element

return objtype, [Entry(x) for x in data]
else:
raise TypeError("unknown data type %s returned by result" %
type(data))
else:
return objtype, data
elif name.startswith('add'):
# the first arg is self
# the second and third arg are the dn and the data to send
# We need to convert the Entry into the format used by
# python-ldap
ent = args[0]
if isinstance(ent, Entry):
return f(ent.dn, ent.toTupleList(), *args[2:])
else:
return f(*args, **kwargs)
else:
> return f(*args, **kwargs)

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>, msgid = 4, 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/lib64/python3.6/site-packages/ldap/ldapobject.py:749:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (4, 1, -1)
kwargs = {'add_ctrls': 0, 'add_extop': 0, 'add_intermediates': 0, 'resp_ctrl_classes': None}

def inner(*args, **kwargs):
if name == 'result':
objtype, data = f(*args, **kwargs)
# data is either a 2-tuple or a list of 2-tuples
# print data
if data:
if isinstance(data, tuple):
return objtype, Entry(data)
elif isinstance(data, list):
# AD sends back these search references
# if objtype == ldap.RES_SEARCH_RESULT and \
# isinstance(data[-1],tuple) and \
# not data[-1][0]:
# print "Received search reference: "
# pprint.pprint(data[-1][1])
# data.pop() # remove the last non-entry element

return objtype, [Entry(x) for x in data]
else:
raise TypeError("unknown data type %s returned by result" %
type(data))
else:
return objtype, data
elif name.startswith('add'):
# the first arg is self
# the second and third arg are the dn and the data to send
# We need to convert the Entry into the format used by
# python-ldap
ent = args[0]
if isinstance(ent, Entry):
return f(ent.dn, ent.toTupleList(), *args[2:])
else:
return f(*args, **kwargs)
else:
> return f(*args, **kwargs)

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>, msgid = 4, 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/lib64/python3.6/site-packages/ldap/ldapobject.py:756:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (<built-in method result4 of LDAP object at 0x7f20de5c2bc0>, 4, 1, -1, 0, 0, ...)
kwargs = {}

def inner(*args, **kwargs):
if name == 'result':
objtype, data = f(*args, **kwargs)
# data is either a 2-tuple or a list of 2-tuples
# print data
if data:
if isinstance(data, tuple):
return objtype, Entry(data)
elif isinstance(data, list):
# AD sends back these search references
# if objtype == ldap.RES_SEARCH_RESULT and \
# isinstance(data[-1],tuple) and \
# not data[-1][0]:
# print "Received search reference: "
# pprint.pprint(data[-1][1])
# data.pop() # remove the last non-entry element

return objtype, [Entry(x) for x in data]
else:
raise TypeError("unknown data type %s returned by result" %
type(data))
else:
return objtype, data
elif name.startswith('add'):
# the first arg is self
# the second and third arg are the dn and the data to send
# We need to convert the Entry into the format used by
# python-ldap
ent = args[0]
if isinstance(ent, Entry):
return f(ent.dn, ent.toTupleList(), *args[2:])
else:
return f(*args, **kwargs)
else:
> return f(*args, **kwargs)

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>
func = <built-in method result4 of LDAP object at 0x7f20de5c2bc0>
args = (4, 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/lib64/python3.6/site-packages/ldap/ldapobject.py:329:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

exc_type = <class 'ldap.UNWILLING_TO_PERFORM'>
exc_value = UNWILLING_TO_PERFORM({'desc': 'Server is unwilling to perform', 'info': 'RootDN access control violation'},)
exc_traceback = <traceback object at 0x7f20eed259c8>

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/lib64/python3.6/site-packages/ldap/compat.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>
func = <built-in method result4 of LDAP object at 0x7f20de5c2bc0>
args = (4, 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.UNWILLING_TO_PERFORM: {'desc': 'Server is unwilling to perform', 'info': 'RootDN access control violation'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: UNWILLING_TO_PERFORM

During handling of the above exception, another exception occurred:

topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee8d6400>

def test_rootdn_access_denied_ip(topology_st):
'''
Test denied IP feature - we can just test denying 127.0.0.1
'''

log.info('Running test_rootdn_access_denied_ip...')
try:
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_REPLACE,
'rootdn-deny-ip',
b'127.0.0.1'),
(ldap.MOD_ADD,
'rootdn-deny-ip',
b'::1')])
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_denied_ip: Failed to set rootDN plugin config: error {}'
.format(e))
assert False

#
# Bind as Root DN - should fail
#
try:
conn = ldap.initialize('ldap://{}:{}'.format(LOCALHOST_IP, topology_st.standalone.port))
topology_st.standalone.restart()
conn.simple_bind_s(DN_DM, PASSWORD)
succeeded = True
except ldap.LDAPError as e:
succeeded = False
if succeeded:
log.fatal('test_rootdn_access_denied_ip: Root DN was incorrectly able to bind')
assert False

#
# Change the denied IP so root DN succeeds
#
try:
topology_st.standalone.simple_bind_s(USER1_DN, PASSWORD)
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_denied_ip: failed to bind as user1')
assert False

try:
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_REPLACE, 'rootdn-deny-ip', b'255.255.255.255')])
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_denied_ip: Failed to set rootDN plugin config: error {}'
.format(e))
assert False

try:
topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_denied_ip: Root DN bind failed unexpectedly failed: error {}'
.format(e))
> assert False
E assert False

suites/plugins/rootdn_plugin_test.py:314: AssertionError
----------------------------- Captured stderr call -----------------------------
INFO:tests.suites.plugins.rootdn_plugin_test:Running test_rootdn_access_denied_ip... CRITICAL:tests.suites.plugins.rootdn_plugin_test:test_rootdn_access_denied_ip: Root DN bind failed unexpectedly failed: error {'desc': 'Server is unwilling to perform', 'info': 'RootDN access control violation'} ------------------------------ Captured log call -------------------------------
rootdn_plugin_test.py 266 INFO Running test_rootdn_access_denied_ip... rootdn_plugin_test.py 313 CRITICAL test_rootdn_access_denied_ip: Root DN bind failed unexpectedly failed: error {'desc': 'Server is unwilling to perform', 'info': 'RootDN access control violation'}
Failed suites/plugins/rootdn_plugin_test.py::test_rootdn_access_denied_host 0.04
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee8d6400>

def test_rootdn_access_denied_host(topology_st):
'''
Test denied Host feature - we can just test denying localhost
'''

log.info('Running test_rootdn_access_denied_host...')
hostname = socket.gethostname()
localhost = DirSrvTools.getLocalhost()
try:
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_ADD,
'rootdn-deny-host',
ensure_bytes(hostname))])
if localhost != hostname:
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_ADD,
'rootdn-deny-host',
ensure_bytes(localhost))])
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_denied_host: Failed to set deny host: error {}'
.format(e))
assert False

#
# Bind as Root DN - should fail
#
try:
topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
succeeded = True
except ldap.LDAPError as e:
succeeded = False

if succeeded:
log.fatal('test_rootdn_access_denied_host: Root DN was incorrectly able to bind')
assert False

#
# Change the denied host so root DN succeeds
#
try:
topology_st.standalone.simple_bind_s(USER1_DN, PASSWORD)
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_denied_host: : failed to bind as user1')
assert False

try:
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_REPLACE, 'rootdn-deny-host', b'i.dont.exist.com')])
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_denied_host: Failed to set rootDN plugin config: error {}'
.format(e))
assert False

try:
> topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)

suites/plugins/rootdn_plugin_test.py:387:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = ('cn=Directory Manager', 'password'), kwargs = {}

def inner(*args, **kwargs):
if name == 'result':
objtype, data = f(*args, **kwargs)
# data is either a 2-tuple or a list of 2-tuples
# print data
if data:
if isinstance(data, tuple):
return objtype, Entry(data)
elif isinstance(data, list):
# AD sends back these search references
# if objtype == ldap.RES_SEARCH_RESULT and \
# isinstance(data[-1],tuple) and \
# not data[-1][0]:
# print "Received search reference: "
# pprint.pprint(data[-1][1])
# data.pop() # remove the last non-entry element

return objtype, [Entry(x) for x in data]
else:
raise TypeError("unknown data type %s returned by result" %
type(data))
else:
return objtype, data
elif name.startswith('add'):
# the first arg is self
# the second and third arg are the dn and the data to send
# We need to convert the Entry into the format used by
# python-ldap
ent = args[0]
if isinstance(ent, Entry):
return f(ent.dn, ent.toTupleList(), *args[2:])
else:
return f(*args, **kwargs)
else:
> return f(*args, **kwargs)

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>, who = 'cn=Directory Manager'
cred = 'password', serverctrls = None, clientctrls = None

def simple_bind_s(self,who=None,cred=None,serverctrls=None,clientctrls=None):
"""
simple_bind_s([who='' [,cred='']]) -> 4-tuple
"""
msgid = self.simple_bind(who,cred,serverctrls,clientctrls)
> resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:444:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (10,), kwargs = {'all': 1, 'timeout': -1}

def inner(*args, **kwargs):
if name == 'result':
objtype, data = f(*args, **kwargs)
# data is either a 2-tuple or a list of 2-tuples
# print data
if data:
if isinstance(data, tuple):
return objtype, Entry(data)
elif isinstance(data, list):
# AD sends back these search references
# if objtype == ldap.RES_SEARCH_RESULT and \
# isinstance(data[-1],tuple) and \
# not data[-1][0]:
# print "Received search reference: "
# pprint.pprint(data[-1][1])
# data.pop() # remove the last non-entry element

return objtype, [Entry(x) for x in data]
else:
raise TypeError("unknown data type %s returned by result" %
type(data))
else:
return objtype, data
elif name.startswith('add'):
# the first arg is self
# the second and third arg are the dn and the data to send
# We need to convert the Entry into the format used by
# python-ldap
ent = args[0]
if isinstance(ent, Entry):
return f(ent.dn, ent.toTupleList(), *args[2:])
else:
return f(*args, **kwargs)
else:
> return f(*args, **kwargs)

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>, msgid = 10, 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/lib64/python3.6/site-packages/ldap/ldapobject.py:749:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (10, 1, -1)
kwargs = {'add_ctrls': 0, 'add_extop': 0, 'add_intermediates': 0, 'resp_ctrl_classes': None}

def inner(*args, **kwargs):
if name == 'result':
objtype, data = f(*args, **kwargs)
# data is either a 2-tuple or a list of 2-tuples
# print data
if data:
if isinstance(data, tuple):
return objtype, Entry(data)
elif isinstance(data, list):
# AD sends back these search references
# if objtype == ldap.RES_SEARCH_RESULT and \
# isinstance(data[-1],tuple) and \
# not data[-1][0]:
# print "Received search reference: "
# pprint.pprint(data[-1][1])
# data.pop() # remove the last non-entry element

return objtype, [Entry(x) for x in data]
else:
raise TypeError("unknown data type %s returned by result" %
type(data))
else:
return objtype, data
elif name.startswith('add'):
# the first arg is self
# the second and third arg are the dn and the data to send
# We need to convert the Entry into the format used by
# python-ldap
ent = args[0]
if isinstance(ent, Entry):
return f(ent.dn, ent.toTupleList(), *args[2:])
else:
return f(*args, **kwargs)
else:
> return f(*args, **kwargs)

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>, msgid = 10, 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/lib64/python3.6/site-packages/ldap/ldapobject.py:756:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (<built-in method result4 of LDAP object at 0x7f20de5c2bc0>, 10, 1, -1, 0, 0, ...)
kwargs = {}

def inner(*args, **kwargs):
if name == 'result':
objtype, data = f(*args, **kwargs)
# data is either a 2-tuple or a list of 2-tuples
# print data
if data:
if isinstance(data, tuple):
return objtype, Entry(data)
elif isinstance(data, list):
# AD sends back these search references
# if objtype == ldap.RES_SEARCH_RESULT and \
# isinstance(data[-1],tuple) and \
# not data[-1][0]:
# print "Received search reference: "
# pprint.pprint(data[-1][1])
# data.pop() # remove the last non-entry element

return objtype, [Entry(x) for x in data]
else:
raise TypeError("unknown data type %s returned by result" %
type(data))
else:
return objtype, data
elif name.startswith('add'):
# the first arg is self
# the second and third arg are the dn and the data to send
# We need to convert the Entry into the format used by
# python-ldap
ent = args[0]
if isinstance(ent, Entry):
return f(ent.dn, ent.toTupleList(), *args[2:])
else:
return f(*args, **kwargs)
else:
> return f(*args, **kwargs)

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>
func = <built-in method result4 of LDAP object at 0x7f20de5c2bc0>
args = (10, 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/lib64/python3.6/site-packages/ldap/ldapobject.py:329:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

exc_type = <class 'ldap.UNWILLING_TO_PERFORM'>
exc_value = UNWILLING_TO_PERFORM({'desc': 'Server is unwilling to perform', 'info': 'RootDN access control violation'},)
exc_traceback = <traceback object at 0x7f20eea10448>

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/lib64/python3.6/site-packages/ldap/compat.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>
func = <built-in method result4 of LDAP object at 0x7f20de5c2bc0>
args = (10, 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.UNWILLING_TO_PERFORM: {'desc': 'Server is unwilling to perform', 'info': 'RootDN access control violation'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: UNWILLING_TO_PERFORM

During handling of the above exception, another exception occurred:

topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee8d6400>

def test_rootdn_access_denied_host(topology_st):
'''
Test denied Host feature - we can just test denying localhost
'''

log.info('Running test_rootdn_access_denied_host...')
hostname = socket.gethostname()
localhost = DirSrvTools.getLocalhost()
try:
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_ADD,
'rootdn-deny-host',
ensure_bytes(hostname))])
if localhost != hostname:
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_ADD,
'rootdn-deny-host',
ensure_bytes(localhost))])
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_denied_host: Failed to set deny host: error {}'
.format(e))
assert False

#
# Bind as Root DN - should fail
#
try:
topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
succeeded = True
except ldap.LDAPError as e:
succeeded = False

if succeeded:
log.fatal('test_rootdn_access_denied_host: Root DN was incorrectly able to bind')
assert False

#
# Change the denied host so root DN succeeds
#
try:
topology_st.standalone.simple_bind_s(USER1_DN, PASSWORD)
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_denied_host: : failed to bind as user1')
assert False

try:
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_REPLACE, 'rootdn-deny-host', b'i.dont.exist.com')])
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_denied_host: Failed to set rootDN plugin config: error {}'
.format(e))
assert False

try:
topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_denied_host: Root DN bind failed unexpectedly failed: error {}'
.format(e))
> assert False
E assert False

suites/plugins/rootdn_plugin_test.py:391: AssertionError
----------------------------- Captured stderr call -----------------------------
INFO:tests.suites.plugins.rootdn_plugin_test:Running test_rootdn_access_denied_host... CRITICAL:tests.suites.plugins.rootdn_plugin_test:test_rootdn_access_denied_host: Root DN bind failed unexpectedly failed: error {'desc': 'Server is unwilling to perform', 'info': 'RootDN access control violation'} ------------------------------ Captured log call -------------------------------
rootdn_plugin_test.py 341 INFO Running test_rootdn_access_denied_host... rootdn_plugin_test.py 390 CRITICAL test_rootdn_access_denied_host: Root DN bind failed unexpectedly failed: error {'desc': 'Server is unwilling to perform', 'info': 'RootDN access control violation'}
Failed suites/plugins/rootdn_plugin_test.py::test_rootdn_access_allowed_ip 4.11
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee8d6400>

def test_rootdn_access_allowed_ip(topology_st):
'''
Test allowed ip feature
'''

log.info('Running test_rootdn_access_allowed_ip...')

#
# Set allowed host to an unknown host - blocks the Root DN
#
try:
conn = ldap.initialize('ldap://{}:{}'.format(LOCALHOST_IP, topology_st.standalone.port))
> topology_st.standalone.restart()

suites/plugins/rootdn_plugin_test.py:425:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>, timeout = 120, post_open = True

def restart(self, timeout=120, post_open=True):
'''
It restarts an instance and rebind it. Its final state after rebind
(open) is DIRSRV_STATE_ONLINE.

@param self
@param timeout (in sec) to wait for successful stop

@return None

@raise None
'''
self.stop(timeout)
time.sleep(1)
> self.start(timeout, post_open)

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:1327:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>, timeout = 120, post_open = True

def start(self, timeout=120, post_open=True):
'''
It starts an instance and rebind it. Its final state after rebind
(open) is DIRSRV_STATE_ONLINE

@param self
@param timeout (in sec) to wait for successful start

@return None

@raise None
'''

if self.status() is True:
return

if self.with_systemd() and not self.containerised:
# Do systemd things here ...
subprocess.check_call(["/usr/bin/systemctl",
"start",
"dirsrv@%s" % self.serverid])
else:
# Start the process.
# Wait for it to terminate
# This means the server is probably ready to go ....
env = {}
if self.has_asan():
self.log.warning("WARNING: Starting instance with ASAN options. This is probably not what you want. Please contact support.")
self.log.info("INFO: ASAN options will be copied from your environment")
env['ASAN_SYMBOLIZER_PATH'] = "/usr/bin/llvm-symbolizer"
env['ASAN_OPTIONS'] = "symbolize=1 detect_deadlocks=1 log_path=%s/ns-slapd-%s.asan" % (self.ds_paths.run_dir, self.serverid)
env.update(os.environ)
output = None
try:
output = subprocess.check_output(["%s/ns-slapd" % self.get_sbin_dir(),
"-D",
self.ds_paths.config_dir,
"-i",
self.ds_paths.pid_file], env=env, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError:
self.log.error(output)
count = timeout
pid = pid_from_file(self.ds_paths.pid_file)
while (pid is None) and count > 0:
count -= 1
time.sleep(1)
pid = pid_from_file(self.ds_paths.pid_file)
if pid == 0 or pid is None:
raise ValueError
# Wait
while not pid_exists(pid) and count > 0:
# It looks like DS changes the value in here at some point ...
# It's probably a DS bug, but if we "keep checking" the file, eventually
# we get the main server pid, and it's ready to go.
pid = pid_from_file(self.ds_paths.pid_file)
time.sleep(1)
count -= 1
if not pid_exists(pid):
raise Exception("Failed to start DS")
if post_open:
> self.open()

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:1237:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>
uri = 'ldap://server.example.com:38901', saslmethod = None, sasltoken = None
certdir = '/etc/dirsrv/slapd-standalone1', starttls = False, connOnly = False
reqcert = 1, usercert = None, userkey = None

def open(self, uri=None, saslmethod=None, sasltoken=None, certdir=None, starttls=False, connOnly=False, reqcert=ldap.OPT_X_TLS_HARD,
usercert=None, userkey=None):
'''
It opens a ldap bound connection to dirsrv so that online
administrative tasks are possible. It binds with the binddn
property, then it initializes various fields from DirSrv
(via __initPart2)

The state changes -> DIRSRV_STATE_ONLINE

@param self
@param saslmethod - None, or GSSAPI
@param sasltoken - The ldap.sasl token type to bind with.
@param certdir - Certificate directory for TLS
@return None

@raise LDAPError
'''

# Force our state offline to prevent paths from trying to search
# cn=config while we startup.
self.state = DIRSRV_STATE_OFFLINE

if not uri:
uri = self.toLDAPURL()
self.log.debug('open(): Connecting to uri %s' % uri)
if hasattr(ldap, 'PYLDAP_VERSION') and MAJOR >= 3:
super(DirSrv, self).__init__(uri, bytes_mode=False, trace_level=TRACE_LEVEL)
else:
super(DirSrv, self).__init__(uri, trace_level=TRACE_LEVEL)

if certdir is None and self.isLocal:
certdir = self.get_cert_dir()
self.log.debug("Using dirsrv ca certificate %s" % certdir)

if certdir is not None:
"""
We have a certificate directory, so lets start up TLS negotiations
"""
# Note this sets LDAP.OPT not SELF. Because once self has opened
# it can NOT change opts AT ALL.
self.set_option(ldap.OPT_X_TLS_CACERTDIR, ensure_str(certdir))
self.log.debug("Using external ca certificate %s" % certdir)

if userkey is not None:
# Note this sets LDAP.OPT not SELF. Because once self has opened
# it can NOT change opts AT ALL.
self.log.debug("Using user private key %s" % userkey)
self.set_option(ldap.OPT_X_TLS_KEYFILE, ensure_str(userkey))

if usercert is not None:
self.log.debug("Using user certificate %s" % usercert)
self.set_option(ldap.OPT_X_TLS_CERTFILE, ensure_str(usercert))

if certdir is not None:
self.log.debug("Using external ca certificate %s" % certdir)
self.set_option(ldap.OPT_X_TLS_CACERTDIR, ensure_str(certdir))

if certdir or starttls:
try:
# Note this sets LDAP.OPT not SELF. Because once self has opened
# it can NOT change opts on reused (ie restart)
self.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, reqcert)
self.log.debug("Using certificate policy %s" % reqcert)
self.log.debug("ldap.OPT_X_TLS_REQUIRE_CERT = %s" % reqcert)
except ldap.LDAPError as e:
self.log.fatal('TLS negotiation failed: %s' % str(e))
raise e

# Tell python ldap to make a new TLS context with this information.
self.set_option(ldap.OPT_X_TLS_NEWCTX, 0)

if starttls and not uri.startswith('ldaps'):
self.start_tls_s()

if saslmethod and sasltoken is not None:
# Just pass the sasltoken in!
self.sasl_interactive_bind_s("", sasltoken)
elif saslmethod and saslmethod.lower() == 'gssapi':
"""
Perform kerberos/gssapi authentication
"""
sasl_auth = ldap.sasl.gssapi("")
self.sasl_interactive_bind_s("", sasl_auth)

elif saslmethod == 'EXTERNAL':
# Do nothing.
sasl_auth = ldap.sasl.external()
self.sasl_interactive_bind_s("", sasl_auth)
elif saslmethod:
# Unknown or unsupported method
self.log.debug('Unsupported SASL method: %s' % saslmethod)
raise ldap.UNWILLING_TO_PERFORM

elif self.can_autobind():
# Connect via ldapi, and autobind.
# do nothing: the bind is complete.
if self.verbose:
self.log.info("open(): Using root autobind ...")
sasl_auth = ldap.sasl.external()
self.sasl_interactive_bind_s("", sasl_auth)

else:
"""
Do a simple bind
"""
try:
self.simple_bind_s(ensure_str(self.binddn), self.bindpw)
except ldap.SERVER_DOWN as e:
# TODO add server info in exception
self.log.debug("Cannot connect to %r" % uri)
raise e
except ldap.LDAPError as e:
self.log.debug("Error: Failed to authenticate: %s", str(e))
> raise e

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:1147:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>
uri = 'ldap://server.example.com:38901', saslmethod = None, sasltoken = None
certdir = '/etc/dirsrv/slapd-standalone1', starttls = False, connOnly = False
reqcert = 1, usercert = None, userkey = None

def open(self, uri=None, saslmethod=None, sasltoken=None, certdir=None, starttls=False, connOnly=False, reqcert=ldap.OPT_X_TLS_HARD,
usercert=None, userkey=None):
'''
It opens a ldap bound connection to dirsrv so that online
administrative tasks are possible. It binds with the binddn
property, then it initializes various fields from DirSrv
(via __initPart2)

The state changes -> DIRSRV_STATE_ONLINE

@param self
@param saslmethod - None, or GSSAPI
@param sasltoken - The ldap.sasl token type to bind with.
@param certdir - Certificate directory for TLS
@return None

@raise LDAPError
'''

# Force our state offline to prevent paths from trying to search
# cn=config while we startup.
self.state = DIRSRV_STATE_OFFLINE

if not uri:
uri = self.toLDAPURL()
self.log.debug('open(): Connecting to uri %s' % uri)
if hasattr(ldap, 'PYLDAP_VERSION') and MAJOR >= 3:
super(DirSrv, self).__init__(uri, bytes_mode=False, trace_level=TRACE_LEVEL)
else:
super(DirSrv, self).__init__(uri, trace_level=TRACE_LEVEL)

if certdir is None and self.isLocal:
certdir = self.get_cert_dir()
self.log.debug("Using dirsrv ca certificate %s" % certdir)

if certdir is not None:
"""
We have a certificate directory, so lets start up TLS negotiations
"""
# Note this sets LDAP.OPT not SELF. Because once self has opened
# it can NOT change opts AT ALL.
self.set_option(ldap.OPT_X_TLS_CACERTDIR, ensure_str(certdir))
self.log.debug("Using external ca certificate %s" % certdir)

if userkey is not None:
# Note this sets LDAP.OPT not SELF. Because once self has opened
# it can NOT change opts AT ALL.
self.log.debug("Using user private key %s" % userkey)
self.set_option(ldap.OPT_X_TLS_KEYFILE, ensure_str(userkey))

if usercert is not None:
self.log.debug("Using user certificate %s" % usercert)
self.set_option(ldap.OPT_X_TLS_CERTFILE, ensure_str(usercert))

if certdir is not None:
self.log.debug("Using external ca certificate %s" % certdir)
self.set_option(ldap.OPT_X_TLS_CACERTDIR, ensure_str(certdir))

if certdir or starttls:
try:
# Note this sets LDAP.OPT not SELF. Because once self has opened
# it can NOT change opts on reused (ie restart)
self.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, reqcert)
self.log.debug("Using certificate policy %s" % reqcert)
self.log.debug("ldap.OPT_X_TLS_REQUIRE_CERT = %s" % reqcert)
except ldap.LDAPError as e:
self.log.fatal('TLS negotiation failed: %s' % str(e))
raise e

# Tell python ldap to make a new TLS context with this information.
self.set_option(ldap.OPT_X_TLS_NEWCTX, 0)

if starttls and not uri.startswith('ldaps'):
self.start_tls_s()

if saslmethod and sasltoken is not None:
# Just pass the sasltoken in!
self.sasl_interactive_bind_s("", sasltoken)
elif saslmethod and saslmethod.lower() == 'gssapi':
"""
Perform kerberos/gssapi authentication
"""
sasl_auth = ldap.sasl.gssapi("")
self.sasl_interactive_bind_s("", sasl_auth)

elif saslmethod == 'EXTERNAL':
# Do nothing.
sasl_auth = ldap.sasl.external()
self.sasl_interactive_bind_s("", sasl_auth)
elif saslmethod:
# Unknown or unsupported method
self.log.debug('Unsupported SASL method: %s' % saslmethod)
raise ldap.UNWILLING_TO_PERFORM

elif self.can_autobind():
# Connect via ldapi, and autobind.
# do nothing: the bind is complete.
if self.verbose:
self.log.info("open(): Using root autobind ...")
sasl_auth = ldap.sasl.external()
self.sasl_interactive_bind_s("", sasl_auth)

else:
"""
Do a simple bind
"""
try:
> self.simple_bind_s(ensure_str(self.binddn), self.bindpw)

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:1140:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = ('cn=Directory Manager', 'password'), kwargs = {}

def inner(*args, **kwargs):
if name == 'result':
objtype, data = f(*args, **kwargs)
# data is either a 2-tuple or a list of 2-tuples
# print data
if data:
if isinstance(data, tuple):
return objtype, Entry(data)
elif isinstance(data, list):
# AD sends back these search references
# if objtype == ldap.RES_SEARCH_RESULT and \
# isinstance(data[-1],tuple) and \
# not data[-1][0]:
# print "Received search reference: "
# pprint.pprint(data[-1][1])
# data.pop() # remove the last non-entry element

return objtype, [Entry(x) for x in data]
else:
raise TypeError("unknown data type %s returned by result" %
type(data))
else:
return objtype, data
elif name.startswith('add'):
# the first arg is self
# the second and third arg are the dn and the data to send
# We need to convert the Entry into the format used by
# python-ldap
ent = args[0]
if isinstance(ent, Entry):
return f(ent.dn, ent.toTupleList(), *args[2:])
else:
return f(*args, **kwargs)
else:
> return f(*args, **kwargs)

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>, who = 'cn=Directory Manager'
cred = 'password', serverctrls = None, clientctrls = None

def simple_bind_s(self,who=None,cred=None,serverctrls=None,clientctrls=None):
"""
simple_bind_s([who='' [,cred='']]) -> 4-tuple
"""
msgid = self.simple_bind(who,cred,serverctrls,clientctrls)
> resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:444:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (1,), kwargs = {'all': 1, 'timeout': -1}

def inner(*args, **kwargs):
if name == 'result':
objtype, data = f(*args, **kwargs)
# data is either a 2-tuple or a list of 2-tuples
# print data
if data:
if isinstance(data, tuple):
return objtype, Entry(data)
elif isinstance(data, list):
# AD sends back these search references
# if objtype == ldap.RES_SEARCH_RESULT and \
# isinstance(data[-1],tuple) and \
# not data[-1][0]:
# print "Received search reference: "
# pprint.pprint(data[-1][1])
# data.pop() # remove the last non-entry element

return objtype, [Entry(x) for x in data]
else:
raise TypeError("unknown data type %s returned by result" %
type(data))
else:
return objtype, data
elif name.startswith('add'):
# the first arg is self
# the second and third arg are the dn and the data to send
# We need to convert the Entry into the format used by
# python-ldap
ent = args[0]
if isinstance(ent, Entry):
return f(ent.dn, ent.toTupleList(), *args[2:])
else:
return f(*args, **kwargs)
else:
> return f(*args, **kwargs)

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>, msgid = 1, 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/lib64/python3.6/site-packages/ldap/ldapobject.py:749:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (1, 1, -1)
kwargs = {'add_ctrls': 0, 'add_extop': 0, 'add_intermediates': 0, 'resp_ctrl_classes': None}

def inner(*args, **kwargs):
if name == 'result':
objtype, data = f(*args, **kwargs)
# data is either a 2-tuple or a list of 2-tuples
# print data
if data:
if isinstance(data, tuple):
return objtype, Entry(data)
elif isinstance(data, list):
# AD sends back these search references
# if objtype == ldap.RES_SEARCH_RESULT and \
# isinstance(data[-1],tuple) and \
# not data[-1][0]:
# print "Received search reference: "
# pprint.pprint(data[-1][1])
# data.pop() # remove the last non-entry element

return objtype, [Entry(x) for x in data]
else:
raise TypeError("unknown data type %s returned by result" %
type(data))
else:
return objtype, data
elif name.startswith('add'):
# the first arg is self
# the second and third arg are the dn and the data to send
# We need to convert the Entry into the format used by
# python-ldap
ent = args[0]
if isinstance(ent, Entry):
return f(ent.dn, ent.toTupleList(), *args[2:])
else:
return f(*args, **kwargs)
else:
> return f(*args, **kwargs)

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>, msgid = 1, 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/lib64/python3.6/site-packages/ldap/ldapobject.py:756:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (<built-in method result4 of LDAP object at 0x7f20de444af8>, 1, 1, -1, 0, 0, ...)
kwargs = {}

def inner(*args, **kwargs):
if name == 'result':
objtype, data = f(*args, **kwargs)
# data is either a 2-tuple or a list of 2-tuples
# print data
if data:
if isinstance(data, tuple):
return objtype, Entry(data)
elif isinstance(data, list):
# AD sends back these search references
# if objtype == ldap.RES_SEARCH_RESULT and \
# isinstance(data[-1],tuple) and \
# not data[-1][0]:
# print "Received search reference: "
# pprint.pprint(data[-1][1])
# data.pop() # remove the last non-entry element

return objtype, [Entry(x) for x in data]
else:
raise TypeError("unknown data type %s returned by result" %
type(data))
else:
return objtype, data
elif name.startswith('add'):
# the first arg is self
# the second and third arg are the dn and the data to send
# We need to convert the Entry into the format used by
# python-ldap
ent = args[0]
if isinstance(ent, Entry):
return f(ent.dn, ent.toTupleList(), *args[2:])
else:
return f(*args, **kwargs)
else:
> return f(*args, **kwargs)

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>
func = <built-in method result4 of LDAP object at 0x7f20de444af8>
args = (1, 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/lib64/python3.6/site-packages/ldap/ldapobject.py:329:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

exc_type = <class 'ldap.UNWILLING_TO_PERFORM'>
exc_value = UNWILLING_TO_PERFORM({'desc': 'Server is unwilling to perform', 'info': 'RootDN access control violation'},)
exc_traceback = <traceback object at 0x7f20eea4abc8>

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/lib64/python3.6/site-packages/ldap/compat.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>
func = <built-in method result4 of LDAP object at 0x7f20de444af8>
args = (1, 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.UNWILLING_TO_PERFORM: {'desc': 'Server is unwilling to perform', 'info': 'RootDN access control violation'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: UNWILLING_TO_PERFORM

During handling of the above exception, another exception occurred:

topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee8d6400>

def test_rootdn_access_allowed_ip(topology_st):
'''
Test allowed ip feature
'''

log.info('Running test_rootdn_access_allowed_ip...')

#
# Set allowed host to an unknown host - blocks the Root DN
#
try:
conn = ldap.initialize('ldap://{}:{}'.format(LOCALHOST_IP, topology_st.standalone.port))
topology_st.standalone.restart()
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_REPLACE, 'rootdn-allow-ip', b'255.255.255.255')])
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_allowed_ip: Failed to set allowed host: error {}'
.format(e))
> assert False
E assert False

suites/plugins/rootdn_plugin_test.py:430: AssertionError
----------------------------- Captured stderr call -----------------------------
INFO:tests.suites.plugins.rootdn_plugin_test:Running test_rootdn_access_allowed_ip... CRITICAL:tests.suites.plugins.rootdn_plugin_test:test_rootdn_access_allowed_ip: Failed to set allowed host: error {'desc': 'Server is unwilling to perform', 'info': 'RootDN access control violation'} ------------------------------ Captured log call -------------------------------
rootdn_plugin_test.py 418 INFO Running test_rootdn_access_allowed_ip... rootdn_plugin_test.py 429 CRITICAL test_rootdn_access_allowed_ip: Failed to set allowed host: error {'desc': 'Server is unwilling to perform', 'info': 'RootDN access control violation'}
Failed suites/plugins/rootdn_plugin_test.py::test_rootdn_access_allowed_host 0.05
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee8d6400>

def test_rootdn_access_allowed_host(topology_st):
'''
Test allowed ip feature
'''

log.info('Running test_rootdn_access_allowed_host...')

#
# Set allowed host to an unknown host - blocks the Root DN
#
try:
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_REPLACE, 'rootdn-allow-host', b'i.dont.exist.com')])
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_allowed_host: Failed to set allowed host: error {}'
.format(e))
assert False

#
# Bind as Root DN - should fail
#
try:
topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
succeeded = True
except ldap.LDAPError as e:
succeeded = False

if succeeded:
log.fatal('test_rootdn_access_allowed_host: Root DN was incorrectly able to bind')
assert False

#
# Allow localhost
#
try:
topology_st.standalone.simple_bind_s(USER1_DN, PASSWORD)
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_allowed_host: : failed to bind as user1')
assert False

hostname = socket.gethostname()
localhost = DirSrvTools.getLocalhost()
try:
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_DELETE,
'rootdn-allow-host',
None)])
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_ADD,
'rootdn-allow-host',
ensure_bytes(localhost))])
if hostname != localhost:
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_ADD,
'rootdn-allow-host',
ensure_bytes(hostname))])
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_allowed_host: Failed to set allowed host: error {}'
.format(e))
assert False

try:
> topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)

suites/plugins/rootdn_plugin_test.py:549:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = ('cn=Directory Manager', 'password'), kwargs = {}

def inner(*args, **kwargs):
if name == 'result':
objtype, data = f(*args, **kwargs)
# data is either a 2-tuple or a list of 2-tuples
# print data
if data:
if isinstance(data, tuple):
return objtype, Entry(data)
elif isinstance(data, list):
# AD sends back these search references
# if objtype == ldap.RES_SEARCH_RESULT and \
# isinstance(data[-1],tuple) and \
# not data[-1][0]:
# print "Received search reference: "
# pprint.pprint(data[-1][1])
# data.pop() # remove the last non-entry element

return objtype, [Entry(x) for x in data]
else:
raise TypeError("unknown data type %s returned by result" %
type(data))
else:
return objtype, data
elif name.startswith('add'):
# the first arg is self
# the second and third arg are the dn and the data to send
# We need to convert the Entry into the format used by
# python-ldap
ent = args[0]
if isinstance(ent, Entry):
return f(ent.dn, ent.toTupleList(), *args[2:])
else:
return f(*args, **kwargs)
else:
> return f(*args, **kwargs)

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>, who = 'cn=Directory Manager'
cred = 'password', serverctrls = None, clientctrls = None

def simple_bind_s(self,who=None,cred=None,serverctrls=None,clientctrls=None):
"""
simple_bind_s([who='' [,cred='']]) -> 4-tuple
"""
msgid = self.simple_bind(who,cred,serverctrls,clientctrls)
> resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:444:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (8,), kwargs = {'all': 1, 'timeout': -1}

def inner(*args, **kwargs):
if name == 'result':
objtype, data = f(*args, **kwargs)
# data is either a 2-tuple or a list of 2-tuples
# print data
if data:
if isinstance(data, tuple):
return objtype, Entry(data)
elif isinstance(data, list):
# AD sends back these search references
# if objtype == ldap.RES_SEARCH_RESULT and \
# isinstance(data[-1],tuple) and \
# not data[-1][0]:
# print "Received search reference: "
# pprint.pprint(data[-1][1])
# data.pop() # remove the last non-entry element

return objtype, [Entry(x) for x in data]
else:
raise TypeError("unknown data type %s returned by result" %
type(data))
else:
return objtype, data
elif name.startswith('add'):
# the first arg is self
# the second and third arg are the dn and the data to send
# We need to convert the Entry into the format used by
# python-ldap
ent = args[0]
if isinstance(ent, Entry):
return f(ent.dn, ent.toTupleList(), *args[2:])
else:
return f(*args, **kwargs)
else:
> return f(*args, **kwargs)

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>, msgid = 8, 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/lib64/python3.6/site-packages/ldap/ldapobject.py:749:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (8, 1, -1)
kwargs = {'add_ctrls': 0, 'add_extop': 0, 'add_intermediates': 0, 'resp_ctrl_classes': None}

def inner(*args, **kwargs):
if name == 'result':
objtype, data = f(*args, **kwargs)
# data is either a 2-tuple or a list of 2-tuples
# print data
if data:
if isinstance(data, tuple):
return objtype, Entry(data)
elif isinstance(data, list):
# AD sends back these search references
# if objtype == ldap.RES_SEARCH_RESULT and \
# isinstance(data[-1],tuple) and \
# not data[-1][0]:
# print "Received search reference: "
# pprint.pprint(data[-1][1])
# data.pop() # remove the last non-entry element

return objtype, [Entry(x) for x in data]
else:
raise TypeError("unknown data type %s returned by result" %
type(data))
else:
return objtype, data
elif name.startswith('add'):
# the first arg is self
# the second and third arg are the dn and the data to send
# We need to convert the Entry into the format used by
# python-ldap
ent = args[0]
if isinstance(ent, Entry):
return f(ent.dn, ent.toTupleList(), *args[2:])
else:
return f(*args, **kwargs)
else:
> return f(*args, **kwargs)

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>, msgid = 8, 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/lib64/python3.6/site-packages/ldap/ldapobject.py:756:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (<built-in method result4 of LDAP object at 0x7f20de444af8>, 8, 1, -1, 0, 0, ...)
kwargs = {}

def inner(*args, **kwargs):
if name == 'result':
objtype, data = f(*args, **kwargs)
# data is either a 2-tuple or a list of 2-tuples
# print data
if data:
if isinstance(data, tuple):
return objtype, Entry(data)
elif isinstance(data, list):
# AD sends back these search references
# if objtype == ldap.RES_SEARCH_RESULT and \
# isinstance(data[-1],tuple) and \
# not data[-1][0]:
# print "Received search reference: "
# pprint.pprint(data[-1][1])
# data.pop() # remove the last non-entry element

return objtype, [Entry(x) for x in data]
else:
raise TypeError("unknown data type %s returned by result" %
type(data))
else:
return objtype, data
elif name.startswith('add'):
# the first arg is self
# the second and third arg are the dn and the data to send
# We need to convert the Entry into the format used by
# python-ldap
ent = args[0]
if isinstance(ent, Entry):
return f(ent.dn, ent.toTupleList(), *args[2:])
else:
return f(*args, **kwargs)
else:
> return f(*args, **kwargs)

/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>
func = <built-in method result4 of LDAP object at 0x7f20de444af8>
args = (8, 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/lib64/python3.6/site-packages/ldap/ldapobject.py:329:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

exc_type = <class 'ldap.UNWILLING_TO_PERFORM'>
exc_value = UNWILLING_TO_PERFORM({'desc': 'Server is unwilling to perform', 'info': 'RootDN access control violation'},)
exc_traceback = <traceback object at 0x7f20eeb9c948>

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/lib64/python3.6/site-packages/ldap/compat.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de6bf748>
func = <built-in method result4 of LDAP object at 0x7f20de444af8>
args = (8, 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.UNWILLING_TO_PERFORM: {'desc': 'Server is unwilling to perform', 'info': 'RootDN access control violation'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: UNWILLING_TO_PERFORM

During handling of the above exception, another exception occurred:

topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee8d6400>

def test_rootdn_access_allowed_host(topology_st):
'''
Test allowed ip feature
'''

log.info('Running test_rootdn_access_allowed_host...')

#
# Set allowed host to an unknown host - blocks the Root DN
#
try:
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_REPLACE, 'rootdn-allow-host', b'i.dont.exist.com')])
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_allowed_host: Failed to set allowed host: error {}'
.format(e))
assert False

#
# Bind as Root DN - should fail
#
try:
topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
succeeded = True
except ldap.LDAPError as e:
succeeded = False

if succeeded:
log.fatal('test_rootdn_access_allowed_host: Root DN was incorrectly able to bind')
assert False

#
# Allow localhost
#
try:
topology_st.standalone.simple_bind_s(USER1_DN, PASSWORD)
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_allowed_host: : failed to bind as user1')
assert False

hostname = socket.gethostname()
localhost = DirSrvTools.getLocalhost()
try:
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_DELETE,
'rootdn-allow-host',
None)])
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_ADD,
'rootdn-allow-host',
ensure_bytes(localhost))])
if hostname != localhost:
topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_ADD,
'rootdn-allow-host',
ensure_bytes(hostname))])
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_allowed_host: Failed to set allowed host: error {}'
.format(e))
assert False

try:
topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_allowed_host: Root DN bind failed unexpectedly failed: error {}'
.format(e))
> assert False
E assert False

suites/plugins/rootdn_plugin_test.py:553: AssertionError
----------------------------- Captured stderr call -----------------------------
INFO:tests.suites.plugins.rootdn_plugin_test:Running test_rootdn_access_allowed_host... CRITICAL:tests.suites.plugins.rootdn_plugin_test:test_rootdn_access_allowed_host: Root DN bind failed unexpectedly failed: error {'desc': 'Server is unwilling to perform', 'info': 'RootDN access control violation'} ------------------------------ Captured log call -------------------------------
rootdn_plugin_test.py 496 INFO Running test_rootdn_access_allowed_host... rootdn_plugin_test.py 552 CRITICAL test_rootdn_access_allowed_host: Root DN bind failed unexpectedly failed: error {'desc': 'Server is unwilling to perform', 'info': 'RootDN access control violation'}
Failed suites/replication/cleanallruv_test.py::test_abort_restart 14.78
topology_m4 = <lib389.topologies.TopologyMain object at 0x7f20da20e710>
m4rid = '5'

def test_abort_restart(topology_m4, m4rid):
"""Test the abort task can handle a restart, and then resume

:id: b66e33d4-fe85-4e1c-b882-75da80f70ab3
:setup: Replication setup with four masters
:steps:
1. Disable replication on master 4
2. Remove agreements to master 4 from other masters
3. Stop master 3
4. Run a cleanallruv task on master 1
5. Run a cleanallruv abort task on master 1
6. Restart master 1
7. Make sure that no crash happened
8. Start master 3
9. Check master 1 does not have the clean task running
10. Check that errors log doesn't have 'Aborting abort task' message
:expectedresults:
1. Replication on master 4 should be disabled
2. Agreements to master 4 should be removed
3. Master 3 should be stopped
4. Operation should be successful
5. Operation should be successful
6. Master 1 should be restarted
7. No crash should happened
8. Master 3 should be started
9. Check master 1 shouldn't have the clean task running
10. Errors log shouldn't have 'Aborting abort task' message
"""

log.info('Running test_abort_restart...')
# Remove the agreements from the other masters that point to master 4
remove_master4_agmts("test_abort", topology_m4)

# Stop master 3
log.info('test_abort_restart: stop master 3 to freeze the cleanAllRUV task...')
topology_m4.ms["master3"].stop()

# Run the task
log.info('test_abort_restart: add the cleanAllRUV task...')
cruv_task = CleanAllRUVTask(topology_m4.ms["master1"])
cruv_task.create(properties={
'replica-id': m4rid,
'replica-base-dn': DEFAULT_SUFFIX
})
# Wait a bit
time.sleep(2)

# Abort the task
abort_task = cruv_task.abort()

# Check master 1 does not have the clean task running
log.info('test_abort_abort: check master 1 no longer has a cleanAllRUV task...')
if not task_done(topology_m4, cruv_task.dn):
log.fatal('test_abort_restart: CleanAllRUV task was not aborted')
assert False

# Now restart master 1, and make sure the abort process completes
topology_m4.ms["master1"].restart()
if topology_m4.ms["master1"].detectDisorderlyShutdown():
log.fatal('test_abort_restart: Master 1 previously crashed!')
assert False

# Start master 3
topology_m4.ms["master3"].start()

# Check master 1 tried to run abort task. We expect the abort task to be aborted.
if not topology_m4.ms["master1"].searchErrorsLog('Aborting abort task'):
log.fatal('test_abort_restart: Abort task did not restart')
> assert False
E assert False

suites/replication/cleanallruv_test.py:453: AssertionError
---------------------------- Captured stderr setup -----------------------------
DEBUG:tests.suites.replication.cleanallruv_test:-------------- BEGIN RESET of m4 ----------------- INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39003 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39004 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39003 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39004 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39003 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39003 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39003 to ldap://server.example.com:39004 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39004 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39004 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39004 to ldap://server.example.com:39003 is working DEBUG:tests.suites.replication.cleanallruv_test:-------------- FINISH RESET of m4 ----------------- ------------------------------ Captured log setup ------------------------------
cleanallruv_test.py 141 DEBUG -------------- BEGIN RESET of m4 ----------------- replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39003 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39004 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39003 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39004 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39003 to ldap://server.example.com:39001 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39003 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39003 to ldap://server.example.com:39004 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39004 to ldap://server.example.com:39001 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39004 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39004 to ldap://server.example.com:39003 is working cleanallruv_test.py 162 DEBUG -------------- FINISH RESET of m4 ---------------------------------------------- Captured stderr call -----------------------------
INFO:tests.suites.replication.cleanallruv_test:Running test_abort_restart... INFO:tests.suites.replication.cleanallruv_test:test_abort: remove all the agreements to master 4... INFO:tests.suites.replication.cleanallruv_test:test_abort_restart: stop master 3 to freeze the cleanAllRUV task... INFO:tests.suites.replication.cleanallruv_test:test_abort_restart: add the cleanAllRUV task... INFO:tests.suites.replication.cleanallruv_test:test_abort_abort: check master 1 no longer has a cleanAllRUV task... CRITICAL:tests.suites.replication.cleanallruv_test:test_abort_restart: Abort task did not restart ------------------------------ Captured log call -------------------------------
cleanallruv_test.py 414 INFO Running test_abort_restart... cleanallruv_test.py 67 INFO test_abort: remove all the agreements to master 4... cleanallruv_test.py 419 INFO test_abort_restart: stop master 3 to freeze the cleanAllRUV task... cleanallruv_test.py 423 INFO test_abort_restart: add the cleanAllRUV task... cleanallruv_test.py 436 INFO test_abort_abort: check master 1 no longer has a cleanAllRUV task... cleanallruv_test.py 452 CRITICAL test_abort_restart: Abort task did not restart
Failed suites/replication/cleanallruv_test.py::test_abort_certify 132.12
topology_m4 = <lib389.topologies.TopologyMain object at 0x7f20da20e710>
m4rid = '5'

def test_abort_certify(topology_m4, m4rid):
"""Test the abort task with a replica-certify-all option

:id: 78959966-d644-44a8-b98c-1fcf21b45eb0
:setup: Replication setup with four masters
:steps:
1. Disable replication on master 4
2. Remove agreements to master 4 from other masters
3. Stop master 2
4. Run a cleanallruv task on master 1
5. Run a cleanallruv abort task on master 1 with a replica-certify-all option
:expectedresults: No hanging tasks left
1. Replication on master 4 should be disabled
2. Agreements to master 4 should be removed
3. Master 2 should be stopped
4. Operation should be successful
5. Operation should be successful
"""

log.info('Running test_abort_certify...')

# Remove the agreements from the other masters that point to master 4
remove_master4_agmts("test_abort_certify", topology_m4)

# Stop master 2
log.info('test_abort_certify: stop master 2 to freeze the cleanAllRUV task...')
topology_m4.ms["master2"].stop()

# Run the task
log.info('test_abort_certify: add the cleanAllRUV task...')
cruv_task = CleanAllRUVTask(topology_m4.ms["master1"])
cruv_task.create(properties={
'replica-id': m4rid,
'replica-base-dn': DEFAULT_SUFFIX
})
# Wait a bit
time.sleep(2)

# Abort the task
log.info('test_abort_certify: abort the cleanAllRUV task...')
abort_task = cruv_task.abort(certify=True)

# Wait a while and make sure the abort task is still running
log.info('test_abort_certify: sleep for 5 seconds')
time.sleep(5)

if task_done(topology_m4, abort_task.dn, 60):
log.fatal('test_abort_certify: abort task incorrectly finished')
assert False

# Now start master 2 so it can be aborted
log.info('test_abort_certify: start master 2 to allow the abort task to finish...')
topology_m4.ms["master2"].start()

# Wait for the abort task to stop
if not task_done(topology_m4, abort_task.dn, 60):
log.fatal('test_abort_certify: The abort CleanAllRUV task was not aborted')
> assert False
E assert False

suites/replication/cleanallruv_test.py:515: AssertionError
---------------------------- Captured stderr setup -----------------------------
DEBUG:tests.suites.replication.cleanallruv_test:-------------- BEGIN RESET of m4 ----------------- INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39003 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39004 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39003 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39004 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39003 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39003 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39003 to ldap://server.example.com:39004 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39004 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39004 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39004 to ldap://server.example.com:39003 is working DEBUG:tests.suites.replication.cleanallruv_test:-------------- FINISH RESET of m4 ----------------- ------------------------------ Captured log setup ------------------------------
cleanallruv_test.py 141 DEBUG -------------- BEGIN RESET of m4 ----------------- replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39003 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39004 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39003 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39004 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39003 to ldap://server.example.com:39001 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39003 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39003 to ldap://server.example.com:39004 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39004 to ldap://server.example.com:39001 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39004 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39004 to ldap://server.example.com:39003 is working cleanallruv_test.py 162 DEBUG -------------- FINISH RESET of m4 ---------------------------------------------- Captured stderr call -----------------------------
INFO:tests.suites.replication.cleanallruv_test:Running test_abort_certify... INFO:tests.suites.replication.cleanallruv_test:test_abort_certify: remove all the agreements to master 4... INFO:tests.suites.replication.cleanallruv_test:test_abort_certify: stop master 2 to freeze the cleanAllRUV task... INFO:tests.suites.replication.cleanallruv_test:test_abort_certify: add the cleanAllRUV task... INFO:tests.suites.replication.cleanallruv_test:test_abort_certify: abort the cleanAllRUV task... INFO:tests.suites.replication.cleanallruv_test:test_abort_certify: sleep for 5 seconds INFO:tests.suites.replication.cleanallruv_test:test_abort_certify: start master 2 to allow the abort task to finish... CRITICAL:tests.suites.replication.cleanallruv_test:test_abort_certify: The abort CleanAllRUV task was not aborted ------------------------------ Captured log call -------------------------------
cleanallruv_test.py 477 INFO Running test_abort_certify... cleanallruv_test.py 67 INFO test_abort_certify: remove all the agreements to master 4... cleanallruv_test.py 483 INFO test_abort_certify: stop master 2 to freeze the cleanAllRUV task... cleanallruv_test.py 487 INFO test_abort_certify: add the cleanAllRUV task... cleanallruv_test.py 497 INFO test_abort_certify: abort the cleanAllRUV task... cleanallruv_test.py 501 INFO test_abort_certify: sleep for 5 seconds cleanallruv_test.py 509 INFO test_abort_certify: start master 2 to allow the abort task to finish... cleanallruv_test.py 514 CRITICAL test_abort_certify: The abort CleanAllRUV task was not aborted
Failed suites/replication/conflict_resolve_test.py::TestTwoMasters::()::test_memberof_groups 76.01
self = <tests.suites.replication.conflict_resolve_test.TestTwoMasters object at 0x7f20da22a0f0>
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20ee88e3c8>
test_base = <lib389.idm.nscontainer.nsContainer object at 0x7f20ee98e9b0>

def test_memberof_groups(self, topology_m2, test_base):
"""Check that conflict properly resolved for operations
with memberOf and groups

:id: 77f09b18-03d1-45da-940b-1ad2c2908eb3
:setup: Two master replication, test container for entries, enable plugin logging,
audit log, error log for replica and access log for internal
:steps:
1. Enable memberOf plugin
2. Add 30 users to m1 and wait for replication to happen
3. Pause replication
4. Create a group on m1 and m2
5. Create a group on m1 and m2, delete from m1
6. Create a group on m1, delete from m1, and create on m2,
7. Create a group on m2 and m1, delete from m1
8. Create two different groups on m2
9. Resume replication
10. Check that the entries on both masters are the same and replication is working
:expectedresults:
1. It should pass
2. It should pass
3. It should pass
4. It should pass
5. It should pass
6. It should pass
7. It should pass
8. It should pass
9. It should pass
10. It should pass
"""

M1 = topology_m2.ms["master1"]
M2 = topology_m2.ms["master2"]
test_users_m1 = UserAccounts(M1, test_base.dn, rdn=None)
test_groups_m1 = Groups(M1, test_base.dn, rdn=None)
test_groups_m2 = Groups(M2, test_base.dn, rdn=None)

repl = ReplicationManager(SUFFIX)

for inst in topology_m2.ms.values():
memberof = MemberOfPlugin(inst)
memberof.enable()
agmt = Agreements(inst).list()[0]
agmt.replace_many(('nsDS5ReplicatedAttributeListTotal',
'(objectclass=*) $ EXCLUDE '),
('nsDS5ReplicatedAttributeList',
'(objectclass=*) $ EXCLUDE memberOf'))
inst.restart()
user_dns = []
for user_num in range(10):
user_trio = []
for num in range(0, 30, 10):
user = _create_user(test_users_m1, 1200 + user_num + num)
user_trio.append(user.dn)
user_dns.append(user_trio)

repl.test_replication(M1, M2)
topology_m2.pause_all_replicas()

log.info("Check a simple conflict")
group_num = 0
_create_group(test_groups_m1, group_num, user_dns[group_num], sleep=True)
_create_group(test_groups_m2, group_num, user_dns[group_num], sleep=True)

log.info("Check a add - del")
group_num += 1
_create_group(test_groups_m1, group_num, user_dns[group_num], sleep=True)
_create_group(test_groups_m2, group_num, user_dns[group_num], sleep=True)
_delete_group(test_groups_m1, group_num)

group_num += 1
_create_group(test_groups_m1, group_num, user_dns[group_num])
_delete_group(test_groups_m1, group_num, sleep=True)
_create_group(test_groups_m2, group_num, user_dns[group_num])

group_num += 1
_create_group(test_groups_m2, group_num, user_dns[group_num], sleep=True)
_create_group(test_groups_m1, group_num, user_dns[group_num])
_delete_group(test_groups_m1, group_num, sleep=True)

group_num += 1
_create_group(test_groups_m2, group_num, user_dns[group_num])
group_num += 1
_create_group(test_groups_m2, group_num, user_dns[group_num])

topology_m2.resume_all_replicas()

> repl.test_replication_topology(topology_m2)

suites/replication/conflict_resolve_test.py:455:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/replica.py:1906: in test_replication_topology
self.test_replication(a, b, timeout)
/usr/local/lib/python3.6/site-packages/lib389/replica.py:1892: in test_replication
self.wait_for_replication(from_instance, to_instance, timeout)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.replica.ReplicationManager object at 0x7f20ee873828>
from_instance = <lib389.DirSrv object at 0x7f20ee7ea9b0>
to_instance = <lib389.DirSrv object at 0x7f20da20b470>, timeout = 20

def wait_for_replication(self, from_instance, to_instance, timeout=20):
"""Wait for a replication event to occur from instance to instance. This
shows some point of synchronisation has occured.

:param from_instance: The instance whos state we we want to check from
:type from_instance: lib389.DirSrv
:param to_instance: The instance whos state we want to check matches from.
:type to_instance: lib389.DirSrv
:param timeout: Fail after timeout seconds.
:type timeout: int

"""
# Touch something then wait_for_replication.
from_groups = Groups(from_instance, basedn=self._suffix, rdn=None)
to_groups = Groups(to_instance, basedn=self._suffix, rdn=None)
from_group = from_groups.get('replication_managers')
to_group = to_groups.get('replication_managers')

change = str(uuid.uuid4())

from_group.replace('description', change)

for i in range(0, timeout):
desc = to_group.get_attr_val_utf8('description')
if change == desc:
self._log.info("SUCCESS: Replication from %s to %s is working" % (from_instance.ldapuri, to_instance.ldapuri))
return True
time.sleep(1)
> raise Exception("Replication did not sync in time!")
E Exception: Replication did not sync in time!

/usr/local/lib/python3.6/site-packages/lib389/replica.py:1876: Exception
----------------------------- Captured stderr call -----------------------------
INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working INFO:tests.suites.replication.conflict_resolve_test:Check a simple conflict INFO:tests.suites.replication.conflict_resolve_test:Check a add - del ------------------------------ Captured log call -------------------------------
replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working conflict_resolve_test.py 427 INFO Check a simple conflict conflict_resolve_test.py 432 INFO Check a add - del
Failed suites/replication/conflict_resolve_test.py::TestTwoMasters::()::test_managed_entries 24.33
self = <tests.suites.replication.conflict_resolve_test.TestTwoMasters object at 0x7f20ee7eed30>
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20ee88e3c8>

def test_managed_entries(self, topology_m2):
"""Check that conflict properly resolved for operations
with managed entries

:id: 77f09b18-03d1-45da-940b-1ad2c2908eb4
:setup: Two master replication, test container for entries, enable plugin logging,
audit log, error log for replica and access log for internal
:steps:
1. Create ou=managed_users and ou=managed_groups under test container
2. Configure managed entries plugin and add a template to test container
3. Add a user to m1 and wait for replication to happen
4. Pause replication
5. Create a user on m1 and m2 with a same group ID on both master
6. Create a user on m1 and m2 with a different group ID on both master
7. Resume replication
8. Check that the entries on both masters are the same and replication is working
:expectedresults:
1. It should pass
2. It should pass
3. It should pass
4. It should pass
5. It should pass
6. It should pass
7. It should pass
8. It should pass
"""

M1 = topology_m2.ms["master1"]
M2 = topology_m2.ms["master2"]
repl = ReplicationManager(SUFFIX)

ous = OrganizationalUnits(M1, DEFAULT_SUFFIX)
ou_people = ous.create(properties={'ou': 'managed_people'})
ou_groups = ous.create(properties={'ou': 'managed_groups'})

test_users_m1 = UserAccounts(M1, DEFAULT_SUFFIX, rdn='ou={}'.format(ou_people.rdn))
test_users_m2 = UserAccounts(M2, DEFAULT_SUFFIX, rdn='ou={}'.format(ou_people.rdn))

# TODO: Refactor ManagedPlugin class functionality (also add configs and templates)
conts = nsContainers(M1, SUFFIX)
template = conts.create(properties={
'objectclass': 'top mepTemplateEntry extensibleObject'.split(),
'cn': 'MEP Template',
'mepRDNAttr': 'cn',
'mepStaticAttr': ['objectclass: posixGroup', 'objectclass: extensibleObject'],
'mepMappedAttr': ['cn: $uid', 'uid: $cn', 'gidNumber: $uidNumber']
})
> repl.test_replication(M1, M2)

suites/replication/conflict_resolve_test.py:508:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/replica.py:1892: in test_replication
self.wait_for_replication(from_instance, to_instance, timeout)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.replica.ReplicationManager object at 0x7f20ee7ee748>
from_instance = <lib389.DirSrv object at 0x7f20ee7ea9b0>
to_instance = <lib389.DirSrv object at 0x7f20da20b470>, timeout = 20

def wait_for_replication(self, from_instance, to_instance, timeout=20):
"""Wait for a replication event to occur from instance to instance. This
shows some point of synchronisation has occured.

:param from_instance: The instance whos state we we want to check from
:type from_instance: lib389.DirSrv
:param to_instance: The instance whos state we want to check matches from.
:type to_instance: lib389.DirSrv
:param timeout: Fail after timeout seconds.
:type timeout: int

"""
# Touch something then wait_for_replication.
from_groups = Groups(from_instance, basedn=self._suffix, rdn=None)
to_groups = Groups(to_instance, basedn=self._suffix, rdn=None)
from_group = from_groups.get('replication_managers')
to_group = to_groups.get('replication_managers')

change = str(uuid.uuid4())

from_group.replace('description', change)

for i in range(0, timeout):
desc = to_group.get_attr_val_utf8('description')
if change == desc:
self._log.info("SUCCESS: Replication from %s to %s is working" % (from_instance.ldapuri, to_instance.ldapuri))
return True
time.sleep(1)
> raise Exception("Replication did not sync in time!")
E Exception: Replication did not sync in time!

/usr/local/lib/python3.6/site-packages/lib389/replica.py:1876: Exception
Failed suites/replication/conflict_resolve_test.py::TestTwoMasters::()::test_nested_entries_with_children 28.23
self = <tests.suites.replication.conflict_resolve_test.TestTwoMasters object at 0x7f20ee8a44a8>
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20ee88e3c8>
test_base = <lib389.idm.nscontainer.nsContainer object at 0x7f20ee8a48d0>

def test_nested_entries_with_children(self, topology_m2, test_base):
"""Check that conflict properly resolved for operations
with nested entries with children

:id: 77f09b18-03d1-45da-940b-1ad2c2908eb5
:setup: Two master replication, test container for entries, enable plugin logging,
audit log, error log for replica and access log for internal
:steps:
1. Add 15 containers to m1 and wait for replication to happen
2. Pause replication
3. Create parent-child on master2 and master1
4. Create parent-child on master1 and master2
5. Create parent-child on master1 and master2 different child rdn
6. Create parent-child on master1 and delete parent on master2
7. Create parent on master1, delete it and parent-child on master2, delete them
8. Create parent on master1, delete it and parent-two children on master2
9. Create parent-two children on master1 and parent-child on master2, delete them
10. Create three subsets inside existing container entry, applying only part of changes on m2
11. Create more combinations of the subset with parent-child on m1 and parent on m2
12. Delete container on m1, modify user1 on m1, create parent on m2 and modify user2 on m2
13. Resume replication
14. Check that the entries on both masters are the same and replication is working
:expectedresults:
1. It should pass
2. It should pass
3. It should pass
4. It should pass
5. It should pass
6. It should pass
7. It should pass
8. It should pass
9. It should pass
10. It should pass
11. It should pass
12. It should pass
13. It should pass
14. It should pass
"""

M1 = topology_m2.ms["master1"]
M2 = topology_m2.ms["master2"]
repl = ReplicationManager(SUFFIX)
test_users_m1 = UserAccounts(M1, test_base.dn, rdn=None)
test_users_m2 = UserAccounts(M2, test_base.dn, rdn=None)
_create_user(test_users_m1, 4000)
_create_user(test_users_m1, 4001)

cont_list = []
for num in range(15):
cont = _create_container(M1, test_base.dn, 'sub{}'.format(num))
cont_list.append(cont)

> repl.test_replication(M1, M2)

suites/replication/conflict_resolve_test.py:590:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/replica.py:1892: in test_replication
self.wait_for_replication(from_instance, to_instance, timeout)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.replica.ReplicationManager object at 0x7f20de63a1d0>
from_instance = <lib389.DirSrv object at 0x7f20ee7ea9b0>
to_instance = <lib389.DirSrv object at 0x7f20da20b470>, timeout = 20

def wait_for_replication(self, from_instance, to_instance, timeout=20):
"""Wait for a replication event to occur from instance to instance. This
shows some point of synchronisation has occured.

:param from_instance: The instance whos state we we want to check from
:type from_instance: lib389.DirSrv
:param to_instance: The instance whos state we want to check matches from.
:type to_instance: lib389.DirSrv
:param timeout: Fail after timeout seconds.
:type timeout: int

"""
# Touch something then wait_for_replication.
from_groups = Groups(from_instance, basedn=self._suffix, rdn=None)
to_groups = Groups(to_instance, basedn=self._suffix, rdn=None)
from_group = from_groups.get('replication_managers')
to_group = to_groups.get('replication_managers')

change = str(uuid.uuid4())

from_group.replace('description', change)

for i in range(0, timeout):
desc = to_group.get_attr_val_utf8('description')
if change == desc:
self._log.info("SUCCESS: Replication from %s to %s is working" % (from_instance.ldapuri, to_instance.ldapuri))
return True
time.sleep(1)
> raise Exception("Replication did not sync in time!")
E Exception: Replication did not sync in time!

/usr/local/lib/python3.6/site-packages/lib389/replica.py:1876: Exception
Failed suites/replication/conflict_resolve_test.py::TestThreeMasters::()::test_nested_entries 107.75
self = <tests.suites.replication.conflict_resolve_test.TestThreeMasters object at 0x7f20de6352e8>
topology_m3 = <lib389.topologies.TopologyMain object at 0x7f20da231ac8>
test_base_m3 = <lib389.idm.nscontainer.nsContainer object at 0x7f20de608668>

def test_nested_entries(self, topology_m3, test_base_m3):
"""Check that conflict properly resolved for operations
with nested entries with children

:id: 77f09b18-03d1-45da-940b-1ad2c2908eb6
:setup: Three master replication, test container for entries, enable plugin logging,
audit log, error log for replica and access log for internal
:steps:
1. Add 15 containers to m1 and wait for replication to happen
2. Pause replication
3. Create two child entries under each of two entries
4. Create three child entries under each of three entries
5. Create two parents on m1 and m2, then on m1 - create a child and delete one parent,
on m2 - delete one parent and create a child
6. Test a few more parent-child combinations with three instances
7. Resume replication
8. Check that the entries on both masters are the same and replication is working
:expectedresults:
1. It should pass
2. It should pass
3. It should pass
4. It should pass
5. It should pass
6. It should pass
7. It should pass
8. It should pass
"""

M1 = topology_m3.ms["master1"]
M2 = topology_m3.ms["master2"]
M3 = topology_m3.ms["master3"]
repl = ReplicationManager(SUFFIX)

cont_list = []
for num in range(11):
cont = _create_container(M1, test_base_m3.dn, 'sub{}'.format(num))
cont_list.append(cont)

repl.test_replication(M1, M2)
repl.test_replication(M1, M3)

topology_m3.pause_all_replicas()

log.info("Create two child entries under each of two entries")
cont_num = -1
for num in range(2):
cont_num += 1
_create_container(M1, cont_list[cont_num].dn, 'p0', sleep=True)
_create_container(M2, cont_list[cont_num].dn, 'p1', sleep=True)

log.info("Create three child entries under each of three entries")
for num in range(3):
cont_num += 1
_create_container(M1, cont_list[cont_num].dn, 'p0', sleep=True)
_create_container(M2, cont_list[cont_num].dn, 'p1', sleep=True)
_create_container(M3, cont_list[cont_num].dn, 'p2', sleep=True)

log.info("Create two parents on m1 and m2, then on m1 - create a child and delete one parent,"
"on m2 - delete one parent and create a child")
for inst1, inst2 in ((M1, M2), (M2, M1)):
cont_num += 1
cont_p_m1_1 = _create_container(inst1, cont_list[cont_num].dn, 'p0')
cont_p_m1_2 = _create_container(inst1, cont_list[cont_num].dn, 'p1', sleep=True)
cont_p_m2_1 = _create_container(inst2, cont_list[cont_num].dn, 'p0')
cont_p_m2_2 = _create_container(inst2, cont_list[cont_num].dn, 'p1', sleep=True)
_create_container(inst1, cont_p_m1_1.dn, 'c0', sleep=True)
_delete_container(cont_p_m2_1, sleep=True)
_delete_container(cont_p_m1_2, sleep=True)
_create_container(inst2, cont_p_m2_2.dn, 'c0', sleep=True)

log.info("Test a few more parent-child combinations on three instances")
for inst1, inst2, inst3 in ((M1, M2, M3), (M2, M1, M3), (M3, M1, M2)):
cont_num += 1
cont_p_m1 = _create_container(inst1, cont_list[cont_num].dn, 'p0')
_delete_container(cont_p_m1, sleep=True)

cont_p_m2 = _create_container(inst2, cont_list[cont_num].dn, 'p0')
cont_c_m2 = _create_container(inst2, cont_p_m2.dn, 'c0')
_delete_container(cont_c_m2)
_delete_container(cont_p_m2, sleep=True)

cont_p_m3 = _create_container(inst3, cont_list[cont_num].dn, 'p0')
_create_container(inst3, cont_p_m3.dn, 'c0')
_create_container(inst3, cont_p_m3.dn, 'c1', sleep=True)

topology_m3.resume_all_replicas()

> repl.test_replication_topology(topology_m3)

suites/replication/conflict_resolve_test.py:847:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/replica.py:1906: in test_replication_topology
self.test_replication(a, b, timeout)
/usr/local/lib/python3.6/site-packages/lib389/replica.py:1892: in test_replication
self.wait_for_replication(from_instance, to_instance, timeout)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.replica.ReplicationManager object at 0x7f20de608ac8>
from_instance = <lib389.DirSrv object at 0x7f20ee9a33c8>
to_instance = <lib389.DirSrv object at 0x7f20de635208>, timeout = 20

def wait_for_replication(self, from_instance, to_instance, timeout=20):
"""Wait for a replication event to occur from instance to instance. This
shows some point of synchronisation has occured.

:param from_instance: The instance whos state we we want to check from
:type from_instance: lib389.DirSrv
:param to_instance: The instance whos state we want to check matches from.
:type to_instance: lib389.DirSrv
:param timeout: Fail after timeout seconds.
:type timeout: int

"""
# Touch something then wait_for_replication.
from_groups = Groups(from_instance, basedn=self._suffix, rdn=None)
to_groups = Groups(to_instance, basedn=self._suffix, rdn=None)
from_group = from_groups.get('replication_managers')
to_group = to_groups.get('replication_managers')

change = str(uuid.uuid4())

from_group.replace('description', change)

for i in range(0, timeout):
desc = to_group.get_attr_val_utf8('description')
if change == desc:
self._log.info("SUCCESS: Replication from %s to %s is working" % (from_instance.ldapuri, to_instance.ldapuri))
return True
time.sleep(1)
> raise Exception("Replication did not sync in time!")
E Exception: Replication did not sync in time!

/usr/local/lib/python3.6/site-packages/lib389/replica.py:1876: Exception
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists OK group dirsrv exists OK user dirsrv exists OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Instance with parameters {'ldap-port': 39003, 'ldap-secureport': 63703, 'server-id': 'master3', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Creating replication topology. INFO:lib389.topologies:Joining master master2 to master1 ... INFO:lib389.replica:SUCCESS: bootstrap to ldap://server.example.com:39002 completed INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 INFO:lib389.topologies:Joining master master3 to master1 ... INFO:lib389.replica:SUCCESS: bootstrap to ldap://server.example.com:39003 completed INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39003 is was created INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39003 to ldap://server.example.com:39001 is was created INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39003 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39003 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39003 INFO:lib389.topologies:Ensuring master master1 to master2 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists INFO:lib389.topologies:Ensuring master master1 to master3 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39003 already exists INFO:lib389.topologies:Ensuring master master2 to master1 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists INFO:lib389.topologies:Ensuring master master2 to master3 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39003 is was created INFO:lib389.topologies:Ensuring master master3 to master1 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39003 to ldap://server.example.com:39001 already exists INFO:lib389.topologies:Ensuring master master3 to master2 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39003 to ldap://server.example.com:39002 is was created ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. topologies.py 106 INFO Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. topologies.py 106 INFO Instance with parameters {'ldap-port': 39003, 'ldap-secureport': 63703, 'server-id': 'master3', 'suffix': 'dc=example,dc=com'} was created. topologies.py 139 INFO Creating replication topology. topologies.py 153 INFO Joining master master2 to master1 ... replica.py 1461 INFO SUCCESS: bootstrap to ldap://server.example.com:39002 completed replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working replica.py 1530 INFO SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 topologies.py 153 INFO Joining master master3 to master1 ... replica.py 1461 INFO SUCCESS: bootstrap to ldap://server.example.com:39003 completed replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39003 is was created replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39003 to ldap://server.example.com:39001 is was created replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39003 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39003 to ldap://server.example.com:39001 is working replica.py 1530 INFO SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39003 topologies.py 161 INFO Ensuring master master1 to master2 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists topologies.py 161 INFO Ensuring master master1 to master3 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39003 already exists topologies.py 161 INFO Ensuring master master2 to master1 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists topologies.py 161 INFO Ensuring master master2 to master3 ... replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39003 is was created topologies.py 161 INFO Ensuring master master3 to master1 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39003 to ldap://server.example.com:39001 already exists topologies.py 161 INFO Ensuring master master3 to master2 ... replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39003 to ldap://server.example.com:39002 is was created----------------------------- Captured stderr call -----------------------------
INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39003 is working INFO:tests.suites.replication.conflict_resolve_test:Create two child entries under each of two entries INFO:tests.suites.replication.conflict_resolve_test:Create three child entries under each of three entries INFO:tests.suites.replication.conflict_resolve_test:Create two parents on m1 and m2, then on m1 - create a child and delete one parent,on m2 - delete one parent and create a child INFO:tests.suites.replication.conflict_resolve_test:Test a few more parent-child combinations on three instances INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39003 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39003 is working ------------------------------ Captured log call -------------------------------
replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39003 is working conflict_resolve_test.py 803 INFO Create two child entries under each of two entries conflict_resolve_test.py 810 INFO Create three child entries under each of three entries conflict_resolve_test.py 817 INFO Create two parents on m1 and m2, then on m1 - create a child and delete one parent,on m2 - delete one parent and create a child conflict_resolve_test.py 830 INFO Test a few more parent-child combinations on three instances replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39003 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39003 is working
Failed suites/replication/encryption_cl5_test.py::test_algorithm_unhashed[AES] 2.43
topology_with_tls = <lib389.topologies.TopologyMain object at 0x7f20ee7b4828>
encryption = 'AES'

@pytest.mark.parametrize("encryption", ["AES", "3DES"])
def test_algorithm_unhashed(topology_with_tls, encryption):
"""Check encryption algowithm AES and 3DES.
And check unhashed#user#password attribute for encryption.

:id: b7a37bf8-4b2e-4dbd-9891-70117d67558c
:setup: Replication with two masters and SSL configured.
:steps: 1. Enable changelog encrytion on master1 (try AES and 3DES).
2. Add a user to master1/master2
3. Run dbscan -f on m1 to check unhashed#user#password
attribute is encrypted.
4. Run dbscan -f on m2 to check unhashed#user#password
attribute is in cleartext.
5. Modify password in master2/master1
6. Run dbscan -f on m1 to check unhashed#user#password
attribute is encrypted.
7. Run dbscan -f on m2 to check unhashed#user#password
attribute is in cleartext.
:expectedresults:
1. It should pass
2. It should pass
3. It should pass
4. It should pass
5. It should pass
6. It should pass
7. It should pass
"""

m1 = topology_with_tls.ms['master1']
m2 = topology_with_tls.ms['master2']
test_passw = 'm2Test199'

> _enable_changelog_encryption(m1, encryption)

suites/replication/encryption_cl5_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
suites/replication/encryption_cl5_test.py:49: in _enable_changelog_encryption
inst.start()
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:1197: in start
"dirsrv@%s" % self.serverid])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

popenargs = (['/usr/bin/systemctl', 'start', 'dirsrv@master1'],), kwargs = {}
retcode = 1, cmd = ['/usr/bin/systemctl', 'start', 'dirsrv@master1']

def check_call(*popenargs, **kwargs):
"""Run command with arguments. Wait for command to complete. If
the exit code was zero then return, otherwise raise
CalledProcessError. The CalledProcessError object will have the
return code in the returncode attribute.

The arguments are the same as for the call function. Example:

check_call(["ls", "-l"])
"""
retcode = call(*popenargs, **kwargs)
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E subprocess.CalledProcessError: Command '['/usr/bin/systemctl', 'start', 'dirsrv@master1']' returned non-zero exit status 1.

/usr/lib64/python3.6/subprocess.py:291: CalledProcessError
---------------------------- Captured stdout setup -----------------------------
Instance slapd-master1 removed. Instance slapd-master2 removed. Instance slapd-master3 removed. OK group dirsrv exists OK user dirsrv exists OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Creating replication topology. INFO:lib389.topologies:Joining master master2 to master1 ... INFO:lib389.replica:SUCCESS: bootstrap to ldap://server.example.com:39002 completed INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 INFO:lib389.topologies:Ensuring master master1 to master2 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists INFO:lib389.topologies:Ensuring master master2 to master1 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists INFO:lib389.replica:SUCCESS: Replication from ldaps://server.example.com:63701 to ldaps://server.example.com:63702 is working ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. topologies.py 106 INFO Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. topologies.py 139 INFO Creating replication topology. topologies.py 153 INFO Joining master master2 to master1 ... replica.py 1461 INFO SUCCESS: bootstrap to ldap://server.example.com:39002 completed replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working replica.py 1530 INFO SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 topologies.py 161 INFO Ensuring master master1 to master2 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists topologies.py 161 INFO Ensuring master master2 to master1 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists replica.py 1873 INFO SUCCESS: Replication from ldaps://server.example.com:63701 to ldaps://server.example.com:63702 is working----------------------------- Captured stderr call -----------------------------
INFO:tests.suites.replication.encryption_cl5_test:Configuring changelog encryption:master1 for: AES Job for dirsrv@master1.service failed because the control process exited with error code. See "systemctl status dirsrv@master1.service" and "journalctl -xe" for details. ------------------------------ Captured log call -------------------------------
encryption_cl5_test.py 44 INFO Configuring changelog encryption:master1 for: AES
Failed suites/replication/encryption_cl5_test.py::test_algorithm_unhashed[3DES] 0.18
topology_with_tls = <lib389.topologies.TopologyMain object at 0x7f20ee7b4828>
encryption = '3DES'

@pytest.mark.parametrize("encryption", ["AES", "3DES"])
def test_algorithm_unhashed(topology_with_tls, encryption):
"""Check encryption algowithm AES and 3DES.
And check unhashed#user#password attribute for encryption.

:id: b7a37bf8-4b2e-4dbd-9891-70117d67558c
:setup: Replication with two masters and SSL configured.
:steps: 1. Enable changelog encrytion on master1 (try AES and 3DES).
2. Add a user to master1/master2
3. Run dbscan -f on m1 to check unhashed#user#password
attribute is encrypted.
4. Run dbscan -f on m2 to check unhashed#user#password
attribute is in cleartext.
5. Modify password in master2/master1
6. Run dbscan -f on m1 to check unhashed#user#password
attribute is encrypted.
7. Run dbscan -f on m2 to check unhashed#user#password
attribute is in cleartext.
:expectedresults:
1. It should pass
2. It should pass
3. It should pass
4. It should pass
5. It should pass
6. It should pass
7. It should pass
"""

m1 = topology_with_tls.ms['master1']
m2 = topology_with_tls.ms['master2']
test_passw = 'm2Test199'

> _enable_changelog_encryption(m1, encryption)

suites/replication/encryption_cl5_test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
suites/replication/encryption_cl5_test.py:49: in _enable_changelog_encryption
inst.start()
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:1197: in start
"dirsrv@%s" % self.serverid])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

popenargs = (['/usr/bin/systemctl', 'start', 'dirsrv@master1'],), kwargs = {}
retcode = 1, cmd = ['/usr/bin/systemctl', 'start', 'dirsrv@master1']

def check_call(*popenargs, **kwargs):
"""Run command with arguments. Wait for command to complete. If
the exit code was zero then return, otherwise raise
CalledProcessError. The CalledProcessError object will have the
return code in the returncode attribute.

The arguments are the same as for the call function. Example:

check_call(["ls", "-l"])
"""
retcode = call(*popenargs, **kwargs)
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E subprocess.CalledProcessError: Command '['/usr/bin/systemctl', 'start', 'dirsrv@master1']' returned non-zero exit status 1.

/usr/lib64/python3.6/subprocess.py:291: CalledProcessError
----------------------------- Captured stderr call -----------------------------
INFO:tests.suites.replication.encryption_cl5_test:Configuring changelog encryption:master1 for: 3DES Job for dirsrv@master1.service failed because the control process exited with error code. See "systemctl status dirsrv@master1.service" and "journalctl -xe" for details. ------------------------------ Captured log call -------------------------------
encryption_cl5_test.py 44 INFO Configuring changelog encryption:master1 for: 3DES
Failed suites/replication/tombstone_test.py::test_purge_success 0.26
topology_m1 = <lib389.topologies.TopologyMain object at 0x7f20de3fef28>

def test_purge_success(topology_m1):
"""Verify that tombstones are created successfully

:id: adb86f50-ae76-4ed6-82b4-3cdc30ccab78
:setup: Standalone instance
:steps:
1. Enable replication to unexisting instance
2. Add an entry to the replicated suffix
3. Delete the entry
4. Check that tombstone entry exists (objectclass=nsTombstone)
:expectedresults: Tombstone entry exist
1. Operation should be successful
2. The entry should be successfully added
3. The entry should be successfully deleted
4. Tombstone entry should exist
"""
m1 = topology_m1.ms['master1']

users = UserAccounts(m1, DEFAULT_SUFFIX)
user = users.create(properties=TEST_USER_PROPERTIES)

tombstones = Tombstones(m1, DEFAULT_SUFFIX)

assert len(tombstones.list()) == 0

user.delete()

assert len(tombstones.list()) == 1
assert len(users.list()) == 0

ts = tombstones.get('testuser')
assert ts.exists()

if not ds_is_older('1.4.0'):
> ts.revive()

suites/replication/tombstone_test.py:52:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/tombstone.py:39: in revive
orig_dn = self.get_attr_val_utf8('nscpEntryDN')
/usr/local/lib/python3.6/site-packages/lib389/_mapped_object.py:528: in get_attr_val_utf8
return ensure_str(self.get_attr_val(key))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.tombstone.Tombstone object at 0x7f20de635940>
key = 'nscpEntryDN', use_json = False

def get_attr_val(self, key, use_json=False):
self._log.debug("%s getVal(%r)" % (self._dn, key))
# We might need to add a state check for NONE dn.
if self._instance.state != DIRSRV_STATE_ONLINE:
raise ValueError("Invalid state. Cannot get properties on instance that is not ONLINE")
# In the future, I plan to add a mode where if local == true, we
# can use get on dse.ldif to get values offline.
else:
> entry = self._instance.search_ext_s(self._dn, ldap.SCOPE_BASE, self._object_filter, attrlist=[key], serverctrls=self._server_controls, clientctrls=self._client_controls)[0]
E IndexError: list index out of range

/usr/local/lib/python3.6/site-packages/lib389/_mapped_object.py:494: IndexError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Creating replication topology. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. topologies.py 139 INFO Creating replication topology.
Failed suites/sasl/regression_test.py::test_openldap_no_nss_crypto 12.27
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20ee7ee780>

def test_openldap_no_nss_crypto(topology_m2):
"""Check that we allow usage of OpenLDAP libraries
that don't use NSS for crypto

:id: 0a622f3d-8ba5-4df2-a1de-1fb2237da40a
:setup: Replication with two masters:
master_1 ----- startTLS -----> master_2;
master_1 <-- TLS_clientAuth -- master_2;
nsslapd-extract-pemfiles set to 'on' on both masters
without specifying cert names
:steps:
1. Add 5 users to master 1 and 2
2. Check that the users were successfully replicated
3. Relocate PEM files on master 1
4. Check PEM files in master 1 config directory
5. Add 5 users more to master 1 and 2
6. Check that the users were successfully replicated
7. Export userRoot on master 1
:expectedresults:
1. Users should be successfully added
2. Users should be successfully replicated
3. Operation should be successful
4. PEM files should be found
5. Users should be successfully added
6. Users should be successfully replicated
7. Operation should be successful
"""

log.info("Ticket 47536 - Allow usage of OpenLDAP libraries that don't use NSS for crypto")

> create_keys_certs(topology_m2)

suites/sasl/regression_test.py:393:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
suites/sasl/regression_test.py:201: in create_keys_certs
enable_ssl(topology_m2.ms["master1"], M1LDAPSPORT, M1SERVERCERT)
suites/sasl/regression_test.py:61: in enable_ssl
'nsSSLActivation': 'on'})
/usr/local/lib/python3.6/site-packages/lib389/config.py:260: in create
super(RSA, self).create(properties=properties)
/usr/local/lib/python3.6/site-packages/lib389/_mapped_object.py:770: in create
return self._create(rdn, properties, basedn, ensure=False)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.config.RSA object at 0x7f20ee7f15c0>, rdn = None
properties = {'cn': ['RSA'], 'nsSSLActivation': ['on'], 'nsSSLPersonalitySSL': ['Server-Cert1'], 'nsSSLToken': ['internal (software)'], ...}
basedn = None, ensure = False

def _create(self, rdn=None, properties=None, basedn=None, ensure=False):
"""Internal implementation of create. This is used by ensure
and create, to prevent code duplication. You should *never* call
this method directly.
"""
assert(len(self._create_objectclasses) > 0)
basedn = ensure_str(basedn)
self._log.debug('Checking "%s" under %s : %s' % (rdn, basedn, properties))
# Add the objectClasses to the properties
(dn, valid_props) = self._validate(rdn, properties, basedn)
# Check if the entry exists or not? .add_s is going to error anyway ...
self._log.debug('Validated dn %s : valid_props %s' % (dn, valid_props))

exists = False

try:
self._instance.search_ext_s(dn, ldap.SCOPE_BASE, self._object_filter, attrsonly=1, serverctrls=self._server_controls, clientctrls=self._client_controls)
exists = True
except ldap.NO_SUCH_OBJECT:
pass

if exists and ensure:
# update properties
self._log.debug('Exists %s' % dn)
self._dn = dn
# Now use replace_many to setup our values
mods = []
for k,v in valid_props.items():
mods.append( (ldap.MOD_REPLACE, k, v))
self._instance.modify_ext_s(self._dn, mods, serverctrls=self._server_controls, clientctrls=self._client_controls)
elif exists and not ensure:
# raise "already exists."
> raise ldap.ALREADY_EXISTS("Entry %s already exists" % dn)
E ldap.ALREADY_EXISTS: Entry cn=RSA,cn=encryption,cn=config already exists

/usr/local/lib/python3.6/site-packages/lib389/_mapped_object.py:745: ALREADY_EXISTS
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Creating replication topology. INFO:lib389.topologies:Joining master master2 to master1 ... INFO:lib389.replica:SUCCESS: bootstrap to ldap://server.example.com:39002 completed INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 INFO:lib389.topologies:Ensuring master master1 to master2 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists INFO:lib389.topologies:Ensuring master master2 to master1 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. topologies.py 106 INFO Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. topologies.py 139 INFO Creating replication topology. topologies.py 153 INFO Joining master master2 to master1 ... replica.py 1461 INFO SUCCESS: bootstrap to ldap://server.example.com:39002 completed replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working replica.py 1530 INFO SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 topologies.py 161 INFO Ensuring master master1 to master2 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists topologies.py 161 INFO Ensuring master master2 to master1 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists----------------------------- Captured stdout call -----------------------------
Is this a CA certificate [y/N]? Enter the path length constraint, enter to skip [<0 for unlimited path]: > Is this a critical extension [y/N]? ----------------------------- Captured stderr call -----------------------------
INFO:tests.suites.sasl.regression_test:Ticket 47536 - Allow usage of OpenLDAP libraries that don't use NSS for crypto INFO:tests.suites.sasl.regression_test: ######################### Creating SSL Keys and Certs ###################### INFO:tests.suites.sasl.regression_test:##### shutdown master1 INFO:tests.suites.sasl.regression_test:##### Creating a password file INFO:tests.suites.sasl.regression_test:##### create the pin file INFO:tests.suites.sasl.regression_test:##### Creating a noise file INFO:tests.suites.sasl.regression_test:##### Create key3.db and cert8.db database (master1): ['certutil', '-N', '-d', '/etc/dirsrv/slapd-master1', '-f', '/etc/dirsrv/slapd-master1/pwdfile.txt'] INFO:tests.suites.sasl.regression_test: OUT: INFO:tests.suites.sasl.regression_test: ERR: INFO:tests.suites.sasl.regression_test:##### Creating encryption key for CA (master1): ['certutil', '-G', '-d', '/etc/dirsrv/slapd-master1', '-z', '/etc/dirsrv/slapd-master1/noise.txt', '-f', '/etc/dirsrv/slapd-master1/pwdfile.txt'] INFO:tests.suites.sasl.regression_test: OUT: INFO:tests.suites.sasl.regression_test: ERR: INFO:tests.suites.sasl.regression_test:##### Creating self-signed CA certificate (master1) -- nickname CAcertificate Generating key. This may take a few moments... INFO:tests.suites.sasl.regression_test:##### Creating Server certificate -- nickname Server-Cert1: ['certutil', '-S', '-n', 'Server-Cert1', '-s', 'CN=server.example.com,OU=389 Directory Server', '-c', 'CAcertificate', '-t', ',,', '-m', '1001', '-v', '120', '-d', '/etc/dirsrv/slapd-master1', '-z', '/etc/dirsrv/slapd-master1/noise.txt', '-f', '/etc/dirsrv/slapd-master1/pwdfile.txt'] INFO:tests.suites.sasl.regression_test: OUT: INFO:tests.suites.sasl.regression_test: ERR: INFO:tests.suites.sasl.regression_test:##### Creating Server certificate -- nickname Server-Cert2: ['certutil', '-S', '-n', 'Server-Cert2', '-s', 'CN=server.example.com,OU=390 Directory Server', '-c', 'CAcertificate', '-t', ',,', '-m', '1002', '-v', '120', '-d', '/etc/dirsrv/slapd-master1', '-z', '/etc/dirsrv/slapd-master1/noise.txt', '-f', '/etc/dirsrv/slapd-master1/pwdfile.txt'] INFO:tests.suites.sasl.regression_test: OUT: INFO:tests.suites.sasl.regression_test: ERR: INFO:tests.suites.sasl.regression_test:##### start master1 INFO:tests.suites.sasl.regression_test:##### enable SSL in master1 with all ciphers INFO:tests.suites.sasl.regression_test: ######################### Enabling SSL LDAPSPORT 41636 ###################### ------------------------------ Captured log call -------------------------------
regression_test.py 391 INFO Ticket 47536 - Allow usage of OpenLDAP libraries that don't use NSS for crypto regression_test.py 127 INFO ######################### Creating SSL Keys and Certs ###################### regression_test.py 134 INFO ##### shutdown master1 regression_test.py 137 INFO ##### Creating a password file regression_test.py 146 INFO ##### create the pin file regression_test.py 157 INFO ##### Creating a noise file regression_test.py 166 INFO ##### Create key3.db and cert8.db database (master1): ['certutil', '-N', '-d', '/etc/dirsrv/slapd-master1', '-f', '/etc/dirsrv/slapd-master1/pwdfile.txt'] regression_test.py 111 INFO OUT: regression_test.py 117 INFO ERR: regression_test.py 170 INFO ##### Creating encryption key for CA (master1): ['certutil', '-G', '-d', '/etc/dirsrv/slapd-master1', '-z', '/etc/dirsrv/slapd-master1/noise.txt', '-f', '/etc/dirsrv/slapd-master1/pwdfile.txt'] regression_test.py 111 INFO OUT: regression_test.py 117 INFO ERR: regression_test.py 176 INFO ##### Creating self-signed CA certificate (master1) -- nickname CAcertificate regression_test.py 184 INFO ##### Creating Server certificate -- nickname Server-Cert1: ['certutil', '-S', '-n', 'Server-Cert1', '-s', 'CN=server.example.com,OU=389 Directory Server', '-c', 'CAcertificate', '-t', ',,', '-m', '1001', '-v', '120', '-d', '/etc/dirsrv/slapd-master1', '-z', '/etc/dirsrv/slapd-master1/noise.txt', '-f', '/etc/dirsrv/slapd-master1/pwdfile.txt'] regression_test.py 111 INFO OUT: regression_test.py 117 INFO ERR: regression_test.py 192 INFO ##### Creating Server certificate -- nickname Server-Cert2: ['certutil', '-S', '-n', 'Server-Cert2', '-s', 'CN=server.example.com,OU=390 Directory Server', '-c', 'CAcertificate', '-t', ',,', '-m', '1002', '-v', '120', '-d', '/etc/dirsrv/slapd-master1', '-z', '/etc/dirsrv/slapd-master1/noise.txt', '-f', '/etc/dirsrv/slapd-master1/pwdfile.txt'] regression_test.py 111 INFO OUT: regression_test.py 117 INFO ERR: regression_test.py 197 INFO ##### start master1 regression_test.py 200 INFO ##### enable SSL in master1 with all ciphers regression_test.py 46 INFO ######################### Enabling SSL LDAPSPORT 41636 ######################
Failed tickets/ticket47462_test.py::test_ticket47462 0.00
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20ee9a3748>

def test_ticket47462(topology_m2):
"""
Test that AES properly replaces DES during an update/restart, and that
replication also works correctly.
"""

#
# First set config as if it's an older version. Set DES to use
# libdes-plugin, MMR to depend on DES, delete the existing AES plugin,
# and set a DES password for the replication agreement.
#
# Add an extra attribute to the DES plugin args
#
try:
topology_m2.ms["master1"].modify_s(DES_PLUGIN,
> [(ldap.MOD_REPLACE, 'nsslapd-pluginEnabled', 'on')])

tickets/ticket47462_test.py:47:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee7ea940>
func = <built-in method modify_ext of LDAP object at 0x7f20ee81b648>
args = ('cn=DES,cn=Password Storage Schemes,cn=plugins,cn=config', [(2, 'nsslapd-pluginEnabled', 'on')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'o')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Creating replication topology. INFO:lib389.topologies:Joining master master2 to master1 ... INFO:lib389.replica:SUCCESS: bootstrap to ldap://server.example.com:39002 completed INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 INFO:lib389.topologies:Ensuring master master1 to master2 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists INFO:lib389.topologies:Ensuring master master2 to master1 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. topologies.py 106 INFO Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. topologies.py 139 INFO Creating replication topology. topologies.py 153 INFO Joining master master2 to master1 ... replica.py 1461 INFO SUCCESS: bootstrap to ldap://server.example.com:39002 completed replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working replica.py 1530 INFO SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 topologies.py 161 INFO Ensuring master master1 to master2 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists topologies.py 161 INFO Ensuring master master2 to master1 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists
Failed tickets/ticket47560_test.py::test_ticket47560 0.13
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee9d35f8>

def test_ticket47560(topology_st):
"""
This test case does the following:
SETUP
- Create entry cn=group,SUFFIX
- Create entry cn=member,SUFFIX
- Update 'cn=member,SUFFIX' to add "memberOf: cn=group,SUFFIX"
- Enable Memberof Plugins

# Here the cn=member entry has a 'memberOf' but
# cn=group entry does not contain 'cn=member' in its member

TEST CASE
- start the fixupmemberof task
- read the cn=member entry
- check 'memberOf is now empty

TEARDOWN
- Delete entry cn=group,SUFFIX
- Delete entry cn=member,SUFFIX
- Disable Memberof Plugins
"""

def _enable_disable_mbo(value):
"""
Enable or disable mbo plugin depending on 'value' ('on'/'off')
"""
# enable/disable the mbo plugin
if value == 'on':
topology_st.standalone.plugins.enable(name=PLUGIN_MEMBER_OF)
else:
topology_st.standalone.plugins.disable(name=PLUGIN_MEMBER_OF)

log.debug("-------------> _enable_disable_mbo(%s)" % value)

topology_st.standalone.stop(timeout=120)
time.sleep(1)
topology_st.standalone.start(timeout=120)
time.sleep(3)

# need to reopen a connection toward the instance
topology_st.standalone.open()

def _test_ticket47560_setup():
"""
- Create entry cn=group,SUFFIX
- Create entry cn=member,SUFFIX
- Update 'cn=member,SUFFIX' to add "memberOf: cn=group,SUFFIX"
- Enable Memberof Plugins
"""
log.debug("-------- > _test_ticket47560_setup\n")

#
# By default the memberof plugin is disabled create
# - create a group entry
# - create a member entry
# - set the member entry as memberof the group entry
#
entry = Entry(group_DN)
entry.setValues('objectclass', 'top', 'groupOfNames', 'inetUser')
entry.setValues('cn', 'group')
try:
topology_st.standalone.add_s(entry)
except ldap.ALREADY_EXISTS:
log.debug("Entry %s already exists" % (group_DN))

entry = Entry(member_DN)
entry.setValues('objectclass', 'top', 'person', 'organizationalPerson', 'inetorgperson', 'inetUser')
entry.setValues('uid', 'member')
entry.setValues('cn', 'member')
entry.setValues('sn', 'member')
try:
topology_st.standalone.add_s(entry)
except ldap.ALREADY_EXISTS:
log.debug("Entry %s already exists" % (member_DN))

replace = [(ldap.MOD_REPLACE, 'memberof', group_DN)]
topology_st.standalone.modify_s(member_DN, replace)

#
# enable the memberof plugin and restart the instance
#
_enable_disable_mbo('on')

#
# check memberof attribute is still present
#
filt = 'uid=member'
ents = topology_st.standalone.search_s(member_DN, ldap.SCOPE_BASE, filt)
assert len(ents) == 1
ent = ents[0]
# print ent
value = ent.getValue('memberof')
# print "memberof: %s" % (value)
assert value == group_DN

def _test_ticket47560_teardown():
"""
- Delete entry cn=group,SUFFIX
- Delete entry cn=member,SUFFIX
- Disable Memberof Plugins
"""
log.debug("-------- > _test_ticket47560_teardown\n")
# remove the entries group_DN and member_DN
try:
topology_st.standalone.delete_s(group_DN)
except:
log.warning("Entry %s fail to delete" % (group_DN))
try:
topology_st.standalone.delete_s(member_DN)
except:
log.warning("Entry %s fail to delete" % (member_DN))
#
# disable the memberof plugin and restart the instance
#
_enable_disable_mbo('off')

group_DN = "cn=group,%s" % (SUFFIX)
member_DN = "uid=member,%s" % (SUFFIX)

#
# Initialize the test case
#
> _test_ticket47560_setup()

tickets/ticket47560_test.py:145:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47560_test.py:99: in _test_ticket47560_setup
topology_st.standalone.modify_s(member_DN, replace)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee5dd358>
func = <built-in method modify_ext of LDAP object at 0x7f20ee7523f0>
args = ('uid=member,dc=example,dc=com', [(2, 'memberof', 'cn=group,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.----------------------------- Captured stderr call -----------------------------
DEBUG:tests.tickets.ticket47560_test:-------- > _test_ticket47560_setup ------------------------------ Captured log call -------------------------------
ticket47560_test.py 72 DEBUG -------- > _test_ticket47560_setup
Failed tickets/ticket47573_test.py::test_ticket47573_one 0.00
topology_m1c1 = <lib389.topologies.TopologyMain object at 0x7f20ee9bb390>

def test_ticket47573_one(topology_m1c1):
"""
Summary: Add a custom OC with MUST and MAY
MUST = postalAddress $ preferredLocale
MAY = telexNumber $ postalCode $ street

Final state
- supplier +OCwithMayAttr
- consumer +OCwithMayAttr

"""
log.debug("test_ticket47573_one topology_m1c1 %r (master %r, consumer %r" % (
topology_m1c1, topology_m1c1.ms["master1"], topology_m1c1.cs["consumer1"]))
# update the schema of the supplier so that it is a superset of
# consumer. Schema should be pushed
new_oc = _oc_definition(2, 'OCwithMayAttr',
must=MUST_OLD,
may=MAY_OLD)
> topology_m1c1.ms["master1"].schema.add_schema('objectClasses', new_oc)

tickets/ticket47573_test.py:151:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/schema.py:102: in add_schema
self.conn.modify_s(DN_SCHEMA, [(ldap.MOD_ADD, attr, val)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee713d68>
func = <built-in method modify_ext of LDAP object at 0x7f20de3d3b48>
args = ('cn=schema', [(0, 'objectClasses', "( 1.2.3.4.5.6.7.8.9.10.2 NAME 'OCwithMayAttr' DESC 'To test ticket 47573' SUP person AUXILIARY MUST (postalAddress $ preferredLocale $ telexNumber) MAY (postalCode $ street) )")], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '(')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
DEBUG:tests.tickets.ticket47573_test:test_ticket47573_one topology_m1c1 <lib389.topologies.TopologyMain object at 0x7f20ee9bb390> (master <lib389.DirSrv object at 0x7f20ee713d68>, consumer <lib389.DirSrv object at 0x7f20de74ef98> ------------------------------ Captured log call -------------------------------
ticket47573_test.py 145 DEBUG test_ticket47573_one topology_m1c1 <lib389.topologies.TopologyMain object at 0x7f20ee9bb390> (master <lib389.DirSrv object at 0x7f20ee713d68>, consumer <lib389.DirSrv object at 0x7f20de74ef98>
Failed tickets/ticket47573_test.py::test_ticket47573_two 0.00
topology_m1c1 = <lib389.topologies.TopologyMain object at 0x7f20ee9bb390>

def test_ticket47573_two(topology_m1c1):
"""
Summary: Change OCwithMayAttr to move a MAY attribute to a MUST attribute


Final state
- supplier OCwithMayAttr updated
- consumer OCwithMayAttr updated

"""

# Update the objectclass so that a MAY attribute is moved to MUST attribute
mod_OC(topology_m1c1.ms["master1"], 2, 'OCwithMayAttr', old_must=MUST_OLD, new_must=MUST_NEW, old_may=MAY_OLD,
> new_may=MAY_NEW)

tickets/ticket47573_test.py:181:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47573_test.py:82: in mod_OC
instance.schema.del_schema('objectClasses', old_oc)
/usr/local/lib/python3.6/site-packages/lib389/schema.py:109: in del_schema
self.conn.modify_s(DN_SCHEMA, [(ldap.MOD_DELETE, attr, val)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee713d68>
func = <built-in method modify_ext of LDAP object at 0x7f20de3d3b48>
args = ('cn=schema', [(1, 'objectClasses', "( 1.2.3.4.5.6.7.8.9.10.2 NAME 'OCwithMayAttr' DESC 'To test ticket 47573' SUP person AUXILIARY MUST (postalAddress $ preferredLocale $ telexNumber) MAY (postalCode $ street) )")], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '(')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
Failed tickets/ticket47573_test.py::test_ticket47573_three 0.02
topology_m1c1 = <lib389.topologies.TopologyMain object at 0x7f20ee9bb390>

def test_ticket47573_three(topology_m1c1):
'''
Create a entry with OCwithMayAttr OC
'''
# Check replication is working fine
dn = "cn=ticket47573, %s" % SUFFIX
topology_m1c1.ms["master1"].add_s(Entry((dn,
{'objectclass': "top person OCwithMayAttr".split(),
'sn': 'test_repl',
'cn': 'test_repl',
'postalAddress': 'here',
'preferredLocale': 'en',
'telexNumber': '12$us$21',
> 'postalCode': '54321'})))

tickets/ticket47573_test.py:212:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee713d68>
func = <built-in method result4 of LDAP object at 0x7f20de3d3b48>
args = (45, 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.OBJECT_CLASS_VIOLATION: {'desc': 'Object class violation', 'info': 'unknown object class "OCwithMayAttr"\n'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: OBJECT_CLASS_VIOLATION
Failed tickets/ticket47640_test.py::test_ticket47640 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20de608ba8>

def test_ticket47640(topology_st):
'''
Linked Attrs Plugins - verify that if the plugin fails to update the link entry
that the entire operation is aborted
'''

# Enable Dynamic plugins, and the linked Attrs plugin
try:
> topology_st.standalone.modify_s(DN_CONFIG, [(ldap.MOD_REPLACE, 'nsslapd-dynamic-plugins', 'on')])

tickets/ticket47640_test.py:31:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee8346d8>
func = <built-in method modify_ext of LDAP object at 0x7f20de3d3580>
args = ('cn=config', [(2, 'nsslapd-dynamic-plugins', 'on')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'o')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.
Failed tickets/ticket47653MMR_test.py::test_ticket47653_init 0.00
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20d804cc18>

def test_ticket47653_init(topology_m2):
"""
It adds
- Objectclass with MAY 'member'
- an entry ('bind_entry') with which we bind to test the 'SELFDN' operation
It deletes the anonymous aci

"""

topology_m2.ms["master1"].log.info("Add %s that allows 'member' attribute" % OC_NAME)
new_oc = _oc_definition(2, OC_NAME, must=MUST, may=MAY)
> topology_m2.ms["master1"].schema.add_schema('objectClasses', new_oc)

tickets/ticket47653MMR_test.py:73:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/schema.py:102: in add_schema
self.conn.modify_s(DN_SCHEMA, [(ldap.MOD_ADD, attr, val)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de3e8dd8>
func = <built-in method modify_ext of LDAP object at 0x7f20dc2809e0>
args = ('cn=schema', [(0, 'objectClasses', "( 1.2.3.4.5.6.7.8.9.10.2 NAME 'OCticket47653' DESC 'To test ticket 47490' SUP person AUXILIARY MUST (postalAddress $ postalCode) MAY (member $ street) )")], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '(')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Creating replication topology. INFO:lib389.topologies:Joining master master2 to master1 ... INFO:lib389.replica:SUCCESS: bootstrap to ldap://server.example.com:39002 completed INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 INFO:lib389.topologies:Ensuring master master1 to master2 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists INFO:lib389.topologies:Ensuring master master2 to master1 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. topologies.py 106 INFO Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. topologies.py 139 INFO Creating replication topology. topologies.py 153 INFO Joining master master2 to master1 ... replica.py 1461 INFO SUCCESS: bootstrap to ldap://server.example.com:39002 completed replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working replica.py 1530 INFO SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 topologies.py 161 INFO Ensuring master master1 to master2 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists topologies.py 161 INFO Ensuring master master2 to master1 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists----------------------------- Captured stderr call -----------------------------
INFO:lib389:Add OCticket47653 that allows 'member' attribute ------------------------------ Captured log call -------------------------------
ticket47653MMR_test.py 71 INFO Add OCticket47653 that allows 'member' attribute
Failed tickets/ticket47653MMR_test.py::test_ticket47653_add 0.00
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20d804cc18>

def test_ticket47653_add(topology_m2):
'''
This test ADD an entry on MASTER1 where 47653 is fixed. Then it checks that entry is replicated
on MASTER2 (even if on MASTER2 47653 is NOT fixed). Then update on MASTER2 and check the update on MASTER1

It checks that, bound as bind_entry,
- we can not ADD an entry without the proper SELFDN aci.
- with the proper ACI we can not ADD with 'member' attribute
- with the proper ACI and 'member' it succeeds to ADD
'''
topology_m2.ms["master1"].log.info("\n\n######################### ADD ######################\n")

# bind as bind_entry
topology_m2.ms["master1"].log.info("Bind as %s" % BIND_DN)
> topology_m2.ms["master1"].simple_bind_s(BIND_DN, BIND_PW)

tickets/ticket47653MMR_test.py:117:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:444: in simple_bind_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de3e8dd8>
func = <built-in method result4 of LDAP object at 0x7f20dc2809e0>
args = (55, 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.INVALID_CREDENTIALS: {'desc': 'Invalid credentials'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: INVALID_CREDENTIALS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ######################### ADD ###################### INFO:lib389:Bind as cn=bind_entry, dc=example,dc=com ------------------------------ Captured log call -------------------------------
ticket47653MMR_test.py 113 INFO ######################### ADD ###################### ticket47653MMR_test.py 116 INFO Bind as cn=bind_entry, dc=example,dc=com
Failed tickets/ticket47653MMR_test.py::test_ticket47653_modify 0.00
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20d804cc18>

def test_ticket47653_modify(topology_m2):
'''
This test MOD an entry on MASTER1 where 47653 is fixed. Then it checks that update is replicated
on MASTER2 (even if on MASTER2 47653 is NOT fixed). Then update on MASTER2 (bound as BIND_DN).
This update may fail whether or not 47653 is fixed on MASTER2

It checks that, bound as bind_entry,
- we can not modify an entry without the proper SELFDN aci.
- adding the ACI, we can modify the entry
'''
# bind as bind_entry
topology_m2.ms["master1"].log.info("Bind as %s" % BIND_DN)
> topology_m2.ms["master1"].simple_bind_s(BIND_DN, BIND_PW)

tickets/ticket47653MMR_test.py:248:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:444: in simple_bind_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20de3e8dd8>
func = <built-in method result4 of LDAP object at 0x7f20dc2809e0>
args = (56, 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.INVALID_CREDENTIALS: {'desc': 'Invalid credentials'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: INVALID_CREDENTIALS
----------------------------- Captured stderr call -----------------------------
INFO:lib389:Bind as cn=bind_entry, dc=example,dc=com ------------------------------ Captured log call -------------------------------
ticket47653MMR_test.py 247 INFO Bind as cn=bind_entry, dc=example,dc=com
Failed tickets/ticket47676_test.py::test_ticket47676_init 0.00
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20ee7ea860>

def test_ticket47676_init(topology_m2):
"""
It adds
- Objectclass with MAY 'member'
- an entry ('bind_entry') with which we bind to test the 'SELFDN' operation
It deletes the anonymous aci

"""

topology_m2.ms["master1"].log.info("Add %s that allows 'member' attribute" % OC_NAME)
new_oc = _oc_definition(OC_OID_EXT, OC_NAME, must=MUST, may=MAY)
> topology_m2.ms["master1"].schema.add_schema('objectClasses', new_oc)

tickets/ticket47676_test.py:83:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/schema.py:102: in add_schema
self.conn.modify_s(DN_SCHEMA, [(ldap.MOD_ADD, attr, val)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee7f17f0>
func = <built-in method modify_ext of LDAP object at 0x7f20ee7073f0>
args = ('cn=schema', [(0, 'objectClasses', "( 1.2.3.4.5.6.7.8.9.10.2 NAME 'OCticket47676' DESC 'To test ticket 47490' SUP person AUXILIARY MUST (postalAddress $ postalCode) MAY (member $ street) )")], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '(')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Creating replication topology. INFO:lib389.topologies:Joining master master2 to master1 ... INFO:lib389.replica:SUCCESS: bootstrap to ldap://server.example.com:39002 completed INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 INFO:lib389.topologies:Ensuring master master1 to master2 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists INFO:lib389.topologies:Ensuring master master2 to master1 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. topologies.py 106 INFO Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. topologies.py 139 INFO Creating replication topology. topologies.py 153 INFO Joining master master2 to master1 ... replica.py 1461 INFO SUCCESS: bootstrap to ldap://server.example.com:39002 completed replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working replica.py 1530 INFO SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 topologies.py 161 INFO Ensuring master master1 to master2 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists topologies.py 161 INFO Ensuring master master2 to master1 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists----------------------------- Captured stderr call -----------------------------
INFO:lib389:Add OCticket47676 that allows 'member' attribute ------------------------------ Captured log call -------------------------------
ticket47676_test.py 81 INFO Add OCticket47676 that allows 'member' attribute
Failed tickets/ticket47676_test.py::test_ticket47676_skip_oc_at 0.14
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20ee7ea860>

def test_ticket47676_skip_oc_at(topology_m2):
'''
This test ADD an entry on MASTER1 where 47676 is fixed. Then it checks that entry is replicated
on MASTER2 (even if on MASTER2 47676 is NOT fixed). Then update on MASTER2.
If the schema has successfully been pushed, updating Master2 should succeed
'''
topology_m2.ms["master1"].log.info("\n\n######################### ADD ######################\n")

# bind as 'cn=Directory manager'
topology_m2.ms["master1"].log.info("Bind as %s and add the add the entry with specific oc" % DN_DM)
topology_m2.ms["master1"].simple_bind_s(DN_DM, PASSWORD)

# Prepare the entry with multivalued members
entry = Entry(ENTRY_DN)
entry.setValues('objectclass', 'top', 'person', 'OCticket47676')
entry.setValues('sn', ENTRY_NAME)
entry.setValues('cn', ENTRY_NAME)
entry.setValues('postalAddress', 'here')
entry.setValues('postalCode', '1234')
members = []
for cpt in range(MAX_OTHERS):
name = "%s%d" % (OTHER_NAME, cpt)
members.append("cn=%s,%s" % (name, SUFFIX))
members.append(BIND_DN)
entry.setValues('member', members)

topology_m2.ms["master1"].log.info("Try to add Add %s should be successful" % ENTRY_DN)
> topology_m2.ms["master1"].add_s(entry)

tickets/ticket47676_test.py:134:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee7f17f0>
func = <built-in method result4 of LDAP object at 0x7f20ee7073f0>
args = (56, 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.OBJECT_CLASS_VIOLATION: {'desc': 'Object class violation', 'info': 'unknown object class "OCticket47676"\n'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: OBJECT_CLASS_VIOLATION
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ######################### ADD ###################### INFO:lib389:Bind as cn=Directory Manager and add the add the entry with specific oc INFO:lib389:Try to add Add cn=test_entry, dc=example,dc=com should be successful ------------------------------ Captured log call -------------------------------
ticket47676_test.py 113 INFO ######################### ADD ###################### ticket47676_test.py 116 INFO Bind as cn=Directory Manager and add the add the entry with specific oc ticket47676_test.py 133 INFO Try to add Add cn=test_entry, dc=example,dc=com should be successful
Failed tickets/ticket47676_test.py::test_ticket47676_reject_action 0.21
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20ee7ea860>

def test_ticket47676_reject_action(topology_m2):
topology_m2.ms["master1"].log.info("\n\n######################### REJECT ACTION ######################\n")

topology_m2.ms["master1"].simple_bind_s(DN_DM, PASSWORD)
topology_m2.ms["master2"].simple_bind_s(DN_DM, PASSWORD)

# make master1 to refuse to push the schema if OC_NAME is present in consumer schema
mod = [(ldap.MOD_ADD, 'schemaUpdateObjectclassReject', '%s' % (OC_NAME))] # ACL + REPL
> topology_m2.ms["master1"].modify_s(REPL_SCHEMA_POLICY_SUPPLIER, mod)

tickets/ticket47676_test.py:176:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee7f17f0>
func = <built-in method modify_ext of LDAP object at 0x7f20ee7073f0>
args = ('cn=supplierUpdatePolicy,cn=replSchema,cn=config', [(0, 'schemaUpdateObjectclassReject', 'OCticket47676')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'O')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ######################### REJECT ACTION ###################### ------------------------------ Captured log call -------------------------------
ticket47676_test.py 169 INFO ######################### REJECT ACTION ######################
Failed tickets/ticket47714_test.py::test_ticket47714_run_0 0.11
topology_st = <lib389.topologies.TopologyMain object at 0x7f20de3e85c0>

def test_ticket47714_run_0(topology_st):
"""
Check this change has no inpact to the existing functionality.
1. Set account policy config without the new attr alwaysRecordLoginAttr
2. Bind as a test user
3. Bind as the test user again and check the lastLoginTime is updated
4. Waint longer than the accountInactivityLimit time and bind as the test user,
which should fail with CONSTANT_VIOLATION.
"""
_header(topology_st, 'Account Policy - No new attr alwaysRecordLoginAttr in config')

topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)

# Modify Account Policy config entry
topology_st.standalone.modify_s(ACCT_POLICY_CONFIG_DN, [(ldap.MOD_REPLACE, 'alwaysrecordlogin', 'yes'),
(ldap.MOD_REPLACE, 'stateattrname', 'lastLoginTime'),
(ldap.MOD_REPLACE, 'altstateattrname', 'createTimestamp'),
(ldap.MOD_REPLACE, 'specattrname', 'acctPolicySubentry'),
(ldap.MOD_REPLACE, 'limitattrname',
> 'accountInactivityLimit')])

tickets/ticket47714_test.py:88:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20d806d208>
func = <built-in method modify_ext of LDAP object at 0x7f20ee55e468>
args = ('cn=config,cn=Account Policy Plugin,cn=plugins,cn=config', [(2, 'alwaysrecordlogin', 'yes'), (2, 'stateattrname', 'la...ateTimestamp'), (2, 'specattrname', 'acctPolicySubentry'), (2, 'limitattrname', 'accountInactivityLimit')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'y')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Account Policy - No new attr alwaysRecordLoginAttr in config INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47714_test.py 37 INFO ############################################### ticket47714_test.py 38 INFO ####### ticket47714_test.py 39 INFO ####### Account Policy - No new attr alwaysRecordLoginAttr in config ticket47714_test.py 40 INFO ####### ticket47714_test.py 41 INFO ###############################################
Failed tickets/ticket47714_test.py::test_ticket47714_run_1 0.11
topology_st = <lib389.topologies.TopologyMain object at 0x7f20de3e85c0>

def test_ticket47714_run_1(topology_st):
"""
Verify a new config attr alwaysRecordLoginAttr
1. Set account policy config with the new attr alwaysRecordLoginAttr: lastLoginTime
Note: bogus attr is set to stateattrname.
altstateattrname type value is used for checking whether the account is idle or not.
2. Bind as a test user
3. Bind as the test user again and check the alwaysRecordLoginAttr: lastLoginTime is updated
"""
_header(topology_st, 'Account Policy - With new attr alwaysRecordLoginAttr in config')

topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
> topology_st.standalone.modify_s(TEST_USER_DN, [(ldap.MOD_DELETE, 'lastLoginTime', None)])

tickets/ticket47714_test.py:161:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:602: in modify_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20d806d208>
func = <built-in method result4 of LDAP object at 0x7f20ee55e468>
args = (7, 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_ATTRIBUTE: {'desc': 'No such attribute'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: NO_SUCH_ATTRIBUTE
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Account Policy - With new attr alwaysRecordLoginAttr in config INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47714_test.py 37 INFO ############################################### ticket47714_test.py 38 INFO ####### ticket47714_test.py 39 INFO ####### Account Policy - With new attr alwaysRecordLoginAttr in config ticket47714_test.py 40 INFO ####### ticket47714_test.py 41 INFO ###############################################
Failed tickets/ticket47721_test.py::test_ticket47721_init 0.13
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20de6357b8>

def test_ticket47721_init(topology_m2):
"""
It adds
- Objectclass with MAY 'member'
- an entry ('bind_entry') with which we bind to test the 'SELFDN' operation
It deletes the anonymous aci

"""

# entry used to bind with
topology_m2.ms["master1"].log.info("Add %s" % BIND_DN)
topology_m2.ms["master1"].add_s(Entry((BIND_DN, {
'objectclass': "top person".split(),
'sn': BIND_NAME,
'cn': BIND_NAME,
'userpassword': BIND_PW})))

# enable repl error logging
mod = [(ldap.MOD_REPLACE, 'nsslapd-errorlog-level', str(8192))] # REPL logging
> topology_m2.ms["master1"].modify_s(DN_CONFIG, mod)

tickets/ticket47721_test.py:98:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee5e5978>
func = <built-in method modify_ext of LDAP object at 0x7f20ee506a08>
args = ('cn=config', [(2, 'nsslapd-errorlog-level', '8192')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '8')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Creating replication topology. INFO:lib389.topologies:Joining master master2 to master1 ... INFO:lib389.replica:SUCCESS: bootstrap to ldap://server.example.com:39002 completed INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 INFO:lib389.topologies:Ensuring master master1 to master2 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists INFO:lib389.topologies:Ensuring master master2 to master1 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. topologies.py 106 INFO Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. topologies.py 139 INFO Creating replication topology. topologies.py 153 INFO Joining master master2 to master1 ... replica.py 1461 INFO SUCCESS: bootstrap to ldap://server.example.com:39002 completed replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working replica.py 1530 INFO SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 topologies.py 161 INFO Ensuring master master1 to master2 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists topologies.py 161 INFO Ensuring master master2 to master1 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists----------------------------- Captured stderr call -----------------------------
INFO:lib389:Add cn=bind_entry, dc=example,dc=com ------------------------------ Captured log call -------------------------------
ticket47721_test.py 89 INFO Add cn=bind_entry, dc=example,dc=com
Failed tickets/ticket47721_test.py::test_ticket47721_0 11.02
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20de6357b8>

def test_ticket47721_0(topology_m2):
dn = "cn=%s0,%s" % (OTHER_NAME, SUFFIX)
loop = 0
ent = None
while loop <= 10:
try:
ent = topology_m2.ms["master2"].getEntry(dn, ldap.SCOPE_BASE, "(objectclass=*)")
break
except ldap.NO_SUCH_OBJECT:
time.sleep(1)
loop += 1
if ent is None:
> assert False
E assert False

tickets/ticket47721_test.py:122: AssertionError
Failed tickets/ticket47721_test.py::test_ticket47721_1 0.00
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20de6357b8>

def test_ticket47721_1(topology_m2):
log.info('Running test 1...')
# topology_m2.ms["master1"].log.info("Attach debugger\n\n")
# time.sleep(30)

new = _add_custom_at_definition()
topology_m2.ms["master1"].log.info("Add (M2) %s " % new)
> topology_m2.ms["master2"].schema.add_schema('attributetypes', new)

tickets/ticket47721_test.py:132:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/schema.py:102: in add_schema
self.conn.modify_s(DN_SCHEMA, [(ldap.MOD_ADD, attr, val)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee5c34e0>
func = <built-in method modify_ext of LDAP object at 0x7f20dc280c38>
args = ('cn=schema', [(0, 'attributetypes', "( ATticket47721-oid NAME 'ATticket47721' DESC 'test AT ticket 47721' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN ( 'Test 47721' 'user defined' ) )")], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '(')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:tests.tickets.ticket47721_test:Running test 1... INFO:lib389:Add (M2) ( ATticket47721-oid NAME 'ATticket47721' DESC 'test AT ticket 47721' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN ( 'Test 47721' 'user defined' ) ) ------------------------------ Captured log call -------------------------------
ticket47721_test.py 126 INFO Running test 1... ticket47721_test.py 131 INFO Add (M2) ( ATticket47721-oid NAME 'ATticket47721' DESC 'test AT ticket 47721' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN ( 'Test 47721' 'user defined' ) )
Failed tickets/ticket47721_test.py::test_ticket47721_2 0.00
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20de6357b8>

def test_ticket47721_2(topology_m2):
log.info('Running test 2...')

mod = [(ldap.MOD_REPLACE, 'description', 'Hello world 2')]
dn = "cn=%s0,%s" % (OTHER_NAME, SUFFIX)
> topology_m2.ms["master1"].modify_s(dn, mod)

tickets/ticket47721_test.py:173:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee5e5978>
func = <built-in method modify_ext of LDAP object at 0x7f20ee506a08>
args = ('cn=other_entry0,dc=example,dc=com', [(2, 'description', 'Hello world 2')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'H')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:tests.tickets.ticket47721_test:Running test 2... ------------------------------ Captured log call -------------------------------
ticket47721_test.py 169 INFO Running test 2...
Failed tickets/ticket47721_test.py::test_ticket47721_3 5.12
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20de6357b8>

def test_ticket47721_3(topology_m2):
'''
Check that the supplier can update its schema from consumer schema
Update M2 schema, then trigger a replication M1->M2
'''
log.info('Running test 3...')

# stop RA M2->M1, so that M1 can only learn being a supplier
ents = topology_m2.ms["master2"].agreement.list(suffix=SUFFIX)
assert len(ents) == 1
topology_m2.ms["master2"].agreement.pause(ents[0].dn)

new = _add_custom_at_definition('ATtest3')
topology_m2.ms["master1"].log.info("Update schema (M2) %s " % new)
> topology_m2.ms["master2"].schema.add_schema('attributetypes', new)

tickets/ticket47721_test.py:217:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/schema.py:102: in add_schema
self.conn.modify_s(DN_SCHEMA, [(ldap.MOD_ADD, attr, val)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee5c34e0>
func = <built-in method modify_ext of LDAP object at 0x7f20dc280c38>
args = ('cn=schema', [(0, 'attributetypes', "( ATtest3-oid NAME 'ATtest3' DESC 'test AT ticket 47721' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN ( 'Test 47721' 'user defined' ) )")], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '(')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:tests.tickets.ticket47721_test:Running test 3... INFO:lib389:Pausing replication cn=001,cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config INFO:lib389:Update schema (M2) ( ATtest3-oid NAME 'ATtest3' DESC 'test AT ticket 47721' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN ( 'Test 47721' 'user defined' ) ) ------------------------------ Captured log call -------------------------------
ticket47721_test.py 208 INFO Running test 3... agreement.py 830 INFO Pausing replication cn=001,cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config ticket47721_test.py 216 INFO Update schema (M2) ( ATtest3-oid NAME 'ATtest3' DESC 'test AT ticket 47721' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN ( 'Test 47721' 'user defined' ) )
Failed tickets/ticket47721_test.py::test_ticket47721_4 0.00
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20de6357b8>

def test_ticket47721_4(topology_m2):
'''
Here M2->M1 agreement is disabled.
with test_ticket47721_3, M1 schema and M2 should be identical BUT
the nsschemacsn is M2>M1. But as the RA M2->M1 is disabled, M1 keeps its schemacsn.
Update schema on M2 (nsschemaCSN update), update M2. Check they have the same schemacsn
'''
log.info('Running test 4...')

new = _add_custom_at_definition('ATtest4')
topology_m2.ms["master1"].log.info("Update schema (M1) %s " % new)
> topology_m2.ms["master1"].schema.add_schema('attributetypes', new)

tickets/ticket47721_test.py:269:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/schema.py:102: in add_schema
self.conn.modify_s(DN_SCHEMA, [(ldap.MOD_ADD, attr, val)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee5e5978>
func = <built-in method modify_ext of LDAP object at 0x7f20ee506a08>
args = ('cn=schema', [(0, 'attributetypes', "( ATtest4-oid NAME 'ATtest4' DESC 'test AT ticket 47721' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN ( 'Test 47721' 'user defined' ) )")], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '(')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:tests.tickets.ticket47721_test:Running test 4... INFO:lib389:Update schema (M1) ( ATtest4-oid NAME 'ATtest4' DESC 'test AT ticket 47721' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN ( 'Test 47721' 'user defined' ) ) ------------------------------ Captured log call -------------------------------
ticket47721_test.py 265 INFO Running test 4... ticket47721_test.py 268 INFO Update schema (M1) ( ATtest4-oid NAME 'ATtest4' DESC 'test AT ticket 47721' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN ( 'Test 47721' 'user defined' ) )
Failed tickets/ticket47781_test.py::test_ticket47781 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee650cc0>

def test_ticket47781(topology_st):
"""
Testing for a deadlock after doing an online import of an LDIF with
replication data. The replication agreement should be invalid.
"""

log.info('Testing Ticket 47781 - Testing for deadlock after importing LDIF with replication data')

#
# Setup Replication
#
log.info('Setting up replication...')
topology_st.standalone.replica.enableReplication(suffix=DEFAULT_SUFFIX, role=ReplicaRole.MASTER,
> replicaId=REPLICAID_MASTER_1)

tickets/ticket47781_test.py:36:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/replica.py:560: in enableReplication
self.conn.changelog.create()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee8341d0>, name = 'changelog'

def __getattr__(self,name):
if name in self.CLASSATTR_OPTION_MAPPING:
return self.get_option(self.CLASSATTR_OPTION_MAPPING[name])
elif name in self.__dict__:
return self.__dict__[name]
else:
raise AttributeError('%s has no attribute %s' % (
> self.__class__.__name__,repr(name)
))
E AttributeError: DirSrv has no attribute 'changelog'

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:352: AttributeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.----------------------------- Captured stderr call -----------------------------
INFO:tests.tickets.ticket47781_test:Testing Ticket 47781 - Testing for deadlock after importing LDIF with replication data INFO:tests.tickets.ticket47781_test:Setting up replication... INFO:lib389:List backend with suffix=dc=example,dc=com ------------------------------ Captured log call -------------------------------
ticket47781_test.py 29 INFO Testing Ticket 47781 - Testing for deadlock after importing LDIF with replication data ticket47781_test.py 34 INFO Setting up replication... backend.py 71 INFO List backend with suffix=dc=example,dc=com
Failed tickets/ticket47787_test.py::test_ticket47787_init 0.12
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20ee834eb8>

def test_ticket47787_init(topology_m2):
"""
Creates
- a staging DIT
- a production DIT
- add accounts in staging DIT

"""

topology_m2.ms["master1"].log.info("\n\n######################### INITIALIZATION ######################\n")

# entry used to bind with
topology_m2.ms["master1"].log.info("Add %s" % BIND_DN)
topology_m2.ms["master1"].add_s(Entry((BIND_DN, {
'objectclass': "top person".split(),
'sn': BIND_CN,
'cn': BIND_CN,
'userpassword': BIND_PW})))

# DIT for staging
topology_m2.ms["master1"].log.info("Add %s" % STAGING_DN)
topology_m2.ms["master1"].add_s(Entry((STAGING_DN, {
'objectclass': "top organizationalRole".split(),
'cn': STAGING_CN,
'description': "staging DIT"})))

# DIT for production
topology_m2.ms["master1"].log.info("Add %s" % PRODUCTION_DN)
topology_m2.ms["master1"].add_s(Entry((PRODUCTION_DN, {
'objectclass': "top organizationalRole".split(),
'cn': PRODUCTION_CN,
'description': "production DIT"})))

# enable replication error logging
mod = [(ldap.MOD_REPLACE, 'nsslapd-errorlog-level', '8192')]
> topology_m2.ms["master1"].modify_s(DN_CONFIG, mod)

tickets/ticket47787_test.py:316:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee7f1048>
func = <built-in method modify_ext of LDAP object at 0x7f20dfd80260>
args = ('cn=config', [(2, 'nsslapd-errorlog-level', '8192')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '8')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Creating replication topology. INFO:lib389.topologies:Joining master master2 to master1 ... INFO:lib389.replica:SUCCESS: bootstrap to ldap://server.example.com:39002 completed INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 INFO:lib389.topologies:Ensuring master master1 to master2 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists INFO:lib389.topologies:Ensuring master master2 to master1 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. topologies.py 106 INFO Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. topologies.py 139 INFO Creating replication topology. topologies.py 153 INFO Joining master master2 to master1 ... replica.py 1461 INFO SUCCESS: bootstrap to ldap://server.example.com:39002 completed replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working replica.py 1530 INFO SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 topologies.py 161 INFO Ensuring master master1 to master2 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists topologies.py 161 INFO Ensuring master master2 to master1 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists----------------------------- Captured stderr call -----------------------------
INFO:lib389: ######################### INITIALIZATION ###################### INFO:lib389:Add cn=bind_entry,dc=example,dc=com INFO:lib389:Add cn=staged user,dc=example,dc=com INFO:lib389:Add cn=accounts,dc=example,dc=com ------------------------------ Captured log call -------------------------------
ticket47787_test.py 290 INFO ######################### INITIALIZATION ###################### ticket47787_test.py 293 INFO Add cn=bind_entry,dc=example,dc=com ticket47787_test.py 301 INFO Add cn=staged user,dc=example,dc=com ticket47787_test.py 308 INFO Add cn=accounts,dc=example,dc=com
Failed tickets/ticket47787_test.py::test_ticket47787_2 11.25
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20ee834eb8>

def test_ticket47787_2(topology_m2):
'''
Disable replication so that updates are not replicated
Delete an entry on M1. Modrdn it on M2 (chg rdn + delold=0 + same superior).
update a test entry on M2
Reenable the RA.
checks that entry was deleted on M2 (with the modified RDN)
checks that test entry was replicated on M1 (replication M2->M1 not broken by modrdn)
'''

_header(topology_m2, "test_ticket47787_2")
_bind_manager(topology_m2.ms["master1"])
_bind_manager(topology_m2.ms["master2"])

# entry to test the replication is still working
name = "%s%d" % (NEW_ACCOUNT, MAX_ACCOUNTS - 1)
test_rdn = "cn=%s" % (name)
testentry_dn = "%s,%s" % (test_rdn, STAGING_DN)

name = "%s%d" % (NEW_ACCOUNT, MAX_ACCOUNTS - 2)
test2_rdn = "cn=%s" % (name)
testentry2_dn = "%s,%s" % (test2_rdn, STAGING_DN)

# value of updates to test the replication both ways
attr = 'description'
value = 'test_ticket47787_2'

# entry for the modrdn
name = "%s%d" % (NEW_ACCOUNT, 1)
rdn = "cn=%s" % (name)
entry_dn = "%s,%s" % (rdn, STAGING_DN)

# created on M1, wait the entry exists on M2
> _check_entry_exists(topology_m2.ms["master2"], entry_dn)

tickets/ticket47787_test.py:361:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

instance = <lib389.DirSrv object at 0x7f20ee7109e8>
entry_dn = 'cn=new_account1,cn=staged user,dc=example,dc=com'

def _check_entry_exists(instance, entry_dn):
loop = 0
ent = None
while loop <= 10:
try:
ent = instance.getEntry(entry_dn, ldap.SCOPE_BASE, "(objectclass=*)")
break
except ldap.NO_SUCH_OBJECT:
time.sleep(1)
loop += 1
if ent is None:
> assert False
E assert False

tickets/ticket47787_test.py:240: AssertionError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### test_ticket47787_2 INFO:lib389:####### INFO:lib389:############################################### INFO:lib389:Bind as cn=Directory Manager INFO:lib389:Bind as cn=Directory Manager ------------------------------ Captured log call -------------------------------
ticket47787_test.py 66 INFO ############################################### ticket47787_test.py 67 INFO ####### ticket47787_test.py 68 INFO ####### test_ticket47787_2 ticket47787_test.py 69 INFO ####### ticket47787_test.py 70 INFO ############################################### ticket47787_test.py 56 INFO Bind as cn=Directory Manager ticket47787_test.py 56 INFO Bind as cn=Directory Manager
Failed tickets/ticket47808_test.py::test_ticket47808_run 0.11
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfd7d0b8>

def test_ticket47808_run(topology_st):
"""
It enables attribute uniqueness plugin with sn as a unique attribute
Add an entry 1 with sn = ENTRY_NAME
Add an entry 2 with sn = ENTRY_NAME
If the second add does not crash the server and the following search found none,
the bug is fixed.
"""

# bind as directory manager
topology_st.standalone.log.info("Bind as %s" % DN_DM)
topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)

topology_st.standalone.log.info("\n\n######################### SETUP ATTR UNIQ PLUGIN ######################\n")

# enable attribute uniqueness plugin
mod = [(ldap.MOD_REPLACE, 'nsslapd-pluginEnabled', 'on'), (ldap.MOD_REPLACE, 'nsslapd-pluginarg0', 'sn'),
(ldap.MOD_REPLACE, 'nsslapd-pluginarg1', SUFFIX)]
> topology_st.standalone.modify_s(ATTRIBUTE_UNIQUENESS_PLUGIN, mod)

tickets/ticket47808_test.py:41:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dfdcb160>
func = <built-in method modify_ext of LDAP object at 0x7f20ee714260>
args = ('cn=attribute uniqueness,cn=plugins,cn=config', [(2, 'nsslapd-pluginEnabled', 'on'), (2, 'nsslapd-pluginarg0', 'sn'), (2, 'nsslapd-pluginarg1', 'dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'o')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.----------------------------- Captured stderr call -----------------------------
INFO:lib389:Bind as cn=Directory Manager INFO:lib389: ######################### SETUP ATTR UNIQ PLUGIN ###################### ------------------------------ Captured log call -------------------------------
ticket47808_test.py 33 INFO Bind as cn=Directory Manager ticket47808_test.py 36 INFO ######################### SETUP ATTR UNIQ PLUGIN ######################
Failed tickets/ticket47819_test.py::test_ticket47819 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfb67e80>

def test_ticket47819(topology_st):
"""
from lib389.utils import *

# Skip on older versions
pytestmark = pytest.mark.skipif(ds_is_older('1.3.4'), reason="Not implemented")
Testing precise tombstone purging:
[1] Make sure "nsTombstoneCSN" is added to new tombstones
[2] Make sure an import of a replication ldif adds "nsTombstoneCSN"
to old tombstones
[4] Test fixup task
[3] Make sure tombstone purging works
"""

log.info('Testing Ticket 47819 - Test precise tombstone purging')

#
# Setup Replication
#
log.info('Setting up replication...')
topology_st.standalone.replica.enableReplication(suffix=DEFAULT_SUFFIX, role=ReplicaRole.MASTER,
> replicaId=REPLICAID_MASTER_1)

tickets/ticket47819_test.py:43:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/replica.py:560: in enableReplication
self.conn.changelog.create()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dfdcb4e0>, name = 'changelog'

def __getattr__(self,name):
if name in self.CLASSATTR_OPTION_MAPPING:
return self.get_option(self.CLASSATTR_OPTION_MAPPING[name])
elif name in self.__dict__:
return self.__dict__[name]
else:
raise AttributeError('%s has no attribute %s' % (
> self.__class__.__name__,repr(name)
))
E AttributeError: DirSrv has no attribute 'changelog'

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:352: AttributeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.----------------------------- Captured stderr call -----------------------------
INFO:tests.tickets.ticket47819_test:Testing Ticket 47819 - Test precise tombstone purging INFO:tests.tickets.ticket47819_test:Setting up replication... INFO:lib389:List backend with suffix=dc=example,dc=com ------------------------------ Captured log call -------------------------------
ticket47819_test.py 36 INFO Testing Ticket 47819 - Test precise tombstone purging ticket47819_test.py 41 INFO Setting up replication... backend.py 71 INFO List backend with suffix=dc=example,dc=com
Failed tickets/ticket47823_test.py::test_ticket47823_one_container_mod 4.80
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfdbac18>

def test_ticket47823_one_container_mod(topology_st):
'''
Check uniqueness in a single container
Add and entry with a given 'cn', then check we can not modify an entry with the same 'cn' value

'''
_header(topology_st, "With former config (args), check attribute uniqueness with 'cn' (MOD)")

> _active_container_mod(topology_st, type_config='old')

tickets/ticket47823_test.py:479:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47823_test.py:204: in _active_container_mod
topology_st.standalone.modify_s(ACTIVE_USER_2_DN, [(ldap.MOD_ADD, 'cn', ACTIVE_USER_1_CN)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee54cf60>
func = <built-in method modify_ext of LDAP object at 0x7f20dfd82a30>
args = ('cn=test_2,cn=accounts,dc=example,dc=com', [(0, 'cn', 'test_1')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 't')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### With former config (args), check attribute uniqueness with 'cn' (MOD) INFO:lib389:####### INFO:lib389:############################################### INFO:lib389:Uniqueness enforced: checks MOD ADD entry is rejected ------------------------------ Captured log call -------------------------------
ticket47823_test.py 57 INFO ############################################### ticket47823_test.py 58 INFO ####### ticket47823_test.py 59 INFO ####### With former config (args), check attribute uniqueness with 'cn' (MOD) ticket47823_test.py 60 INFO ####### ticket47823_test.py 61 INFO ############################################### ticket47823_test.py 192 INFO Uniqueness enforced: checks MOD ADD entry is rejected
Failed tickets/ticket47823_test.py::test_ticket47823_one_container_modrdn 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfdbac18>

def test_ticket47823_one_container_modrdn(topology_st):
'''
Check uniqueness in a single container
Add and entry with a given 'cn', then check we can not modrdn an entry with the same 'cn' value

'''
_header(topology_st, "With former config (args), check attribute uniqueness with 'cn' (MODRDN)")

> _active_container_modrdn(topology_st, type_config='old')

tickets/ticket47823_test.py:494:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47823_test.py:233: in _active_container_modrdn
topology_st.standalone.add_s(config)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee54cf60>
func = <built-in method result4 of LDAP object at 0x7f20dfd82a30>
args = (5, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### With former config (args), check attribute uniqueness with 'cn' (MODRDN) INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47823_test.py 57 INFO ############################################### ticket47823_test.py 58 INFO ####### ticket47823_test.py 59 INFO ####### With former config (args), check attribute uniqueness with 'cn' (MODRDN) ticket47823_test.py 60 INFO ####### ticket47823_test.py 61 INFO ###############################################
Failed tickets/ticket47823_test.py::test_ticket47823_multi_containers_add 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfdbac18>

def test_ticket47823_multi_containers_add(topology_st):
'''
Check uniqueness in a several containers
Add and entry with a given 'cn', then check we can not add an entry with the same 'cn' value

'''
_header(topology_st, "With former config (args), check attribute uniqueness with 'cn' (ADD) ")

> _active_stage_containers_add(topology_st, type_config='old', across_subtrees=False)

tickets/ticket47823_test.py:509:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47823_test.py:271: in _active_stage_containers_add
topology_st.standalone.add_s(config)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee54cf60>
func = <built-in method result4 of LDAP object at 0x7f20dfd82a30>
args = (7, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### With former config (args), check attribute uniqueness with 'cn' (ADD) INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47823_test.py 57 INFO ############################################### ticket47823_test.py 58 INFO ####### ticket47823_test.py 59 INFO ####### With former config (args), check attribute uniqueness with 'cn' (ADD) ticket47823_test.py 60 INFO ####### ticket47823_test.py 61 INFO ###############################################
Failed tickets/ticket47823_test.py::test_ticket47823_multi_containers_mod 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfdbac18>

def test_ticket47823_multi_containers_mod(topology_st):
'''
Check uniqueness in a several containers
Add an entry on a container with a given 'cn', then check we CAN mod an entry with the same 'cn' value on the other container

'''
_header(topology_st, "With former config (args), check attribute uniqueness with 'cn' (MOD) on separated container")

topology_st.standalone.log.info(
'Uniqueness not enforced: if same \'cn\' modified (add/replace) on separated containers')
> _active_stage_containers_mod(topology_st, type_config='old', across_subtrees=False)

tickets/ticket47823_test.py:526:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47823_test.py:302: in _active_stage_containers_mod
topology_st.standalone.add_s(config)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee54cf60>
func = <built-in method result4 of LDAP object at 0x7f20dfd82a30>
args = (9, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### With former config (args), check attribute uniqueness with 'cn' (MOD) on separated container INFO:lib389:####### INFO:lib389:############################################### INFO:lib389:Uniqueness not enforced: if same 'cn' modified (add/replace) on separated containers ------------------------------ Captured log call -------------------------------
ticket47823_test.py 57 INFO ############################################### ticket47823_test.py 58 INFO ####### ticket47823_test.py 59 INFO ####### With former config (args), check attribute uniqueness with 'cn' (MOD) on separated container ticket47823_test.py 60 INFO ####### ticket47823_test.py 61 INFO ############################################### ticket47823_test.py 525 INFO Uniqueness not enforced: if same 'cn' modified (add/replace) on separated containers
Failed tickets/ticket47823_test.py::test_ticket47823_multi_containers_modrdn 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfdbac18>

def test_ticket47823_multi_containers_modrdn(topology_st):
'''
Check uniqueness in a several containers
Add and entry with a given 'cn', then check we CAN modrdn an entry with the same 'cn' value on the other container

'''
_header(topology_st,
"With former config (args), check attribute uniqueness with 'cn' (MODRDN) on separated containers")

topology_st.standalone.log.info('Uniqueness not enforced: checks MODRDN entry is accepted on separated containers')
> _active_stage_containers_modrdn(topology_st, type_config='old', across_subtrees=False)

tickets/ticket47823_test.py:545:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47823_test.py:352: in _active_stage_containers_modrdn
topology_st.standalone.add_s(config)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee54cf60>
func = <built-in method result4 of LDAP object at 0x7f20dfd82a30>
args = (11, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### With former config (args), check attribute uniqueness with 'cn' (MODRDN) on separated containers INFO:lib389:####### INFO:lib389:############################################### INFO:lib389:Uniqueness not enforced: checks MODRDN entry is accepted on separated containers ------------------------------ Captured log call -------------------------------
ticket47823_test.py 57 INFO ############################################### ticket47823_test.py 58 INFO ####### ticket47823_test.py 59 INFO ####### With former config (args), check attribute uniqueness with 'cn' (MODRDN) on separated containers ticket47823_test.py 60 INFO ####### ticket47823_test.py 61 INFO ############################################### ticket47823_test.py 544 INFO Uniqueness not enforced: checks MODRDN entry is accepted on separated containers
Failed tickets/ticket47823_test.py::test_ticket47823_across_multi_containers_add 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfdbac18>

def test_ticket47823_across_multi_containers_add(topology_st):
'''
Check uniqueness across several containers, uniquely with the new configuration
Add and entry with a given 'cn', then check we can not add an entry with the same 'cn' value

'''
_header(topology_st, "With new config (args), check attribute uniqueness with 'cn' (ADD) across several containers")

> _active_stage_containers_add(topology_st, type_config='old', across_subtrees=True)

tickets/ticket47823_test.py:559:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47823_test.py:271: in _active_stage_containers_add
topology_st.standalone.add_s(config)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee54cf60>
func = <built-in method result4 of LDAP object at 0x7f20dfd82a30>
args = (13, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### With new config (args), check attribute uniqueness with 'cn' (ADD) across several containers INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47823_test.py 57 INFO ############################################### ticket47823_test.py 58 INFO ####### ticket47823_test.py 59 INFO ####### With new config (args), check attribute uniqueness with 'cn' (ADD) across several containers ticket47823_test.py 60 INFO ####### ticket47823_test.py 61 INFO ###############################################
Failed tickets/ticket47823_test.py::test_ticket47823_across_multi_containers_mod 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfdbac18>

def test_ticket47823_across_multi_containers_mod(topology_st):
'''
Check uniqueness across several containers, uniquely with the new configuration
Add and entry with a given 'cn', then check we can not modifiy an entry with the same 'cn' value

'''
_header(topology_st, "With new config (args), check attribute uniqueness with 'cn' (MOD) across several containers")

> _active_stage_containers_mod(topology_st, type_config='old', across_subtrees=True)

tickets/ticket47823_test.py:570:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47823_test.py:302: in _active_stage_containers_mod
topology_st.standalone.add_s(config)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee54cf60>
func = <built-in method result4 of LDAP object at 0x7f20dfd82a30>
args = (15, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### With new config (args), check attribute uniqueness with 'cn' (MOD) across several containers INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47823_test.py 57 INFO ############################################### ticket47823_test.py 58 INFO ####### ticket47823_test.py 59 INFO ####### With new config (args), check attribute uniqueness with 'cn' (MOD) across several containers ticket47823_test.py 60 INFO ####### ticket47823_test.py 61 INFO ###############################################
Failed tickets/ticket47823_test.py::test_ticket47823_across_multi_containers_modrdn 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfdbac18>

def test_ticket47823_across_multi_containers_modrdn(topology_st):
'''
Check uniqueness across several containers, uniquely with the new configuration
Add and entry with a given 'cn', then check we can not modrdn an entry with the same 'cn' value

'''
_header(topology_st,
"With new config (args), check attribute uniqueness with 'cn' (MODRDN) across several containers")

> _active_stage_containers_modrdn(topology_st, type_config='old', across_subtrees=True)

tickets/ticket47823_test.py:582:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47823_test.py:352: in _active_stage_containers_modrdn
topology_st.standalone.add_s(config)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee54cf60>
func = <built-in method result4 of LDAP object at 0x7f20dfd82a30>
args = (17, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### With new config (args), check attribute uniqueness with 'cn' (MODRDN) across several containers INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47823_test.py 57 INFO ############################################### ticket47823_test.py 58 INFO ####### ticket47823_test.py 59 INFO ####### With new config (args), check attribute uniqueness with 'cn' (MODRDN) across several containers ticket47823_test.py 60 INFO ####### ticket47823_test.py 61 INFO ###############################################
Failed tickets/ticket47823_test.py::test_ticket47823_invalid_config_1 1.02
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfdbac18>

def test_ticket47823_invalid_config_1(topology_st):
'''
Check that an invalid config is detected. No uniqueness enforced
Using old config: arg0 is missing
'''
_header(topology_st, "Invalid config (old): arg0 is missing")

_config_file(topology_st, action='save')

# create an invalid config without arg0
config = _build_config(topology_st, attr_name='cn', subtree_1=ACTIVE_DN, subtree_2=None, type_config='old',
across_subtrees=False)

del config.data['nsslapd-pluginarg0']
# replace 'cn' uniqueness entry
try:
topology_st.standalone.delete_s(config.dn)

except ldap.NO_SUCH_OBJECT:
pass
topology_st.standalone.add_s(config)

topology_st.standalone.getEntry(config.dn, ldap.SCOPE_BASE, "(objectclass=nsSlapdPlugin)", ALL_CONFIG_ATTRS)

# Check the server did not restart
> topology_st.standalone.modify_s(DN_CONFIG, [(ldap.MOD_REPLACE, 'nsslapd-errorlog-level', '65536')])

tickets/ticket47823_test.py:610:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee54cf60>
func = <built-in method modify_ext of LDAP object at 0x7f20dfd82a30>
args = ('cn=config', [(2, 'nsslapd-errorlog-level', '65536')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '6')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Invalid config (old): arg0 is missing INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47823_test.py 57 INFO ############################################### ticket47823_test.py 58 INFO ####### ticket47823_test.py 59 INFO ####### Invalid config (old): arg0 is missing ticket47823_test.py 60 INFO ####### ticket47823_test.py 61 INFO ###############################################
Failed tickets/ticket47823_test.py::test_ticket47823_invalid_config_2 7.92
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfdbac18>

def test_ticket47823_invalid_config_2(topology_st):
'''
Check that an invalid config is detected. No uniqueness enforced
Using old config: arg1 is missing
'''
_header(topology_st, "Invalid config (old): arg1 is missing")

_config_file(topology_st, action='save')

# create an invalid config without arg0
config = _build_config(topology_st, attr_name='cn', subtree_1=ACTIVE_DN, subtree_2=None, type_config='old',
across_subtrees=False)

del config.data['nsslapd-pluginarg1']
# replace 'cn' uniqueness entry
try:
topology_st.standalone.delete_s(config.dn)

except ldap.NO_SUCH_OBJECT:
pass
topology_st.standalone.add_s(config)

topology_st.standalone.getEntry(config.dn, ldap.SCOPE_BASE, "(objectclass=nsSlapdPlugin)", ALL_CONFIG_ATTRS)

# Check the server did not restart
try:
topology_st.standalone.restart()
ent = topology_st.standalone.getEntry(config.dn, ldap.SCOPE_BASE, "(objectclass=nsSlapdPlugin)",
ALL_CONFIG_ATTRS)
if ent:
# be sure to restore a valid config before assert
_config_file(topology_st, action='restore')
assert not ent
except:
pass

# Check the expected error message
regex = re.compile("No valid subtree is defined")
res = _pattern_errorlog(topology_st.standalone.errorlog_file, regex)
if not res:
# be sure to restore a valid config before assert
_config_file(topology_st, action='restore')
assert res

# Check we can restart the server
_config_file(topology_st, action='restore')
> topology_st.standalone.start()

tickets/ticket47823_test.py:685:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:1197: in start
"dirsrv@%s" % self.serverid])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

popenargs = (['/usr/bin/systemctl', 'start', 'dirsrv@standalone1'],)
kwargs = {}, retcode = 1
cmd = ['/usr/bin/systemctl', 'start', 'dirsrv@standalone1']

def check_call(*popenargs, **kwargs):
"""Run command with arguments. Wait for command to complete. If
the exit code was zero then return, otherwise raise
CalledProcessError. The CalledProcessError object will have the
return code in the returncode attribute.

The arguments are the same as for the call function. Example:

check_call(["ls", "-l"])
"""
retcode = call(*popenargs, **kwargs)
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E subprocess.CalledProcessError: Command '['/usr/bin/systemctl', 'start', 'dirsrv@standalone1']' returned non-zero exit status 1.

/usr/lib64/python3.6/subprocess.py:291: CalledProcessError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Invalid config (old): arg1 is missing INFO:lib389:####### INFO:lib389:############################################### Job for dirsrv@standalone1.service failed because the control process exited with error code. See "systemctl status dirsrv@standalone1.service" and "journalctl -xe" for details. Job for dirsrv@standalone1.service failed because the control process exited with error code. See "systemctl status dirsrv@standalone1.service" and "journalctl -xe" for details. ------------------------------ Captured log call -------------------------------
ticket47823_test.py 57 INFO ############################################### ticket47823_test.py 58 INFO ####### ticket47823_test.py 59 INFO ####### Invalid config (old): arg1 is missing ticket47823_test.py 60 INFO ####### ticket47823_test.py 61 INFO ###############################################
Failed tickets/ticket47823_test.py::test_ticket47823_invalid_config_3 1.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfdbac18>

def test_ticket47823_invalid_config_3(topology_st):
'''
Check that an invalid config is detected. No uniqueness enforced
Using old config: arg0 is missing
'''
_header(topology_st, "Invalid config (old): arg0 is missing but new config attrname exists")

_config_file(topology_st, action='save')

# create an invalid config without arg0
config = _build_config(topology_st, attr_name='cn', subtree_1=ACTIVE_DN, subtree_2=None, type_config='old',
> across_subtrees=False)

tickets/ticket47823_test.py:703:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47823_test.py:87: in _build_config
config = _uniqueness_config_entry(topology_st, attr_name)
tickets/ticket47823_test.py:74: in _uniqueness_config_entry
'nsslapd-pluginDescription'])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:1803: in getEntry
restype, obj = self.result(res)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:135: in inner
objtype, data = f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:738: in result
resp_type, resp_data, resp_msgid = self.result2(msgid,all,timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:742: in result2
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all,timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee54cf60>
func = <built-in method result4 of LDAP object at 0x7f20dfd82a30>
args = (26, 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.SERVER_DOWN: {'desc': "Can't contact LDAP server"}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: SERVER_DOWN
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Invalid config (old): arg0 is missing but new config attrname exists INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47823_test.py 57 INFO ############################################### ticket47823_test.py 58 INFO ####### ticket47823_test.py 59 INFO ####### Invalid config (old): arg0 is missing but new config attrname exists ticket47823_test.py 60 INFO ####### ticket47823_test.py 61 INFO ###############################################
Failed tickets/ticket47823_test.py::test_ticket47823_invalid_config_4 1.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfdbac18>

def test_ticket47823_invalid_config_4(topology_st):
'''
Check that an invalid config is detected. No uniqueness enforced
Using old config: arg1 is missing
'''
_header(topology_st, "Invalid config (old): arg1 is missing but new config exist")

_config_file(topology_st, action='save')

# create an invalid config without arg0
config = _build_config(topology_st, attr_name='cn', subtree_1=ACTIVE_DN, subtree_2=None, type_config='old',
> across_subtrees=False)

tickets/ticket47823_test.py:758:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47823_test.py:87: in _build_config
config = _uniqueness_config_entry(topology_st, attr_name)
tickets/ticket47823_test.py:74: in _uniqueness_config_entry
'nsslapd-pluginDescription'])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:1802: in getEntry
res = self.search(*args, **kwargs)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:849: in search
return self.search_ext(base,scope,filterstr,attrlist,attrsonly,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:841: in search_ext
timeout,sizelimit,
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee54cf60>
func = <built-in method search_ext of LDAP object at 0x7f20dfd82a30>
args = ('cn=attribute uniqueness,cn=plugins,cn=config', 0, '(objectclass=nsSlapdPlugin)', ['objectClass', 'cn', 'nsslapd-pluginPath', 'nsslapd-pluginInitfunc', 'nsslapd-pluginType', 'nsslapd-pluginEnabled', ...], 0, None, ...)
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.SERVER_DOWN: {'desc': "Can't contact LDAP server"}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: SERVER_DOWN
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Invalid config (old): arg1 is missing but new config exist INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47823_test.py 57 INFO ############################################### ticket47823_test.py 58 INFO ####### ticket47823_test.py 59 INFO ####### Invalid config (old): arg1 is missing but new config exist ticket47823_test.py 60 INFO ####### ticket47823_test.py 61 INFO ###############################################
Failed tickets/ticket47823_test.py::test_ticket47823_invalid_config_5 1.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfdbac18>

def test_ticket47823_invalid_config_5(topology_st):
'''
Check that an invalid config is detected. No uniqueness enforced
Using new config: uniqueness-attribute-name is missing
'''
_header(topology_st, "Invalid config (new): uniqueness-attribute-name is missing")

_config_file(topology_st, action='save')

# create an invalid config without arg0
config = _build_config(topology_st, attr_name='cn', subtree_1=ACTIVE_DN, subtree_2=None, type_config='new',
> across_subtrees=False)

tickets/ticket47823_test.py:812:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47823_test.py:94: in _build_config
config = _uniqueness_config_entry(topology_st, attr_name)
tickets/ticket47823_test.py:74: in _uniqueness_config_entry
'nsslapd-pluginDescription'])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:1802: in getEntry
res = self.search(*args, **kwargs)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:849: in search
return self.search_ext(base,scope,filterstr,attrlist,attrsonly,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:841: in search_ext
timeout,sizelimit,
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee54cf60>
func = <built-in method search_ext of LDAP object at 0x7f20dfd82a30>
args = ('cn=attribute uniqueness,cn=plugins,cn=config', 0, '(objectclass=nsSlapdPlugin)', ['objectClass', 'cn', 'nsslapd-pluginPath', 'nsslapd-pluginInitfunc', 'nsslapd-pluginType', 'nsslapd-pluginEnabled', ...], 0, None, ...)
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.SERVER_DOWN: {'desc': "Can't contact LDAP server"}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: SERVER_DOWN
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Invalid config (new): uniqueness-attribute-name is missing INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47823_test.py 57 INFO ############################################### ticket47823_test.py 58 INFO ####### ticket47823_test.py 59 INFO ####### Invalid config (new): uniqueness-attribute-name is missing ticket47823_test.py 60 INFO ####### ticket47823_test.py 61 INFO ###############################################
Failed tickets/ticket47823_test.py::test_ticket47823_invalid_config_6 1.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfdbac18>

def test_ticket47823_invalid_config_6(topology_st):
'''
Check that an invalid config is detected. No uniqueness enforced
Using new config: uniqueness-subtrees is missing
'''
_header(topology_st, "Invalid config (new): uniqueness-subtrees is missing")

_config_file(topology_st, action='save')

# create an invalid config without arg0
config = _build_config(topology_st, attr_name='cn', subtree_1=ACTIVE_DN, subtree_2=None, type_config='new',
> across_subtrees=False)

tickets/ticket47823_test.py:865:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47823_test.py:94: in _build_config
config = _uniqueness_config_entry(topology_st, attr_name)
tickets/ticket47823_test.py:74: in _uniqueness_config_entry
'nsslapd-pluginDescription'])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:1802: in getEntry
res = self.search(*args, **kwargs)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:849: in search
return self.search_ext(base,scope,filterstr,attrlist,attrsonly,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:841: in search_ext
timeout,sizelimit,
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee54cf60>
func = <built-in method search_ext of LDAP object at 0x7f20dfd82a30>
args = ('cn=attribute uniqueness,cn=plugins,cn=config', 0, '(objectclass=nsSlapdPlugin)', ['objectClass', 'cn', 'nsslapd-pluginPath', 'nsslapd-pluginInitfunc', 'nsslapd-pluginType', 'nsslapd-pluginEnabled', ...], 0, None, ...)
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.SERVER_DOWN: {'desc': "Can't contact LDAP server"}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: SERVER_DOWN
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Invalid config (new): uniqueness-subtrees is missing INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47823_test.py 57 INFO ############################################### ticket47823_test.py 58 INFO ####### ticket47823_test.py 59 INFO ####### Invalid config (new): uniqueness-subtrees is missing ticket47823_test.py 60 INFO ####### ticket47823_test.py 61 INFO ###############################################
Failed tickets/ticket47823_test.py::test_ticket47823_invalid_config_7 1.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfdbac18>

def test_ticket47823_invalid_config_7(topology_st):
'''
Check that an invalid config is detected. No uniqueness enforced
Using new config: uniqueness-subtrees is missing
'''
_header(topology_st, "Invalid config (new): uniqueness-subtrees are invalid")

_config_file(topology_st, action='save')

# create an invalid config without arg0
config = _build_config(topology_st, attr_name='cn', subtree_1="this_is dummy DN", subtree_2="an other=dummy DN",
> type_config='new', across_subtrees=False)

tickets/ticket47823_test.py:918:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47823_test.py:94: in _build_config
config = _uniqueness_config_entry(topology_st, attr_name)
tickets/ticket47823_test.py:74: in _uniqueness_config_entry
'nsslapd-pluginDescription'])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:1802: in getEntry
res = self.search(*args, **kwargs)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:849: in search
return self.search_ext(base,scope,filterstr,attrlist,attrsonly,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:841: in search_ext
timeout,sizelimit,
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee54cf60>
func = <built-in method search_ext of LDAP object at 0x7f20dfd82a30>
args = ('cn=attribute uniqueness,cn=plugins,cn=config', 0, '(objectclass=nsSlapdPlugin)', ['objectClass', 'cn', 'nsslapd-pluginPath', 'nsslapd-pluginInitfunc', 'nsslapd-pluginType', 'nsslapd-pluginEnabled', ...], 0, None, ...)
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.SERVER_DOWN: {'desc': "Can't contact LDAP server"}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: SERVER_DOWN
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Invalid config (new): uniqueness-subtrees are invalid INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47823_test.py 57 INFO ############################################### ticket47823_test.py 58 INFO ####### ticket47823_test.py 59 INFO ####### Invalid config (new): uniqueness-subtrees are invalid ticket47823_test.py 60 INFO ####### ticket47823_test.py 61 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_1 0.02
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_1(topology_st):
"""
NO exclude scope: Add an active entry and check its ALLOCATED_ATTR is unchanged (!= magic)
"""
_header(topology_st, 'NO exclude scope: Add an active entry and check its ALLOCATED_ATTR is unchanged (!= magic)')

topology_st.standalone.add_s(
Entry((ACTIVE_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': ACTIVE_USER1_CN,
'sn': ACTIVE_USER1_CN,
ALLOCATED_ATTR: str(20)})))
ent = topology_st.standalone.getEntry(ACTIVE_USER1_DN, ldap.SCOPE_BASE, "(objectclass=*)")
assert ent.hasAttr(ALLOCATED_ATTR)
> assert ent.getValue(ALLOCATED_ATTR) == str(20)
E AssertionError: assert b'20' == '20'
E + where b'20' = <bound method Entry.getValue of dn: cn=active user1,dc=example,dc=com\ncn: active user1\nemployeeNumber: 20\nobjectClass: top\nobjectClass: person\nobjectClass: organizationalPerson\nobjectClass: inetOrgPerson\nsn: active user1\n\n>('employeeNumber')
E + where <bound method Entry.getValue of dn: cn=active user1,dc=example,dc=com\ncn: active user1\nemployeeNumber: 20\nobjectClass: top\nobjectClass: person\nobjectClass: organizationalPerson\nobjectClass: inetOrgPerson\nsn: active user1\n\n> = dn: cn=active user1,dc=example,dc=com\ncn: active user1\nemployeeNumber: 20\nobjectClass: top\nobjectClass: person\nobjectClass: organizationalPerson\nobjectClass: inetOrgPerson\nsn: active user1\n\n.getValue
E + and '20' = str(20)

tickets/ticket47828_test.py:102: AssertionError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### NO exclude scope: Add an active entry and check its ALLOCATED_ATTR is unchanged (!= magic) INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### NO exclude scope: Add an active entry and check its ALLOCATED_ATTR is unchanged (!= magic) ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_3 0.02
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_3(topology_st):
"""
NO exclude scope: Add a staged entry and check its ALLOCATED_ATTR is unchanged (!= magic)
"""
_header(topology_st, 'NO exclude scope: Add a staged entry and check its ALLOCATED_ATTR is unchanged (!= magic)')

topology_st.standalone.add_s(
Entry((STAGED_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': STAGED_USER1_CN,
'sn': STAGED_USER1_CN,
ALLOCATED_ATTR: str(20)})))
ent = topology_st.standalone.getEntry(STAGED_USER1_DN, ldap.SCOPE_BASE, "(objectclass=*)")
assert ent.hasAttr(ALLOCATED_ATTR)
> assert ent.getValue(ALLOCATED_ATTR) == str(20)
E AssertionError: assert b'20' == '20'
E + where b'20' = <bound method Entry.getValue of dn: cn=staged user1,cn=provisioning,dc=example,dc=com\ncn: staged user1\nemployeeNumber: 20\nobjectClass: top\nobjectClass: person\nobjectClass: organizationalPerson\nobjectClass: inetOrgPerson\nsn: staged user1\n\n>('employeeNumber')
E + where <bound method Entry.getValue of dn: cn=staged user1,cn=provisioning,dc=example,dc=com\ncn: staged user1\nemployeeNumber: 20\nobjectClass: top\nobjectClass: person\nobjectClass: organizationalPerson\nobjectClass: inetOrgPerson\nsn: staged user1\n\n> = dn: cn=staged user1,cn=provisioning,dc=example,dc=com\ncn: staged user1\nemployeeNumber: 20\nobjectClass: top\nobjectClass: person\nobjectClass: organizationalPerson\nobjectClass: inetOrgPerson\nsn: staged user1\n\n.getValue
E + and '20' = str(20)

tickets/ticket47828_test.py:138: AssertionError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### NO exclude scope: Add a staged entry and check its ALLOCATED_ATTR is unchanged (!= magic) INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### NO exclude scope: Add a staged entry and check its ALLOCATED_ATTR is unchanged (!= magic) ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_4 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_4(topology_st):
'''
Exclude the provisioning container
'''
_header(topology_st, 'Exclude the provisioning container')

dn_config = "cn=excluded scope, cn=%s, %s" % (PLUGIN_DNA, DN_PLUGIN)
mod = [(ldap.MOD_REPLACE, 'dnaExcludeScope', PROVISIONING)]
> topology_st.standalone.modify_s(dn_config, mod)

tickets/ticket47828_test.py:151:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method modify_ext of LDAP object at 0x7f20dfd118a0>
args = ('cn=excluded scope, cn=Distributed Numeric Assignment Plugin, cn=plugins,cn=config', [(2, 'dnaExcludeScope', 'cn=provisioning,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Exclude the provisioning container INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Exclude the provisioning container ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_5 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_5(topology_st):
"""
Provisioning excluded scope: Add an active entry and check its ALLOCATED_ATTR is set
"""
_header(topology_st, 'Provisioning excluded scope: Add an active entry and check its ALLOCATED_ATTR is set')

topology_st.standalone.add_s(
Entry((ACTIVE_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': ACTIVE_USER1_CN,
'sn': ACTIVE_USER1_CN,
> ALLOCATED_ATTR: str(-1)})))

tickets/ticket47828_test.py:164:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method result4 of LDAP object at 0x7f20dfd118a0>
args = (12, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Provisioning excluded scope: Add an active entry and check its ALLOCATED_ATTR is set INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Provisioning excluded scope: Add an active entry and check its ALLOCATED_ATTR is set ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_6 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_6(topology_st):
"""
Provisioning excluded scope: Add an active entry and check its ALLOCATED_ATTR is unchanged (!= magic)
"""
_header(topology_st,
'Provisioning excluded scope: Add an active entry and check its ALLOCATED_ATTR is unchanged (!= magic)')

topology_st.standalone.add_s(
Entry((ACTIVE_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': ACTIVE_USER1_CN,
'sn': ACTIVE_USER1_CN,
> ALLOCATED_ATTR: str(20)})))

tickets/ticket47828_test.py:183:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method result4 of LDAP object at 0x7f20dfd118a0>
args = (13, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Provisioning excluded scope: Add an active entry and check its ALLOCATED_ATTR is unchanged (!= magic) INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Provisioning excluded scope: Add an active entry and check its ALLOCATED_ATTR is unchanged (!= magic) ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_7 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_7(topology_st):
"""
Provisioning excluded scope: Add a staged entry and check its ALLOCATED_ATTR is not set
"""
_header(topology_st, 'Provisioning excluded scope: Add a staged entry and check its ALLOCATED_ATTR is not set')

topology_st.standalone.add_s(
Entry((STAGED_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': STAGED_USER1_CN,
'sn': STAGED_USER1_CN,
> ALLOCATED_ATTR: str(-1)})))

tickets/ticket47828_test.py:201:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method result4 of LDAP object at 0x7f20dfd118a0>
args = (14, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Provisioning excluded scope: Add a staged entry and check its ALLOCATED_ATTR is not set INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Provisioning excluded scope: Add a staged entry and check its ALLOCATED_ATTR is not set ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_8 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_8(topology_st):
"""
Provisioning excluded scope: Add a staged entry and check its ALLOCATED_ATTR is unchanged (!= magic)
"""
_header(topology_st,
'Provisioning excluded scope: Add a staged entry and check its ALLOCATED_ATTR is unchanged (!= magic)')

topology_st.standalone.add_s(
Entry((STAGED_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': STAGED_USER1_CN,
'sn': STAGED_USER1_CN,
> ALLOCATED_ATTR: str(20)})))

tickets/ticket47828_test.py:220:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method result4 of LDAP object at 0x7f20dfd118a0>
args = (15, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Provisioning excluded scope: Add a staged entry and check its ALLOCATED_ATTR is unchanged (!= magic) INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Provisioning excluded scope: Add a staged entry and check its ALLOCATED_ATTR is unchanged (!= magic) ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_10 0.01
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_10(topology_st):
"""
Provisioning excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is unchanged (!= magic)
"""
_header(topology_st,
'Provisioning excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is unchanged (!= magic)')

topology_st.standalone.add_s(
Entry((DUMMY_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': DUMMY_USER1_CN,
'sn': DUMMY_USER1_CN,
ALLOCATED_ATTR: str(20)})))
ent = topology_st.standalone.getEntry(DUMMY_USER1_DN, ldap.SCOPE_BASE, "(objectclass=*)")
assert ent.hasAttr(ALLOCATED_ATTR)
> assert ent.getValue(ALLOCATED_ATTR) == str(20)
E AssertionError: assert b'20' == '20'
E + where b'20' = <bound method Entry.getValue of dn: cn=dummy user1,cn=dummy container,dc=example,dc=com\ncn: dummy user1\nemployeeNumber: 20\nobjectClass: top\nobjectClass: person\nobjectClass: organizationalPerson\nobjectClass: inetOrgPerson\nsn: dummy user1\n\n>('employeeNumber')
E + where <bound method Entry.getValue of dn: cn=dummy user1,cn=dummy container,dc=example,dc=com\ncn: dummy user1\nemployeeNumber: 20\nobjectClass: top\nobjectClass: person\nobjectClass: organizationalPerson\nobjectClass: inetOrgPerson\nsn: dummy user1\n\n> = dn: cn=dummy user1,cn=dummy container,dc=example,dc=com\ncn: dummy user1\nemployeeNumber: 20\nobjectClass: top\nobjectClass: person\nobjectClass: organizationalPerson\nobjectClass: inetOrgPerson\nsn: dummy user1\n\n.getValue
E + and '20' = str(20)

tickets/ticket47828_test.py:260: AssertionError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Provisioning excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is unchanged (!= magic) INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Provisioning excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is unchanged (!= magic) ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_11 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_11(topology_st):
'''
Exclude (in addition) the dummy container
'''
_header(topology_st, 'Exclude (in addition) the dummy container')

dn_config = "cn=excluded scope, cn=%s, %s" % (PLUGIN_DNA, DN_PLUGIN)
mod = [(ldap.MOD_ADD, 'dnaExcludeScope', DUMMY_CONTAINER)]
> topology_st.standalone.modify_s(dn_config, mod)

tickets/ticket47828_test.py:273:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method modify_ext of LDAP object at 0x7f20dfd118a0>
args = ('cn=excluded scope, cn=Distributed Numeric Assignment Plugin, cn=plugins,cn=config', [(0, 'dnaExcludeScope', 'cn=dummy container,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Exclude (in addition) the dummy container INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Exclude (in addition) the dummy container ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_12 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_12(topology_st):
"""
Provisioning/Dummy excluded scope: Add an active entry and check its ALLOCATED_ATTR is set
"""
_header(topology_st, 'Provisioning/Dummy excluded scope: Add an active entry and check its ALLOCATED_ATTR is set')

topology_st.standalone.add_s(
Entry((ACTIVE_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': ACTIVE_USER1_CN,
'sn': ACTIVE_USER1_CN,
> ALLOCATED_ATTR: str(-1)})))

tickets/ticket47828_test.py:286:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method result4 of LDAP object at 0x7f20dfd118a0>
args = (21, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Provisioning/Dummy excluded scope: Add an active entry and check its ALLOCATED_ATTR is set INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Provisioning/Dummy excluded scope: Add an active entry and check its ALLOCATED_ATTR is set ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_13 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_13(topology_st):
"""
Provisioning/Dummy excluded scope: Add an active entry and check its ALLOCATED_ATTR is unchanged (!= magic)
"""
_header(topology_st,
'Provisioning/Dummy excluded scope: Add an active entry and check its ALLOCATED_ATTR is unchanged (!= magic)')

topology_st.standalone.add_s(
Entry((ACTIVE_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': ACTIVE_USER1_CN,
'sn': ACTIVE_USER1_CN,
> ALLOCATED_ATTR: str(20)})))

tickets/ticket47828_test.py:305:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method result4 of LDAP object at 0x7f20dfd118a0>
args = (22, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Provisioning/Dummy excluded scope: Add an active entry and check its ALLOCATED_ATTR is unchanged (!= magic) INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Provisioning/Dummy excluded scope: Add an active entry and check its ALLOCATED_ATTR is unchanged (!= magic) ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_14 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_14(topology_st):
"""
Provisioning/Dummy excluded scope: Add a staged entry and check its ALLOCATED_ATTR is not set
"""
_header(topology_st,
'Provisioning/Dummy excluded scope: Add a staged entry and check its ALLOCATED_ATTR is not set')

topology_st.standalone.add_s(
Entry((STAGED_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': STAGED_USER1_CN,
'sn': STAGED_USER1_CN,
> ALLOCATED_ATTR: str(-1)})))

tickets/ticket47828_test.py:324:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method result4 of LDAP object at 0x7f20dfd118a0>
args = (23, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Provisioning/Dummy excluded scope: Add a staged entry and check its ALLOCATED_ATTR is not set INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Provisioning/Dummy excluded scope: Add a staged entry and check its ALLOCATED_ATTR is not set ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_15 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_15(topology_st):
"""
Provisioning/Dummy excluded scope: Add a staged entry and check its ALLOCATED_ATTR is unchanged (!= magic)
"""
_header(topology_st,
'Provisioning/Dummy excluded scope: Add a staged entry and check its ALLOCATED_ATTR is unchanged (!= magic)')

topology_st.standalone.add_s(
Entry((STAGED_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': STAGED_USER1_CN,
'sn': STAGED_USER1_CN,
> ALLOCATED_ATTR: str(20)})))

tickets/ticket47828_test.py:343:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method result4 of LDAP object at 0x7f20dfd118a0>
args = (24, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Provisioning/Dummy excluded scope: Add a staged entry and check its ALLOCATED_ATTR is unchanged (!= magic) INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Provisioning/Dummy excluded scope: Add a staged entry and check its ALLOCATED_ATTR is unchanged (!= magic) ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_16 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_16(topology_st):
"""
Provisioning/Dummy excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is not set
"""
_header(topology_st,
'Provisioning/Dummy excluded scope: Add an dummy entry and check its ALLOCATED_ATTR not is set')

topology_st.standalone.add_s(
Entry((DUMMY_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': DUMMY_USER1_CN,
'sn': DUMMY_USER1_CN,
> ALLOCATED_ATTR: str(-1)})))

tickets/ticket47828_test.py:362:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method result4 of LDAP object at 0x7f20dfd118a0>
args = (25, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Provisioning/Dummy excluded scope: Add an dummy entry and check its ALLOCATED_ATTR not is set INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Provisioning/Dummy excluded scope: Add an dummy entry and check its ALLOCATED_ATTR not is set ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_17 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_17(topology_st):
"""
Provisioning/Dummy excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is unchanged (!= magic)
"""
_header(topology_st,
'Provisioning/Dummy excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is unchanged (!= magic)')

topology_st.standalone.add_s(
Entry((DUMMY_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': DUMMY_USER1_CN,
'sn': DUMMY_USER1_CN,
> ALLOCATED_ATTR: str(20)})))

tickets/ticket47828_test.py:381:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method result4 of LDAP object at 0x7f20dfd118a0>
args = (26, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Provisioning/Dummy excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is unchanged (!= magic) INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Provisioning/Dummy excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is unchanged (!= magic) ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_18 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_18(topology_st):
'''
Exclude PROVISIONING and a wrong container
'''
_header(topology_st, 'Exclude PROVISIONING and a wrong container')

dn_config = "cn=excluded scope, cn=%s, %s" % (PLUGIN_DNA, DN_PLUGIN)
mod = [(ldap.MOD_REPLACE, 'dnaExcludeScope', PROVISIONING)]
> topology_st.standalone.modify_s(dn_config, mod)

tickets/ticket47828_test.py:397:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method modify_ext of LDAP object at 0x7f20dfd118a0>
args = ('cn=excluded scope, cn=Distributed Numeric Assignment Plugin, cn=plugins,cn=config', [(2, 'dnaExcludeScope', 'cn=provisioning,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Exclude PROVISIONING and a wrong container INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Exclude PROVISIONING and a wrong container ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_19 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_19(topology_st):
"""
Provisioning+wrong container excluded scope: Add an active entry and check its ALLOCATED_ATTR is set
"""
_header(topology_st,
'Provisioning+wrong container excluded scope: Add an active entry and check its ALLOCATED_ATTR is set')

topology_st.standalone.add_s(
Entry((ACTIVE_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': ACTIVE_USER1_CN,
'sn': ACTIVE_USER1_CN,
> ALLOCATED_ATTR: str(-1)})))

tickets/ticket47828_test.py:417:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method result4 of LDAP object at 0x7f20dfd118a0>
args = (27, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Provisioning+wrong container excluded scope: Add an active entry and check its ALLOCATED_ATTR is set INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Provisioning+wrong container excluded scope: Add an active entry and check its ALLOCATED_ATTR is set ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_20 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_20(topology_st):
"""
Provisioning+wrong container excluded scope: Add an active entry and check its ALLOCATED_ATTR is unchanged (!= magic)
"""
_header(topology_st,
'Provisioning+wrong container excluded scope: Add an active entry and check its ALLOCATED_ATTR is unchanged (!= magic)')

topology_st.standalone.add_s(
Entry((ACTIVE_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': ACTIVE_USER1_CN,
'sn': ACTIVE_USER1_CN,
> ALLOCATED_ATTR: str(20)})))

tickets/ticket47828_test.py:436:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method result4 of LDAP object at 0x7f20dfd118a0>
args = (28, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Provisioning+wrong container excluded scope: Add an active entry and check its ALLOCATED_ATTR is unchanged (!= magic) INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Provisioning+wrong container excluded scope: Add an active entry and check its ALLOCATED_ATTR is unchanged (!= magic) ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_21 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_21(topology_st):
"""
Provisioning+wrong container excluded scope: Add a staged entry and check its ALLOCATED_ATTR is not set
"""
_header(topology_st,
'Provisioning+wrong container excluded scope: Add a staged entry and check its ALLOCATED_ATTR is not set')

topology_st.standalone.add_s(
Entry((STAGED_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': STAGED_USER1_CN,
'sn': STAGED_USER1_CN,
> ALLOCATED_ATTR: str(-1)})))

tickets/ticket47828_test.py:455:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method result4 of LDAP object at 0x7f20dfd118a0>
args = (29, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Provisioning+wrong container excluded scope: Add a staged entry and check its ALLOCATED_ATTR is not set INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Provisioning+wrong container excluded scope: Add a staged entry and check its ALLOCATED_ATTR is not set ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_22 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_22(topology_st):
"""
Provisioning+wrong container excluded scope: Add a staged entry and check its ALLOCATED_ATTR is unchanged (!= magic)
"""
_header(topology_st,
'Provisioning+wrong container excluded scope: Add a staged entry and check its ALLOCATED_ATTR is unchanged (!= magic)')

topology_st.standalone.add_s(
Entry((STAGED_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': STAGED_USER1_CN,
'sn': STAGED_USER1_CN,
> ALLOCATED_ATTR: str(20)})))

tickets/ticket47828_test.py:474:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method result4 of LDAP object at 0x7f20dfd118a0>
args = (30, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Provisioning+wrong container excluded scope: Add a staged entry and check its ALLOCATED_ATTR is unchanged (!= magic) INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Provisioning+wrong container excluded scope: Add a staged entry and check its ALLOCATED_ATTR is unchanged (!= magic) ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_23 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_23(topology_st):
"""
Provisioning+wrong container excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is set
"""
_header(topology_st,
'Provisioning+wrong container excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is set')

topology_st.standalone.add_s(
Entry((DUMMY_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': DUMMY_USER1_CN,
'sn': DUMMY_USER1_CN,
> ALLOCATED_ATTR: str(-1)})))

tickets/ticket47828_test.py:493:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method result4 of LDAP object at 0x7f20dfd118a0>
args = (31, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Provisioning+wrong container excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is set INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Provisioning+wrong container excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is set ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_24 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_24(topology_st):
"""
Provisioning+wrong container excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is unchanged (!= magic)
"""
_header(topology_st,
'Provisioning+wrong container excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is unchanged (!= magic)')

topology_st.standalone.add_s(
Entry((DUMMY_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': DUMMY_USER1_CN,
'sn': DUMMY_USER1_CN,
> ALLOCATED_ATTR: str(20)})))

tickets/ticket47828_test.py:512:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method result4 of LDAP object at 0x7f20dfd118a0>
args = (32, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Provisioning+wrong container excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is unchanged (!= magic) INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Provisioning+wrong container excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is unchanged (!= magic) ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_25 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_25(topology_st):
'''
Exclude a wrong container
'''
_header(topology_st, 'Exclude a wrong container')

dn_config = "cn=excluded scope, cn=%s, %s" % (PLUGIN_DNA, DN_PLUGIN)

try:
mod = [(ldap.MOD_REPLACE, 'dnaExcludeScope', "invalidDN,%s" % SUFFIX)]
> topology_st.standalone.modify_s(dn_config, mod)

tickets/ticket47828_test.py:530:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method modify_ext of LDAP object at 0x7f20dfd118a0>
args = ('cn=excluded scope, cn=Distributed Numeric Assignment Plugin, cn=plugins,cn=config', [(2, 'dnaExcludeScope', 'invalidDN,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'i')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Exclude a wrong container INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Exclude a wrong container ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_26 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_26(topology_st):
"""
Wrong container excluded scope: Add an active entry and check its ALLOCATED_ATTR is set
"""
_header(topology_st, 'Wrong container excluded scope: Add an active entry and check its ALLOCATED_ATTR is set')

topology_st.standalone.add_s(
Entry((ACTIVE_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': ACTIVE_USER1_CN,
'sn': ACTIVE_USER1_CN,
> ALLOCATED_ATTR: str(-1)})))

tickets/ticket47828_test.py:546:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method result4 of LDAP object at 0x7f20dfd118a0>
args = (33, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Wrong container excluded scope: Add an active entry and check its ALLOCATED_ATTR is set INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Wrong container excluded scope: Add an active entry and check its ALLOCATED_ATTR is set ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_27 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_27(topology_st):
"""
Wrong container excluded scope: Add an active entry and check its ALLOCATED_ATTR is unchanged (!= magic)
"""
_header(topology_st,
'Wrong container excluded scope: Add an active entry and check its ALLOCATED_ATTR is unchanged (!= magic)')

topology_st.standalone.add_s(
Entry((ACTIVE_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': ACTIVE_USER1_CN,
'sn': ACTIVE_USER1_CN,
> ALLOCATED_ATTR: str(20)})))

tickets/ticket47828_test.py:565:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method result4 of LDAP object at 0x7f20dfd118a0>
args = (34, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Wrong container excluded scope: Add an active entry and check its ALLOCATED_ATTR is unchanged (!= magic) INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Wrong container excluded scope: Add an active entry and check its ALLOCATED_ATTR is unchanged (!= magic) ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_28 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_28(topology_st):
"""
Wrong container excluded scope: Add a staged entry and check its ALLOCATED_ATTR is not set
"""
_header(topology_st, 'Wrong container excluded scope: Add a staged entry and check its ALLOCATED_ATTR is not set')

topology_st.standalone.add_s(
Entry((STAGED_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': STAGED_USER1_CN,
'sn': STAGED_USER1_CN,
> ALLOCATED_ATTR: str(-1)})))

tickets/ticket47828_test.py:583:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method result4 of LDAP object at 0x7f20dfd118a0>
args = (35, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Wrong container excluded scope: Add a staged entry and check its ALLOCATED_ATTR is not set INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Wrong container excluded scope: Add a staged entry and check its ALLOCATED_ATTR is not set ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_29 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_29(topology_st):
"""
Wrong container excluded scope: Add a staged entry and check its ALLOCATED_ATTR is unchanged (!= magic)
"""
_header(topology_st,
'Wrong container excluded scope: Add a staged entry and check its ALLOCATED_ATTR is unchanged (!= magic)')

topology_st.standalone.add_s(
Entry((STAGED_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': STAGED_USER1_CN,
'sn': STAGED_USER1_CN,
> ALLOCATED_ATTR: str(20)})))

tickets/ticket47828_test.py:602:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method result4 of LDAP object at 0x7f20dfd118a0>
args = (36, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Wrong container excluded scope: Add a staged entry and check its ALLOCATED_ATTR is unchanged (!= magic) INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Wrong container excluded scope: Add a staged entry and check its ALLOCATED_ATTR is unchanged (!= magic) ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_30 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_30(topology_st):
"""
Wrong container excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is set
"""
_header(topology_st, 'Wrong container excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is set')

topology_st.standalone.add_s(
Entry((DUMMY_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': DUMMY_USER1_CN,
'sn': DUMMY_USER1_CN,
> ALLOCATED_ATTR: str(-1)})))

tickets/ticket47828_test.py:620:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method result4 of LDAP object at 0x7f20dfd118a0>
args = (37, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Wrong container excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is set INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Wrong container excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is set ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47828_test.py::test_ticket47828_run_31 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc6eb70>

def test_ticket47828_run_31(topology_st):
"""
Wrong container excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is unchanged (!= magic)
"""
_header(topology_st,
'Wrong container excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is unchanged (!= magic)')

topology_st.standalone.add_s(
Entry((DUMMY_USER1_DN, {'objectclass': "top person organizationalPerson inetOrgPerson".split(),
'cn': DUMMY_USER1_CN,
'sn': DUMMY_USER1_CN,
> ALLOCATED_ATTR: str(20)})))

tickets/ticket47828_test.py:639:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dc2a2710>
func = <built-in method result4 of LDAP object at 0x7f20dfd118a0>
args = (38, 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.ALREADY_EXISTS: {'desc': 'Already exists'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: ALREADY_EXISTS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Wrong container excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is unchanged (!= magic) INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47828_test.py 41 INFO ############################################### ticket47828_test.py 42 INFO ####### ticket47828_test.py 43 INFO ####### Wrong container excluded scope: Add an dummy entry and check its ALLOCATED_ATTR is unchanged (!= magic) ticket47828_test.py 44 INFO ####### ticket47828_test.py 45 INFO ###############################################
Failed tickets/ticket47829_test.py::test_ticket47829_init 0.69
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfbe33c8>

def test_ticket47829_init(topology_st):
topology_st.standalone.add_s(Entry((SCOPE_IN_DN, {
'objectclass': "top nscontainer".split(),
'cn': SCOPE_IN_DN})))
topology_st.standalone.add_s(Entry((SCOPE_OUT_DN, {
'objectclass': "top nscontainer".split(),
'cn': SCOPE_OUT_DN})))
topology_st.standalone.add_s(Entry((PROVISIONING_DN, {
'objectclass': "top nscontainer".split(),
'cn': PROVISIONING_CN})))
topology_st.standalone.add_s(Entry((ACTIVE_DN, {
'objectclass': "top nscontainer".split(),
'cn': ACTIVE_CN})))
topology_st.standalone.add_s(Entry((STAGE_DN, {
'objectclass': "top nscontainer".split(),
'cn': STAGE_DN})))
topology_st.standalone.add_s(Entry((DELETE_DN, {
'objectclass': "top nscontainer".split(),
'cn': DELETE_CN})))

# add groups
topology_st.standalone.add_s(Entry((ACTIVE_GROUP_DN, {
'objectclass': "top groupOfNames inetuser".split(),
'cn': ACTIVE_GROUP_CN})))
topology_st.standalone.add_s(Entry((STAGE_GROUP_DN, {
'objectclass': "top groupOfNames inetuser".split(),
'cn': STAGE_GROUP_CN})))
topology_st.standalone.add_s(Entry((OUT_GROUP_DN, {
'objectclass': "top groupOfNames inetuser".split(),
'cn': OUT_GROUP_CN})))
topology_st.standalone.add_s(Entry((INDIRECT_ACTIVE_GROUP_DN, {
'objectclass': "top groupOfNames".split(),
'cn': INDIRECT_ACTIVE_GROUP_CN})))

# add users
_add_user(topology_st, 'active')
_add_user(topology_st, 'stage')
_add_user(topology_st, 'out')

# enable memberof of with scope IN except provisioning
topology_st.standalone.plugins.enable(name=PLUGIN_MEMBER_OF)
dn = "cn=%s,%s" % (PLUGIN_MEMBER_OF, DN_PLUGIN)
> topology_st.standalone.modify_s(dn, [(ldap.MOD_REPLACE, 'memberOfEntryScope', SCOPE_IN_DN)])

tickets/ticket47829_test.py:221:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df99d898>
func = <built-in method modify_ext of LDAP object at 0x7f20ec047cb0>
args = ('cn=MemberOf Plugin,cn=plugins,cn=config', [(2, 'memberOfEntryScope', 'cn=in,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.
Failed tickets/ticket47829_test.py::test_ticket47829_mod_active_user_1 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfbe33c8>

def test_ticket47829_mod_active_user_1(topology_st):
_header(topology_st, 'MOD: add an active user to an active group')

# add active user to active group
_check_memberof(topology_st, action=ldap.MOD_ADD, user_dn=ACTIVE_USER_DN, group_dn=ACTIVE_GROUP_DN,
> find_result=True)

tickets/ticket47829_test.py:239:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47829_test.py:174: in _check_memberof
topology_st.standalone.modify_s(group_dn, [(action, 'member', user_dn)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df99d898>
func = <built-in method modify_ext of LDAP object at 0x7f20ec047cb0>
args = ('cn=active group,cn=accounts,cn=in,dc=example,dc=com', [(0, 'member', 'cn=active guy,cn=accounts,cn=in,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### MOD: add an active user to an active group INFO:lib389:####### INFO:lib389:############################################### INFO:lib389: add entry cn=active guy,cn=accounts,cn=in,dc=example,dc=com INFO:lib389:to group cn=active group,cn=accounts,cn=in,dc=example,dc=com ------------------------------ Captured log call -------------------------------
ticket47829_test.py 61 INFO ############################################### ticket47829_test.py 62 INFO ####### ticket47829_test.py 63 INFO ####### MOD: add an active user to an active group ticket47829_test.py 64 INFO ####### ticket47829_test.py 65 INFO ############################################### ticket47829_test.py 171 INFO add entry cn=active guy,cn=accounts,cn=in,dc=example,dc=com ticket47829_test.py 172 INFO to group cn=active group,cn=accounts,cn=in,dc=example,dc=com
Failed tickets/ticket47829_test.py::test_ticket47829_mod_active_user_2 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfbe33c8>

def test_ticket47829_mod_active_user_2(topology_st):
_header(topology_st, 'MOD: add an Active user to a Stage group')

# add active user to stage group
_check_memberof(topology_st, action=ldap.MOD_ADD, user_dn=ACTIVE_USER_DN, group_dn=STAGE_GROUP_DN,
> find_result=False)

tickets/ticket47829_test.py:252:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47829_test.py:174: in _check_memberof
topology_st.standalone.modify_s(group_dn, [(action, 'member', user_dn)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df99d898>
func = <built-in method modify_ext of LDAP object at 0x7f20ec047cb0>
args = ('cn=stage group,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com', [(0, 'member', 'cn=active guy,cn=accounts,cn=in,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### MOD: add an Active user to a Stage group INFO:lib389:####### INFO:lib389:############################################### INFO:lib389: add entry cn=active guy,cn=accounts,cn=in,dc=example,dc=com INFO:lib389:to group cn=stage group,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com ------------------------------ Captured log call -------------------------------
ticket47829_test.py 61 INFO ############################################### ticket47829_test.py 62 INFO ####### ticket47829_test.py 63 INFO ####### MOD: add an Active user to a Stage group ticket47829_test.py 64 INFO ####### ticket47829_test.py 65 INFO ############################################### ticket47829_test.py 171 INFO add entry cn=active guy,cn=accounts,cn=in,dc=example,dc=com ticket47829_test.py 172 INFO to group cn=stage group,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com
Failed tickets/ticket47829_test.py::test_ticket47829_mod_active_user_3 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfbe33c8>

def test_ticket47829_mod_active_user_3(topology_st):
_header(topology_st, 'MOD: add an Active user to a out of scope group')

# add active user to out of scope group
> _check_memberof(topology_st, action=ldap.MOD_ADD, user_dn=ACTIVE_USER_DN, group_dn=OUT_GROUP_DN, find_result=False)

tickets/ticket47829_test.py:264:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47829_test.py:174: in _check_memberof
topology_st.standalone.modify_s(group_dn, [(action, 'member', user_dn)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df99d898>
func = <built-in method modify_ext of LDAP object at 0x7f20ec047cb0>
args = ('cn=out group,cn=out,dc=example,dc=com', [(0, 'member', 'cn=active guy,cn=accounts,cn=in,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### MOD: add an Active user to a out of scope group INFO:lib389:####### INFO:lib389:############################################### INFO:lib389: add entry cn=active guy,cn=accounts,cn=in,dc=example,dc=com INFO:lib389:to group cn=out group,cn=out,dc=example,dc=com ------------------------------ Captured log call -------------------------------
ticket47829_test.py 61 INFO ############################################### ticket47829_test.py 62 INFO ####### ticket47829_test.py 63 INFO ####### MOD: add an Active user to a out of scope group ticket47829_test.py 64 INFO ####### ticket47829_test.py 65 INFO ############################################### ticket47829_test.py 171 INFO add entry cn=active guy,cn=accounts,cn=in,dc=example,dc=com ticket47829_test.py 172 INFO to group cn=out group,cn=out,dc=example,dc=com
Failed tickets/ticket47829_test.py::test_ticket47829_mod_stage_user_1 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfbe33c8>

def test_ticket47829_mod_stage_user_1(topology_st):
_header(topology_st, 'MOD: add an Stage user to a Active group')

# add stage user to active group
_check_memberof(topology_st, action=ldap.MOD_ADD, user_dn=STAGE_USER_DN, group_dn=ACTIVE_GROUP_DN,
> find_result=False)

tickets/ticket47829_test.py:277:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47829_test.py:174: in _check_memberof
topology_st.standalone.modify_s(group_dn, [(action, 'member', user_dn)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df99d898>
func = <built-in method modify_ext of LDAP object at 0x7f20ec047cb0>
args = ('cn=active group,cn=accounts,cn=in,dc=example,dc=com', [(0, 'member', 'cn=stage guy,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### MOD: add an Stage user to a Active group INFO:lib389:####### INFO:lib389:############################################### INFO:lib389: add entry cn=stage guy,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com INFO:lib389:to group cn=active group,cn=accounts,cn=in,dc=example,dc=com ------------------------------ Captured log call -------------------------------
ticket47829_test.py 61 INFO ############################################### ticket47829_test.py 62 INFO ####### ticket47829_test.py 63 INFO ####### MOD: add an Stage user to a Active group ticket47829_test.py 64 INFO ####### ticket47829_test.py 65 INFO ############################################### ticket47829_test.py 171 INFO add entry cn=stage guy,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com ticket47829_test.py 172 INFO to group cn=active group,cn=accounts,cn=in,dc=example,dc=com
Failed tickets/ticket47829_test.py::test_ticket47829_mod_stage_user_2 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfbe33c8>

def test_ticket47829_mod_stage_user_2(topology_st):
_header(topology_st, 'MOD: add an Stage user to a Stage group')

# add stage user to stage group
> _check_memberof(topology_st, action=ldap.MOD_ADD, user_dn=STAGE_USER_DN, group_dn=STAGE_GROUP_DN, find_result=False)

tickets/ticket47829_test.py:289:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47829_test.py:174: in _check_memberof
topology_st.standalone.modify_s(group_dn, [(action, 'member', user_dn)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df99d898>
func = <built-in method modify_ext of LDAP object at 0x7f20ec047cb0>
args = ('cn=stage group,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com', [(0, 'member', 'cn=stage guy,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### MOD: add an Stage user to a Stage group INFO:lib389:####### INFO:lib389:############################################### INFO:lib389: add entry cn=stage guy,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com INFO:lib389:to group cn=stage group,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com ------------------------------ Captured log call -------------------------------
ticket47829_test.py 61 INFO ############################################### ticket47829_test.py 62 INFO ####### ticket47829_test.py 63 INFO ####### MOD: add an Stage user to a Stage group ticket47829_test.py 64 INFO ####### ticket47829_test.py 65 INFO ############################################### ticket47829_test.py 171 INFO add entry cn=stage guy,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com ticket47829_test.py 172 INFO to group cn=stage group,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com
Failed tickets/ticket47829_test.py::test_ticket47829_mod_stage_user_3 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfbe33c8>

def test_ticket47829_mod_stage_user_3(topology_st):
_header(topology_st, 'MOD: add an Stage user to a out of scope group')

# add stage user to an out of scope group
> _check_memberof(topology_st, action=ldap.MOD_ADD, user_dn=STAGE_USER_DN, group_dn=OUT_GROUP_DN, find_result=False)

tickets/ticket47829_test.py:301:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47829_test.py:174: in _check_memberof
topology_st.standalone.modify_s(group_dn, [(action, 'member', user_dn)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df99d898>
func = <built-in method modify_ext of LDAP object at 0x7f20ec047cb0>
args = ('cn=out group,cn=out,dc=example,dc=com', [(0, 'member', 'cn=stage guy,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### MOD: add an Stage user to a out of scope group INFO:lib389:####### INFO:lib389:############################################### INFO:lib389: add entry cn=stage guy,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com INFO:lib389:to group cn=out group,cn=out,dc=example,dc=com ------------------------------ Captured log call -------------------------------
ticket47829_test.py 61 INFO ############################################### ticket47829_test.py 62 INFO ####### ticket47829_test.py 63 INFO ####### MOD: add an Stage user to a out of scope group ticket47829_test.py 64 INFO ####### ticket47829_test.py 65 INFO ############################################### ticket47829_test.py 171 INFO add entry cn=stage guy,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com ticket47829_test.py 172 INFO to group cn=out group,cn=out,dc=example,dc=com
Failed tickets/ticket47829_test.py::test_ticket47829_mod_out_user_1 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfbe33c8>

def test_ticket47829_mod_out_user_1(topology_st):
_header(topology_st, 'MOD: add an out of scope user to an active group')

# add out of scope user to active group
> _check_memberof(topology_st, action=ldap.MOD_ADD, user_dn=OUT_USER_DN, group_dn=ACTIVE_GROUP_DN, find_result=False)

tickets/ticket47829_test.py:313:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47829_test.py:174: in _check_memberof
topology_st.standalone.modify_s(group_dn, [(action, 'member', user_dn)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df99d898>
func = <built-in method modify_ext of LDAP object at 0x7f20ec047cb0>
args = ('cn=active group,cn=accounts,cn=in,dc=example,dc=com', [(0, 'member', 'cn=out guy,cn=out,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### MOD: add an out of scope user to an active group INFO:lib389:####### INFO:lib389:############################################### INFO:lib389: add entry cn=out guy,cn=out,dc=example,dc=com INFO:lib389:to group cn=active group,cn=accounts,cn=in,dc=example,dc=com ------------------------------ Captured log call -------------------------------
ticket47829_test.py 61 INFO ############################################### ticket47829_test.py 62 INFO ####### ticket47829_test.py 63 INFO ####### MOD: add an out of scope user to an active group ticket47829_test.py 64 INFO ####### ticket47829_test.py 65 INFO ############################################### ticket47829_test.py 171 INFO add entry cn=out guy,cn=out,dc=example,dc=com ticket47829_test.py 172 INFO to group cn=active group,cn=accounts,cn=in,dc=example,dc=com
Failed tickets/ticket47829_test.py::test_ticket47829_mod_out_user_2 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfbe33c8>

def test_ticket47829_mod_out_user_2(topology_st):
_header(topology_st, 'MOD: add an out of scope user to a Stage group')

# add out of scope user to stage group
> _check_memberof(topology_st, action=ldap.MOD_ADD, user_dn=OUT_USER_DN, group_dn=STAGE_GROUP_DN, find_result=False)

tickets/ticket47829_test.py:325:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47829_test.py:174: in _check_memberof
topology_st.standalone.modify_s(group_dn, [(action, 'member', user_dn)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df99d898>
func = <built-in method modify_ext of LDAP object at 0x7f20ec047cb0>
args = ('cn=stage group,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com', [(0, 'member', 'cn=out guy,cn=out,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### MOD: add an out of scope user to a Stage group INFO:lib389:####### INFO:lib389:############################################### INFO:lib389: add entry cn=out guy,cn=out,dc=example,dc=com INFO:lib389:to group cn=stage group,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com ------------------------------ Captured log call -------------------------------
ticket47829_test.py 61 INFO ############################################### ticket47829_test.py 62 INFO ####### ticket47829_test.py 63 INFO ####### MOD: add an out of scope user to a Stage group ticket47829_test.py 64 INFO ####### ticket47829_test.py 65 INFO ############################################### ticket47829_test.py 171 INFO add entry cn=out guy,cn=out,dc=example,dc=com ticket47829_test.py 172 INFO to group cn=stage group,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com
Failed tickets/ticket47829_test.py::test_ticket47829_mod_out_user_3 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfbe33c8>

def test_ticket47829_mod_out_user_3(topology_st):
_header(topology_st, 'MOD: add an out of scope user to an out of scope group')

# add out of scope user to stage group
> _check_memberof(topology_st, action=ldap.MOD_ADD, user_dn=OUT_USER_DN, group_dn=OUT_GROUP_DN, find_result=False)

tickets/ticket47829_test.py:337:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47829_test.py:174: in _check_memberof
topology_st.standalone.modify_s(group_dn, [(action, 'member', user_dn)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df99d898>
func = <built-in method modify_ext of LDAP object at 0x7f20ec047cb0>
args = ('cn=out group,cn=out,dc=example,dc=com', [(0, 'member', 'cn=out guy,cn=out,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### MOD: add an out of scope user to an out of scope group INFO:lib389:####### INFO:lib389:############################################### INFO:lib389: add entry cn=out guy,cn=out,dc=example,dc=com INFO:lib389:to group cn=out group,cn=out,dc=example,dc=com ------------------------------ Captured log call -------------------------------
ticket47829_test.py 61 INFO ############################################### ticket47829_test.py 62 INFO ####### ticket47829_test.py 63 INFO ####### MOD: add an out of scope user to an out of scope group ticket47829_test.py 64 INFO ####### ticket47829_test.py 65 INFO ############################################### ticket47829_test.py 171 INFO add entry cn=out guy,cn=out,dc=example,dc=com ticket47829_test.py 172 INFO to group cn=out group,cn=out,dc=example,dc=com
Failed tickets/ticket47829_test.py::test_ticket47829_mod_active_user_modrdn_active_user_1 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfbe33c8>

def test_ticket47829_mod_active_user_modrdn_active_user_1(topology_st):
_header(topology_st, 'add an Active user to a Active group. Then move Active user to Active')

# add Active user to active group
_check_memberof(topology_st, action=ldap.MOD_ADD, user_dn=ACTIVE_USER_DN, group_dn=ACTIVE_GROUP_DN,
> find_result=True)

tickets/ticket47829_test.py:349:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47829_test.py:174: in _check_memberof
topology_st.standalone.modify_s(group_dn, [(action, 'member', user_dn)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df99d898>
func = <built-in method modify_ext of LDAP object at 0x7f20ec047cb0>
args = ('cn=active group,cn=accounts,cn=in,dc=example,dc=com', [(0, 'member', 'cn=active guy,cn=accounts,cn=in,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### add an Active user to a Active group. Then move Active user to Active INFO:lib389:####### INFO:lib389:############################################### INFO:lib389: add entry cn=active guy,cn=accounts,cn=in,dc=example,dc=com INFO:lib389:to group cn=active group,cn=accounts,cn=in,dc=example,dc=com ------------------------------ Captured log call -------------------------------
ticket47829_test.py 61 INFO ############################################### ticket47829_test.py 62 INFO ####### ticket47829_test.py 63 INFO ####### add an Active user to a Active group. Then move Active user to Active ticket47829_test.py 64 INFO ####### ticket47829_test.py 65 INFO ############################################### ticket47829_test.py 171 INFO add entry cn=active guy,cn=accounts,cn=in,dc=example,dc=com ticket47829_test.py 172 INFO to group cn=active group,cn=accounts,cn=in,dc=example,dc=com
Failed tickets/ticket47829_test.py::test_ticket47829_mod_active_user_modrdn_stage_user_1 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfbe33c8>

def test_ticket47829_mod_active_user_modrdn_stage_user_1(topology_st):
_header(topology_st, 'add an Active user to a Active group. Then move Active user to Stage')

# add Active user to active group
_check_memberof(topology_st, action=ldap.MOD_ADD, user_dn=ACTIVE_USER_DN, group_dn=ACTIVE_GROUP_DN,
> find_result=True)

tickets/ticket47829_test.py:377:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47829_test.py:174: in _check_memberof
topology_st.standalone.modify_s(group_dn, [(action, 'member', user_dn)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df99d898>
func = <built-in method modify_ext of LDAP object at 0x7f20ec047cb0>
args = ('cn=active group,cn=accounts,cn=in,dc=example,dc=com', [(0, 'member', 'cn=active guy,cn=accounts,cn=in,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### add an Active user to a Active group. Then move Active user to Stage INFO:lib389:####### INFO:lib389:############################################### INFO:lib389: add entry cn=active guy,cn=accounts,cn=in,dc=example,dc=com INFO:lib389:to group cn=active group,cn=accounts,cn=in,dc=example,dc=com ------------------------------ Captured log call -------------------------------
ticket47829_test.py 61 INFO ############################################### ticket47829_test.py 62 INFO ####### ticket47829_test.py 63 INFO ####### add an Active user to a Active group. Then move Active user to Stage ticket47829_test.py 64 INFO ####### ticket47829_test.py 65 INFO ############################################### ticket47829_test.py 171 INFO add entry cn=active guy,cn=accounts,cn=in,dc=example,dc=com ticket47829_test.py 172 INFO to group cn=active group,cn=accounts,cn=in,dc=example,dc=com
Failed tickets/ticket47829_test.py::test_ticket47829_mod_active_user_modrdn_out_user_1 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfbe33c8>

def test_ticket47829_mod_active_user_modrdn_out_user_1(topology_st):
_header(topology_st, 'add an Active user to a Active group. Then move Active user to out of scope')

# add Active user to active group
_check_memberof(topology_st, action=ldap.MOD_ADD, user_dn=ACTIVE_USER_DN, group_dn=ACTIVE_GROUP_DN,
> find_result=True)

tickets/ticket47829_test.py:401:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47829_test.py:174: in _check_memberof
topology_st.standalone.modify_s(group_dn, [(action, 'member', user_dn)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df99d898>
func = <built-in method modify_ext of LDAP object at 0x7f20ec047cb0>
args = ('cn=active group,cn=accounts,cn=in,dc=example,dc=com', [(0, 'member', 'cn=active guy,cn=accounts,cn=in,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### add an Active user to a Active group. Then move Active user to out of scope INFO:lib389:####### INFO:lib389:############################################### INFO:lib389: add entry cn=active guy,cn=accounts,cn=in,dc=example,dc=com INFO:lib389:to group cn=active group,cn=accounts,cn=in,dc=example,dc=com ------------------------------ Captured log call -------------------------------
ticket47829_test.py 61 INFO ############################################### ticket47829_test.py 62 INFO ####### ticket47829_test.py 63 INFO ####### add an Active user to a Active group. Then move Active user to out of scope ticket47829_test.py 64 INFO ####### ticket47829_test.py 65 INFO ############################################### ticket47829_test.py 171 INFO add entry cn=active guy,cn=accounts,cn=in,dc=example,dc=com ticket47829_test.py 172 INFO to group cn=active group,cn=accounts,cn=in,dc=example,dc=com
Failed tickets/ticket47829_test.py::test_ticket47829_mod_modrdn_1 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfbe33c8>

def test_ticket47829_mod_modrdn_1(topology_st):
_header(topology_st, 'add an Stage user to a Active group. Then move Stage user to Active')

# add Stage user to active group
_check_memberof(topology_st, action=ldap.MOD_ADD, user_dn=STAGE_USER_DN, group_dn=ACTIVE_GROUP_DN,
> find_result=False)

tickets/ticket47829_test.py:425:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47829_test.py:174: in _check_memberof
topology_st.standalone.modify_s(group_dn, [(action, 'member', user_dn)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df99d898>
func = <built-in method modify_ext of LDAP object at 0x7f20ec047cb0>
args = ('cn=active group,cn=accounts,cn=in,dc=example,dc=com', [(0, 'member', 'cn=stage guy,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### add an Stage user to a Active group. Then move Stage user to Active INFO:lib389:####### INFO:lib389:############################################### INFO:lib389: add entry cn=stage guy,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com INFO:lib389:to group cn=active group,cn=accounts,cn=in,dc=example,dc=com ------------------------------ Captured log call -------------------------------
ticket47829_test.py 61 INFO ############################################### ticket47829_test.py 62 INFO ####### ticket47829_test.py 63 INFO ####### add an Stage user to a Active group. Then move Stage user to Active ticket47829_test.py 64 INFO ####### ticket47829_test.py 65 INFO ############################################### ticket47829_test.py 171 INFO add entry cn=stage guy,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com ticket47829_test.py 172 INFO to group cn=active group,cn=accounts,cn=in,dc=example,dc=com
Failed tickets/ticket47829_test.py::test_ticket47829_mod_stage_user_modrdn_active_user_1 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfbe33c8>

def test_ticket47829_mod_stage_user_modrdn_active_user_1(topology_st):
_header(topology_st, 'add an Stage user to a Active group. Then move Stage user to Active')

stage_user_dn = STAGE_USER_DN
stage_user_rdn = "cn=%s" % STAGE_USER_CN
active_user_dn = "cn=%s,%s" % (STAGE_USER_CN, ACTIVE_DN)

# add Stage user to active group
_check_memberof(topology_st, action=ldap.MOD_ADD, user_dn=stage_user_dn, group_dn=ACTIVE_GROUP_DN,
> find_result=False)

tickets/ticket47829_test.py:453:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47829_test.py:174: in _check_memberof
topology_st.standalone.modify_s(group_dn, [(action, 'member', user_dn)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df99d898>
func = <built-in method modify_ext of LDAP object at 0x7f20ec047cb0>
args = ('cn=active group,cn=accounts,cn=in,dc=example,dc=com', [(0, 'member', 'cn=stage guy,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### add an Stage user to a Active group. Then move Stage user to Active INFO:lib389:####### INFO:lib389:############################################### INFO:lib389: add entry cn=stage guy,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com INFO:lib389:to group cn=active group,cn=accounts,cn=in,dc=example,dc=com ------------------------------ Captured log call -------------------------------
ticket47829_test.py 61 INFO ############################################### ticket47829_test.py 62 INFO ####### ticket47829_test.py 63 INFO ####### add an Stage user to a Active group. Then move Stage user to Active ticket47829_test.py 64 INFO ####### ticket47829_test.py 65 INFO ############################################### ticket47829_test.py 171 INFO add entry cn=stage guy,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com ticket47829_test.py 172 INFO to group cn=active group,cn=accounts,cn=in,dc=example,dc=com
Failed tickets/ticket47829_test.py::test_ticket47829_indirect_active_group_1 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfbe33c8>

def test_ticket47829_indirect_active_group_1(topology_st):
_header(topology_st, 'add an Active group (G1) to an active group (G0). Then add active user to G1')

> topology_st.standalone.modify_s(INDIRECT_ACTIVE_GROUP_DN, [(ldap.MOD_ADD, 'member', ACTIVE_GROUP_DN)])

tickets/ticket47829_test.py:497:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df99d898>
func = <built-in method modify_ext of LDAP object at 0x7f20ec047cb0>
args = ('cn=indirect active group,cn=accounts,cn=in,dc=example,dc=com', [(0, 'member', 'cn=active group,cn=accounts,cn=in,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### add an Active group (G1) to an active group (G0). Then add active user to G1 INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47829_test.py 61 INFO ############################################### ticket47829_test.py 62 INFO ####### ticket47829_test.py 63 INFO ####### add an Active group (G1) to an active group (G0). Then add active user to G1 ticket47829_test.py 64 INFO ####### ticket47829_test.py 65 INFO ###############################################
Failed tickets/ticket47829_test.py::test_ticket47829_indirect_active_group_2 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfbe33c8>

def test_ticket47829_indirect_active_group_2(topology_st):
_header(topology_st,
'add an Active group (G1) to an active group (G0). Then add active user to G1. Then move active user to stage')

> topology_st.standalone.modify_s(INDIRECT_ACTIVE_GROUP_DN, [(ldap.MOD_ADD, 'member', ACTIVE_GROUP_DN)])

tickets/ticket47829_test.py:518:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df99d898>
func = <built-in method modify_ext of LDAP object at 0x7f20ec047cb0>
args = ('cn=indirect active group,cn=accounts,cn=in,dc=example,dc=com', [(0, 'member', 'cn=active group,cn=accounts,cn=in,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### add an Active group (G1) to an active group (G0). Then add active user to G1. Then move active user to stage INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47829_test.py 61 INFO ############################################### ticket47829_test.py 62 INFO ####### ticket47829_test.py 63 INFO ####### add an Active group (G1) to an active group (G0). Then add active user to G1. Then move active user to stage ticket47829_test.py 64 INFO ####### ticket47829_test.py 65 INFO ###############################################
Failed tickets/ticket47829_test.py::test_ticket47829_indirect_active_group_3 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfbe33c8>

def test_ticket47829_indirect_active_group_3(topology_st):
_header(topology_st,
'add an Active group (G1) to an active group (G0). Then add active user to G1. Then move active user to out of the scope')

> topology_st.standalone.modify_s(INDIRECT_ACTIVE_GROUP_DN, [(ldap.MOD_ADD, 'member', ACTIVE_GROUP_DN)])

tickets/ticket47829_test.py:558:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df99d898>
func = <built-in method modify_ext of LDAP object at 0x7f20ec047cb0>
args = ('cn=indirect active group,cn=accounts,cn=in,dc=example,dc=com', [(0, 'member', 'cn=active group,cn=accounts,cn=in,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### add an Active group (G1) to an active group (G0). Then add active user to G1. Then move active user to out of the scope INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47829_test.py 61 INFO ############################################### ticket47829_test.py 62 INFO ####### ticket47829_test.py 63 INFO ####### add an Active group (G1) to an active group (G0). Then add active user to G1. Then move active user to out of the scope ticket47829_test.py 64 INFO ####### ticket47829_test.py 65 INFO ###############################################
Failed tickets/ticket47829_test.py::test_ticket47829_indirect_active_group_4 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfbe33c8>

def test_ticket47829_indirect_active_group_4(topology_st):
_header(topology_st,
'add an Active group (G1) to an active group (G0). Then add stage user to G1. Then move user to active. Then move it back')

> topology_st.standalone.modify_s(INDIRECT_ACTIVE_GROUP_DN, [(ldap.MOD_ADD, 'member', ACTIVE_GROUP_DN)])

tickets/ticket47829_test.py:598:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df99d898>
func = <built-in method modify_ext of LDAP object at 0x7f20ec047cb0>
args = ('cn=indirect active group,cn=accounts,cn=in,dc=example,dc=com', [(0, 'member', 'cn=active group,cn=accounts,cn=in,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### add an Active group (G1) to an active group (G0). Then add stage user to G1. Then move user to active. Then move it back INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47829_test.py 61 INFO ############################################### ticket47829_test.py 62 INFO ####### ticket47829_test.py 63 INFO ####### add an Active group (G1) to an active group (G0). Then add stage user to G1. Then move user to active. Then move it back ticket47829_test.py 64 INFO ####### ticket47829_test.py 65 INFO ###############################################
Failed tickets/ticket47833_test.py::test_ticket47829_init 0.19
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfbe99b0>

def test_ticket47829_init(topology_st):
topology_st.standalone.add_s(Entry((SCOPE_IN_DN, {
'objectclass': "top nscontainer".split(),
'cn': SCOPE_IN_DN})))
topology_st.standalone.add_s(Entry((SCOPE_OUT_DN, {
'objectclass': "top nscontainer".split(),
'cn': SCOPE_OUT_DN})))
topology_st.standalone.add_s(Entry((PROVISIONING_DN, {
'objectclass': "top nscontainer".split(),
'cn': PROVISIONING_CN})))
topology_st.standalone.add_s(Entry((ACTIVE_DN, {
'objectclass': "top nscontainer".split(),
'cn': ACTIVE_CN})))
topology_st.standalone.add_s(Entry((STAGE_DN, {
'objectclass': "top nscontainer".split(),
'cn': STAGE_DN})))
topology_st.standalone.add_s(Entry((DELETE_DN, {
'objectclass': "top nscontainer".split(),
'cn': DELETE_CN})))

# add groups
topology_st.standalone.add_s(Entry((ACTIVE_GROUP_DN, {
'objectclass': "top groupOfNames".split(),
'cn': ACTIVE_GROUP_CN})))
topology_st.standalone.add_s(Entry((STAGE_GROUP_DN, {
'objectclass': "top groupOfNames".split(),
'cn': STAGE_GROUP_CN})))
topology_st.standalone.add_s(Entry((OUT_GROUP_DN, {
'objectclass': "top groupOfNames".split(),
'cn': OUT_GROUP_CN})))

# add users
_add_user(topology_st, 'active')
_add_user(topology_st, 'stage')
_add_user(topology_st, 'out')

# enable memberof of with scope account
topology_st.standalone.plugins.enable(name=PLUGIN_MEMBER_OF)
dn = "cn=%s,%s" % (PLUGIN_MEMBER_OF, DN_PLUGIN)
> topology_st.standalone.modify_s(dn, [(ldap.MOD_REPLACE, 'memberOfEntryScope', ACTIVE_DN)])

tickets/ticket47833_test.py:191:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dfa16080>
func = <built-in method modify_ext of LDAP object at 0x7f20df880df0>
args = ('cn=MemberOf Plugin,cn=plugins,cn=config', [(2, 'memberOfEntryScope', 'cn=accounts,cn=in,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.
Failed tickets/ticket47833_test.py::test_ticket47829_mod_stage_user_modrdn_stage_user_1 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfbe99b0>

def test_ticket47829_mod_stage_user_modrdn_stage_user_1(topology_st):
_header(topology_st, 'add an Stage user to a Active group. Then move Stage user to Stage')

old_stage_user_dn = STAGE_USER_DN
old_stage_user_rdn = "cn=%s" % STAGE_USER_CN
new_stage_user_rdn = "cn=x%s" % STAGE_USER_CN
new_stage_user_dn = "%s,%s" % (new_stage_user_rdn, STAGE_DN)

# add Stage user to active group
_check_memberof(topology_st, action=ldap.MOD_ADD, user_dn=old_stage_user_dn, group_dn=ACTIVE_GROUP_DN,
> find_result=False)

tickets/ticket47833_test.py:206:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47833_test.py:147: in _check_memberof
topology_st.standalone.modify_s(group_dn, [(action, 'member', user_dn)])
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dfa16080>
func = <built-in method modify_ext of LDAP object at 0x7f20df880df0>
args = ('cn=active group,cn=accounts,cn=in,dc=example,dc=com', [(0, 'member', 'cn=stage guy,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### add an Stage user to a Active group. Then move Stage user to Stage INFO:lib389:####### INFO:lib389:############################################### INFO:lib389: add entry cn=stage guy,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com INFO:lib389:to group cn=active group,cn=accounts,cn=in,dc=example,dc=com ------------------------------ Captured log call -------------------------------
ticket47833_test.py 57 INFO ############################################### ticket47833_test.py 58 INFO ####### ticket47833_test.py 59 INFO ####### add an Stage user to a Active group. Then move Stage user to Stage ticket47833_test.py 60 INFO ####### ticket47833_test.py 61 INFO ############################################### ticket47833_test.py 144 INFO add entry cn=stage guy,cn=staged users,cn=provisioning,cn=in,dc=example,dc=com ticket47833_test.py 145 INFO to group cn=active group,cn=accounts,cn=in,dc=example,dc=com
Failed tickets/ticket47838_test.py::test_47838_init 0.01
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee5487b8>

def test_47838_init(topology_st):
"""
Generate self signed cert and import it to the DS cert db.
Enable SSL
"""
_header(topology_st, 'Testing Ticket 47838 - harden the list of ciphers available by default')

onss_version = os.popen("rpm -q nss | awk -F'-' '{print $2}'", "r")
global nss_version
nss_version = onss_version.readline()

> topology_st.standalone.nss_ssl.reinit()

tickets/ticket47838_test.py:65:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ec042b00>, name = 'nss_ssl'

def __getattr__(self,name):
if name in self.CLASSATTR_OPTION_MAPPING:
return self.get_option(self.CLASSATTR_OPTION_MAPPING[name])
elif name in self.__dict__:
return self.__dict__[name]
else:
raise AttributeError('%s has no attribute %s' % (
> self.__class__.__name__,repr(name)
))
E AttributeError: DirSrv has no attribute 'nss_ssl'

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:352: AttributeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Testing Ticket 47838 - harden the list of ciphers available by default INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47838_test.py 47 INFO ############################################### ticket47838_test.py 48 INFO ####### ticket47838_test.py 49 INFO ####### Testing Ticket 47838 - harden the list of ciphers available by default ticket47838_test.py 50 INFO ####### ticket47838_test.py 51 INFO ###############################################
Failed tickets/ticket47838_test.py::test_47838_run_0 0.10
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee5487b8>

def test_47838_run_0(topology_st):
"""
Check nsSSL3Ciphers: +all
All ciphers are enabled except null.
Note: allowWeakCipher: on
"""
_header(topology_st, 'Test Case 1 - Check the ciphers availability for "+all"; allowWeakCipher: on')

topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
> topology_st.standalone.modify_s(CONFIG_DN, [(ldap.MOD_REPLACE, 'nsslapd-errorlog-level', '64')])

tickets/ticket47838_test.py:116:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ec042b00>
func = <built-in method modify_ext of LDAP object at 0x7f20df94cd50>
args = ('cn=config', [(2, 'nsslapd-errorlog-level', '64')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '6')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Test Case 1 - Check the ciphers availability for "+all"; allowWeakCipher: on INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47838_test.py 47 INFO ############################################### ticket47838_test.py 48 INFO ####### ticket47838_test.py 49 INFO ####### Test Case 1 - Check the ciphers availability for "+all"; allowWeakCipher: on ticket47838_test.py 50 INFO ####### ticket47838_test.py 51 INFO ###############################################
Failed tickets/ticket47838_test.py::test_47838_run_1 0.10
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee5487b8>

def test_47838_run_1(topology_st):
"""
Check nsSSL3Ciphers: +all
All ciphers are enabled except null.
Note: default allowWeakCipher (i.e., off) for +all
"""
_header(topology_st, 'Test Case 2 - Check the ciphers availability for "+all" with default allowWeakCiphers')

topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
> topology_st.standalone.modify_s(CONFIG_DN, [(ldap.MOD_REPLACE, 'nsslapd-errorlog-level', '64')])

tickets/ticket47838_test.py:155:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ec042b00>
func = <built-in method modify_ext of LDAP object at 0x7f20df94cd50>
args = ('cn=config', [(2, 'nsslapd-errorlog-level', '64')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '6')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Test Case 2 - Check the ciphers availability for "+all" with default allowWeakCiphers INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47838_test.py 47 INFO ############################################### ticket47838_test.py 48 INFO ####### ticket47838_test.py 49 INFO ####### Test Case 2 - Check the ciphers availability for "+all" with default allowWeakCiphers ticket47838_test.py 50 INFO ####### ticket47838_test.py 51 INFO ###############################################
Failed tickets/ticket47838_test.py::test_47838_run_2 0.11
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee5487b8>

def test_47838_run_2(topology_st):
"""
Check nsSSL3Ciphers: +rsa_aes_128_sha,+rsa_aes_256_sha
rsa_aes_128_sha, tls_rsa_aes_128_sha, rsa_aes_256_sha, tls_rsa_aes_256_sha are enabled.
default allowWeakCipher
"""
_header(topology_st,
'Test Case 3 - Check the ciphers availability for "+rsa_aes_128_sha,+rsa_aes_256_sha" with default allowWeakCipher')

topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
topology_st.standalone.modify_s(ENCRYPTION_DN,
> [(ldap.MOD_REPLACE, 'nsSSL3Ciphers', '+rsa_aes_128_sha,+rsa_aes_256_sha')])

tickets/ticket47838_test.py:201:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ec042b00>
func = <built-in method modify_ext of LDAP object at 0x7f20df94cd50>
args = ('cn=encryption,cn=config', [(2, 'nsSSL3Ciphers', '+rsa_aes_128_sha,+rsa_aes_256_sha')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '+')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Test Case 3 - Check the ciphers availability for "+rsa_aes_128_sha,+rsa_aes_256_sha" with default allowWeakCipher INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47838_test.py 47 INFO ############################################### ticket47838_test.py 48 INFO ####### ticket47838_test.py 49 INFO ####### Test Case 3 - Check the ciphers availability for "+rsa_aes_128_sha,+rsa_aes_256_sha" with default allowWeakCipher ticket47838_test.py 50 INFO ####### ticket47838_test.py 51 INFO ###############################################
Failed tickets/ticket47838_test.py::test_47838_run_3 0.10
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee5487b8>

def test_47838_run_3(topology_st):
"""
Check nsSSL3Ciphers: -all
All ciphers are disabled.
default allowWeakCipher
"""
_header(topology_st, 'Test Case 4 - Check the ciphers availability for "-all"')

topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
> topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3Ciphers', '-all')])

tickets/ticket47838_test.py:234:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ec042b00>
func = <built-in method modify_ext of LDAP object at 0x7f20df94cd50>
args = ('cn=encryption,cn=config', [(2, 'nsSSL3Ciphers', '-all')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '-')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Test Case 4 - Check the ciphers availability for "-all" INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47838_test.py 47 INFO ############################################### ticket47838_test.py 48 INFO ####### ticket47838_test.py 49 INFO ####### Test Case 4 - Check the ciphers availability for "-all" ticket47838_test.py 50 INFO ####### ticket47838_test.py 51 INFO ###############################################
Failed tickets/ticket47838_test.py::test_47838_run_4 0.10
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee5487b8>

def test_47838_run_4(topology_st):
"""
Check no nsSSL3Ciphers
Default ciphers are enabled.
default allowWeakCipher
"""
_header(topology_st, 'Test Case 5 - Check no nsSSL3Ciphers (default setting) with default allowWeakCipher')

topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
> topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_DELETE, 'nsSSL3Ciphers', '-all')])

tickets/ticket47838_test.py:266:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ec042b00>
func = <built-in method modify_ext of LDAP object at 0x7f20df94cd50>
args = ('cn=encryption,cn=config', [(1, 'nsSSL3Ciphers', '-all')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '-')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Test Case 5 - Check no nsSSL3Ciphers (default setting) with default allowWeakCipher INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47838_test.py 47 INFO ############################################### ticket47838_test.py 48 INFO ####### ticket47838_test.py 49 INFO ####### Test Case 5 - Check no nsSSL3Ciphers (default setting) with default allowWeakCipher ticket47838_test.py 50 INFO ####### ticket47838_test.py 51 INFO ###############################################
Failed tickets/ticket47838_test.py::test_47838_run_5 0.11
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee5487b8>

def test_47838_run_5(topology_st):
"""
Check nsSSL3Ciphers: default
Default ciphers are enabled.
default allowWeakCipher
"""
_header(topology_st, 'Test Case 6 - Check default nsSSL3Ciphers (default setting) with default allowWeakCipher')

topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
> topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3Ciphers', 'default')])

tickets/ticket47838_test.py:309:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ec042b00>
func = <built-in method modify_ext of LDAP object at 0x7f20df94cd50>
args = ('cn=encryption,cn=config', [(2, 'nsSSL3Ciphers', 'default')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'd')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Test Case 6 - Check default nsSSL3Ciphers (default setting) with default allowWeakCipher INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47838_test.py 47 INFO ############################################### ticket47838_test.py 48 INFO ####### ticket47838_test.py 49 INFO ####### Test Case 6 - Check default nsSSL3Ciphers (default setting) with default allowWeakCipher ticket47838_test.py 50 INFO ####### ticket47838_test.py 51 INFO ###############################################
Failed tickets/ticket47838_test.py::test_47838_run_6 0.10
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee5487b8>

def test_47838_run_6(topology_st):
"""
Check nsSSL3Ciphers: +all,-rsa_rc4_128_md5
All ciphers are disabled.
default allowWeakCipher
"""
_header(topology_st,
'Test Case 7 - Check nsSSL3Ciphers: +all,-tls_dhe_rsa_aes_128_gcm_sha with default allowWeakCipher')

topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
topology_st.standalone.modify_s(ENCRYPTION_DN,
> [(ldap.MOD_REPLACE, 'nsSSL3Ciphers', '+all,-tls_dhe_rsa_aes_128_gcm_sha')])

tickets/ticket47838_test.py:354:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ec042b00>
func = <built-in method modify_ext of LDAP object at 0x7f20df94cd50>
args = ('cn=encryption,cn=config', [(2, 'nsSSL3Ciphers', '+all,-tls_dhe_rsa_aes_128_gcm_sha')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '+')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Test Case 7 - Check nsSSL3Ciphers: +all,-tls_dhe_rsa_aes_128_gcm_sha with default allowWeakCipher INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47838_test.py 47 INFO ############################################### ticket47838_test.py 48 INFO ####### ticket47838_test.py 49 INFO ####### Test Case 7 - Check nsSSL3Ciphers: +all,-tls_dhe_rsa_aes_128_gcm_sha with default allowWeakCipher ticket47838_test.py 50 INFO ####### ticket47838_test.py 51 INFO ###############################################
Failed tickets/ticket47838_test.py::test_47838_run_7 0.11
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee5487b8>

def test_47838_run_7(topology_st):
"""
Check nsSSL3Ciphers: -all,+rsa_rc4_128_md5
All ciphers are disabled.
default allowWeakCipher
"""
_header(topology_st, 'Test Case 8 - Check nsSSL3Ciphers: -all,+rsa_rc4_128_md5 with default allowWeakCipher')

topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
> topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3Ciphers', '-all,+rsa_rc4_128_md5')])

tickets/ticket47838_test.py:389:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ec042b00>
func = <built-in method modify_ext of LDAP object at 0x7f20df94cd50>
args = ('cn=encryption,cn=config', [(2, 'nsSSL3Ciphers', '-all,+rsa_rc4_128_md5')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '-')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Test Case 8 - Check nsSSL3Ciphers: -all,+rsa_rc4_128_md5 with default allowWeakCipher INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47838_test.py 47 INFO ############################################### ticket47838_test.py 48 INFO ####### ticket47838_test.py 49 INFO ####### Test Case 8 - Check nsSSL3Ciphers: -all,+rsa_rc4_128_md5 with default allowWeakCipher ticket47838_test.py 50 INFO ####### ticket47838_test.py 51 INFO ###############################################
Failed tickets/ticket47838_test.py::test_47838_run_8 0.10
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee5487b8>

def test_47838_run_8(topology_st):
"""
Check nsSSL3Ciphers: default + allowWeakCipher: off
Strong Default ciphers are enabled.
"""
_header(topology_st, 'Test Case 9 - Check default nsSSL3Ciphers (default setting + allowWeakCipher: off)')

topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3Ciphers', 'default'),
> (ldap.MOD_REPLACE, 'allowWeakCipher', 'off')])

tickets/ticket47838_test.py:422:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ec042b00>
func = <built-in method modify_ext of LDAP object at 0x7f20df94cd50>
args = ('cn=encryption,cn=config', [(2, 'nsSSL3Ciphers', 'default'), (2, 'allowWeakCipher', 'off')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'd')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Test Case 9 - Check default nsSSL3Ciphers (default setting + allowWeakCipher: off) INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47838_test.py 47 INFO ############################################### ticket47838_test.py 48 INFO ####### ticket47838_test.py 49 INFO ####### Test Case 9 - Check default nsSSL3Ciphers (default setting + allowWeakCipher: off) ticket47838_test.py 50 INFO ####### ticket47838_test.py 51 INFO ###############################################
Failed tickets/ticket47838_test.py::test_47838_run_9 0.11
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee5487b8>

def test_47838_run_9(topology_st):
"""
Check no nsSSL3Ciphers
Default ciphers are enabled.
allowWeakCipher: on
nsslapd-errorlog-level: 0
"""
_header(topology_st,
'Test Case 10 - Check no nsSSL3Ciphers (default setting) with no errorlog-level & allowWeakCipher on')

topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3Ciphers', None),
> (ldap.MOD_REPLACE, 'allowWeakCipher', 'on')])

tickets/ticket47838_test.py:468:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ec042b00>
func = <built-in method modify_ext of LDAP object at 0x7f20df94cd50>
args = ('cn=encryption,cn=config', [(2, 'nsSSL3Ciphers', None), (2, 'allowWeakCipher', 'on')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'o')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Test Case 10 - Check no nsSSL3Ciphers (default setting) with no errorlog-level & allowWeakCipher on INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47838_test.py 47 INFO ############################################### ticket47838_test.py 48 INFO ####### ticket47838_test.py 49 INFO ####### Test Case 10 - Check no nsSSL3Ciphers (default setting) with no errorlog-level & allowWeakCipher on ticket47838_test.py 50 INFO ####### ticket47838_test.py 51 INFO ###############################################
Failed tickets/ticket47838_test.py::test_47838_run_10 0.10
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee5487b8>

def test_47838_run_10(topology_st):
"""
Check nsSSL3Ciphers: -TLS_RSA_WITH_NULL_MD5,+TLS_RSA_WITH_RC4_128_MD5,
+TLS_RSA_EXPORT_WITH_RC4_40_MD5,+TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5,
+TLS_DHE_RSA_WITH_DES_CBC_SHA,+SSL_RSA_FIPS_WITH_DES_CBC_SHA,
+TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,+SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA,
+TLS_RSA_EXPORT1024_WITH_RC4_56_SHA,+TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA,
-SSL_CK_RC4_128_WITH_MD5,-SSL_CK_RC4_128_EXPORT40_WITH_MD5,
-SSL_CK_RC2_128_CBC_WITH_MD5,-SSL_CK_RC2_128_CBC_EXPORT40_WITH_MD5,
-SSL_CK_DES_64_CBC_WITH_MD5,-SSL_CK_DES_192_EDE3_CBC_WITH_MD5
allowWeakCipher: on
nsslapd-errorlog-level: 0
"""
_header(topology_st,
'Test Case 11 - Check nsSSL3Ciphers: long list using the NSS Cipher Suite name with allowWeakCipher on')

topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3Ciphers',
> '-TLS_RSA_WITH_NULL_MD5,+TLS_RSA_WITH_RC4_128_MD5,+TLS_RSA_EXPORT_WITH_RC4_40_MD5,+TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5,+TLS_DHE_RSA_WITH_DES_CBC_SHA,+SSL_RSA_FIPS_WITH_DES_CBC_SHA,+TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,+SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA,+TLS_RSA_EXPORT1024_WITH_RC4_56_SHA,+TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA,-SSL_CK_RC4_128_WITH_MD5,-SSL_CK_RC4_128_EXPORT40_WITH_MD5,-SSL_CK_RC2_128_CBC_WITH_MD5,-SSL_CK_RC2_128_CBC_EXPORT40_WITH_MD5,-SSL_CK_DES_64_CBC_WITH_MD5,-SSL_CK_DES_192_EDE3_CBC_WITH_MD5')])

tickets/ticket47838_test.py:526:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ec042b00>
func = <built-in method modify_ext of LDAP object at 0x7f20df94cd50>
args = ('cn=encryption,cn=config', [(2, 'nsSSL3Ciphers', '-TLS_RSA_WITH_NULL_MD5,+TLS_RSA_WITH_RC4_128_MD5,+TLS_RSA_EXPORT_WI...MD5,-SSL_CK_RC2_128_CBC_EXPORT40_WITH_MD5,-SSL_CK_DES_64_CBC_WITH_MD5,-SSL_CK_DES_192_EDE3_CBC_WITH_MD5')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '-')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Test Case 11 - Check nsSSL3Ciphers: long list using the NSS Cipher Suite name with allowWeakCipher on INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47838_test.py 47 INFO ############################################### ticket47838_test.py 48 INFO ####### ticket47838_test.py 49 INFO ####### Test Case 11 - Check nsSSL3Ciphers: long list using the NSS Cipher Suite name with allowWeakCipher on ticket47838_test.py 50 INFO ####### ticket47838_test.py 51 INFO ###############################################
Failed tickets/ticket47838_test.py::test_47838_run_11 0.11
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee5487b8>

def test_47838_run_11(topology_st):
"""
Check nsSSL3Ciphers: +fortezza
SSL_GetImplementedCiphers does not return this as a secuire cipher suite
"""
_header(topology_st, 'Test Case 12 - Check nsSSL3Ciphers: +fortezza, which is not supported')

topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
> topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3Ciphers', '+fortezza')])

tickets/ticket47838_test.py:567:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ec042b00>
func = <built-in method modify_ext of LDAP object at 0x7f20df94cd50>
args = ('cn=encryption,cn=config', [(2, 'nsSSL3Ciphers', '+fortezza')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '+')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Test Case 12 - Check nsSSL3Ciphers: +fortezza, which is not supported INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47838_test.py 47 INFO ############################################### ticket47838_test.py 48 INFO ####### ticket47838_test.py 49 INFO ####### Test Case 12 - Check nsSSL3Ciphers: +fortezza, which is not supported ticket47838_test.py 50 INFO ####### ticket47838_test.py 51 INFO ###############################################
Failed tickets/ticket47838_test.py::test_47928_run_0 0.10
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee5487b8>

def test_47928_run_0(topology_st):
"""
No SSL version config parameters.
Check SSL3 (TLS1.0) is off.
"""
_header(topology_st, 'Test Case 13 - No SSL version config parameters')

topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
# add them once and remove them
topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3', 'off'),
(ldap.MOD_REPLACE, 'nsTLS1', 'on'),
(ldap.MOD_REPLACE, 'sslVersionMin', 'TLS1.1'),
> (ldap.MOD_REPLACE, 'sslVersionMax', 'TLS1.2')])

tickets/ticket47838_test.py:599:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ec042b00>
func = <built-in method modify_ext of LDAP object at 0x7f20df94cd50>
args = ('cn=encryption,cn=config', [(2, 'nsSSL3', 'off'), (2, 'nsTLS1', 'on'), (2, 'sslVersionMin', 'TLS1.1'), (2, 'sslVersionMax', 'TLS1.2')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'o')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Test Case 13 - No SSL version config parameters INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47838_test.py 47 INFO ############################################### ticket47838_test.py 48 INFO ####### ticket47838_test.py 49 INFO ####### Test Case 13 - No SSL version config parameters ticket47838_test.py 50 INFO ####### ticket47838_test.py 51 INFO ###############################################
Failed tickets/ticket47838_test.py::test_47928_run_1 0.11
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee5487b8>

def test_47928_run_1(topology_st):
"""
No nsSSL3, nsTLS1; sslVersionMin > sslVersionMax
Check sslVersionMax is ignored.
"""
_header(topology_st, 'Test Case 14 - No nsSSL3, nsTLS1; sslVersionMin > sslVersionMax')

topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'sslVersionMin', 'TLS1.2'),
> (ldap.MOD_REPLACE, 'sslVersionMax', 'TLS1.1')])

tickets/ticket47838_test.py:633:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ec042b00>
func = <built-in method modify_ext of LDAP object at 0x7f20df94cd50>
args = ('cn=encryption,cn=config', [(2, 'sslVersionMin', 'TLS1.2'), (2, 'sslVersionMax', 'TLS1.1')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'T')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Test Case 14 - No nsSSL3, nsTLS1; sslVersionMin > sslVersionMax INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47838_test.py 47 INFO ############################################### ticket47838_test.py 48 INFO ####### ticket47838_test.py 49 INFO ####### Test Case 14 - No nsSSL3, nsTLS1; sslVersionMin > sslVersionMax ticket47838_test.py 50 INFO ####### ticket47838_test.py 51 INFO ###############################################
Failed tickets/ticket47838_test.py::test_47928_run_2 0.10
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee5487b8>

def test_47928_run_2(topology_st):
"""
nsSSL3: on; sslVersionMin: TLS1.1; sslVersionMax: TLS1.2
Conflict between nsSSL3 and range; nsSSL3 is disabled
"""
_header(topology_st, 'Test Case 15 - nsSSL3: on; sslVersionMin: TLS1.1; sslVersionMax: TLS1.2')

topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'sslVersionMin', 'TLS1.1'),
(ldap.MOD_REPLACE, 'sslVersionMax', 'TLS1.2'),
> (ldap.MOD_REPLACE, 'nsSSL3', 'on')])

tickets/ticket47838_test.py:670:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ec042b00>
func = <built-in method modify_ext of LDAP object at 0x7f20df94cd50>
args = ('cn=encryption,cn=config', [(2, 'sslVersionMin', 'TLS1.1'), (2, 'sslVersionMax', 'TLS1.2'), (2, 'nsSSL3', 'on')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'T')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Test Case 15 - nsSSL3: on; sslVersionMin: TLS1.1; sslVersionMax: TLS1.2 INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47838_test.py 47 INFO ############################################### ticket47838_test.py 48 INFO ####### ticket47838_test.py 49 INFO ####### Test Case 15 - nsSSL3: on; sslVersionMin: TLS1.1; sslVersionMax: TLS1.2 ticket47838_test.py 50 INFO ####### ticket47838_test.py 51 INFO ###############################################
Failed tickets/ticket47838_test.py::test_47928_run_3 0.10
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee5487b8>

def test_47928_run_3(topology_st):
"""
nsSSL3: on; nsTLS1: off; sslVersionMin: TLS1.1; sslVersionMax: TLS1.2
Conflict between nsSSL3/nsTLS1 and range; nsSSL3 is disabled; nsTLS1 is enabled.
"""
_header(topology_st, 'Test Case 16 - nsSSL3: on; nsTLS1: off; sslVersionMin: TLS1.1; sslVersionMax: TLS1.2')

topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'sslVersionMin', 'TLS1.1'),
(ldap.MOD_REPLACE, 'sslVersionMax', 'TLS1.2'),
(ldap.MOD_REPLACE, 'nsSSL3', 'on'),
> (ldap.MOD_REPLACE, 'nsTLS1', 'off')])

tickets/ticket47838_test.py:717:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ec042b00>
func = <built-in method modify_ext of LDAP object at 0x7f20df94cd50>
args = ('cn=encryption,cn=config', [(2, 'sslVersionMin', 'TLS1.1'), (2, 'sslVersionMax', 'TLS1.2'), (2, 'nsSSL3', 'on'), (2, 'nsTLS1', 'off')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'T')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Test Case 16 - nsSSL3: on; nsTLS1: off; sslVersionMin: TLS1.1; sslVersionMax: TLS1.2 INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47838_test.py 47 INFO ############################################### ticket47838_test.py 48 INFO ####### ticket47838_test.py 49 INFO ####### Test Case 16 - nsSSL3: on; nsTLS1: off; sslVersionMin: TLS1.1; sslVersionMax: TLS1.2 ticket47838_test.py 50 INFO ####### ticket47838_test.py 51 INFO ###############################################
Failed tickets/ticket47838_test.py::test_47838_run_last 0.11
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee5487b8>

def test_47838_run_last(topology_st):
"""
Check nsSSL3Ciphers: all <== invalid value
All ciphers are disabled.
"""
_header(topology_st, 'Test Case 17 - Check nsSSL3Ciphers: all, which is invalid')

topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
topology_st.standalone.modify_s(CONFIG_DN, [(ldap.MOD_REPLACE, 'nsslapd-errorlog-level', None)])
> topology_st.standalone.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3Ciphers', 'all')])

tickets/ticket47838_test.py:762:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ec042b00>
func = <built-in method modify_ext of LDAP object at 0x7f20df94cd50>
args = ('cn=encryption,cn=config', [(2, 'nsSSL3Ciphers', 'all')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'a')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### Test Case 17 - Check nsSSL3Ciphers: all, which is invalid INFO:lib389:####### INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket47838_test.py 47 INFO ############################################### ticket47838_test.py 48 INFO ####### ticket47838_test.py 49 INFO ####### Test Case 17 - Check nsSSL3Ciphers: all, which is invalid ticket47838_test.py 50 INFO ####### ticket47838_test.py 51 INFO ###############################################
Failed tickets/ticket47869MMR_test.py::test_ticket47869_init 0.00
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20df797c50>

def test_ticket47869_init(topology_m2):
"""
It adds an entry ('bind_entry') and 10 test entries
It sets the anonymous aci

"""
# enable acl error logging
mod = [(ldap.MOD_REPLACE, 'nsslapd-errorlog-level', str(8192))] # REPL
> topology_m2.ms["master1"].modify_s(DN_CONFIG, mod)

tickets/ticket47869MMR_test.py:38:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df93add8>
func = <built-in method modify_ext of LDAP object at 0x7f20df7ae378>
args = ('cn=config', [(2, 'nsslapd-errorlog-level', '8192')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '8')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Creating replication topology. INFO:lib389.topologies:Joining master master2 to master1 ... INFO:lib389.replica:SUCCESS: bootstrap to ldap://server.example.com:39002 completed INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 INFO:lib389.topologies:Ensuring master master1 to master2 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists INFO:lib389.topologies:Ensuring master master2 to master1 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. topologies.py 106 INFO Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. topologies.py 139 INFO Creating replication topology. topologies.py 153 INFO Joining master master2 to master1 ... replica.py 1461 INFO SUCCESS: bootstrap to ldap://server.example.com:39002 completed replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working replica.py 1530 INFO SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 topologies.py 161 INFO Ensuring master master1 to master2 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists topologies.py 161 INFO Ensuring master master2 to master1 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists
Failed tickets/ticket47869MMR_test.py::test_ticket47869_check 0.22
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20df797c50>

def test_ticket47869_check(topology_m2):
'''
On Master 1 and 2:
Bind as Directory Manager.
Search all specifying nscpEntryWsi in the attribute list.
Check nscpEntryWsi is returned.
On Master 1 and 2:
Bind as Bind Entry.
Search all specifying nscpEntryWsi in the attribute list.
Check nscpEntryWsi is not returned.
On Master 1 and 2:
Bind as anonymous.
Search all specifying nscpEntryWsi in the attribute list.
Check nscpEntryWsi is not returned.
'''
topology_m2.ms["master1"].log.info("\n\n######################### CHECK nscpentrywsi ######################\n")

topology_m2.ms["master1"].log.info("##### Master1: Bind as %s #####" % DN_DM)
topology_m2.ms["master1"].simple_bind_s(DN_DM, PASSWORD)

topology_m2.ms["master1"].log.info("Master1: Calling search_ext...")
msgid = topology_m2.ms["master1"].search_ext(SUFFIX, ldap.SCOPE_SUBTREE, 'objectclass=*', ['nscpentrywsi'])
nscpentrywsicnt = 0
rtype, rdata, rmsgid = topology_m2.ms["master1"].result2(msgid)
topology_m2.ms["master1"].log.info("%d results" % len(rdata))

topology_m2.ms["master1"].log.info("Results:")
for dn, attrs in rdata:
topology_m2.ms["master1"].log.info("dn: %s" % dn)
if 'nscpentrywsi' in attrs:
nscpentrywsicnt += 1

topology_m2.ms["master1"].log.info("Master1: count of nscpentrywsi: %d" % nscpentrywsicnt)

topology_m2.ms["master2"].log.info("##### Master2: Bind as %s #####" % DN_DM)
topology_m2.ms["master2"].simple_bind_s(DN_DM, PASSWORD)

topology_m2.ms["master2"].log.info("Master2: Calling search_ext...")
msgid = topology_m2.ms["master2"].search_ext(SUFFIX, ldap.SCOPE_SUBTREE, 'objectclass=*', ['nscpentrywsi'])
nscpentrywsicnt = 0
rtype, rdata, rmsgid = topology_m2.ms["master2"].result2(msgid)
topology_m2.ms["master2"].log.info("%d results" % len(rdata))

topology_m2.ms["master2"].log.info("Results:")
for dn, attrs in rdata:
topology_m2.ms["master2"].log.info("dn: %s" % dn)
if 'nscpentrywsi' in attrs:
nscpentrywsicnt += 1

topology_m2.ms["master2"].log.info("Master2: count of nscpentrywsi: %d" % nscpentrywsicnt)

# bind as bind_entry
topology_m2.ms["master1"].log.info("##### Master1: Bind as %s #####" % BIND_DN)
> topology_m2.ms["master1"].simple_bind_s(BIND_DN, BIND_PW)

tickets/ticket47869MMR_test.py:140:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:444: in simple_bind_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df93add8>
func = <built-in method result4 of LDAP object at 0x7f20df7ae378>
args = (57, 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.INVALID_CREDENTIALS: {'desc': 'Invalid credentials'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: INVALID_CREDENTIALS
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ######################### CHECK nscpentrywsi ###################### INFO:lib389:##### Master1: Bind as cn=Directory Manager ##### INFO:lib389:Master1: Calling search_ext... INFO:lib389:13 results INFO:lib389:Results: INFO:lib389:dn: dc=example,dc=com INFO:lib389:dn: cn=Directory Administrators,dc=example,dc=com INFO:lib389:dn: ou=Groups,dc=example,dc=com INFO:lib389:dn: ou=People,dc=example,dc=com INFO:lib389:dn: ou=Special Users,dc=example,dc=com INFO:lib389:dn: cn=Accounting Managers,ou=Groups,dc=example,dc=com INFO:lib389:dn: cn=HR Managers,ou=Groups,dc=example,dc=com INFO:lib389:dn: cn=QA Managers,ou=Groups,dc=example,dc=com INFO:lib389:dn: cn=PD Managers,ou=Groups,dc=example,dc=com INFO:lib389:dn: cn=replication_managers,dc=example,dc=com INFO:lib389:dn: ou=Services,dc=example,dc=com INFO:lib389:dn: cn=server.example.com:63701,ou=Services,dc=example,dc=com INFO:lib389:dn: cn=server.example.com:63702,ou=Services,dc=example,dc=com INFO:lib389:Master1: count of nscpentrywsi: 13 INFO:lib389:##### Master2: Bind as cn=Directory Manager ##### INFO:lib389:Master2: Calling search_ext... INFO:lib389:13 results INFO:lib389:Results: INFO:lib389:dn: dc=example,dc=com INFO:lib389:dn: cn=Directory Administrators,dc=example,dc=com INFO:lib389:dn: ou=Groups,dc=example,dc=com INFO:lib389:dn: ou=People,dc=example,dc=com INFO:lib389:dn: ou=Special Users,dc=example,dc=com INFO:lib389:dn: cn=replication_managers,dc=example,dc=com INFO:lib389:dn: ou=Services,dc=example,dc=com INFO:lib389:dn: cn=server.example.com:63701,ou=Services,dc=example,dc=com INFO:lib389:dn: cn=server.example.com:63702,ou=Services,dc=example,dc=com INFO:lib389:dn: cn=Accounting Managers,ou=Groups,dc=example,dc=com INFO:lib389:dn: cn=HR Managers,ou=Groups,dc=example,dc=com INFO:lib389:dn: cn=QA Managers,ou=Groups,dc=example,dc=com INFO:lib389:dn: cn=PD Managers,ou=Groups,dc=example,dc=com INFO:lib389:Master2: count of nscpentrywsi: 13 INFO:lib389:##### Master1: Bind as cn=bind_entry, dc=example,dc=com ##### ------------------------------ Captured log call -------------------------------
ticket47869MMR_test.py 102 INFO ######################### CHECK nscpentrywsi ###################### ticket47869MMR_test.py 104 INFO ##### Master1: Bind as cn=Directory Manager ##### ticket47869MMR_test.py 107 INFO Master1: Calling search_ext... ticket47869MMR_test.py 111 INFO 13 results ticket47869MMR_test.py 113 INFO Results: ticket47869MMR_test.py 115 INFO dn: dc=example,dc=com ticket47869MMR_test.py 115 INFO dn: cn=Directory Administrators,dc=example,dc=com ticket47869MMR_test.py 115 INFO dn: ou=Groups,dc=example,dc=com ticket47869MMR_test.py 115 INFO dn: ou=People,dc=example,dc=com ticket47869MMR_test.py 115 INFO dn: ou=Special Users,dc=example,dc=com ticket47869MMR_test.py 115 INFO dn: cn=Accounting Managers,ou=Groups,dc=example,dc=com ticket47869MMR_test.py 115 INFO dn: cn=HR Managers,ou=Groups,dc=example,dc=com ticket47869MMR_test.py 115 INFO dn: cn=QA Managers,ou=Groups,dc=example,dc=com ticket47869MMR_test.py 115 INFO dn: cn=PD Managers,ou=Groups,dc=example,dc=com ticket47869MMR_test.py 115 INFO dn: cn=replication_managers,dc=example,dc=com ticket47869MMR_test.py 115 INFO dn: ou=Services,dc=example,dc=com ticket47869MMR_test.py 115 INFO dn: cn=server.example.com:63701,ou=Services,dc=example,dc=com ticket47869MMR_test.py 115 INFO dn: cn=server.example.com:63702,ou=Services,dc=example,dc=com ticket47869MMR_test.py 119 INFO Master1: count of nscpentrywsi: 13 ticket47869MMR_test.py 121 INFO ##### Master2: Bind as cn=Directory Manager ##### ticket47869MMR_test.py 124 INFO Master2: Calling search_ext... ticket47869MMR_test.py 128 INFO 13 results ticket47869MMR_test.py 130 INFO Results: ticket47869MMR_test.py 132 INFO dn: dc=example,dc=com ticket47869MMR_test.py 132 INFO dn: cn=Directory Administrators,dc=example,dc=com ticket47869MMR_test.py 132 INFO dn: ou=Groups,dc=example,dc=com ticket47869MMR_test.py 132 INFO dn: ou=People,dc=example,dc=com ticket47869MMR_test.py 132 INFO dn: ou=Special Users,dc=example,dc=com ticket47869MMR_test.py 132 INFO dn: cn=replication_managers,dc=example,dc=com ticket47869MMR_test.py 132 INFO dn: ou=Services,dc=example,dc=com ticket47869MMR_test.py 132 INFO dn: cn=server.example.com:63701,ou=Services,dc=example,dc=com ticket47869MMR_test.py 132 INFO dn: cn=server.example.com:63702,ou=Services,dc=example,dc=com ticket47869MMR_test.py 132 INFO dn: cn=Accounting Managers,ou=Groups,dc=example,dc=com ticket47869MMR_test.py 132 INFO dn: cn=HR Managers,ou=Groups,dc=example,dc=com ticket47869MMR_test.py 132 INFO dn: cn=QA Managers,ou=Groups,dc=example,dc=com ticket47869MMR_test.py 132 INFO dn: cn=PD Managers,ou=Groups,dc=example,dc=com ticket47869MMR_test.py 136 INFO Master2: count of nscpentrywsi: 13 ticket47869MMR_test.py 139 INFO ##### Master1: Bind as cn=bind_entry, dc=example,dc=com #####
Failed tickets/ticket47871_test.py::test_ticket47871_init 0.01
topology_m1c1 = <lib389.topologies.TopologyMain object at 0x7f20dfd1cf28>

def test_ticket47871_init(topology_m1c1):
"""
Initialize the test environment
"""
topology_m1c1.ms["master1"].plugins.enable(name=PLUGIN_RETRO_CHANGELOG)
mod = [(ldap.MOD_REPLACE, 'nsslapd-changelogmaxage', "10s"), # 10 second triming
(ldap.MOD_REPLACE, 'nsslapd-changelog-trim-interval', "5s")]
> topology_m1c1.ms["master1"].modify_s("cn=%s,%s" % (PLUGIN_RETRO_CHANGELOG, DN_PLUGIN), mod)

tickets/ticket47871_test.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dfbe96d8>
func = <built-in method modify_ext of LDAP object at 0x7f20ec04bd00>
args = ('cn=Retro Changelog Plugin,cn=plugins,cn=config', [(2, 'nsslapd-changelogmaxage', '10s'), (2, 'nsslapd-changelog-trim-interval', '5s')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '1')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Instance with parameters {'ldap-port': 39201, 'ldap-secureport': 63901, 'server-id': 'consumer1', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Creating replication topology. INFO:lib389.topologies:Joining consumer consumer1 from master1 ... INFO:lib389.replica:SUCCESS: bootstrap to ldap://server.example.com:39201 completed INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39201 is was created INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39201 is working INFO:lib389.replica:SUCCESS: joined consumer from ldap://server.example.com:39001 to ldap://server.example.com:39201 INFO:lib389.topologies:Ensuring consumer consumer1 from master1 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39201 already exists ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. topologies.py 106 INFO Instance with parameters {'ldap-port': 39201, 'ldap-secureport': 63901, 'server-id': 'consumer1', 'suffix': 'dc=example,dc=com'} was created. topologies.py 139 INFO Creating replication topology. topologies.py 166 INFO Joining consumer consumer1 from master1 ... replica.py 1461 INFO SUCCESS: bootstrap to ldap://server.example.com:39201 completed replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39201 is was created replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39201 is working replica.py 1645 INFO SUCCESS: joined consumer from ldap://server.example.com:39001 to ldap://server.example.com:39201 topologies.py 171 INFO Ensuring consumer consumer1 from master1 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39201 already exists
Failed tickets/ticket47871_test.py::test_ticket47871_1 1.27
topology_m1c1 = <lib389.topologies.TopologyMain object at 0x7f20dfd1cf28>

def test_ticket47871_1(topology_m1c1):
'''
ADD entries and check they are all in the retrocl
'''
# add dummy entries
for cpt in range(MAX_OTHERS):
name = "%s%d" % (OTHER_NAME, cpt)
topology_m1c1.ms["master1"].add_s(Entry(("cn=%s,%s" % (name, SUFFIX), {
'objectclass': "top person".split(),
'sn': name,
'cn': name})))

topology_m1c1.ms["master1"].log.info(
"test_ticket47871_init: %d entries ADDed %s[0..%d]" % (MAX_OTHERS, OTHER_NAME, MAX_OTHERS - 1))

# Check the number of entries in the retro changelog
time.sleep(1)
> ents = topology_m1c1.ms["master1"].search_s(RETROCL_SUFFIX, ldap.SCOPE_ONELEVEL, "(objectclass=*)")

tickets/ticket47871_test.py:75:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:852: in search_s
return self.search_ext_s(base,scope,filterstr,attrlist,attrsonly,None,None,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:846: in search_ext_s
return self.result(msgid,all=1,timeout=timeout)[1]
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:135: in inner
objtype, data = f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:738: in result
resp_type, resp_data, resp_msgid = self.result2(msgid,all,timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:742: in result2
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all,timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dfbe96d8>
func = <built-in method result4 of LDAP object at 0x7f20ec04bd00>
args = (56, 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'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: NO_SUCH_OBJECT
----------------------------- Captured stderr call -----------------------------
INFO:lib389:test_ticket47871_init: 10 entries ADDed other_entry[0..9] ------------------------------ Captured log call -------------------------------
ticket47871_test.py 71 INFO test_ticket47871_init: 10 entries ADDed other_entry[0..9]
Failed tickets/ticket47871_test.py::test_ticket47871_2 6.01
topology_m1c1 = <lib389.topologies.TopologyMain object at 0x7f20dfd1cf28>

def test_ticket47871_2(topology_m1c1):
'''
Wait until there is just a last entries
'''
MAX_TRIES = 10
TRY_NO = 1
while TRY_NO <= MAX_TRIES:
time.sleep(6) # at least 1 trimming occurred
> ents = topology_m1c1.ms["master1"].search_s(RETROCL_SUFFIX, ldap.SCOPE_ONELEVEL, "(objectclass=*)")

tickets/ticket47871_test.py:90:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:852: in search_s
return self.search_ext_s(base,scope,filterstr,attrlist,attrsonly,None,None,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:846: in search_ext_s
return self.result(msgid,all=1,timeout=timeout)[1]
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:135: in inner
objtype, data = f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:738: in result
resp_type, resp_data, resp_msgid = self.result2(msgid,all,timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:742: in result2
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all,timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dfbe96d8>
func = <built-in method result4 of LDAP object at 0x7f20ec04bd00>
args = (57, 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'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: NO_SUCH_OBJECT
Failed tickets/ticket47900_test.py::test_ticket47900 0.10
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfcfcc18>

def test_ticket47900(topology_st):
"""
Test that password administrators/root DN can
bypass password syntax/policy.

We need to test how passwords are modified in
existing entries, and when adding new entries.

Create the Password Admin entry, but do not set
it as an admin yet. Use the entry to verify invalid
passwords are caught. Then activate the password
admin and make sure it can bypass password policy.
"""

# Prepare the Password Administator
entry = Entry(ADMIN_DN)
entry.setValues('objectclass', 'top', 'person')
entry.setValues('sn', ADMIN_NAME)
entry.setValues('cn', ADMIN_NAME)
entry.setValues('userpassword', ADMIN_PWD)

topology_st.standalone.log.info("Creating Password Administator entry %s..." % ADMIN_DN)
try:
topology_st.standalone.add_s(entry)
except ldap.LDAPError as e:
topology_st.standalone.log.error('Unexpected result ' + e.message['desc'])
assert False
topology_st.standalone.log.error("Failed to add Password Administator %s, error: %s "
% (ADMIN_DN, e.message['desc']))
assert False

topology_st.standalone.log.info("Configuring password policy...")
try:
topology_st.standalone.modify_s(CONFIG_DN, [(ldap.MOD_REPLACE, 'nsslapd-pwpolicy-local', 'on'),
(ldap.MOD_REPLACE, 'passwordCheckSyntax', 'on'),
(ldap.MOD_REPLACE, 'passwordMinCategories', '1'),
(ldap.MOD_REPLACE, 'passwordMinTokenLength', '1'),
(ldap.MOD_REPLACE, 'passwordExp', 'on'),
(ldap.MOD_REPLACE, 'passwordMinDigits', '1'),
> (ldap.MOD_REPLACE, 'passwordMinSpecials', '1')])

tickets/ticket47900_test.py:67:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ec052c88>
func = <built-in method modify_ext of LDAP object at 0x7f20ee3e7e68>
args = ('cn=config', [(2, 'nsslapd-pwpolicy-local', 'on'), (2, 'passwordCheckSyntax', 'on'), (2, 'passwordMinCategories', '1'), (2, 'passwordMinTokenLength', '1'), (2, 'passwordExp', 'on'), (2, 'passwordMinDigits', '1'), ...], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'o')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.----------------------------- Captured stderr call -----------------------------
INFO:lib389:Creating Password Administator entry cn=passwd_admin,dc=example,dc=com... INFO:lib389:Configuring password policy... ------------------------------ Captured log call -------------------------------
ticket47900_test.py 49 INFO Creating Password Administator entry cn=passwd_admin,dc=example,dc=com... ticket47900_test.py 59 INFO Configuring password policy...
Failed tickets/ticket47910_test.py::test_ticket47910_logconv_start_end_positive 0.43
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfd1ce80>
log_dir = '/var/log/dirsrv/slapd-standalone1/access'

def test_ticket47910_logconv_start_end_positive(topology_st, log_dir):
'''
Execute logconv.pl with -S and -E(endtime) with random time stamp
This is execute successfully
'''
#
# Execute logconv.pl -S -E with random timestamp
#
log.info('Running test_ticket47910 - Execute logconv.pl -S -E with random values')

log.info("taking current time with offset of 2 mins and formatting it to feed -S")
start_time_stamp = (datetime.now() - timedelta(minutes=2))
formatted_start_time_stamp = format_time(start_time_stamp)

log.info("taking current time with offset of 2 mins and formatting it to feed -E")
end_time_stamp = (datetime.now() + timedelta(minutes=2))
formatted_end_time_stamp = format_time(end_time_stamp)

log.info("Executing logconv.pl with -S and -E")
> result = execute_logconv(topology_st.standalone, formatted_start_time_stamp, formatted_end_time_stamp, log_dir)

tickets/ticket47910_test.py:87:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

inst = <lib389.DirSrv object at 0x7f20dfd38128>
start_time_stamp = '[18/Jun/2018:21:22:56]'
end_time_stamp = '[18/Jun/2018:21:26:56]'
access_log = '/var/log/dirsrv/slapd-standalone1/access'

def execute_logconv(inst, start_time_stamp, end_time_stamp, access_log):
'''
This function will take start time and end time
as input parameter and
assign these values to -S and -E options of logconv
and, it will execute logconv and return result value
'''

log.info("Executing logconv.pl with -S current time and -E end time")
cmd = [os.path.join(inst.get_bin_dir(), 'logconv.pl'), '-S', start_time_stamp, '-E', end_time_stamp, access_log]
log.info(" ".join(cmd))
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = proc.communicate()
> log.info("standard output" + stdout)
E TypeError: must be str, not bytes

tickets/ticket47910_test.py:63: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.utils:Diable access log buffering INFO:lib389.utils:Do a ldapsearch operation INFO:lib389.utils:sleep for sometime so that access log file get generated ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ticket47910_test.py 33 INFO Diable access log buffering ticket47910_test.py 36 INFO Do a ldapsearch operation ticket47910_test.py 39 INFO sleep for sometime so that access log file get generated----------------------------- Captured stderr call -----------------------------
INFO:lib389.utils:Running test_ticket47910 - Execute logconv.pl -S -E with random values INFO:lib389.utils:taking current time with offset of 2 mins and formatting it to feed -S INFO:lib389.utils:taking current time with offset of 2 mins and formatting it to feed -E INFO:lib389.utils:Executing logconv.pl with -S and -E INFO:lib389.utils:Executing logconv.pl with -S current time and -E end time INFO:lib389.utils:/usr/bin/logconv.pl -S [18/Jun/2018:21:22:56] -E [18/Jun/2018:21:26:56] /var/log/dirsrv/slapd-standalone1/access ------------------------------ Captured log call -------------------------------
ticket47910_test.py 76 INFO Running test_ticket47910 - Execute logconv.pl -S -E with random values ticket47910_test.py 78 INFO taking current time with offset of 2 mins and formatting it to feed -S ticket47910_test.py 82 INFO taking current time with offset of 2 mins and formatting it to feed -E ticket47910_test.py 86 INFO Executing logconv.pl with -S and -E ticket47910_test.py 58 INFO Executing logconv.pl with -S current time and -E end time ticket47910_test.py 60 INFO /usr/bin/logconv.pl -S [18/Jun/2018:21:22:56] -E [18/Jun/2018:21:26:56] /var/log/dirsrv/slapd-standalone1/access
Failed tickets/ticket47910_test.py::test_ticket47910_logconv_start_end_negative 0.11
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfd1ce80>
log_dir = '/var/log/dirsrv/slapd-standalone1/access'

def test_ticket47910_logconv_start_end_negative(topology_st, log_dir):
'''
Execute logconv.pl with -S and -E(endtime) with random time stamp
This is a negative test case, where endtime will be lesser than the
starttime
This should give error message
'''

#
# Execute logconv.pl -S and -E with random timestamp
#
log.info('Running test_ticket47910 - Execute logconv.pl -S -E with starttime>endtime')

log.info("taking current time with offset of 2 mins and formatting it to feed -S")
start_time_stamp = (datetime.now() + timedelta(minutes=2))
formatted_start_time_stamp = format_time(start_time_stamp)

log.info("taking current time with offset of 2 mins and formatting it to feed -E")
end_time_stamp = (datetime.now() - timedelta(minutes=2))
formatted_end_time_stamp = format_time(end_time_stamp)

log.info("Executing logconv.pl with -S and -E")
> result = execute_logconv(topology_st.standalone, formatted_start_time_stamp, formatted_end_time_stamp, log_dir)

tickets/ticket47910_test.py:113:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

inst = <lib389.DirSrv object at 0x7f20dfd38128>
start_time_stamp = '[18/Jun/2018:21:26:57]'
end_time_stamp = '[18/Jun/2018:21:22:57]'
access_log = '/var/log/dirsrv/slapd-standalone1/access'

def execute_logconv(inst, start_time_stamp, end_time_stamp, access_log):
'''
This function will take start time and end time
as input parameter and
assign these values to -S and -E options of logconv
and, it will execute logconv and return result value
'''

log.info("Executing logconv.pl with -S current time and -E end time")
cmd = [os.path.join(inst.get_bin_dir(), 'logconv.pl'), '-S', start_time_stamp, '-E', end_time_stamp, access_log]
log.info(" ".join(cmd))
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = proc.communicate()
> log.info("standard output" + stdout)
E TypeError: must be str, not bytes

tickets/ticket47910_test.py:63: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389.utils:Running test_ticket47910 - Execute logconv.pl -S -E with starttime>endtime INFO:lib389.utils:taking current time with offset of 2 mins and formatting it to feed -S INFO:lib389.utils:taking current time with offset of 2 mins and formatting it to feed -E INFO:lib389.utils:Executing logconv.pl with -S and -E INFO:lib389.utils:Executing logconv.pl with -S current time and -E end time INFO:lib389.utils:/usr/bin/logconv.pl -S [18/Jun/2018:21:26:57] -E [18/Jun/2018:21:22:57] /var/log/dirsrv/slapd-standalone1/access ------------------------------ Captured log call -------------------------------
ticket47910_test.py 102 INFO Running test_ticket47910 - Execute logconv.pl -S -E with starttime>endtime ticket47910_test.py 104 INFO taking current time with offset of 2 mins and formatting it to feed -S ticket47910_test.py 108 INFO taking current time with offset of 2 mins and formatting it to feed -E ticket47910_test.py 112 INFO Executing logconv.pl with -S and -E ticket47910_test.py 58 INFO Executing logconv.pl with -S current time and -E end time ticket47910_test.py 60 INFO /usr/bin/logconv.pl -S [18/Jun/2018:21:26:57] -E [18/Jun/2018:21:22:57] /var/log/dirsrv/slapd-standalone1/access
Failed tickets/ticket47910_test.py::test_ticket47910_logconv_start_end_invalid 0.11
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfd1ce80>
log_dir = '/var/log/dirsrv/slapd-standalone1/access'

def test_ticket47910_logconv_start_end_invalid(topology_st, log_dir):
'''
Execute logconv.pl with -S and -E(endtime) with invalid time stamp
This is a negative test case, where it should give error message
'''
#
# Execute logconv.pl -S and -E with invalid timestamp
#
log.info('Running test_ticket47910 - Execute logconv.pl -S -E with invalid timestamp')
log.info("Set start time and end time to invalid values")
start_time_stamp = "invalid"
end_time_stamp = "invalid"

log.info("Executing logconv.pl with -S and -E")
> result = execute_logconv(topology_st.standalone, start_time_stamp, end_time_stamp, log_dir)

tickets/ticket47910_test.py:131:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

inst = <lib389.DirSrv object at 0x7f20dfd38128>, start_time_stamp = 'invalid'
end_time_stamp = 'invalid'
access_log = '/var/log/dirsrv/slapd-standalone1/access'

def execute_logconv(inst, start_time_stamp, end_time_stamp, access_log):
'''
This function will take start time and end time
as input parameter and
assign these values to -S and -E options of logconv
and, it will execute logconv and return result value
'''

log.info("Executing logconv.pl with -S current time and -E end time")
cmd = [os.path.join(inst.get_bin_dir(), 'logconv.pl'), '-S', start_time_stamp, '-E', end_time_stamp, access_log]
log.info(" ".join(cmd))
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = proc.communicate()
> log.info("standard output" + stdout)
E TypeError: must be str, not bytes

tickets/ticket47910_test.py:63: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389.utils:Running test_ticket47910 - Execute logconv.pl -S -E with invalid timestamp INFO:lib389.utils:Set start time and end time to invalid values INFO:lib389.utils:Executing logconv.pl with -S and -E INFO:lib389.utils:Executing logconv.pl with -S current time and -E end time INFO:lib389.utils:/usr/bin/logconv.pl -S invalid -E invalid /var/log/dirsrv/slapd-standalone1/access ------------------------------ Captured log call -------------------------------
ticket47910_test.py 125 INFO Running test_ticket47910 - Execute logconv.pl -S -E with invalid timestamp ticket47910_test.py 126 INFO Set start time and end time to invalid values ticket47910_test.py 130 INFO Executing logconv.pl with -S and -E ticket47910_test.py 58 INFO Executing logconv.pl with -S current time and -E end time ticket47910_test.py 60 INFO /usr/bin/logconv.pl -S invalid -E invalid /var/log/dirsrv/slapd-standalone1/access
Failed tickets/ticket47910_test.py::test_ticket47910_logconv_noaccesslogs 0.11
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfd1ce80>
log_dir = '/var/log/dirsrv/slapd-standalone1/access'

def test_ticket47910_logconv_noaccesslogs(topology_st, log_dir):
'''
Execute logconv.pl -S(starttime) without specify
access logs location
'''

#
# Execute logconv.pl -S with random timestamp and no access log location
#
log.info('Running test_ticket47910 - Execute logconv.pl without access logs')

log.info("taking current time with offset of 2 mins and formatting it to feed -S")
time_stamp = (datetime.now() - timedelta(minutes=2))
formatted_time_stamp = format_time(time_stamp)
log.info("Executing logconv.pl with -S current time")
cmd = [os.path.join(topology_st.standalone.get_bin_dir(), 'logconv.pl'), '-S', formatted_time_stamp]
log.info(" ".join(cmd))
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = proc.communicate()
> log.info("standard output" + stdout)
E TypeError: must be str, not bytes

tickets/ticket47910_test.py:154: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389.utils:Running test_ticket47910 - Execute logconv.pl without access logs INFO:lib389.utils:taking current time with offset of 2 mins and formatting it to feed -S INFO:lib389.utils:Executing logconv.pl with -S current time INFO:lib389.utils:/usr/bin/logconv.pl -S [18/Jun/2018:21:22:57] ------------------------------ Captured log call -------------------------------
ticket47910_test.py 144 INFO Running test_ticket47910 - Execute logconv.pl without access logs ticket47910_test.py 146 INFO taking current time with offset of 2 mins and formatting it to feed -S ticket47910_test.py 149 INFO Executing logconv.pl with -S current time ticket47910_test.py 151 INFO /usr/bin/logconv.pl -S [18/Jun/2018:21:22:57]
Failed tickets/ticket47920_test.py::test_ticket47920_mod_readentry_ctrl 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20df7f6320>

def test_ticket47920_mod_readentry_ctrl(topology_st):
_header(topology_st, 'MOD: with a readentry control')

topology_st.standalone.log.info("Check the initial value of the entry")
ent = topology_st.standalone.getEntry(ACTIVE_USER_DN, ldap.SCOPE_BASE, "(objectclass=*)", ['description'])
assert ent.hasAttr('description')
> assert ent.getValue('description') == INITIAL_DESC
E AssertionError: assert b'inital description' == 'inital description'
E + where b'inital description' = <bound method Entry.getValue of dn: cn=active guy,cn=accounts,cn=in,dc=example,dc=com\ndescription: inital description\n\n>('description')
E + where <bound method Entry.getValue of dn: cn=active guy,cn=accounts,cn=in,dc=example,dc=com\ndescription: inital description\n\n> = dn: cn=active guy,cn=accounts,cn=in,dc=example,dc=com\ndescription: inital description\n\n.getValue

tickets/ticket47920_test.py:108: AssertionError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### MOD: with a readentry control INFO:lib389:####### INFO:lib389:############################################### INFO:lib389:Check the initial value of the entry ------------------------------ Captured log call -------------------------------
ticket47920_test.py 64 INFO ############################################### ticket47920_test.py 65 INFO ####### ticket47920_test.py 66 INFO ####### MOD: with a readentry control ticket47920_test.py 67 INFO ####### ticket47920_test.py 68 INFO ############################################### ticket47920_test.py 105 INFO Check the initial value of the entry
Failed tickets/ticket47921_test.py::test_ticket47921 0.16
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfa35da0>

def test_ticket47921(topology_st):
'''
Test that indirect cos reflects the current value of the indirect entry
'''

INDIRECT_COS_DN = 'cn=cos definition,' + DEFAULT_SUFFIX
MANAGER_DN = 'uid=my manager,ou=people,' + DEFAULT_SUFFIX
USER_DN = 'uid=user,ou=people,' + DEFAULT_SUFFIX

# Add COS definition
try:
topology_st.standalone.add_s(Entry((INDIRECT_COS_DN,
{
'objectclass': 'top cosSuperDefinition cosIndirectDefinition ldapSubEntry'.split(),
'cosIndirectSpecifier': 'manager',
'cosAttribute': 'roomnumber'
})))
except ldap.LDAPError as e:
log.fatal('Failed to add cos defintion, error: ' + e.message['desc'])
assert False

# Add manager entry
try:
topology_st.standalone.add_s(Entry((MANAGER_DN,
{'objectclass': 'top extensibleObject'.split(),
'uid': 'my manager',
'roomnumber': '1'
})))
except ldap.LDAPError as e:
log.fatal('Failed to add manager entry, error: ' + e.message['desc'])
assert False

# Add user entry
try:
topology_st.standalone.add_s(Entry((USER_DN,
{'objectclass': 'top person organizationalPerson inetorgperson'.split(),
'sn': 'last',
'cn': 'full',
'givenname': 'mark',
'uid': 'user',
'manager': MANAGER_DN
})))
except ldap.LDAPError as e:
log.fatal('Failed to add manager entry, error: ' + e.message['desc'])
assert False

# Test COS is working
try:
entry = topology_st.standalone.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE,
"uid=user",
['roomnumber'])
if entry:
if entry[0].getValue('roomnumber') != '1':
log.fatal('COS is not working.')
> assert False
E assert False

tickets/ticket47921_test.py:72: AssertionError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.----------------------------- Captured stderr call -----------------------------
CRITICAL:tests.tickets.ticket47921_test:COS is not working. ------------------------------ Captured log call -------------------------------
ticket47921_test.py 71 CRITICAL COS is not working.
Failed tickets/ticket47927_test.py::test_ticket47927_init 0.01
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfccc278>

def test_ticket47927_init(topology_st):
topology_st.standalone.plugins.enable(name=PLUGIN_ATTR_UNIQUENESS)
try:
topology_st.standalone.modify_s('cn=' + PLUGIN_ATTR_UNIQUENESS + ',cn=plugins,cn=config',
[(ldap.MOD_REPLACE, 'uniqueness-attribute-name', 'telephonenumber'),
> (ldap.MOD_REPLACE, 'uniqueness-subtrees', DEFAULT_SUFFIX),
])

tickets/ticket47927_test.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee502e48>
func = <built-in method modify_ext of LDAP object at 0x7f20dfa717b0>
args = ('cn=attribute uniqueness,cn=plugins,cn=config', [(2, 'uniqueness-attribute-name', 'telephonenumber'), (2, 'uniqueness-subtrees', 'dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 't')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.
Failed tickets/ticket47927_test.py::test_ticket47927_one 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfccc278>

def test_ticket47927_one(topology_st):
'''
Check that uniqueness is enforce on all SUFFIX
'''
UNIQUE_VALUE = '1234'
try:
topology_st.standalone.modify_s(USER_1_DN,
> [(ldap.MOD_REPLACE, 'telephonenumber', UNIQUE_VALUE)])

tickets/ticket47927_test.py:87:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee502e48>
func = <built-in method modify_ext of LDAP object at 0x7f20dfa717b0>
args = ('cn=test_1,cn=enforced_container,dc=example,dc=com', [(2, 'telephonenumber', '1234')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '1')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
Failed tickets/ticket47927_test.py::test_ticket47927_two 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfccc278>

def test_ticket47927_two(topology_st):
'''
Exclude the EXCLUDED_CONTAINER_DN from the uniqueness plugin
'''
try:
topology_st.standalone.modify_s('cn=' + PLUGIN_ATTR_UNIQUENESS + ',cn=plugins,cn=config',
> [(ldap.MOD_REPLACE, 'uniqueness-exclude-subtrees', EXCLUDED_CONTAINER_DN)])

tickets/ticket47927_test.py:121:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee502e48>
func = <built-in method modify_ext of LDAP object at 0x7f20dfa717b0>
args = ('cn=attribute uniqueness,cn=plugins,cn=config', [(2, 'uniqueness-exclude-subtrees', 'cn=excluded_container,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
Failed tickets/ticket47927_test.py::test_ticket47927_three 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfccc278>

def test_ticket47927_three(topology_st):
'''
Check that uniqueness is enforced on full SUFFIX except EXCLUDED_CONTAINER_DN
First case: it exists an entry (with the same attribute value) in the scope
of the plugin and we set the value in an entry that is in an excluded scope
'''
UNIQUE_VALUE = '9876'
try:
topology_st.standalone.modify_s(USER_1_DN,
> [(ldap.MOD_REPLACE, 'telephonenumber', UNIQUE_VALUE)])

tickets/ticket47927_test.py:138:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee502e48>
func = <built-in method modify_ext of LDAP object at 0x7f20dfa717b0>
args = ('cn=test_1,cn=enforced_container,dc=example,dc=com', [(2, 'telephonenumber', '9876')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '9')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
Failed tickets/ticket47927_test.py::test_ticket47927_four 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfccc278>

def test_ticket47927_four(topology_st):
'''
Check that uniqueness is enforced on full SUFFIX except EXCLUDED_CONTAINER_DN
Second case: it exists an entry (with the same attribute value) in an excluded scope
of the plugin and we set the value in an entry is in the scope
'''
UNIQUE_VALUE = '1111'
# USER_3_DN is in EXCLUDED_CONTAINER_DN so update should be successful
try:
topology_st.standalone.modify_s(USER_3_DN,
> [(ldap.MOD_REPLACE, 'telephonenumber', UNIQUE_VALUE)])

tickets/ticket47927_test.py:174:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee502e48>
func = <built-in method modify_ext of LDAP object at 0x7f20dfa717b0>
args = ('cn=test_3,cn=excluded_container,dc=example,dc=com', [(2, 'telephonenumber', '1111')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '1')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
Failed tickets/ticket47927_test.py::test_ticket47927_five 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfccc278>

def test_ticket47927_five(topology_st):
'''
Exclude the EXCLUDED_BIS_CONTAINER_DN from the uniqueness plugin
'''
try:
topology_st.standalone.modify_s('cn=' + PLUGIN_ATTR_UNIQUENESS + ',cn=plugins,cn=config',
> [(ldap.MOD_ADD, 'uniqueness-exclude-subtrees', EXCLUDED_BIS_CONTAINER_DN)])

tickets/ticket47927_test.py:208:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee502e48>
func = <built-in method modify_ext of LDAP object at 0x7f20dfa717b0>
args = ('cn=attribute uniqueness,cn=plugins,cn=config', [(0, 'uniqueness-exclude-subtrees', 'cn=excluded_bis_container,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
Failed tickets/ticket47927_test.py::test_ticket47927_six 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfccc278>

def test_ticket47927_six(topology_st):
'''
Check that uniqueness is enforced on full SUFFIX except EXCLUDED_CONTAINER_DN
and EXCLUDED_BIS_CONTAINER_DN
First case: it exists an entry (with the same attribute value) in the scope
of the plugin and we set the value in an entry that is in an excluded scope
'''
UNIQUE_VALUE = '222'
try:
topology_st.standalone.modify_s(USER_1_DN,
> [(ldap.MOD_REPLACE, 'telephonenumber', UNIQUE_VALUE)])

tickets/ticket47927_test.py:227:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee502e48>
func = <built-in method modify_ext of LDAP object at 0x7f20dfa717b0>
args = ('cn=test_1,cn=enforced_container,dc=example,dc=com', [(2, 'telephonenumber', '222')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '2')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
Failed tickets/ticket47931_test.py::test_ticket47931 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfadb710>

def test_ticket47931(topology_st):
"""Test Retro Changelog and MemberOf deadlock fix.
Verification steps:
- Enable retro cl and memberOf.
- Create two backends: A & B.
- Configure retrocl scoping for backend A.
- Configure memberOf plugin for uniquemember
- Create group in backend A.
- In parallel, add members to the group on A, and make modifications
to entries in backend B.
- Make sure the server does not hang during the updates to both
backends.

"""

# Enable dynamic plugins to make plugin configuration easier
try:
topology_st.standalone.modify_s(DN_CONFIG,
[(ldap.MOD_REPLACE,
'nsslapd-dynamic-plugins',
> 'on')])

tickets/ticket47931_test.py:72:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df913a58>
func = <built-in method modify_ext of LDAP object at 0x7f20ee3cd300>
args = ('cn=config', [(2, 'nsslapd-dynamic-plugins', 'on')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'o')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.
Failed tickets/ticket47937_test.py::test_ticket47937 7.77
topology_st = <lib389.topologies.TopologyMain object at 0x7f20df8e66d8>

def test_ticket47937(topology_st):
"""
Test that DNA plugin only accepts valid attributes for "dnaType"
"""

log.info("Creating \"ou=people\"...")
try:
topology_st.standalone.add_s(Entry(('ou=people,' + SUFFIX, {
'objectclass': 'top organizationalunit'.split(),
'ou': 'people'
})))

except ldap.ALREADY_EXISTS:
pass
except ldap.LDAPError as e:
log.error('Failed to add ou=people org unit: error ' + e.message['desc'])
assert False

log.info("Creating \"ou=ranges\"...")
try:
topology_st.standalone.add_s(Entry(('ou=ranges,' + SUFFIX, {
'objectclass': 'top organizationalunit'.split(),
'ou': 'ranges'
})))

except ldap.LDAPError as e:
log.error('Failed to add ou=ranges org unit: error ' + e.message['desc'])
assert False

log.info("Creating \"cn=entry\"...")
try:
topology_st.standalone.add_s(Entry(('cn=entry,ou=people,' + SUFFIX, {
'objectclass': 'top groupofuniquenames'.split(),
'cn': 'entry'
})))

except ldap.LDAPError as e:
log.error('Failed to add test entry: error ' + e.message['desc'])
assert False

log.info("Creating DNA shared config entry...")
try:
topology_st.standalone.add_s(Entry(('dnaHostname=localhost.localdomain+dnaPortNum=389,ou=ranges,%s' % SUFFIX, {
'objectclass': 'top dnaSharedConfig'.split(),
'dnaHostname': 'localhost.localdomain',
'dnaPortNum': '389',
'dnaSecurePortNum': '636',
'dnaRemainingValues': '9501'
})))

except ldap.LDAPError as e:
log.error('Failed to add shared config entry: error ' + e.message['desc'])
assert False

log.info("Add dna plugin config entry...")
try:
topology_st.standalone.add_s(
Entry(('cn=dna config,cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config', {
'objectclass': 'top dnaPluginConfig'.split(),
'dnaType': 'description',
'dnaMaxValue': '10000',
'dnaMagicRegen': '0',
'dnaFilter': '(objectclass=top)',
'dnaScope': 'ou=people,%s' % SUFFIX,
'dnaNextValue': '500',
'dnaSharedCfgDN': 'ou=ranges,%s' % SUFFIX
})))

except ldap.LDAPError as e:
log.error('Failed to add DNA config entry: error ' + e.message['desc'])
assert False

log.info("Enable the DNA plugin...")
try:
topology_st.standalone.plugins.enable(name=PLUGIN_DNA)
except e:
log.error("Failed to enable DNA Plugin: error " + e.message['desc'])
assert False

log.info("Restarting the server...")
topology_st.standalone.stop(timeout=120)
time.sleep(1)
topology_st.standalone.start(timeout=120)
time.sleep(3)

log.info("Apply an invalid attribute to the DNA config(dnaType: foo)...")

try:
topology_st.standalone.modify_s('cn=dna config,cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config',
> [(ldap.MOD_REPLACE, 'dnaType', 'foo')])

tickets/ticket47937_test.py:110:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dfadcef0>
func = <built-in method modify_ext of LDAP object at 0x7f20df8f3b48>
args = ('cn=dna config,cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config', [(2, 'dnaType', 'foo')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'f')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.----------------------------- Captured stderr call -----------------------------
INFO:tests.tickets.ticket47937_test:Creating "ou=people"... INFO:tests.tickets.ticket47937_test:Creating "ou=ranges"... INFO:tests.tickets.ticket47937_test:Creating "cn=entry"... INFO:tests.tickets.ticket47937_test:Creating DNA shared config entry... INFO:tests.tickets.ticket47937_test:Add dna plugin config entry... INFO:tests.tickets.ticket47937_test:Enable the DNA plugin... INFO:tests.tickets.ticket47937_test:Restarting the server... INFO:tests.tickets.ticket47937_test:Apply an invalid attribute to the DNA config(dnaType: foo)... ------------------------------ Captured log call -------------------------------
ticket47937_test.py 26 INFO Creating "ou=people"... ticket47937_test.py 39 INFO Creating "ou=ranges"... ticket47937_test.py 50 INFO Creating "cn=entry"... ticket47937_test.py 61 INFO Creating DNA shared config entry... ticket47937_test.py 75 INFO Add dna plugin config entry... ticket47937_test.py 93 INFO Enable the DNA plugin... ticket47937_test.py 100 INFO Restarting the server... ticket47937_test.py 106 INFO Apply an invalid attribute to the DNA config(dnaType: foo)...
Failed tickets/ticket47950_test.py::test_ticket47950 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20df8657b8>

def test_ticket47950(topology_st):
"""
Testing nsslapd-plugin-binddn-tracking does not cause issues around
access control and reconfiguring replication/repl agmt.
"""

log.info('Testing Ticket 47950 - Testing nsslapd-plugin-binddn-tracking')

#
# Turn on bind dn tracking
#
try:
> topology_st.standalone.modify_s("cn=config", [(ldap.MOD_REPLACE, 'nsslapd-plugin-binddn-tracking', 'on')])

tickets/ticket47950_test.py:39:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee853a90>
func = <built-in method modify_ext of LDAP object at 0x7f20dfa10558>
args = ('cn=config', [(2, 'nsslapd-plugin-binddn-tracking', 'on')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'o')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.----------------------------- Captured stderr call -----------------------------
INFO:tests.tickets.ticket47950_test:Testing Ticket 47950 - Testing nsslapd-plugin-binddn-tracking ------------------------------ Captured log call -------------------------------
ticket47950_test.py 33 INFO Testing Ticket 47950 - Testing nsslapd-plugin-binddn-tracking
Failed tickets/ticket47953_test.py::test_ticket47953 5.10
topology_st = <lib389.topologies.TopologyMain object at 0x7f20df8edef0>

def test_ticket47953(topology_st):
"""
Test that we can delete an aci that has an invalid syntax.
Sart by importing an ldif with a "bad" aci, then simply try
to remove that value without error.
"""

log.info('Testing Ticket 47953 - Test we can delete aci that has invalid syntax')

#
# Import an invalid ldif
#
ldif_file = (topology_st.standalone.getDir(__file__, DATA_DIR) +
"ticket47953/ticket47953.ldif")
try:
ldif_dir = topology_st.standalone.get_ldif_dir()
shutil.copy(ldif_file, ldif_dir)
ldif_file = ldif_dir + '/ticket47953.ldif'
except:
log.fatal('Failed to copy ldif to instance ldif dir')
assert False
importTask = Tasks(topology_st.standalone)
args = {TASK_WAIT: True}
try:
importTask.importLDIF(DEFAULT_SUFFIX, None, ldif_file, args)
except ValueError:
assert False

time.sleep(2)

#
# Delete the invalid aci
#
acival = '(targetattr ="fffff")(version 3.0;acl "Directory Administrators Group"' + \
';allow (all) (groupdn = "ldap:///cn=Directory Administrators, dc=example,dc=com");)'

log.info('Attempting to remove invalid aci...')
try:
> topology_st.standalone.modify_s(DEFAULT_SUFFIX, [(ldap.MOD_DELETE, 'aci', acival)])

tickets/ticket47953_test.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee869860>
func = <built-in method modify_ext of LDAP object at 0x7f20df92a198>
args = ('dc=example,dc=com', [(1, 'aci', '(targetattr ="fffff")(version 3.0;acl "Directory Administrators Group";allow (all) (groupdn = "ldap:///cn=Directory Administrators, dc=example,dc=com");)')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '(')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.----------------------------- Captured stderr call -----------------------------
INFO:tests.tickets.ticket47953_test:Testing Ticket 47953 - Test we can delete aci that has invalid syntax INFO:lib389:Import task import_06182018_212601 for file /var/lib/dirsrv/slapd-standalone1/ldif/ticket47953.ldif completed successfully INFO:tests.tickets.ticket47953_test:Attempting to remove invalid aci... ------------------------------ Captured log call -------------------------------
ticket47953_test.py 28 INFO Testing Ticket 47953 - Test we can delete aci that has invalid syntax tasks.py 338 INFO Import task import_06182018_212601 for file /var/lib/dirsrv/slapd-standalone1/ldif/ticket47953.ldif completed successfully ticket47953_test.py 57 INFO Attempting to remove invalid aci...
Failed tickets/ticket47963_test.py::test_ticket47963 0.01
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee841940>

def test_ticket47963(topology_st):
'''
Test that the memberOf plugin works correctly after setting:

memberofskipnested: on

'''
PLUGIN_DN = 'cn=' + PLUGIN_MEMBER_OF + ',cn=plugins,cn=config'
USER_DN = 'uid=test_user,' + DEFAULT_SUFFIX
GROUP_DN1 = 'cn=group1,' + DEFAULT_SUFFIX
GROUP_DN2 = 'cn=group2,' + DEFAULT_SUFFIX
GROUP_DN3 = 'cn=group3,' + DEFAULT_SUFFIX

#
# Enable the plugin and configure the skiop nest attribute, then restart the server
#
topology_st.standalone.plugins.enable(name=PLUGIN_MEMBER_OF)
try:
> topology_st.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_REPLACE, 'memberofskipnested', 'on')])

tickets/ticket47963_test.py:39:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dfbb3668>
func = <built-in method modify_ext of LDAP object at 0x7f20df640f30>
args = ('cn=MemberOf Plugin,cn=plugins,cn=config', [(2, 'memberofskipnested', 'on')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'o')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.
Failed tickets/ticket47966_test.py::test_ticket47966 0.00
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20dfc43cf8>

def test_ticket47966(topology_m2):
'''
Testing bulk import when the backend with VLV was recreated.
If the test passes without the server crash, 47966 is verified.
'''
log.info('Testing Ticket 47966 - [VLV] slapd crashes during Dogtag clone reinstallation')
M1 = topology_m2.ms["master1"]
M2 = topology_m2.ms["master2"]
m1_m2_agmt = M1.agreement.list(suffix=DEFAULT_SUFFIX)[0].dn

log.info('0. Create a VLV index on Master 2.')
# get the backend entry
be = M2.replica.conn.backend.list(suffix=DEFAULT_SUFFIX)
if not be:
log.fatal("ticket47966: enable to retrieve the backend for %s" % DEFAULT_SUFFIX)
raise ValueError("no backend for suffix %s" % DEFAULT_SUFFIX)
bent = be[0]
beName = bent.getValue('cn')
beDn = "cn=%s,cn=ldbm database,cn=plugins,cn=config" % beName

# generate vlvSearch entry
vlvSrchDn = "cn=vlvSrch,%s" % beDn
log.info('0-1. vlvSearch dn: %s' % vlvSrchDn)
vlvSrchEntry = Entry(vlvSrchDn)
vlvSrchEntry.setValues('objectclass', 'top', 'vlvSearch')
vlvSrchEntry.setValues('cn', 'vlvSrch')
vlvSrchEntry.setValues('vlvBase', DEFAULT_SUFFIX)
vlvSrchEntry.setValues('vlvFilter', '(|(objectclass=*)(objectclass=ldapsubentry))')
vlvSrchEntry.setValues('vlvScope', '2')
> M2.add_s(vlvSrchEntry)

tickets/ticket47966_test.py:50:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:163: in inner
return f(ent.dn, ent.toTupleList(), *args[2:])
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:428: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:165: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:414: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee841b38>
func = <built-in method result4 of LDAP object at 0x7f20ee19b6e8>
args = (29, 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'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: NO_SUCH_OBJECT
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Creating replication topology. INFO:lib389.topologies:Joining master master2 to master1 ... INFO:lib389.replica:SUCCESS: bootstrap to ldap://server.example.com:39002 completed INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 INFO:lib389.topologies:Ensuring master master1 to master2 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists INFO:lib389.topologies:Ensuring master master2 to master1 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. topologies.py 106 INFO Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. topologies.py 139 INFO Creating replication topology. topologies.py 153 INFO Joining master master2 to master1 ... replica.py 1461 INFO SUCCESS: bootstrap to ldap://server.example.com:39002 completed replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working replica.py 1530 INFO SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 topologies.py 161 INFO Ensuring master master1 to master2 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists topologies.py 161 INFO Ensuring master master2 to master1 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists----------------------------- Captured stderr call -----------------------------
INFO:tests.tickets.ticket47966_test:Testing Ticket 47966 - [VLV] slapd crashes during Dogtag clone reinstallation INFO:tests.tickets.ticket47966_test:0. Create a VLV index on Master 2. INFO:lib389:List backend with suffix=dc=example,dc=com INFO:tests.tickets.ticket47966_test:0-1. vlvSearch dn: cn=vlvSrch,cn=b'userRoot',cn=ldbm database,cn=plugins,cn=config ------------------------------ Captured log call -------------------------------
ticket47966_test.py 26 INFO Testing Ticket 47966 - [VLV] slapd crashes during Dogtag clone reinstallation ticket47966_test.py 31 INFO 0. Create a VLV index on Master 2. backend.py 71 INFO List backend with suffix=dc=example,dc=com ticket47966_test.py 43 INFO 0-1. vlvSearch dn: cn=vlvSrch,cn=b'userRoot',cn=ldbm database,cn=plugins,cn=config
Failed tickets/ticket47970_test.py::test_ticket47970 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20df7fe358>

def test_ticket47970(topology_st):
"""
Testing that a failed SASL bind does not trigger account lockout -
which would attempt to update the passwordRetryCount on the root dse entry
"""

log.info('Testing Ticket 47970 - Testing that a failed SASL bind does not trigger account lockout')

#
# Enable account lockout
#
try:
> topology_st.standalone.modify_s("cn=config", [(ldap.MOD_REPLACE, 'passwordLockout', 'on')])

tickets/ticket47970_test.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20ee17dc18>
func = <built-in method modify_ext of LDAP object at 0x7f20decd6ee0>
args = ('cn=config', [(2, 'passwordLockout', 'on')], None, None), kwargs = {}
diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'o')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.----------------------------- Captured stderr call -----------------------------
INFO:tests.tickets.ticket47970_test:Testing Ticket 47970 - Testing that a failed SASL bind does not trigger account lockout ------------------------------ Captured log call -------------------------------
ticket47970_test.py 28 INFO Testing Ticket 47970 - Testing that a failed SASL bind does not trigger account lockout
Failed tickets/ticket47973_test.py::test_ticket47973_case 5.06
topology_st = <lib389.topologies.TopologyMain object at 0x7f20df6e8550>

def test_ticket47973_case(topology_st):
log.info('Testing Ticket 47973 (case) - Test the cases in the original schema are preserved.')

log.info('case 1 - Test the cases in the original schema are preserved.')

tsfile = topology_st.standalone.schemadir + '/98test.ldif'
tsfd = open(tsfile, "w")
Mozattr0 = "MoZiLLaaTTRiBuTe"
testschema = "dn: cn=schema\nattributetypes: ( 8.9.10.11.12.13.14 NAME '" + Mozattr0 + "' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Mozilla Dummy Schema' )\nobjectclasses: ( 1.2.3.4.5.6.7 NAME 'MozillaObject' SUP top MUST ( objectclass $ cn ) MAY ( " + Mozattr0 + " ) X-ORIGIN 'user defined' )"
tsfd.write(testschema)
tsfd.close()

try:
# run the schema reload task with the default schemadir
topology_st.standalone.tasks.schemaReload(schemadir=topology_st.standalone.schemadir,
args={TASK_WAIT: False})
except ValueError:
log.error('Schema Reload task failed.')
assert False

time.sleep(5)

try:
schemaentry = topology_st.standalone.search_s("cn=schema", ldap.SCOPE_BASE,
'objectclass=top',
["objectclasses"])
oclist = schemaentry[0].data.get("objectclasses")
except ldap.LDAPError as e:
log.error('Failed to get schema entry: error (%s)' % e.message['desc'])
raise e

found = 0
for oc in oclist:
log.info('OC: %s' % oc)
> moz = re.findall(Mozattr0, oc)

tickets/ticket47973_test.py:147:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

pattern = 'MoZiLLaaTTRiBuTe'
string = b"( 2.5.6.0 NAME 'top' ABSTRACT MUST objectClass X-ORIGIN 'RFC 4512' )"
flags = 0

def findall(pattern, string, flags=0):
"""Return a list of all non-overlapping matches in the string.

If one or more capturing groups are present in the pattern, return
a list of groups; this will be a list of tuples if the pattern
has more than one group.

Empty matches are included in the result."""
> return _compile(pattern, flags).findall(string)
E TypeError: cannot use a string pattern on a bytes-like object

/usr/lib64/python3.6/re.py:222: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:tests.tickets.ticket47973_test:Testing Ticket 47973 (case) - Test the cases in the original schema are preserved. INFO:tests.tickets.ticket47973_test:case 1 - Test the cases in the original schema are preserved. INFO:lib389:Schema Reload task (task-06182018_212652) completed successfully INFO:tests.tickets.ticket47973_test:OC: b"( 2.5.6.0 NAME 'top' ABSTRACT MUST objectClass X-ORIGIN 'RFC 4512' )" ------------------------------ Captured log call -------------------------------
ticket47973_test.py 114 INFO Testing Ticket 47973 (case) - Test the cases in the original schema are preserved. ticket47973_test.py 116 INFO case 1 - Test the cases in the original schema are preserved. tasks.py 991 INFO Schema Reload task (task-06182018_212652) completed successfully ticket47973_test.py 146 INFO OC: b"( 2.5.6.0 NAME 'top' ABSTRACT MUST objectClass X-ORIGIN 'RFC 4512' )"
Failed tickets/ticket47976_test.py::test_ticket47976_1 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc44d30>

def test_ticket47976_1(topology_st):
mod = [(ldap.MOD_REPLACE, 'nsslapd-pluginConfigArea', DEFINITIONS_DN)]
> topology_st.standalone.modify_s('cn=%s,cn=plugins,cn=config' % PLUGIN_MANAGED_ENTRY, mod)

tickets/ticket47976_test.py:77:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dfc76748>
func = <built-in method modify_ext of LDAP object at 0x7f20ee1addc8>
args = ('cn=Managed Entries,cn=plugins,cn=config', [(2, 'nsslapd-pluginConfigArea', 'cn=definitions,dc=example,dc=com')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'c')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
Failed tickets/ticket47976_test.py::test_ticket47976_2 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc44d30>

def test_ticket47976_2(topology_st):
"""It reimports the database with a very large page size
so all the entries (user and its private group).
"""

log.info('Test complete')
mod = [(ldap.MOD_REPLACE, 'nsslapd-db-page-size', str(128 * 1024))]
> topology_st.standalone.modify_s(DN_LDBM, mod)

tickets/ticket47976_test.py:99:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dfc76748>
func = <built-in method modify_ext of LDAP object at 0x7f20ee1addc8>
args = ('cn=ldbm database,cn=plugins,cn=config', [(2, 'nsslapd-db-page-size', '131072')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '1')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:tests.tickets.ticket47976_test:Test complete ------------------------------ Captured log call -------------------------------
ticket47976_test.py 97 INFO Test complete
Failed tickets/ticket47976_test.py::test_ticket47976_3 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20dfc44d30>

def test_ticket47976_3(topology_st):
"""A single delete of a user should hit 47976, because mep post op will
delete its related group.
"""

log.info('Testing if the delete will hang or not')
# log.info("\n\nAttach\n\n debugger")
# time.sleep(60)
topology_st.standalone.set_option(ldap.OPT_TIMEOUT, 5)
try:
for cpt in range(MAX_ACCOUNTS):
name = "user%d" % (cpt)
> topology_st.standalone.delete_s("uid=%s,%s" % (name, PEOPLE_DN))

tickets/ticket47976_test.py:136:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:558: in delete_s
return self.delete_ext_s(dn,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:551: in delete_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:749: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:756: in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:329: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:44: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dfc76748>
func = <built-in method result4 of LDAP object at 0x7f20ee1addc8>
args = (2, 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': 'ou=people,dc=example,dc=com'}

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: NO_SUCH_OBJECT
----------------------------- Captured stderr call -----------------------------
INFO:tests.tickets.ticket47976_test:Testing if the delete will hang or not ------------------------------ Captured log call -------------------------------
ticket47976_test.py 129 INFO Testing if the delete will hang or not
Failed tickets/ticket47980_test.py::test_ticket47980 0.23
topology_st = <lib389.topologies.TopologyMain object at 0x7f20df945588>

def test_ticket47980(topology_st):
"""
Multiple COS pointer definitions that use the same attribute are not correctly ordered.
The cos plugin was incorrectly sorting the attribute indexes based on subtree, which lead
to the wrong cos attribute value being applied to the entry.
"""

log.info('Testing Ticket 47980 - Testing multiple nested COS pointer definitions are processed correctly')

# Add our nested branches
try:
topology_st.standalone.add_s(Entry((BRANCH1, {
'objectclass': 'top extensibleObject'.split(),
'ou': 'level1'
})))
except ldap.LDAPError as e:
log.error('Failed to add level1: error ' + e.message['desc'])
assert False

try:
topology_st.standalone.add_s(Entry((BRANCH2, {
'objectclass': 'top extensibleObject'.split(),
'ou': 'level2'
})))
except ldap.LDAPError as e:
log.error('Failed to add level2: error ' + e.message['desc'])
assert False

try:
topology_st.standalone.add_s(Entry((BRANCH3, {
'objectclass': 'top extensibleObject'.split(),
'uid': 'level3'
})))
except ldap.LDAPError as e:
log.error('Failed to add level3: error ' + e.message['desc'])
assert False

# People branch, might already exist
try:
topology_st.standalone.add_s(Entry((BRANCH4, {
'objectclass': 'top extensibleObject'.split(),
'ou': 'level4'
})))
except ldap.ALREADY_EXISTS:
pass
except ldap.LDAPError as e:
log.error('Failed to add level4: error ' + e.message['desc'])
assert False

try:
topology_st.standalone.add_s(Entry((BRANCH5, {
'objectclass': 'top extensibleObject'.split(),
'ou': 'level5'
})))
except ldap.LDAPError as e:
log.error('Failed to add level5: error ' + e.message['desc'])
assert False

try:
topology_st.standalone.add_s(Entry((BRANCH6, {
'objectclass': 'top extensibleObject'.split(),
'uid': 'level6'
})))
except ldap.LDAPError as e:
log.error('Failed to add level6: error ' + e.message['desc'])
assert False

# Add users to each branch
try:
topology_st.standalone.add_s(Entry((USER1_DN, {
'objectclass': 'top extensibleObject'.split(),
'uid': 'user1'
})))
except ldap.LDAPError as e:
log.error('Failed to add user1: error ' + e.message['desc'])
assert False

try:
topology_st.standalone.add_s(Entry((USER2_DN, {
'objectclass': 'top extensibleObject'.split(),
'uid': 'user2'
})))
except ldap.LDAPError as e:
log.error('Failed to add user2: error ' + e.message['desc'])
assert False

try:
topology_st.standalone.add_s(Entry((USER3_DN, {
'objectclass': 'top extensibleObject'.split(),
'uid': 'user3'
})))
except ldap.LDAPError as e:
log.error('Failed to add user3: error ' + e.message['desc'])
assert False

try:
topology_st.standalone.add_s(Entry((USER4_DN, {
'objectclass': 'top extensibleObject'.split(),
'uid': 'user4'
})))
except ldap.LDAPError as e:
log.error('Failed to add user4: error ' + e.message['desc'])
assert False

try:
topology_st.standalone.add_s(Entry((USER5_DN, {
'objectclass': 'top extensibleObject'.split(),
'uid': 'user5'
})))
except ldap.LDAPError as e:
log.error('Failed to add user5: error ' + e.message['desc'])
assert False

try:
topology_st.standalone.add_s(Entry((USER6_DN, {
'objectclass': 'top extensibleObject'.split(),
'uid': 'user6'
})))
except ldap.LDAPError as e:
log.error('Failed to add user6: error ' + e.message['desc'])
assert False

# Enable password policy
try:
> topology_st.standalone.modify_s(DN_CONFIG, [(ldap.MOD_REPLACE, 'nsslapd-pwpolicy-local', 'on')])

tickets/ticket47980_test.py:200:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df8d6b70>
func = <built-in method modify_ext of LDAP object at 0x7f20df89d5d0>
args = ('cn=config', [(2, 'nsslapd-pwpolicy-local', 'on')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'o')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.----------------------------- Captured stderr call -----------------------------
INFO:tests.tickets.ticket47980_test:Testing Ticket 47980 - Testing multiple nested COS pointer definitions are processed correctly ------------------------------ Captured log call -------------------------------
ticket47980_test.py 83 INFO Testing Ticket 47980 - Testing multiple nested COS pointer definitions are processed correctly
Failed tickets/ticket47981_test.py::test_ticket47981 0.71
topology_st = <lib389.topologies.TopologyMain object at 0x7f20debc3128>

def test_ticket47981(topology_st):
"""
If there are multiple suffixes, and the last suffix checked does not contain any COS entries,
while other suffixes do, then the vattr cache is not invalidated as it should be. Then any
cached entries will still contain the old COS attributes/values.
"""

log.info('Testing Ticket 47981 - Test that COS def changes are correctly reflected in affected users')

#
# Create a second backend that does not have any COS entries
#
log.info('Adding second suffix that will not contain any COS entries...\n')

topology_st.standalone.backend.create(SECOND_SUFFIX, {BACKEND_NAME: BE_NAME})
topology_st.standalone.mappingtree.create(SECOND_SUFFIX, bename=BE_NAME)
try:
topology_st.standalone.add_s(Entry((SECOND_SUFFIX, {
'objectclass': 'top organization'.split(),
'o': BE_NAME})))
except ldap.ALREADY_EXISTS:
pass
except ldap.LDAPError as e:
log.error('Failed to create suffix entry: error ' + e.message['desc'])
assert False

#
# Add People branch, it might already exist
#
log.info('Add our test entries to the default suffix, and proceed with the test...')

try:
topology_st.standalone.add_s(Entry((BRANCH, {
'objectclass': 'top extensibleObject'.split(),
'ou': 'level4'
})))
except ldap.ALREADY_EXISTS:
pass
except ldap.LDAPError as e:
log.error('Failed to add ou=people: error ' + e.message['desc'])
assert False

#
# Add a user to the branch
#
try:
topology_st.standalone.add_s(Entry((USER_DN, {
'objectclass': 'top extensibleObject'.split(),
'uid': 'user1'
})))
except ldap.LDAPError as e:
log.error('Failed to add user1: error ' + e.message['desc'])
assert False

#
# Enable password policy and add the subtree policy
#
try:
> topology_st.standalone.modify_s(DN_CONFIG, [(ldap.MOD_REPLACE, 'nsslapd-pwpolicy-local', 'on')])

tickets/ticket47981_test.py:173:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df8f7898>
func = <built-in method modify_ext of LDAP object at 0x7f20dfa71530>
args = ('cn=config', [(2, 'nsslapd-pwpolicy-local', 'on')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'o')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.----------------------------- Captured stderr call -----------------------------
INFO:tests.tickets.ticket47981_test:Testing Ticket 47981 - Test that COS def changes are correctly reflected in affected users INFO:tests.tickets.ticket47981_test:Adding second suffix that will not contain any COS entries... INFO:lib389:List backend with suffix=o=netscaperoot INFO:lib389:Creating a local backend INFO:lib389:List backend cn=netscaperoot,cn=ldbm database,cn=plugins,cn=config INFO:lib389:Found entry dn: cn=netscaperoot,cn=ldbm database,cn=plugins,cn=config cn: netscaperoot nsslapd-cachememsize: 512000 nsslapd-cachesize: -1 nsslapd-directory: /var/lib/dirsrv/slapd-standalone1/db/netscaperoot nsslapd-dncachememsize: 16777216 nsslapd-readonly: off nsslapd-require-index: off nsslapd-suffix: o=netscaperoot objectClass: top objectClass: extensibleObject objectClass: nsBackendInstance INFO:lib389:Entry dn: cn="o=netscaperoot",cn=mapping tree,cn=config cn: o=netscaperoot nsslapd-backend: netscaperoot nsslapd-state: backend objectclass: top objectclass: extensibleObject objectclass: nsMappingTree INFO:lib389:Found entry dn: cn=o\3Dnetscaperoot,cn=mapping tree,cn=config cn: o=netscaperoot nsslapd-backend: netscaperoot nsslapd-state: backend objectClass: top objectClass: extensibleObject objectClass: nsMappingTree INFO:tests.tickets.ticket47981_test:Add our test entries to the default suffix, and proceed with the test... ------------------------------ Captured log call -------------------------------
ticket47981_test.py 122 INFO Testing Ticket 47981 - Test that COS def changes are correctly reflected in affected users ticket47981_test.py 127 INFO Adding second suffix that will not contain any COS entries... backend.py 71 INFO List backend with suffix=o=netscaperoot backend.py 281 INFO Creating a local backend backend.py 67 INFO List backend cn=netscaperoot,cn=ldbm database,cn=plugins,cn=config __init__.py 1820 INFO Found entry dn: cn=netscaperoot,cn=ldbm database,cn=plugins,cn=config cn: netscaperoot nsslapd-cachememsize: 512000 nsslapd-cachesize: -1 nsslapd-directory: /var/lib/dirsrv/slapd-standalone1/db/netscaperoot nsslapd-dncachememsize: 16777216 nsslapd-readonly: off nsslapd-require-index: off nsslapd-suffix: o=netscaperoot objectClass: top objectClass: extensibleObject objectClass: nsBackendInstance mappingTree.py 155 INFO Entry dn: cn="o=netscaperoot",cn=mapping tree,cn=config cn: o=netscaperoot nsslapd-backend: netscaperoot nsslapd-state: backend objectclass: top objectclass: extensibleObject objectclass: nsMappingTree __init__.py 1820 INFO Found entry dn: cn=o\3Dnetscaperoot,cn=mapping tree,cn=config cn: o=netscaperoot nsslapd-backend: netscaperoot nsslapd-state: backend objectClass: top objectClass: extensibleObject objectClass: nsMappingTree ticket47981_test.py 144 INFO Add our test entries to the default suffix, and proceed with the test...
Failed tickets/ticket47988_test.py::test_ticket47988_init 0.00
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20dfa498d0>

def test_ticket47988_init(topology_m2):
"""
It adds
- Objectclass with MAY 'member'
- an entry ('bind_entry') with which we bind to test the 'SELFDN' operation
It deletes the anonymous aci

"""

_header(topology_m2, 'test_ticket47988_init')

# enable acl error logging
mod = [(ldap.MOD_REPLACE, 'nsslapd-errorlog-level', str(8192))] # REPL
> topology_m2.ms["master1"].modify_s(DN_CONFIG, mod)

tickets/ticket47988_test.py:118:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dfa66a20>
func = <built-in method modify_ext of LDAP object at 0x7f20df765170>
args = ('cn=config', [(2, 'nsslapd-errorlog-level', '8192')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '8')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. INFO:lib389.topologies:Creating replication topology. INFO:lib389.topologies:Joining master master2 to master1 ... INFO:lib389.replica:SUCCESS: bootstrap to ldap://server.example.com:39002 completed INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working INFO:lib389.replica:SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working INFO:lib389.replica:SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 INFO:lib389.topologies:Ensuring master master1 to master2 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists INFO:lib389.topologies:Ensuring master master2 to master1 ... INFO:lib389.replica:SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created. topologies.py 106 INFO Instance with parameters {'ldap-port': 39002, 'ldap-secureport': 63702, 'server-id': 'master2', 'suffix': 'dc=example,dc=com'} was created. topologies.py 139 INFO Creating replication topology. topologies.py 153 INFO Joining master master2 to master1 ... replica.py 1461 INFO SUCCESS: bootstrap to ldap://server.example.com:39002 completed replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 is was created replica.py 1742 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 is was created replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39001 to ldap://server.example.com:39002 is working replica.py 1873 INFO SUCCESS: Replication from ldap://server.example.com:39002 to ldap://server.example.com:39001 is working replica.py 1530 INFO SUCCESS: joined master from ldap://server.example.com:39001 to ldap://server.example.com:39002 topologies.py 161 INFO Ensuring master master1 to master2 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39001 to ldap://server.example.com:39002 already exists topologies.py 161 INFO Ensuring master master2 to master1 ... replica.py 1715 INFO SUCCESS: Agreement from ldap://server.example.com:39002 to ldap://server.example.com:39001 already exists----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### test_ticket47988_init INFO:lib389:####### INFO:lib389:################################################### ------------------------------ Captured log call -------------------------------
ticket47988_test.py 61 INFO ############################################### ticket47988_test.py 62 INFO ####### ticket47988_test.py 63 INFO ####### test_ticket47988_init ticket47988_test.py 64 INFO ####### ticket47988_test.py 65 INFO ###################################################
Failed tickets/ticket47988_test.py::test_ticket47988_1 0.00
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20dfa498d0>

def test_ticket47988_1(topology_m2):
'''
Check that replication is working and pause replication M2->M1
'''
_header(topology_m2, 'test_ticket47988_1')

topology_m2.ms["master1"].log.debug("\n\nCheck that replication is working and pause replication M2->M1\n")
> _do_update_entry(supplier=topology_m2.ms["master2"], consumer=topology_m2.ms["master1"], attempts=5)

tickets/ticket47988_test.py:231:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47988_test.py:181: in _do_update_entry
supplier.modify_s(entryDN, mod)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dfa72a58>
func = <built-in method modify_ext of LDAP object at 0x7f20df6f5ee0>
args = ('cn=other_entry0,dc=example,dc=com', [(2, 'telephonenumber', '101')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '1')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### test_ticket47988_1 INFO:lib389:####### INFO:lib389:################################################### ------------------------------ Captured log call -------------------------------
ticket47988_test.py 61 INFO ############################################### ticket47988_test.py 62 INFO ####### ticket47988_test.py 63 INFO ####### test_ticket47988_1 ticket47988_test.py 64 INFO ####### ticket47988_test.py 65 INFO ###################################################
Failed tickets/ticket47988_test.py::test_ticket47988_2 0.09
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20dfa498d0>

def test_ticket47988_2(topology_m2):
'''
Update M1 schema and trigger update M1->M2
So M1 should learn new/extended definitions that are in M2 schema
'''
_header(topology_m2, 'test_ticket47988_2')

topology_m2.ms["master1"].log.debug("\n\nUpdate M1 schema and an entry on M1\n")
master1_schema_csn = topology_m2.ms["master1"].schema.get_schema_csn()
master2_schema_csn = topology_m2.ms["master2"].schema.get_schema_csn()
topology_m2.ms["master1"].log.debug("\nBefore updating the schema on M1\n")
topology_m2.ms["master1"].log.debug("Master1 nsschemaCSN: %s" % master1_schema_csn)
topology_m2.ms["master1"].log.debug("Master2 nsschemaCSN: %s" % master2_schema_csn)

# Here M1 should no, should check M2 schema and learn
> _do_update_schema(topology_m2.ms["master1"])

tickets/ticket47988_test.py:250:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47988_test.py:168: in _do_update_schema
server.modify_s('cn=schema', mod)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dfa66a20>
func = <built-in method modify_ext of LDAP object at 0x7f20df765170>
args = ('cn=schema', [(0, 'objectclasses', "( 2.16.840.1.113730.3.8.12.4946 NAME 'thierry4946' DESC 'Override for Group Attributes' STRUCTURAL MUST ( cn ) MAY sn X-ORIGIN ( 'IPA v4.1.2' 'user defined' ) )")], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '(')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### test_ticket47988_2 INFO:lib389:####### INFO:lib389:################################################### ------------------------------ Captured log call -------------------------------
ticket47988_test.py 61 INFO ############################################### ticket47988_test.py 62 INFO ####### ticket47988_test.py 63 INFO ####### test_ticket47988_2 ticket47988_test.py 64 INFO ####### ticket47988_test.py 65 INFO ###################################################
Failed tickets/ticket47988_test.py::test_ticket47988_3 2.01
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20dfa498d0>

def test_ticket47988_3(topology_m2):
'''
Resume replication M2->M1 and check replication is still working
'''
_header(topology_m2, 'test_ticket47988_3')

_resume_M2_to_M1(topology_m2)
> _do_update_entry(supplier=topology_m2.ms["master1"], consumer=topology_m2.ms["master2"], attempts=5)

tickets/ticket47988_test.py:281:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47988_test.py:181: in _do_update_entry
supplier.modify_s(entryDN, mod)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dfa66a20>
func = <built-in method modify_ext of LDAP object at 0x7f20df765170>
args = ('cn=other_entry0,dc=example,dc=com', [(2, 'telephonenumber', '148')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '1')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### test_ticket47988_3 INFO:lib389:####### INFO:lib389:################################################### INFO:lib389: ######################### resume RA M2->M1 ###################### INFO:lib389:Resuming replication cn=001,cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config ------------------------------ Captured log call -------------------------------
ticket47988_test.py 61 INFO ############################################### ticket47988_test.py 62 INFO ####### ticket47988_test.py 63 INFO ####### test_ticket47988_3 ticket47988_test.py 64 INFO ####### ticket47988_test.py 65 INFO ################################################### ticket47988_test.py 218 INFO ######################### resume RA M2->M1 ###################### agreement.py 856 INFO Resuming replication cn=001,cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config
Failed tickets/ticket47988_test.py::test_ticket47988_4 0.09
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20dfa498d0>

def test_ticket47988_4(topology_m2):
'''
Check schemaCSN is identical on both server
And save the nsschemaCSN to later check they do not change unexpectedly
'''
_header(topology_m2, 'test_ticket47988_4')

master1_schema_csn = topology_m2.ms["master1"].schema.get_schema_csn()
master2_schema_csn = topology_m2.ms["master2"].schema.get_schema_csn()
topology_m2.ms["master1"].log.debug("\n\nMaster1 nsschemaCSN: %s" % master1_schema_csn)
topology_m2.ms["master1"].log.debug("\n\nMaster2 nsschemaCSN: %s" % master2_schema_csn)
> assert (master1_schema_csn)
E assert None

tickets/ticket47988_test.py:296: AssertionError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### test_ticket47988_4 INFO:lib389:####### INFO:lib389:################################################### ------------------------------ Captured log call -------------------------------
ticket47988_test.py 61 INFO ############################################### ticket47988_test.py 62 INFO ####### ticket47988_test.py 63 INFO ####### test_ticket47988_4 ticket47988_test.py 64 INFO ####### ticket47988_test.py 65 INFO ###################################################
Failed tickets/ticket47988_test.py::test_ticket47988_5 0.00
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20dfa498d0>

def test_ticket47988_5(topology_m2):
'''
Check schemaCSN do not change unexpectedly
'''
_header(topology_m2, 'test_ticket47988_5')

> _do_update_entry(supplier=topology_m2.ms["master1"], consumer=topology_m2.ms["master2"], attempts=5)

tickets/ticket47988_test.py:310:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47988_test.py:181: in _do_update_entry
supplier.modify_s(entryDN, mod)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dfa66a20>
func = <built-in method modify_ext of LDAP object at 0x7f20df765170>
args = ('cn=other_entry0,dc=example,dc=com', [(2, 'telephonenumber', '153')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '1')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### test_ticket47988_5 INFO:lib389:####### INFO:lib389:################################################### ------------------------------ Captured log call -------------------------------
ticket47988_test.py 61 INFO ############################################### ticket47988_test.py 62 INFO ####### ticket47988_test.py 63 INFO ####### test_ticket47988_5 ticket47988_test.py 64 INFO ####### ticket47988_test.py 65 INFO ###################################################
Failed tickets/ticket47988_test.py::test_ticket47988_6 0.11
topology_m2 = <lib389.topologies.TopologyMain object at 0x7f20dfa498d0>

def test_ticket47988_6(topology_m2):
'''
Update M1 schema and trigger update M2->M1
So M2 should learn new/extended definitions that are in M1 schema
'''

_header(topology_m2, 'test_ticket47988_6')

topology_m2.ms["master1"].log.debug("\n\nUpdate M1 schema and an entry on M1\n")
master1_schema_csn = topology_m2.ms["master1"].schema.get_schema_csn()
master2_schema_csn = topology_m2.ms["master2"].schema.get_schema_csn()
topology_m2.ms["master1"].log.debug("\nBefore updating the schema on M1\n")
topology_m2.ms["master1"].log.debug("Master1 nsschemaCSN: %s" % master1_schema_csn)
topology_m2.ms["master1"].log.debug("Master2 nsschemaCSN: %s" % master2_schema_csn)

# Here M1 should no, should check M2 schema and learn
> _do_update_schema(topology_m2.ms["master1"], range=5999)

tickets/ticket47988_test.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tickets/ticket47988_test.py:168: in _do_update_schema
server.modify_s('cn=schema', mod)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dfa66a20>
func = <built-in method modify_ext of LDAP object at 0x7f20df765170>
args = ('cn=schema', [(0, 'objectclasses', "( 2.16.840.1.113730.3.8.12.6558 NAME 'thierry6558' DESC 'Override for Group Attributes' STRUCTURAL MUST ( cn ) MAY sn X-ORIGIN ( 'IPA v4.1.2' 'user defined' ) )")], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', '(')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### INFO:lib389:####### test_ticket47988_6 INFO:lib389:####### INFO:lib389:################################################### ------------------------------ Captured log call -------------------------------
ticket47988_test.py 61 INFO ############################################### ticket47988_test.py 62 INFO ####### ticket47988_test.py 63 INFO ####### test_ticket47988_6 ticket47988_test.py 64 INFO ####### ticket47988_test.py 65 INFO ###################################################
Failed tickets/ticket48013_test.py::test_ticket48013 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee581828>

def test_ticket48013(topology_st):
'''
Content Synchonization: Test that invalid cookies are caught
'''

cookies = ('#', '##', 'a#a#a', 'a#a#1')

# Enable dynamic plugins
try:
> topology_st.standalone.modify_s(DN_CONFIG, [(ldap.MOD_REPLACE, 'nsslapd-dynamic-plugins', 'on')])

tickets/ticket48013_test.py:50:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20df72f320>
func = <built-in method modify_ext of LDAP object at 0x7f20dedfe4b8>
args = ('cn=config', [(2, 'nsslapd-dynamic-plugins', 'on')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'o')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.
Failed tickets/ticket48026_test.py::test_ticket48026 0.01
topology_st = <lib389.topologies.TopologyMain object at 0x7f20d9bff400>

def test_ticket48026(topology_st):
'''
Test that multiple attribute uniqueness works correctly.
'''
# Configure the plugin
inst = topology_st.standalone
inst.plugins.enable(name=PLUGIN_ATTR_UNIQUENESS)

try:
# This plugin enable / disable doesn't seem to create the nsslapd-pluginId correctly?
inst.modify_s('cn=' + PLUGIN_ATTR_UNIQUENESS + ',cn=plugins,cn=config',
[(ldap.MOD_REPLACE, 'uniqueness-attribute-name', 'mail'),
(ldap.MOD_ADD, 'uniqueness-attribute-name',
> 'mailAlternateAddress'),
])

tickets/ticket48026_test.py:39:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20decf2cc0>
func = <built-in method modify_ext of LDAP object at 0x7f20df96f468>
args = ('cn=attribute uniqueness,cn=plugins,cn=config', [(2, 'uniqueness-attribute-name', 'mail'), (0, 'uniqueness-attribute-name', 'mailAlternateAddress')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'm')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.
Failed tickets/ticket48109_test.py::test_ticket48109 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20d9bffb70>

def test_ticket48109(topology_st):
'''
Set SubStr lengths to cn=uid,cn=index,...
objectClass: extensibleObject
nsIndexType: sub
nsSubStrBegin: 2
nsSubStrEnd: 2
'''
log.info('Test case 0')
# add substr setting to UID_INDEX
try:
topology_st.standalone.modify_s(UID_INDEX,
[(ldap.MOD_ADD, 'objectClass', 'extensibleObject'),
(ldap.MOD_ADD, 'nsIndexType', 'sub'),
(ldap.MOD_ADD, 'nsSubStrBegin', '2'),
> (ldap.MOD_ADD, 'nsSubStrEnd', '2')])

tickets/ticket48109_test.py:37:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20d9b82cf8>
func = <built-in method modify_ext of LDAP object at 0x7f20df83f3c8>
args = ('cn=uid,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config', [(0, 'objectClass', 'extensibleObject'), (0, 'nsIndexType', 'sub'), (0, 'nsSubStrBegin', '2'), (0, 'nsSubStrEnd', '2')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'e')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.----------------------------- Captured stderr call -----------------------------
INFO:tests.tickets.ticket48109_test:Test case 0 ------------------------------ Captured log call -------------------------------
ticket48109_test.py 30 INFO Test case 0
Failed tickets/ticket48170_test.py::test_ticket48170 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20df91b978>

def test_ticket48170(topology_st):
'''
Attempt to add a nsIndexType wikth an invalid value: "eq,pres"
'''

INDEX_DN = 'cn=cn,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config'
REJECTED = False
try:
> topology_st.standalone.modify_s(INDEX_DN, [(ldap.MOD_ADD, 'nsINdexType', 'eq,pres')])

tickets/ticket48170_test.py:25:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:629: in modify_s
return self.modify_ext_s(dn,modlist,None,None)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:601: in modify_ext_s
msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls)
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:598: in modify_ext
return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20d9bff048>
func = <built-in method modify_ext of LDAP object at 0x7f20ded21c38>
args = ('cn=cn,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config', [(0, 'nsINdexType', 'eq,pres')], None, None)
kwargs = {}, diagnostic_message_success = 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 TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'e')

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:313: TypeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.
Failed tickets/ticket48194_test.py::test_init 0.00
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee3c68d0>

def test_init(topology_st):
"""
Generate self signed cert and import it to the DS cert db.
Enable SSL
"""
_header(topology_st, 'Testing Ticket 48194 - harden the list of ciphers available by default')

> topology_st.standalone.nss_ssl.reinit()

tickets/ticket48194_test.py:50:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <lib389.DirSrv object at 0x7f20dbb4f9e8>, name = 'nss_ssl'

def __getattr__(self,name):
if name in self.CLASSATTR_OPTION_MAPPING:
return self.get_option(self.CLASSATTR_OPTION_MAPPING[name])
elif name in self.__dict__:
return self.__dict__[name]
else:
raise AttributeError('%s has no attribute %s' % (
> self.__class__.__name__,repr(name)
))
E AttributeError: DirSrv has no attribute 'nss_ssl'

/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:352: AttributeError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists OK user dirsrv exists ---------------------------- Captured stderr setup -----------------------------
INFO:lib389.topologies:Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created. ------------------------------ Captured log setup ------------------------------
topologies.py 106 INFO Instance with parameters {'ldap-port': 38901, 'ldap-secureport': 63601, 'server-id': 'standalone1', 'suffix': 'dc=example,dc=com'} was created.----------------------------- Captured stderr call -----------------------------
INFO:lib389: ############################################### INFO:lib389:####### Testing Ticket 48194 - harden the list of ciphers available by default INFO:lib389:############################################### ------------------------------ Captured log call -------------------------------
ticket48194_test.py 38 INFO ############################################### ticket48194_test.py 39 INFO ####### Testing Ticket 48194 - harden the list of ciphers available by default ticket48194_test.py 40 INFO ###############################################
Failed tickets/ticket48194_test.py::test_run_0 0.12
topology_st = <lib389.topologies.TopologyMain object at 0x7f20ee3c68d0>

def test_run_0(topology_st):
"""
Check nsSSL3Ciphers: +all
All ciphers are enabled except null.
Note: allowWeakCipher: on
"""
_header(topology_st, 'Test Case 1 - Check the ciphers availability for "+all"; allowWeakCipher: on')

topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
> topology_st.standalone.modify_s(CONFIG_DN, [(ldap.MOD_REPLACE, 'nsslapd-errorlog-level', '64')])

tickets/ticket48194_test.py:125:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.6/site-packages/lib389/__init__.py:167: in inner
return f(*args, **kwargs)
/usr/lib