Bug 836233

Summary: Static IPV4 and IPV6 addresses are not set to interface if DHCPv4 failed for this interface
Product: Red Hat Enterprise Linux 6 Reporter: Konstantin Volkov <wolf>
Component: initscriptsAssignee: Lukáš Nykrýn <lnykryn>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: high    
Version: 6.3CC: azelinka, cww, fleite, jrieden, jscotka, rfreire, vpavlin
Target Milestone: rcKeywords: EasyFix, Patch
Target Release: 6.5   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: If assigning of ip address through DHCPv4 fails initscript exits with error. Consequence: Static IPv4 and IPv6 addresses are not set if DHCPv4 fails. Fix: Add option IPV4_FAILURE_FATAL. This option lets user decide whether the script should continue or exit if DHCPv4 fails. Also if set to "no" and DHCPv6 is enabled in the configuration file, script tries to get IPv6 address even if DHCPv4 fails. Result: User has more control of what happens when DHCPv4 fails
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-21 22:10:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Konstantin Volkov 2012-06-28 12:49:38 UTC
Description of problem:

Static IPV4 and IPV6 addresses are not set to interface if DHCPv4 failed for this interface

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

initscripts-9.03.31-2.el6

How reproducible:

100%

Steps to Reproduce:
1. Configure the eth0 as DHCP + static IPV4 + static IPV6:

---
CT-106-bash-4.1# cat /etc/sysconfig/network-scripts/ifcfg-eth0 
DEVICE="eth0"
ONBOOT="yes"
BOOTPROTO="static"
DHCPV6C="no"
IPV6INIT="yes"
IPV6ADDR_SECONDARIES="2001:aaad::a1d:8290/64"
IPADDR="1.1.1.2"
NETMASK=""
---

2. service network restart (or ifup eth0)
3. see that both IPV4 and IPV6 addresses are not assigned if dhcpv4 client failed
  
Actual results:

---
CT-106-bash-4.1# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:1C:42:FE:07:84  
          inet6 addr: fe80::21c:42ff:fefe:784/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3551808 errors:0 dropped:0 overruns:0 frame:0
          TX packets:144 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:302572596 (288.5 MiB)  TX bytes:20662 (20.1 KiB)

---


Expected results:

Both static addresses are assigned to eth0

Additional info:

The problem is in /etc/sysconfig/network-scripts/ifup-eth :


[...]
     if /sbin/dhclient ${DHCLIENTARGS} ${DEVICE} ; then
        echo $" done."
    else
        echo $" failed."
        exit 1
    fi

as you can see, all work stopped if dhclient failed. Please, fix.

Comment 2 Lukáš Nykrýn 2013-04-02 16:34:36 UTC
*** Bug 903311 has been marked as a duplicate of this bug. ***

Comment 15 errata-xmlrpc 2013-11-21 22:10:15 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-2013-1679.html