Bug 322731 - RHEL5 automounter and undefined variables
RHEL5 automounter and undefined variables
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: autofs5 (Show other bugs)
4.6
All Linux
low Severity low
: rc
: ---
Assigned To: Ian Kent
: Regression
Depends On: 253870
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-08 01:09 EDT by Ian Kent
Modified: 2008-07-24 15:08 EDT (History)
2 users (show)

See Also:
Fixed In Version: RHBA-2008-0659
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-07-24 15:08:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ian Kent 2007-10-08 01:09:31 EDT
+++ This bug was initially created as a clone of Bug #253870 +++

Escalated to Bugzilla from IssueTracker

-- Additional comment from tao@redhat.com on 2007-08-22 10:43 EST --
Description of problem:
Some of our automount maps contain the $NATISA variable.  On Solaris, this is
filled in with 'isainfo -n'.  On 64-bit RHEL3 and RHEL4, we edit
/etc/sysconfig/autofs and set
   LOCALOPTIONS="-DOSREL=rhel_4.0 -DNATISA=x86_64"
For 32-bit systems, we just leave it blank, i.e., we set
   LOCALOPTIONS="-DOSREL=rhel_4.0"

With 32-bit RHEL5 and the new automounter, this no longer works.  We have to
manually define the $NATISA variable to nothing.  That is, we edit
/etc/sysconfig/autofs and set
   OPTIONS="-DOSREL=rhel_5.0 -DNATISA="

Maybe RHEL3 and RHEL4 were the buggy ones and we should never have relied on
undefined variables.  If the new RHEL5 automounter is doing the right thing with
respect to undefined variables, then please document what the expected behavior
is in the man pages.

How reproducible:
Every time.

Steps to Reproduce:
1. Create an auto.misc map entry like
     foo server:/some/path/$NATISA
   but do NOT define $NATISA and do not create any special
   directories under /some/path.
2. Try to access /misc/foo and it will fail.
     $ cd /misc/foo
     -bash: cd: /misc/foo: No such file or directory
3. Restart the automounter with '-DNATISA=' and it will
   work.

Actual results:
Received an error if trying to access an automounted directory with undefined
variables.

Expected results:
Variable should be replaced by nothing.

Additional info:

This event sent from IssueTracker by jnansi  [Support Engineering Group]
 issue 126762

-- Additional comment from jnansi@redhat.com on 2007-08-22 10:59 EST --
This got escalated early, working on this myself.

-- Additional comment from tao@redhat.com on 2007-08-22 11:08 EST --
OK, so this can be taken as a request to document that all variables need
to be defined.


This event sent from IssueTracker by jnansi 
 issue 126762

-- Additional comment from pm-rhel@redhat.com on 2007-08-22 11:16 EST --
This bugzilla has Keywords: Regression.  

Since no regressions are allowed between releases, 
it is also being proposed as a blocker for this release.  

Please resolve ASAP.

-- Additional comment from ikent@redhat.com on 2007-08-22 11:19 EST --
(In reply to comment #1)
> Description of problem:
> Some of our automount maps contain the $NATISA variable.  On Solaris, this is
filled in with 'isainfo -n'.  On 64-bit RHEL3 and RHEL4, we edit
/etc/sysconfig/autofs and set
>    LOCALOPTIONS="-DOSREL=rhel_4.0 -DNATISA=x86_64"
> For 32-bit systems, we just leave it blank, i.e., we set
>    LOCALOPTIONS="-DOSREL=rhel_4.0"
> 
> With 32-bit RHEL5 and the new automounter, this no longer works.  We have to
manually define the $NATISA variable to nothing.  That is, we edit
/etc/sysconfig/autofs and set
>    OPTIONS="-DOSREL=rhel_5.0 -DNATISA="
> 
> Maybe RHEL3 and RHEL4 were the buggy ones and we should never have relied on
undefined variables.  If the new RHEL5 automounter is doing the right thing with
respect to undefined variables, then please document what the expected behavior
is in the man pages.

No, I think we should cope with undefined variables.
Sounds like a bug to me.

> 
> How reproducible:
> Every time.
> 
> Steps to Reproduce:
> 1. Create an auto.misc map entry like
>      foo server:/some/path/$NATISA
>    but do NOT define $NATISA and do not create any special
>    directories under /some/path.
> 2. Try to access /misc/foo and it will fail.
>      $ cd /misc/foo
>      -bash: cd: /misc/foo: No such file or directory
> 3. Restart the automounter with '-DNATISA=' and it will
>    work.
> 
> Actual results:
> Received an error if trying to access an automounted directory with undefined
variables.
> 
> Expected results:
> Variable should be replaced by nothing.

Yep, I'll reproduce and check what's going on.

Ian


-- Additional comment from ikent@redhat.com on 2007-08-22 11:46 EST --
Created an attachment (id=162070)
Patch to ignore undefined macros

Please test this patch.

In v5 there is a deliberate fail return and this
patch reverts this to the v4 behavior. There may
be questions regarding how this should be handled
at some point in the future but for now I want the
same semantics as v4.

Ian

-- Additional comment from ikent@redhat.com on 2007-10-02 03:33 EST --
Has this been tested?
Is there anything I need to do to facilitate
the testing?


-- Additional comment from jnansi@redhat.com on 2007-10-05 03:59 EST --
Sorry for the delay, I will get the patch tested asap.
Comment 1 RHEL Product and Program Management 2007-10-08 01:15:38 EDT
This bugzilla has Keywords: Regression.  

Since no regressions are allowed between releases, 
it is also being proposed as a blocker for this release.  

Please resolve ASAP.
Comment 2 Ian Kent 2008-03-11 23:34:30 EDT
An RHTS test case for this bug has been added under autofs-tests/bugzillas,
subtest bz253870.

This issue is fixed in autofs5-5.0.1-0.rc2.87.
Comment 4 Barry Donahue 2008-06-12 09:36:12 EDT
Verified RHTS job #23575
Comment 6 errata-xmlrpc 2008-07-24 15:08:45 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0659.html

Note You need to log in before you can comment on or make changes to this bug.