diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-08-09 14:33:49 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-08-09 08:20:36 +0200 |
commit | a117fd6d11aef5360a1af1fc6da542829da8b7b0 (patch) | |
tree | b7928e8e30b96586c6a578b61feb6283015a0dba /source4 | |
parent | ef87b4e4f10eb7d5974cb0e0861648d537153a00 (diff) | |
download | samba-a117fd6d11aef5360a1af1fc6da542829da8b7b0.tar.gz samba-a117fd6d11aef5360a1af1fc6da542829da8b7b0.tar.bz2 samba-a117fd6d11aef5360a1af1fc6da542829da8b7b0.zip |
s4-dsdb: Ensure we have indexing enabled during the provision
Because we set the schema before we connected the ldb to a file, the @INDEX records
were not added until next startup. This cost 100% more time in running provision on
my laptop.
Andrew Bartlett
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Aug 9 08:20:36 CEST 2012 on sn-devel-104
Diffstat (limited to 'source4')
-rw-r--r-- | source4/scripting/python/samba/provision/__init__.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/provision/__init__.py b/source4/scripting/python/samba/provision/__init__.py index 192130ea1c..94e857e9f4 100644 --- a/source4/scripting/python/samba/provision/__init__.py +++ b/source4/scripting/python/samba/provision/__init__.py @@ -1121,7 +1121,7 @@ def setup_samdb(path, session_info, provision_backend, lp, names, logger.info("Pre-loading the Samba 4 and AD schema") # Load the schema from the one we computed earlier - samdb.set_schema(schema) + samdb.set_schema(schema, write_attributes=False) # Set the NTDS settings DN manually - in order to have it already around # before the provisioned tree exists and we connect @@ -1131,6 +1131,11 @@ def setup_samdb(path, session_info, provision_backend, lp, names, # DB samdb.connect(path) + # But we have to give it one more kick to have it use the schema + # during provision - it needs, now that it is connected, to write + # the schema @INDEX records to the database. + samdb.set_schema(schema, write_attributes=True) + return samdb |