Running the command samba-tool domain demote --remove-other-dead-server= fails if there are dnsNode object without an dnsRecord attribute. ERROR(<type 'exceptions.TypeError'>): uncaught exception - __ndr_unpack__() argument 1 must be string or read-only buffer, not dnsp.DnssrvRpcRecord File "/usr/lib64/python2.6/site-packages/samba/netcmd/__init__.py", line 175, in _run return self.run(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/samba/netcmd/domain.py", line 720, in run remove_dc.remove_dc(samdb, logger, remove_other_dead_server) File "/usr/lib64/python2.6/site-packages/samba/remove_dc.py", line 423, in remove_dc remove_dns_account=True) File "/usr/lib64/python2.6/site-packages/samba/remove_dc.py", line 351, in offline_remove_ntds_dc remove_dns_account=remove_dns_account) File "/usr/lib64/python2.6/site-packages/samba/remove_dc.py", line 266, in offline_remove_server remove_dns_references(samdb, logger, dnsHostName) File "/usr/lib64/python2.6/site-packages/samba/remove_dc.py", line 186, in remove_dns_references for v in values if not to_remove(v) ] File "/usr/lib64/python2.6/site-packages/samba/remove_dc.py", line 160, in to_remove dnsRecord = ndr_unpack(dnsp.DnssrvRpcRecord, value) File "/usr/lib64/python2.6/site-packages/samba/ndr.py", line 45, in ndr_unpack object.__ndr_unpack__(data, allow_remaining=allow_remaining) A transaction is still active in ldb context [0xe1f320] on tdb:///var/lib/samba/private/sam.ldb
Created attachment 12275 [details] fix for 4.4 cherry-picked from master
Andrew, please also add your review and assign to Karolin
Reassigned to Karolin for inclusion in 4.4.
(In reply to Ralph Böhme from comment #3) Pushed to autobuild-v4-4-test.
(In reply to Karolin Seeger from comment #4) Pushed to v4-4-test. Closing out bug report. Thanks!
Fixed in Samba 4.4.6 with 2a71f2e42d74a459346a06eb68a71efa2b7bfad0 from the master commit f8181360a89ac9e53cc991e966958e496271fa15