[Samba] classic upgrade fails with 4.6-test

Rowland Penny rpenny at samba.org
Mon Jan 30 09:29:02 UTC 2017


On Mon, 30 Jan 2017 21:59:06 +1300
Andrew Bartlett <abartlet at samba.org> wrote:

> On Mon, 2017-01-30 at 08:42 +0000, Rowland Penny wrote:
> > On Mon, 30 Jan 2017 15:44:15 +1300
> > Andrew Bartlett <abartlet at samba.org> wrote:
> > 
> > > On Sun, 2017-01-29 at 22:43 +0000, Rowland Penny via samba wrote:
> > > > On Sun, 29 Jan 2017 17:07:39 -0500
> > > > Sonic <sonicsmith at gmail.com> wrote:
> > > > 
> > > > > On Sun, Jan 29, 2017 at 4:54 PM, Rowland Penny
> > > > > <rpenny at samba.or
> > > > > g>
> > > > > wrote:
> > > > > 
> > > > > > When you built Samba, did you use the '--with-ntvfs-
> > > > > > fileserver'
> > > > > > or
> > > > > > '--enable-selftest' options with configure ?
> > > > > > 
> > > > > 
> > > > > I used '--without-ntvfs-fileserver'.
> > > > 
> > > > OK, this is the code that is producing the error:
> > > 
> > > Thanks for the analysis!
> > > 
> > > I think the attached should fix it.  I've filed a bug for it so we
> > > get
> > > it into 4.6.
> > > 
> > > Andrew Bartlett
> > > 
> > 
> > Sorry Andrew, but I don't think it will ;-)
> > 
> > Unless you have built ntvfs, the '--use-xattrs' option doesn't get
> > set
> > until the 'def' and there it gets set to 'use_xattrs=None' along
> > with 
> > 'use_ntvfs=False'
> > 
> > So, by my reading, with your patch the OP is still going to get the
> > error message.
> 
> Rowland,
> 
> I'm a little confused, because I do change the defaults in the
> function declaration (the 'def' as you put it).  I also tested it.
> 
> Please look again at the changes for 'use_xattrs="auto"'
> 
> Thanks,
> 
> Andrew Bartlett

This is what is in git at the moment:

class cmd_domain_classicupgrade(Command):
~~~~~~~~~~~~
~~~~~~~~~~
~~~~~~

     ntvfs_options = [
         Option("--use-ntvfs", help="Use NTVFS for the fileserver (default = no)",
                action="store_true"),
         Option("--use-xattrs", type="choice", choices=["yes","no","auto"],
                metavar="[yes|no|auto]",
                help="Define if we should use the native fs capabilities or a tdb file for "
                "storing attributes likes ntacl when --use-ntvfs is set. "
                "auto tries to make an inteligent guess based on the user rights and system capabilities",
                default="auto")
     ]
     if samba.is_ntvfs_fileserver_built():
         takes_options.extend(ntvfs_options)

From the way I read it 'ntvfs_options' is ignored unless ntvfs has been built and it is only built if '--with-ntvfs-fileserver' or '--enable-selftest' are used with configure

So, we move down the code (with '--use-ntvfs' and '--use-xattrs' unset) until we get to the def:

     def run(self, smbconf=None, targetdir=None, dbdir=None, testparm=None,
             quiet=False, verbose=False, use_xattrs=None, sambaopts=None, versionopts=None,
             dns_backend=None, use_ntvfs=False):

Here, 'use_xattrs' is set to 'None' and 'use_ntvfs' is set to 'False'

We then come to the block of code that prints the error message:

         eadb = True
         if use_xattrs == "yes":
             eadb = False
         elif use_xattrs == "auto" and use_ntvfs == False or use_ntvfs == None:
             eadb = False
         elif use_ntvfs == False or use_ntvfs == None:
             raise CommandError("--use-xattrs=no requires --use-ntvfs (not supported for production use).  "
                                "Please re-run with --use-xattrs omitted.")
         elif use_xattrs == "auto" and not s3conf.get("posix:eadb"):
             if targetdir:

Now, by my reading, 'use_xattrs == None' and 'use_ntvfs == False', so the only line that matches is:

         elif use_ntvfs == False or use_ntvfs == None:

Or am I missing something ???

Sorry to be a pain, but if you don't ask, you don't learn ;-)

Rowland



More information about the samba mailing list