Bug 432603

Summary: commandline nfs mount options in RHEL5
Product: Red Hat Enterprise Linux 5 Reporter: Adam Stokes <astokes>
Component: anacondaAssignee: Joel Andres Granados <jgranado>
Status: CLOSED ERRATA QA Contact: Alexander Todorov <atodorov>
Severity: medium Docs Contact:
Priority: high    
Version: 5.3CC: atodorov, tao
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHEL52 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 559200 (view as bug list) Environment:
Last Closed: 2009-01-20 21:34:29 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:
Bug Depends On: 234185    
Bug Blocks: 391501, 409971    

Comment 2 RHEL Program Management 2008-06-12 20:29:00 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 4 Joel Andres Granados 2008-07-08 12:58:31 UTC
Will be available in anaconda 11.1.2.114
relative commit 21e3396c2ab445d64407a34e94ea55cdc5ff0999

Comment 5 Joel Andres Granados 2008-07-09 17:22:22 UTC
please ignore comment #4.
see the ks=nfs(:<options>):<path> syntax -- it can be extended to the method=nfs
case easily. then there's also nfs --opts=... in kickstart.

I'm closing this issue as, it is already in rhel5

Comment 6 Issue Tracker 2008-07-10 03:06:30 UTC
> see the ks=nfs(:<options>):<path> syntax

Is this certain? 

I checked the following part in loaders/method.c of 11.1.2.113.

        if (!strncmp(arg, "nfs:", 4)) {
            ld->method = METHOD_NFS;
            ld->methodData = calloc(sizeof(struct nfsInstallData *), 1);
            ((struct nfsInstallData *)ld->methodData)->host = strdup(c);
            if ((c = strtok(NULL, ":"))) {
                ((struct nfsInstallData *)ld->methodData)->directory =
strdup(c);
            }

It seems that "nfs:<host>:<directory>" is assumed here. As far as I
know, options have to be set to ((struct nfsInstallData
*)ld->methodData)-> mountOpt. But,the place to set it is only the
following in the anaconda source.

    235 void setKickstartNfs(struct loaderData_s * loaderData, int argc,
    236                      char ** argv) {
...
    270     if (mountOpts)
    271         ((struct nfsInstallData
*)loaderData->methodData)->mountOpts = m        ountOpts;

And, this is for --opts= in kickstart. 



This event sent from IssueTracker by mmatsuya 
 issue 128966

Comment 7 Joel Andres Granados 2008-07-10 12:09:56 UTC
Are the options not working properly?

I'm looking at nfsinstall.c: setKickstartNfs(struct loaderData_s * loaderData,
int argc,....)
.
.
.
    struct poptOption ksNfsOptions[] = { 
        { "server", '\0', POPT_ARG_STRING, &host, 0, NULL, NULL },
        { "dir", '\0', POPT_ARG_STRING, &dir, 0, NULL, NULL },
        { "opts", '\0', POPT_ARG_STRING, &mountOpts, 0, NULL, NULL},
        { 0, 0, 0, 0, 0, 0, 0 } 
    };
.
.
.
    if (mountOpts)
        ((struct nfsInstallData *)loaderData->methodData)->mountOpts = mountOpts;
.
.
.

The options get passed to the nfsInstallData structure and are used when they
are needed.

A good way to see if your options are actually getting through is to search for
the nfs log message:
 logMessage(INFO, "results of nfs, host is %s, dir is %s, opts are '%s'", host,
dir, mountOpts);



Comment 9 Joel Andres Granados 2008-07-11 07:26:59 UTC
Sorry about that.  I misunderstood you.
I see the code and see the same issue as you do.  If you can, please test and
verify that the options do not get passed.
Just do an installation with whatever nfs additional options and search for the
 ("host is %s, dir is %s, opts are '%s'", host, directory, mountOpts) string in
the logs.

I'm going to reopen this as I might be a valid issue.

Comment 10 Joel Andres Granados 2008-07-11 11:38:10 UTC
I have just confirmed.  the options get passed when ks is used, but do not get
passed when specified in the command line.  It will be fixed in anaconda 
11.1.2.115, relative commit 93cc4e8dff55ecebf043c0d51b47b80b1b9aef17

Comment 13 Joel Andres Granados 2008-07-16 13:17:30 UTC
I found that the cmdline for nfs options was parsed but only used to download
individual files from an nfs server.  I had to build a new patch that modifies a
little the cmdline parsing.  The line needs to be in the following format:
"nfs:[<comma separated opts>:]server:directory",  the new fix is not in current
anaconda and will be present in anaconda 11.1.2.116.

Comment 20 errata-xmlrpc 2009-01-20 21:34:29 UTC
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-2009-0164.html