All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fb.com>
To: Ian Kent <ikent@redhat.com>
Cc: autofs@vger.kernel.org
Subject: Re: [PATCH] autofs: handle old configuration format
Date: Wed, 17 Jun 2015 20:42:55 -0700	[thread overview]
Message-ID: <55823E3F.2020001@fb.com> (raw)
In-Reply-To: <1434587998.2649.12.camel@pluto.fritz.box>

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
>>
>> http://bugzilla.centos.org/view.php?id=8614
>>
>> 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.
>
> And I'm pretty sure I strip white space too so extra spaces shouldn't
> cause a problem either.
>
> But clearly you have a case that I've missed which I'm keen to hear
> about.
>

Huh sorry I got confused by looking at the diffs that I thought you had 
dropped that bit, but now I remember looking at this code a few days 
ago.  I'm not sure why it's not working, our /etc/sysconfig/autofs looks 
something like this

DEFAULT_LOGGING="debug or some shit"
DEFAULT_MAP_OBJECT_CLASS="blah"
DEFAULT_ENTRY_OBJECT_CLASS="foo"
DEFAULT_MAP_ATTRIBUTE="something else"
DEFAULT_ENTRY_ATTRIBUTE="whatever"
DEFAULT_VALUE_ATTRIBUTE="bar"

When we upgrade it cycles through the normal map_object_class things 
instead of using ours, it thinks there's no schema.  With my change it 
works fine.  I don't have VPN access working at the moment so I can't 
screw around with it now, but if you want me to poke at it some more I 
can do it in the morning.  Thanks,

Josef

  reply	other threads:[~2015-06-18  3:42 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 [this message]
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

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=55823E3F.2020001@fb.com \
    --to=jbacik@fb.com \
    --cc=autofs@vger.kernel.org \
    --cc=ikent@redhat.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.