From: Ian Kent <ikent@redhat.com>
To: Josef Bacik <jbacik@fb.com>
Cc: autofs@vger.kernel.org
Subject: Re: [PATCH] autofs: handle old configuration format
Date: Fri, 19 Jun 2015 09:17:01 +0800 [thread overview]
Message-ID: <1434676621.2683.3.camel@pluto.fritz.box> (raw)
In-Reply-To: <5582F49E.6010507@fb.com>
On Thu, 2015-06-18 at 09:41 -0700, Josef Bacik wrote:
> On 06/17/2015 11:37 PM, Ian Kent wrote:
> > On Wed, 2015-06-17 at 20:52 -0700, Josef Bacik wrote:
> >> On 06/17/2015 05:39 PM, Ian Kent wrote:
> >>> Hi Josef,
> >>>
> >>> Hope you are well.
> >>>
> >>> On Wed, 2015-06-17 at 09:29 -0700, Josef Bacik wrote:
> >>>> This is a patch to fix
> >>>>
> >>>> https://urldefense.proofpoint.com/v1/url?u=http://bugzilla.centos.org/view.php?id%3D8614&k=ZVNjlDMF0FElm4dQtryO4A%3D%3D%0A&r=cKCbChRKsMpTX8ybrSkonQ%3D%3D%0A&m=2pMrg2mSVkYIRbq9PsXATsOwwHLUv7M%2FC1vSREeuAMA%3D%0A&s=bce3fa3f755b02b8849de7338fa74adb71fd4cd84a2a318820c29830ed16f699
> >>>>
> >>>> The configuration stuff was redone and it broke backwards compatiblity.
> >>>
> >>> OK, but I put quite a bit of effort in to not do that.
> >>>
> >>> I thought it more likely I'd get complaints from people not realizing an
> >>> old configuration left in place would override changes in the new
> >>> configuration.
> >>>
> >>> Can you give me an example of the problem you have seen please.
> >>>
> >>>> Unfortunately this was backported to Centos/RHEL, so configurations that were
> >>>> working in 6.4 suddenly broke in 6.6, which is not helpful. Fix this by
> >>>> noticing if we are looking at the old configuration file, strip out the DEFAULT_
> >>>> bit of the variable if it is there and tolower the rest of the string. This
> >>>> makes it so our old configuration works properly and now people get their home
> >>>> dirs automounted properly with either versions of autofs. Thanks,
> >>>
> >>> The way this is supposed to work is that the new configuration file is
> >>> read and then the old one is read and anything in the old configuration
> >>> file should override anything in the new one.
> >>>
> >>> When looking up configuration values if the key isn't found and the key
> >>> starts with "DEFAULT_" the the key is looked for again without the
> >>> "DEFAULT_". Also, key comparisons are case insensitive so that shouldn't
> >>> make a difference.
> >>
> >> Oh now I realize why it's not working. When you do defaults_get_schema
> >> you are looking up the new values, so your check in conf_lookup isn't
> >> helping anything, because we aren't looking up DEFAULT_*, we're looking
> >> up the new values. And since we don't have those variables set in
> >> autofs.conf they don't get set until we load the old things, and so we
> >> have DEFAULT_* set in the conf but not the normal variables. So we can
> >> do what I've done here, or change conf_lookup to add the DEFAULT_ to the
> >> front of anything we search for if we can't find it. Thanks,
> >
> > Yes, that looks to be the case.
> >
> > I can't just strip the DEFAULT_ prefix on adding values because there
> > could be configuration key names that are meant to have the prefix.
> >
> > So I think it's best to try and handle this in the conf_lookup()
> > function.
> >
> > You may get some conflicts with this as it's against current upstream
> > but if you can resolve them, does this patch resolve the problem?
> >
> > If you have difficulty with conflicts then give me the package revision
> > and I'll back port the patch to it so you can test it.
> >
> > autofs-5.1.1 - fix config old name lookup
> >
>
> That did it, thanks!
I'm still thinking about this so there might be more changes, not sure
though.
I'll let you know if I make more changes and will commit what I have
next time I push changes to the upstream repo (and post the patches at
the usual autofs location on kernel.org).
Ian
prev parent reply other threads:[~2015-06-19 1:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-17 16:29 [PATCH] autofs: handle old configuration format Josef Bacik
2015-06-18 0:39 ` Ian Kent
2015-06-18 3:42 ` Josef Bacik
2015-06-18 3:52 ` Josef Bacik
2015-06-18 4:52 ` Ian Kent
2015-06-18 6:37 ` Ian Kent
2015-06-18 16:41 ` Josef Bacik
2015-06-19 1:17 ` Ian Kent [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1434676621.2683.3.camel@pluto.fritz.box \
--to=ikent@redhat.com \
--cc=autofs@vger.kernel.org \
--cc=jbacik@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.