Bug 700184

Summary: ifup doesn't assign address specified with IPADDR0
Product: Red Hat Enterprise Linux 6 Reporter: Bill Nottingham <notting>
Component: initscriptsAssignee: initscripts Maintenance Team <initscripts-maint-list>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: medium    
Version: 6.2CC: asersen, azelinka, iarlyy, jonathan, jpopelka, notting, plautrba, rvokal
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: initscripts-9.03.24-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 698738 Environment:
Last Closed: 2011-12-06 18:09:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 698738    
Bug Blocks:    

Description Bill Nottingham 2011-04-27 17:13:33 UTC
+++ This bug was initially created as a clone of Bug #698738 +++

Created attachment 493918 [details]
really accept IPADDR0 in ifcfg file

Description of problem:
When I give static address to eth1 via NM,
switch NM off and try to use network service
I end up with no address assigned to eth1.

Version-Release number of selected component (if applicable):
initscripts-9.29-1.fc15.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Configure eth1 with NetworkManager to statically assign IP address/prefix
2. Check that eth1 has its address
2. stop NM (or set NM_CONTROLLED="no" in ifcfg-eth1)
3. ifdown eth1; ifup eth1
  
Actual results:
eth1 is up but has no IP address

Expected results:
eth1 is up and has configured IP address

Additional info:
Although
http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=ff5befb95b133cc1da3f32ffcd9f3cef779244b6
adds support for IPADDRn variable
ifup-eth is still unable to use for example
IPADDR0=192.168.0.155
written to ifcfg-eth1 by NM.

Attached patch fixes the problem in my environment.

--- Additional comment from jpopelka@redhat.com on 2011-04-21 12:26:23 EDT ---

Created attachment 493919 [details]
Polish the code little bit

This patch only fixes the indentation of the code, nothing more.

--- Additional comment from notting@redhat.com on 2011-04-25 15:04:12 EDT ---

Can you attach your config?

--- Additional comment from jpopelka@redhat.com on 2011-04-26 04:50:53 EDT ---

Created attachment 494835 [details]
ifcfg-eth1 created by NM

I only added
 NM_CONTROLLED=no

--- Additional comment from notting@redhat.com on 2011-04-26 16:34:42 EDT ---

Created attachment 495033 [details]
patch

Maybe I'm missing something, but this patch seems to be simple enough and works for me?

--- Additional comment from jpopelka@redhat.com on 2011-04-27 07:00:38 EDT ---

Yes, that does actually the same as my patch, so +1 for your patch.

--- Additional comment from notting@redhat.com on 2011-04-27 13:11:16 EDT ---

OK, pushed in git, will be in a future build.

--- Additional comment from notting@redhat.com on 2011-04-27 13:11:47 EDT ---

... pushed as git commit 318d859b9df0131a80cdfa7b6a12066bd5212965.

Comment 5 errata-xmlrpc 2011-12-06 18:09:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1528.html