From: Tim Beale Date: Wed, 4 Oct 2017 21:01:27 +0000 (+1300) Subject: upgradeprovision: Change test to always use 2008 R2 schema X-Git-Tag: talloc-2.1.11~182 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=c22d022ceafebe0c30a3947154016e51baf2d5b3 upgradeprovision: Change test to always use 2008 R2 schema This tool (and the corresponding test) is designed to migrate a Samba DC from a pre-4.0.0 release up to a more recent schema (i.e. Windows 2008R2). Going further than 2008R2 turns this test into a bit of a nightmare. We now have a better adprep/'samba-tool domain schemaupgrade' option for upgrading from 2008R2 to a more recent schema. It seems to make most sense to leave this tests just running against 2008R2 schema provisions and add new tests to migrate from 2008R2 to 2012R2. Signed-off-by: Tim Beale Reviewed-by: Garming Sam Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/upgradehelpers.py b/python/samba/upgradehelpers.py index 99ffe28c9b5..e026262b9a7 100644 --- a/python/samba/upgradehelpers.py +++ b/python/samba/upgradehelpers.py @@ -226,7 +226,7 @@ def update_policyids(names, samdb): names.policyid_dc = None -def newprovision(names, session, smbconf, provdir, logger): +def newprovision(names, session, smbconf, provdir, logger, base_schema=None): """Create a new provision. This provision will be the reference for knowing what has changed in the @@ -256,7 +256,7 @@ def newprovision(names, session, smbconf, provdir, logger): backend_type=None, ldapadminpass=None, ol_mmr_urls=None, slapd_path=None, dom_for_fun_level=names.domainlevel, dns_backend=names.dns_backend, - useeadb=True, use_ntvfs=True) + useeadb=True, use_ntvfs=True, base_schema=base_schema) def dn_sort(x, y): diff --git a/source4/scripting/bin/samba_upgradeprovision b/source4/scripting/bin/samba_upgradeprovision index d11175314c6..1dbe1acd7b8 100755 --- a/source4/scripting/bin/samba_upgradeprovision +++ b/source4/scripting/bin/samba_upgradeprovision @@ -1633,7 +1633,7 @@ if __name__ == '__main__': provisiondir = tempfile.mkdtemp(dir=paths.private_dir, prefix="referenceprovision") result = newprovision(names, session, smbconf, provisiondir, - provision_logger) + provision_logger, base_schema="2008_R2") result.report_logger(provision_logger) # TODO diff --git a/testprogs/blackbox/upgradeprovision-oldrelease.sh b/testprogs/blackbox/upgradeprovision-oldrelease.sh index df054e868ad..a297bc3d8a7 100755 --- a/testprogs/blackbox/upgradeprovision-oldrelease.sh +++ b/testprogs/blackbox/upgradeprovision-oldrelease.sh @@ -95,7 +95,7 @@ samba_upgradedns() { } referenceprovision() { - $PYTHON $BINDIR/samba-tool domain provision --server-role="dc" --domain=SAMBA --host-name=ares --realm=${RELEASE}.samba.corp --targetdir=$PREFIX_ABS/${RELEASE}_upgrade_reference --use-ntvfs --host-ip=127.0.0.1 --host-ip6=::1 --function-level=2003 + $PYTHON $BINDIR/samba-tool domain provision --server-role="dc" --domain=SAMBA --host-name=ares --realm=${RELEASE}.samba.corp --targetdir=$PREFIX_ABS/${RELEASE}_upgrade_reference --use-ntvfs --host-ip=127.0.0.1 --host-ip6=::1 --function-level=2003 --base-schema=2008_R2 } ldapcmp() {