Bug 637383

Summary: mount.cifs ip option does not work
Product: [Fedora] Fedora Reporter: leonrvr
Component: cifs-utilsAssignee: Jeff Layton <jlayton>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 13CC: jlayton, ssorce, steved
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: cifs-utils-4.7-1.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-28 05:59:26 UTC Type: ---
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 -- reinstate ip= as an address resolution override option none

Description leonrvr 2010-09-25 11:35:57 UTC
Description of problem:

mount.cifs fails when using the ip= option with the message:

  mount error: could not resolve address for iomega1: Name or service not known

When I add the ip address and servicename to /etc/hosts it works. I think it would be better if it could work without the /etc/hosts entry

The actual command:
  mount.cifs //iomega1/public /mnt/iomega -o "user=leon,uid=leon,gid=leon,ip=192.168.0.123,nounix,file_mode=0640,dir_mode=0750"

Version-Release number of selected component (if applicable):

cifs-utils-4.6-1.fc13.i686

How reproducible:

Always

Steps to Reproduce:
1. No entry for ip address in /etc/hosts
2. Submit command shown above
3. Error message
  
Actual results:

Error message shown above

Expected results:

CIFS disc iomega1 mounted

Additional info:

Temp fix by adding service host to /etc/hosts. This should not be necessary.
The same command worked flawlessly in Fedora 11 on same machine.

Comment 1 Jeff Layton 2010-09-27 19:48:18 UTC
What's the point of putting an ip= option here? Why not just put the address in as part of the UNC? i.e.:

    //192.168.0.123/public

Comment 2 leonrvr 2010-09-28 03:38:21 UTC
Good point. It's just that it used to work in previous versions.
I just tried your solution; it works.
Thanks.

Comment 3 Jeff Layton 2010-09-28 20:37:40 UTC
Created attachment 450314 [details]
patch -- reinstate ip= as an address resolution override option

Yep, it's still a regression though you don't really have to put stuff in /etc/hosts to work around it.

Does this (completely untested) patch fix it?

Comment 4 Jeff Layton 2010-10-08 19:54:15 UTC
Reproduced and a fixed patch posted upstream:

    http://www.spinics.net/lists/linux-cifs/msg01208.html

...unless there are objections this should make the next cifs-utils release (4.7).

Comment 5 Jeff Layton 2010-10-12 12:55:58 UTC
Patch pushed to cifs-utils git master branch. I'll plan to cut an upstream release in the next week or so.

Comment 6 Fedora Update System 2010-10-19 19:57:44 UTC
cifs-utils-4.7-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/cifs-utils-4.7-1.fc14

Comment 7 Fedora Update System 2010-10-20 03:09:17 UTC
cifs-utils-4.7-1.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update cifs-utils'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/cifs-utils-4.7-1.fc14

Comment 8 Fedora Update System 2010-10-25 18:39:07 UTC
cifs-utils-4.7-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/cifs-utils-4.7-1.fc13

Comment 9 Fedora Update System 2010-10-28 05:59:21 UTC
cifs-utils-4.7-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2010-10-29 20:39:48 UTC
cifs-utils-4.7-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.