Bug 191424

Summary: Network should be brought up for %post scripts regardless of media
Product: [Fedora] Fedora Reporter: Philip Prindeville <philipp>
Component: anacondaAssignee: Chris Lumens <clumens>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: orion
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-16 17:15:50 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
In-house script to create cups printers none

Description Philip Prindeville 2006-05-11 20:18:59 UTC
Description of problem:

The fact that an install is happening via jump drve, CD/DVD, or floppy is
irrelevant to whether the network should be brought up or not.

The only meaningful test for whether the network should be brought up or not is,
"Do I know how?"  If you do, then do it.  And if not, don't.  Period.

Second-guessing whether the user's %post is going to try to do a "yum update" or
"wget" (etc) is pointless.

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

anaconda-11.0.5-1

How reproducible:

Build an installer DVD w/ "ifconfig -a ; netstat -n -r" in the %post section.


Steps to Reproduce:
1. Build an installer DVD, with "network --device eth0 --onboot yes --bootproto
dhcp" in it, and "ifconfig -a" in the %post section.
2. Boot off it.
3. Check vty3 for output.
  
Actual results:

eth0 (or whatever) will not be "up" nor will it have an IP address, etc.

Expected results:

The environment for the %post scripts should be whatever the environment of the
rest of the install was (regarding mounts, network interfaces, modules, etc)
plus as much of the state that the eventual target machine should have (which is
already partly the case anyway, right?  all partitions are formatted and mounted
by the time %post runs... so why not the network as well?).

Additional info:

Comment 1 Philip Prindeville 2006-05-15 16:39:31 UTC
Created attachment 129095 [details]
In-house script to create cups printers

Comment 2 Philip Prindeville 2006-05-15 16:40:08 UTC
A more concrete example of why this needs to be done is the following.  I have a
simple script (attached) which I like to call from %post processing when doing
unattended local (re)images.  The script looks something like:

%post

...
/mnt/source/inst-helper/mkprinter.pl <<__EOF__
officejet-6200-series:mail:officejet-6200-series:hpijs:HP:Officejet-6200:Room
101:no:yes
...
__EOF__

...


which creates a bunch of printers using CUPS.  The only problem is that the CUPS
daemon listens on localhost:631 ... which isn't available unless:

/etc/sysconfig/network-scripts/ifup lo

gets done.  So at the VERY least, lo needs to be up, running, and configured...
even if no other interfaces are.

Comment 3 Chris Lumens 2006-10-23 21:26:00 UTC
Committed a potential fix.  I will test it next time we build a new anaconda so
the debug procedure for something on a CD is slightly less complicated.

Comment 4 Orion Poplawski 2007-01-11 18:03:25 UTC
I just tried a PXE/NFS install from rawhide (20070111) and the loopback
interface was not brought up.

Comment 5 Chris Lumens 2007-01-18 16:18:01 UTC
Do the real interfaces at least get brought up?

Comment 6 Chris Lumens 2007-01-18 16:25:08 UTC
Found where we're not bringing up loopback and fixed it.  This should be better
in the next build of anaconda, then.  Back to MODIFIED.