Problematic test: samba.tests.samba_tool.demote
Noel Power
nopower at suse.com
Wed Jun 27 14:58:11 UTC 2018
Andrew/Gary
Hi Guys I need some help/advice or a dig out wrt the
samba.tests.samba_tool.demote test. This test is failing in my PY3 wip
branch. However the reason it fails is that the test itself doesn't
clean up properly after it completes, running the test a second time
(which is what happens when PY3 is enabled) and it fails. You don't even
need to involve PY3, just rerun the test a second time e.g.
make testenv SELFTEST_TESTENV="vampire_dc"
then manually runt the test twice
PYTHONPATH=bin/python:$(PWD)/samba/python
CONFIGFILE=./st/vampire_dc/etc/smb.conf /usr/bin/python2
$(PWD)/source4/scripting/bin/subunitrun $LOADLIST
samba.tests.samba_tool.demote -U"Administrator%locDCpass1"
test:
samba.tests.samba_tool.demote.DemoteCmdTestCase.test_demote_and_remove_dns
time: 2018-06-27 14:54:28.102869Z
successful:
samba.tests.samba_tool.demote.DemoteCmdTestCase.test_demote_and_remove_dns
time: 2018-06-27 14:54:28.102928Z
time: 2018-06-27 14:54:28.103004Z
PYTHONPATH=bin/python:$(PWD)/samba/python
CONFIGFILE=./st/vampire_dc/etc/smb.conf /usr/bin/python2
$(PWD)/source4/scripting/bin/subunitrun $LOADLIST
samba.tests.samba_tool.demote -U"Administrator%locDCpass1"
time: 2018-06-27 14:54:44.139799Z
test:
samba.tests.samba_tool.demote.DemoteCmdTestCase.test_demote_and_remove_dns
time: 2018-06-27 14:54:45.869655Z
failure:
samba.tests.samba_tool.demote.DemoteCmdTestCase.test_demote_and_remove_dns [
Traceback (most recent call last):
File "bin/python/samba/tests/samba_tool/demote.py", line 96, in
test_demote_and_remove_dns
self.assertCmdSuccess(result, out, err)
File "bin/python/samba/tests/samba_tool/base.py", line 110, in
assertCmdSuccess
exit, out, err, msg))
AssertionError: exit[-1] stdout[] stderr[Using localdc as partner server
for the demotion
Deactivating inbound replication
Asking partner server localdc to synchronize from us
Changing userControl and container
Error while demoting, re-enabling inbound replication
ERROR(runtime): Error while sending a removeDsServer of
CN=LOCALVAMPIREDC,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=samba,DC=example,DC=com:
- (31, 'WERR_GEN_FAILURE')
]:
]
time: 2018-06-27 14:54:45.869931Z
time: 2018-06-27 14:54:45.870001Z
Test fails in python/samba/netcmd/domain.py:998 (in class
cmd_domain_demote(Command) )
where
drsuapiBind.DsRemoveDSServer(drsuapi_handle, 1, req1)
ends up in source4/rpc_server/drsuapi/dcesrv_drsuapi.c:570
=> ret = dsdb_delete(b_state->sam_ctx, ntds_dn, DSDB_TREE_DELETE);
So I guess the ntds_dn and associated records don't exists anymore, I
tried manually trying to repromote the DC in the cleanUp but failed to
get it to work (mostly likely 'cause I don't know what I am doing :-))
Ideas or a fix welcome :-)
Noel
More information about the samba-technical
mailing list