Bug 836233 - Static IPV4 and IPV6 addresses are not set to interface if DHCPv4 failed for this interface
Static IPV4 and IPV6 addresses are not set to interface if DHCPv4 failed for ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: initscripts (Show other bugs)
6.3
All Linux
high Severity medium
: rc
: 6.5
Assigned To: Lukáš Nykrýn
qe-baseos-daemons
: EasyFix, Patch
: 903311 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-28 08:49 EDT by Konstantin Volkov
Modified: 2016-11-25 08:05 EST (History)
7 users (show)

See Also:
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 17:10:15 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Konstantin Volkov 2012-06-28 08:49:38 EDT
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 12:34:36 EDT
*** Bug 903311 has been marked as a duplicate of this bug. ***
Comment 15 errata-xmlrpc 2013-11-21 17:10:15 EST
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

Note You need to log in before you can comment on or make changes to this bug.