Bug 1279712 - [dhcp]dhclient command return 0 even if the interface failed to get ip from server
[dhcp]dhclient command return 0 even if the interface failed to get ip from s...
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: dhcp (Show other bugs)
7.2
All Linux
unspecified Severity medium
: rc
: ---
Assigned To: Jiri Popelka
Release Test Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-10 01:04 EST by haidong li
Modified: 2015-11-10 03:59 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-10 03:59:51 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 haidong li 2015-11-10 01:04:25 EST
Description of problem:
dhclient  return 0 even if the interface failed to get ip from server

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

[root@hp-dl385pg8-05 src]# uname -a
Linux hp-dl385pg8-05.rhts.eng.nay.redhat.com 3.10.0-327.el7.x86_64 #1 SMP Thu Oct 29 17:29:29 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux

How reproducible:
100%

Steps to Reproduce:

[root@hp-dl385pg8-05 src]# dhclient -v ens3f1.14
Internet Systems Consortium DHCP Client 4.2.5
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/ens3f1.14/00:05:33:26:9e:5b
Sending on   LPF/ens3f1.14/00:05:33:26:9e:5b
Sending on   Socket/fallback
DHCPDISCOVER on ens3f1.14 to 255.255.255.255 port 67 interval 5 (xid=0x6a51c4d9)
DHCPDISCOVER on ens3f1.14 to 255.255.255.255 port 67 interval 14 (xid=0x6a51c4d9)
DHCPDISCOVER on ens3f1.14 to 255.255.255.255 port 67 interval 14 (xid=0x6a51c4d9)
DHCPDISCOVER on ens3f1.14 to 255.255.255.255 port 67 interval 10 (xid=0x6a51c4d9)
DHCPDISCOVER on ens3f1.14 to 255.255.255.255 port 67 interval 13 (xid=0x6a51c4d9)
DHCPDISCOVER on ens3f1.14 to 255.255.255.255 port 67 interval 5 (xid=0x6a51c4d9)
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
[root@hp-dl385pg8-05 src]# echo $?
0
[root@hp-dl385pg8-05 src]# 


Actual results:

[root@hp-dl385pg8-05 src]# echo $?
0

Expected results:
[root@hp-dl385pg8-05 src]# echo $?
1

Additional info:
Comment 2 Jiri Popelka 2015-11-10 03:59:51 EST
(In reply to haidong li from comment #0)
> No DHCPOFFERS received.
> No working leases in persistent database - sleeping.

Because it did not exit, it reverted to running into background.
You can use '-d' to make it run in foreground all the time.

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