upgrade provision script TP1

Andrew Bartlett abartlet at samba.org
Mon Aug 24 00:13:04 MDT 2009


On Mon, 2009-08-24 at 01:45 +0400, Matthieu Patou wrote:
> Hello andrew,
> 
> I've been pushing quite hard on this upgrade script.
> 
> So far it only upgrades the schema but most is already in to do upgrade 
> for the whole sam.ldb (schema, users,configuration).
> 
> I'd like that anyone interested throw an eye on it, of course it is a 
> bit rough but it's more or less like this that I think my script will be.

Why do you shell out to provision, rather than run the provision()
function from within python?

> So for the good part it's able to upgrade the schema but it's worth 
> noting that after this all the LDB actions are much more slower ...
> The size of the schema.ldb jumped to 75M (starting from a file with 15M) 
> and the freshly generated is 25M.
> 
> About slowness I just discovered that doing an ldbedit -H sam.ldb -b 
> "xx" on any modified partition put things in a better way (execution 
> time of upgradeschema drops from 30's for doing no modification to 15', 
> it's 21's when it's run for the first time stuff is done.
> I don't know what's going on underneath sounds like a kind of reindexing 
> or reorganization, is there a way to trigger it in python (running the 
> the script more than once do not do the trick)

It probably triggers the reindex after loading the schema from the
database.  

Andrew Bartlett

-- 
Andrew Bartlett
http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Cisco Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20090824/79cfdc20/attachment.pgp>


More information about the samba-technical mailing list