Bug 529197

Summary: anaconda kernel command line option stage2= does not honor NFS options
Product: [Fedora] Fedora Reporter: Stijn Hoop <stijn>
Component: anacondaAssignee: Radek Vykydal <rvykydal>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 12CC: michal, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: anaconda-13.8-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-02-23 19:38:58 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
First attempt at making the stage2= parameter parsing honor NFS options
none
consolidate parsing nfs options in ks= and stage2=, anaconda 12.xx version
none
consolidate parsing nfs options in ks= and stage2=, anaconda 13.xx version
none
patch for yuminstall.py to parse NFS options for repo= none

Description Stijn Hoop 2009-10-15 13:12:20 UTC
Created attachment 364904 [details]
First attempt at making the stage2= parameter parsing honor NFS options

Description of problem:

The kernel command line option 'stage2=' when passed onto anaconda is not parsed the same as the command line option 'ks='.

With ks= I can use the following syntax to specify NFS options for the mount:

ks=nfs:nfsvers=3:host:/path/to/kickstart.ks

With stage2= the same sort of syntax:

stage2=nfs:nfsvers=3:host:/path/to/dvd

Leads to anaconda trying to mount host "nfsvers=3" and path "host".

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

12.38

How reproducible:

Everytime

Steps to Reproduce:
1. Boot a known good environment with the stage2= syntax above
  
Actual results:

Failure to mount stage2 via NFS.

Expected results:

Stage2 mounted via NFS using the provided options.

Additional info:

I made a preliminary patch which is only compile tested, but I am having trouble getting up to speed with pungi etc. to test this in our environment. Hopefully it will be enough but I cannot say for sure.

Comment 1 Stijn Hoop 2009-10-16 11:09:50 UTC
Created attachment 365035 [details]
consolidate parsing nfs options in ks= and stage2=, anaconda 12.xx version

I worked on this some more, here is the first of two patches. This one is for F12, anaconda 12.xx.

I tested this by injecting the resulting loader/init binaries into an existing rawhide initrd.img. It works in my environment, both with and without NFS options for both ks= and stage2= specified on the commandline.

Comment 2 Stijn Hoop 2009-10-16 11:10:36 UTC
Created attachment 365036 [details]
consolidate parsing nfs options in ks= and stage2=, anaconda 13.xx version

Here's the other one for anaconda 13.xx (git master) which is only compile-tested since I don't really know how to create a bootable anaconda 13.xx tree. Effectively this is the patch before I "backported" it to git f12-branch.

Hopefully this will help to get it into master at least. f12-branch would be nice as well but I understand the risk of destabilizing anaconda this late in the release cycle, so if you decide it's not worth it I understand.

Comment 3 Radek Vykydal 2009-10-21 15:48:37 UTC
Stijn, thanks for your patches, they look good, but I noticed that ks and therefore suggested stage2= syntax for nfs: differs from that of repo=, which according to wiki is:

repo=nfs:<server>[:options]:/<path>.

So for example in install without stage2= boot option, not from media, and with 
repo=nfs:host:nfsvers=3:/path/to/repo boot option,
anaconda will automatically infer stage2 location as
nfs:host:nfsvers=3:/path/to/repo/images/install.img (which has swapped options and server).

AFAIK nfs options for repo= option have never been implemented, so the easiest way could be to change the syntax for repo= options. As Chris has implemented the repo= stuff, I am asking for his opinion - what do you think, Chris - shall we change repo=nfs: syntax to
repo=[:options]:<server>:/<path>?

And Chris, should I take a look at repo= nfs options implemenation?

Comment 4 Radek Vykydal 2009-10-21 15:53:38 UTC
To Chris: hm, I thought needinfo would send you an email, but it doesn't seem so, so I'm adding you to CC, see my question in comment #3 please.

Comment 5 Michal Jaegermann 2009-10-22 14:52:25 UTC
> shall we change repo=nfs: syntax to repo=[:options]:<server>:/<path>?

Err..., something is missing here.  A repository type needs to follow after "=" and it could be something else than "nfs".  You would like to make that uniform with a format for "ks" which is "ks=nfs[:options]:<server>:<path>". Right?  It certainly makes sense to me.

I believe that you are refering to http://fedoraproject.org/wiki/Anaconda/Options   . BTW - what shows there for:
repo=http://...
ks=ftp://...
ks=http://...
is somewhat weird. Looks suspiciously like an overenthusiastic automatic edit.

Comment 6 Radek Vykydal 2009-10-22 15:23:39 UTC
(In reply to comment #5)
> > shall we change repo=nfs: syntax to repo=[:options]:<server>:/<path>?
> 
> Err..., something is missing here.  A repository type needs to follow after "="
> and it could be something else than "nfs".  You would like to make that uniform
> with a format for "ks" which is "ks=nfs[:options]:<server>:<path>". Right?  It
> certainly makes sense to me.

yep, that's what I meant, thanks for correction

> 
> I believe that you are refering to
> http://fedoraproject.org/wiki/Anaconda/Options

yes

Comment 7 Radek Vykydal 2009-10-22 15:53:43 UTC
It turned out that the wiki documentation was wrong, the correct repo= syntax is
the same as that of ks=, so Stijn, could you post your updated patches to anaconda-devel-list? I'd ack them for master but someone else may see something I have missed.

Comment 8 Stijn Hoop 2009-10-23 12:38:53 UTC
Patches sent.

Comment 9 Stijn Hoop 2009-10-26 14:10:26 UTC
Created attachment 366102 [details]
patch for yuminstall.py to parse NFS options for repo=

Radek, I think that your comment #3 is correct, it appears that parsing NFS options for repo= has not been implemented.

Attached is a patch for f12-branch that implements this for my specific use case. I don't know however whether this is a good location to do so. I'm not entirely sure which anaconda installation paths can use NFS locations, so in order to consolidate any parsing I'd love to get pointed in the right direction to do so.

In the meantime this patch allows me to kickstart from an NFS repo location while working around bug 528537 .

Comment 10 Radek Vykydal 2009-11-04 15:06:18 UTC
Stijn's patch will be in version 13.8 of anaconda. Thanks for reporting and fixing the issue.

Comment 11 Bug Zapper 2009-11-16 13:43:07 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping