Bug 1514506

Summary: -D variable expansion broken on 1:5.1.3-4.fc27
Product: [Fedora] Fedora Reporter: Henrique Martins <fedora>
Component: autofsAssignee: Ian Kent <ikent>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: iand, ikent
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: autofs-5.1.4-5.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-09 16:29:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch - revert fix argc off by one in mount_autofs.c none

Description Henrique Martins 2017-11-17 15:42:56 UTC
Description of problem:

Upgraded from fc26 (autofs-5.1.2-2) to fc27 (autofs-5.1.3-4). All my cifs mounts stopped working.
I believe something is wrong or changed with automount(8)'s -Dvariable=value expansion

Version-Release number of selected component (if applicable):
autofs.x86_64 1:5.1.3-4.fc27

How reproducible:
Always

Steps to Reproduce:
In auto.master enter:
  /smb /etc/auto.smb.top
In auto.smb.top enter:
  remotehost -fstype=autofs,-Dmyhost=&,-Dmyuser=someuser file:/etc/auto.smb.sub
In auto.smb.sub enter:
  * fstype=cifs,nocase,noserverino,nounix,vers=1.0,credentials=/path/to/credentials/${myuser},uid=${UID},gid=${GID} ://${myhost}/&
systemctl restart autofs
cd /smb/remotehost/shareonremotehost

Actual results:
mount fails with cd: no such file or directory: /smb/remotehost/shareonremotehost

Expected results:
successful mount

Additional info:
Making logging=debug in /etc/autofs.conf one can see the mount fails as the mount point is ///shareonremotehost, like the variable ${myhost} isn't expanded or didn't propagate to the next file.

On an earlier attempt, I had host instead of myhost, and the expansion was the hostname where I ran this, again, as the overridding of host in the top map didn't make it down.

Reverting to autofs-5.1.2-2.fc26.x86_64 makes everything work again

Comment 1 Ian Kent 2017-11-18 01:00:56 UTC
(In reply to Henrique Martins from comment #0)
> Description of problem:
> 
> Upgraded from fc26 (autofs-5.1.2-2) to fc27 (autofs-5.1.3-4). All my cifs
> mounts stopped working.
> I believe something is wrong or changed with automount(8)'s -Dvariable=value
> expansion

I became aware of this recently.

There are a couple of regressions in 5.1.3 and I've been trying
to get a 5.1.4 released to fix them.

But it's been hard because there's been a number of new problems
come in and this one is one of them.

Comment 2 Ian Kent 2017-11-18 01:12:29 UTC
Created attachment 1354444 [details]
Patch - revert fix argc off by one in mount_autofs.c

This is the patch which fixes the problem.

Since this is an upstream patch at the very least the
CHANGELOG hunk won't apply.

I'll do a scratch build (when I get a chance to) you can use
until I get 5.1.4 out if you don't want to try patching the
srpm yourself.

Comment 3 Henrique Martins 2017-11-18 01:30:48 UTC
I downgraded to autofs-5.1.2-2.fc26.x86_64 on the single machine where I installed fc27 and blocked dnf from upgrading it (along with firefox57).

I'm off Thanksgiving week.  After that, if you don't have a test release ready, I may try the patch.

Comment 4 Ian Donaldson 2017-12-11 02:36:55 UTC
I've noticed after fc26 -> fc27 upgrade that automount of NFS doesn't
work at all anymore.   No error messages; strace doesn't show automount
waking up when I access an autofs mount.

autofs-5.1.3-4.fc27.x86_64


Presumably this is the same issue ...

Comment 5 Ian Donaldson 2017-12-11 02:53:48 UTC
Downgrading to autofs-5.1.2-2.fc26.x86_64.rpm didn't help for me,
until I enabled browse_mode=yes in autofs.conf

Then I reinstalled autofs-5.1.3-4.fc27.x86_64 and with
the 5.1.3 supplied autofs.conf and auto.master, I could access /net/host/whatever but when I put in my own auto.master, I couldn't access my regular NFS
servers.

Then I turned on browse_mode=yes and my regular NFS servers are now
auto mounting again.

The fc26 and fc27 autofs.conf both have browse_mode=no, which I've
been using on fc26 and prior without issue. 


Hmmm.

Comment 6 Ian Donaldson 2017-12-11 03:04:02 UTC
My config is pretty simple:

/etc/auto.master:
/import /etc/auto_import

/etc/auto_import:
kick -vers=3 apricot:/app/01/kick

Comment 7 Ian Kent 2017-12-11 08:39:53 UTC
(In reply to Ian Donaldson from comment #4)
> I've noticed after fc26 -> fc27 upgrade that automount of NFS doesn't
> work at all anymore.   No error messages; strace doesn't show automount
> waking up when I access an autofs mount.
> 
> autofs-5.1.3-4.fc27.x86_64
> 
> 
> Presumably this is the same issue ...

It's nothing to do with this report.

What your seeing is a change in semantic behaviour in
the kernel module that had rather more impact than I
expected.

The change has been reverted upstream and using the
option browse_mode = yes or just commenting the option
out in the configuration is my recommended work around
until the Fedora kernel is updated.

Ian

Comment 8 Fedora Update System 2017-12-19 23:38:50 UTC
autofs-5.1.4-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-21cb07e1d3

Comment 9 Henrique Martins 2017-12-20 00:07:24 UTC
Seems to fix the -D variable expansion.  Thanks.

Comment 10 Fedora Update System 2017-12-21 20:25:08 UTC
autofs-5.1.4-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-21cb07e1d3

Comment 11 Fedora Update System 2017-12-22 03:20:59 UTC
autofs-5.1.4-4.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-eda74692fc

Comment 12 Fedora Update System 2017-12-22 12:43:14 UTC
autofs-5.1.4-4.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-eda74692fc

Comment 13 Fedora Update System 2018-02-01 07:17:34 UTC
autofs-5.1.4-5.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-eda74692fc

Comment 14 Fedora Update System 2018-02-01 19:30:11 UTC
autofs-5.1.4-5.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-eda74692fc

Comment 15 Fedora Update System 2018-02-09 16:29:27 UTC
autofs-5.1.4-5.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.