[PATCH] test for upgradeprovision on alpha13 / upgradeprovision creates incorrect domaindnszones record

Andrew Bartlett abartlet at samba.org
Tue Jan 22 05:57:16 MST 2013


Attached is a patch to run upgradeprovision against the alpha13 tree we
have in GIT.  To date, this has only been used by dbcheck, so this is
useful way to ensure that this code does not bitrot.

However, it has found a problem:

UNEXPECTED(failure):
samba4.blackbox.upgradeprovision.alpha13.dbcheck_full_clean(none)
REASON: _StringException: _StringException: Checking 3429 objects
ERROR: missing GUID component for wellKnownObjects in object
DC=ForestDnsZones,DC=alpha13,DC=samba,DC=corp -
B:32:18E2EA80684F11D2B9AA00C04F79F805:CN=Deleted
Objects,DC=ForestDnsZones,DC=alpha13,DC=samba,DC=corp
unable to find object for DN CN=Deleted
Objects,DC=ForestDnsZones,DC=alpha13,DC=samba,DC=corp - (No such Base
DN: CN=Deleted Objects,DC=ForestDnsZones,DC=alpha13,DC=samba,DC=corp)
Not removing dangling forward link
ERROR: missing GUID component for wellKnownObjects in object
DC=DomainDnsZones,DC=alpha13,DC=samba,DC=corp -
B:32:18E2EA80684F11D2B9AA00C04F79F805:CN=Deleted
Objects,DC=DomainDnsZones,DC=alpha13,DC=samba,DC=corp
unable to find object for DN CN=Deleted
Objects,DC=DomainDnsZones,DC=alpha13,DC=samba,DC=corp - (No such Base
DN: CN=Deleted Objects,DC=DomainDnsZones,DC=alpha13,DC=samba,DC=corp)
Not removing dangling forward link
Please use --fix to fix these errors
Checked 3429 objects (2 errors)
command:
PYTHON=python /data/samba/git/samba/testprogs/blackbox/upgradeprovision-alpha13.sh $PREFIX_ABS/provision --configfile=$SMB_CONF_PATH 2>&1 | /data/samba/git/samba/selftest/filter-subunit --fail-on-empty --prefix="samba4.blackbox.upgradeprovision.alpha13." --suffix="(none)"
expanded command:
PYTHON=python /data/samba/git/samba/testprogs/blackbox/upgradeprovision-alpha13.sh /data/samba/git/samba/st/provision --configfile=/data/samba/git/samba/st/client/client.conf 2>&1 | /data/samba/git/samba/selftest/filter-subunit --fail-on-empty --prefix="samba4.blackbox.upgradeprovision.alpha13." --suffix="(none)"
ERROR: Testsuite[samba4.blackbox.upgradeprovision.alpha13]
REASON: Exit code was 1


This is the DomainDNZZones object that creates the problem:

[abartlet at jesse samba]$ bin/ldbsearch -H
st/provision/alpha13_upgrade_full/private/sam.ldb -s base -b
'DC=DomainDnsZones,DC=alpha13,DC=samba,DC=corp'
# record 1
dn: DC=DomainDnsZones,DC=alpha13,DC=samba,DC=corp
objectClass: top
objectClass: domain
objectClass: domainDNS
description: Microsoft DNS Directory
instanceType: 4
...
wellKnownObjects: B:32:18E2EA80684F11D2B9AA00C04F79F805:CN=Deleted
Objects,DC=
 DomainDnsZones,DC=alpha13,DC=samba,DC=corp
wellKnownObjects: B:32:6227F0AF1FC2410D8E3BB10615BB5B0F:CN=NTDS
Quotas,DC=Doma
 inDnsZones,DC=alpha13,DC=samba,DC=corp
wellKnownObjects:
B:32:2FBAC1870ADE11D297C400C04FD8D5CD:CN=Infrastructure,DC=D
 omainDnsZones,DC=alpha13,DC=samba,DC=corp
wellKnownObjects:
B:32:AB8153B7768811D1ADED00C04FD8D5CD:CN=LostAndFound,DC=Dom
 ainDnsZones,DC=alpha13,DC=samba,DC=corp
...

This shows that a DomainDNSZones partition is not crated:

[abartlet at jesse samba]$ bin/ldbsearch -H
st/provision/alpha13_upgrade_full/private/sam.ldb -s base -b ''
namingcontexts
# record 1
dn: 
namingContexts: DC=alpha13,DC=samba,DC=corp
namingContexts: CN=Configuration,DC=alpha13,DC=samba,DC=corp
namingContexts: CN=Schema,CN=Configuration,DC=alpha13,DC=samba,DC=corp

For some time, we have recommended against using upgradeprovision, but
we need a way to fix up the ACLs we changed just before Samba 4.0.0.  If
we are to recommend this tool, we need it to work.

In the meantime, we could add this patch, but with a knownfail entry in
the same commit.  This will at least ensure the script runs and does not
crash on the older input.

I would appreciate your thoughts and review.

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-selftest-Add-test-of-upgradeprovision-using-the-old-.patch
Type: text/x-patch
Size: 7188 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20130122/f139f29b/attachment.bin>


More information about the samba-technical mailing list