Bug 1012568 - ifup-eth aborts when dhcp fails, despite aliases remaining to be brought up
ifup-eth aborts when dhcp fails, despite aliases remaining to be brought up
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: initscripts (Show other bugs)
6.6
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Lukáš Nykrýn
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-26 12:23 EDT by Clarence Risher
Modified: 2016-11-25 08:05 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-26 14:29:34 EDT
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 Clarence Risher 2013-09-26 12:23:47 EDT
Description of problem:
If eth0 is configured to use dhcp and dhclient (called by ifup-eth) fails to acquire a lease then ifup-eth will "exit 1". This skips running ifup-post and ifup-aliases, so any aliases to eth0 are not brought up regardless of their configuration.

Version-Release number of selected component (if applicable):
9.03.38-1.el6

How reproducible:
Always

Steps to Reproduce:
1. configure ifcfg-eth0 to use DHCP
2. configure ifcfg-eth0:1 to use a static IP
3. `ifup eth0`

Actual results:
dhclient fails to get an ip for eth0, script exits, eth0:1 is not brought up

Expected results:
eth0:1 is up and configured. (state of eth0 is not important; being up and unconfigured is a possibility)

Additional info:
Comment 2 Lukáš Nykrýn 2013-09-26 14:29:34 EDT
This is a little bit intended. When "primary" device with dhcp fails, there is something wrong with the network and we should skip the interface and move to the next one. Only non-fatal failure of dhcp is the case where there is working ipv6 dhcp on that network. 
And also changing this functionality would require huge changes in the code. So for both of these reasons this is WONTFIX for me.
Comment 3 Clarence Risher 2013-09-26 14:40:26 EDT
I disagree with both of your reasons, separately.

Not having a DHCP server is not something "wrong with the network". Just off the top of my head, a plausible use case here is a laptop. eth0 configured for DHCP for when the laptop is plugged in at home, eth0:1 configured with a static IP for when the laptop is plugged in at work (where there isn't a DHCP server).

Also, this particular misbehavior can be fixed simply by commenting out the "exit" in question, which results in eth0 being up and [partially] unconfigured, and eth0:1 being up and configured. If a different behavior is desired then that might "require huge changes in the code", but *A* solution exists with a trivial change.
Comment 4 Václav Pavlín 2013-09-27 07:39:45 EDT
Hi Clarence,

I agree with opinion in Comment #3 that if DHCP does not work on the network and we expect it be there, interface and it's aliases should be skipped. This comes from the idea that network initscript is intended to be used for static configuration. 

WRT. trivial code changes, it might be needed not only to solve how to deal with partially configured interface, but with static routing as well.
Comment 5 Clarence Risher 2013-10-22 11:10:45 EDT
Even if we agree that the interface should be skipped when DHCP is missing, I don't see where the leap to the aliases being skipped comes from.

If a primary interface could have a static IP while an alias had DHCP, then this would make more sense, because then DHCP could fail without breaking anything. But DCHP/static pairs are forced to come in that order, so skipping the static alias because the dynamic address failed makes no sense to me.

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