dhclient -1 exits 0 when no lease found
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
isc-dhcp (Ubuntu) |
Confirmed
|
Medium
|
Stéphane Graber |
Bug Description
I've tried this in containers of xenial, trusty and yakkety.
i've created a lxc network that does not have dhcp4.
See https:/
Then, I launch an instance:
$ lxc launch ubuntu-daily:xenial --profile=
% killall dhclient
% dhclient -r eth0
% dhclient -1 -v eth0
Internet Systems Consortium DHCP Client 4.3.3
Copyright 2004-2015 Internet Systems Consortium.
All rights reserved.
For info, please visit https:/
Listening on LPF/eth0/
Sending on LPF/eth0/
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3 (xid=0xc08cb53c)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4 (xid=0xc08cb53c)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9 (xid=0xc08cb53c)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 19 (xid=0xc08cb53c)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7 (xid=0xc08cb53c)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12 (xid=0xc08cb53c)
..
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
% echo $?
0
% ps axw | grep dhcl
356 ? Ss 0:00 dhclient -1 -v eth0
the man page says of the '-1' option:
-1 Try to get a lease once. On failure exit with code 2. In
ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: isc-dhcp-client 4.3.3-5ubuntu15
ProcVersionSign
Uname: Linux 4.8.0-22-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.3-0ubuntu8
Architecture: amd64
CurrentDesktop: Unity
Date: Fri Oct 14 16:59:45 2016
DhclientLeases:
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-07-23 (449 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Alpha amd64 (20150722.1)
SourcePackage: isc-dhcp
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in isc-dhcp (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Confirmed |
for reference, you can make it fail faster like this in /etc/dhcp/ dhclient. conf
timeout 3;
retry 3;
#reboot 10;
select-timeout 5;
initial-interval 1;