upgrade to Samba 4.0 alpha 17

Sam Liddicott sam at liddicott.com
Wed Sep 21 09:32:50 MDT 2011


On Wed, Sep 21, 2011 at 3:53 PM, Andrew Bartlett <abartlet at samba.org> wrote:

> On Wed, 2011-09-21 at 06:19 +0100, Sam Liddicott wrote:
> > On Sat, Sep 17, 2011 at 11:57 AM, Andrew Bartlett <abartlet at samba.org
> >wrote:
> >
> > > On Thu, 2011-09-15 at 10:34 +0100, Sam Liddicott wrote:
> > > > On Tue, Sep 13, 2011 at 6:16 AM, Andrew Bartlett <abartlet at samba.org
> >
> > > wrote:
> > > > ...
> > > >
> > > > >
> > > > > After upgrading Samba, it is suggested that you do the following:
> > > > >
> > > > >  - stop samba
> > > > >  - take a backup copy of your sam.ldb and sam.ldb.d/* database
> files
> > > > >  - run samba-tool dbcheck --cross-ncs --fix
> > > > >  - use 'all' to say yes to fixing each type of error found
> > > > >  - after it has finished, run dbcheck again to ensure it reports no
> > > > >    errors
> > > > >
> > > > >
> > > > After upgrading to samba4 a17, when I run the upgrade command:
> > > >
> > > > # samba-tool dbcheck --cross-ncs --fix
> > > >
> > > > it shows:
> > > >
> > > > WARNING: Module [kludge_acl] not found - do you need to set
> > > > LDB_MODULES_PATH?
> > > > Unable to load modules for tdb:///var/lib/samba/private/sam.ldb:
> (null)
> > > > ERROR(ldb): uncaught exception - None
> > > >   File "/usr/lib/python2.6/site-packages/samba/netcmd/__init__.py",
> line
> > > > 145, in _run
> > > >     return self.run(*args, **kwargs)
> > > >   File "/usr/lib/python2.6/site-packages/samba/netcmd/dbcheck.py",
> line
> > > 72,
> > > > in run
> > > >     credentials=creds, lp=lp)
> > > >   File "/usr/lib/python2.6/site-packages/samba/samdb.py", line 57, in
> > > > __init__
> > > >     options=options)
> > > >   File "/usr/lib/python2.6/site-packages/samba/__init__.py", line
> 122, in
> > > > __init__
> > > >     self.connect(url, flags, options)
> > > >   File "/usr/lib/python2.6/site-packages/samba/samdb.py", line 71, in
> > > > connect
> > > >     options=options)
> > > >
> > > > strace shows that python is opening packages in
> > > > /usr/lib/python2.6/site-packages/samba and does open
> > > > /usr/lib/samba/libtdb-wrap.so and /usr/lib/samba/libtdb.so.1 and
> > > > /usr/modules/samba/ldb/tdb.so
> > > >
> > > > strace doesn't show any ultimate failure to open any file with "tdb"
> in
> > > the
> > > > filename (although it does show search path open sequences which
> succeed
> > > in
> > > > the end)
> > > >
> > > > It does fail to open files which would match "*ldb.py*" but then
> there
> > > are
> > > > no such files in the source either
> > > >
> > > > Any tips?
> > >
> > > Remove your existing installed binaries.  The failure is due to us
> > > attempting to load a module (kludge_acl) from the previous
> installation.
> > >
> >
> >
> > Nope, I tried again to be sure. I have a fresh system installation with
> new
> > samba, but preserved /var/lib/samba from before upgrade.
> >
> > After trashing /var/lib/samba/private and re-provisioning, the command
> runs
> > without error, but of course no binaries were in /var/lib/samba anyway
>
> I'm sorry, I misread the error.  You must have a very, very old
> database.  What version of Samba was used to provision it?
>
> upgradeprovision --full might help, it was built for upgrades from these
> older databases.
>
> If there is no important data in the database, it may work better to
> just remove it and start over.
>
>
The build is based on May 2009.

upgradeprovision --full gives:

Traceback (most recent call last):
  File "/usr/sbin/upgradeprovision", line 1719, in <module>
    backup_provision(paths, backupdir)
  File "/usr/sbin/upgradeprovision", line 1526, in backup_provision
    shutil.copytree(paths.sysvol, os.path.join(dir, "sysvol"))
  File "/usr/lib/python2.6/shutil.py", line 140, in copytree
TypeError: coercing to Unicode: need string or buffer, NoneType found

It may be that I started the command in a UTF LANG/LOCALE environment, but
to be sure I re-ran on a fresh upgrade with a LANG=C and also commented out
line 1719 to remove the backup. Then I get:

# upgradeprovision --full
Traceback (most recent call last):
  File "/usr/sbin/upgradeprovision", line 1726, in <module>
    paths, smbconf, lp)
  File "/usr/lib/python2.6/site-packages/samba/provision/__init__.py", line
255, in find_provision_key_parameters
    paths.smbconf, basedn)))
samba.provision.ProvisioningError: ProvisioningError: basedn in
/var/lib/samba/private/sam.ldb (CN=ESAES33X-559F6A) and from
/etc/samba/smb.conf (DC=wafs-1,DC=wanopt,DC=test)is not the same ...
A transaction is still active in ldb context [0x8ec48a8] on
/var/lib/samba/private/sam.ldb
A transaction is still active in ldb context [0x906c350] on
/var/lib/samba/private/idmap.ldb
A transaction is still active in ldb context [0x9d52810] on
/var/lib/samba/private/secrets.ldb
A transaction is still active in ldb context [0x9d36098] on
/var/lib/samba/private/privilege.ldb

I'm probably just suggest a re-provision, but I'm happy to debug further if
it will be of value.

thanks for your advice on this, Andrew

Sam


More information about the samba-technical mailing list