Public bug reported:

I've tried this in containers of xenial, trusty and yakkety.

i've created a lxc network that does not have dhcp4.

See https://github.com/lxc/lxd/issues/2481 for some info on how to do
that.

Then, I launch an instance:

$ lxc launch ubuntu-daily:xenial --profile=sm-test-profile2 x1
% 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://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:16:3e:b8:e6:70
Sending on   LPF/eth0/00:16:3e:b8:e6:70
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
              DHCPv6 this sets the maximum duration of the initial exchange to
              timeout (from dhclient.conf with a default of sixty seconds).

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: isc-dhcp-client 4.3.3-5ubuntu15
ProcVersionSignature: Ubuntu 4.8.0-22.24-generic 4.8.0
Uname: Linux 4.8.0-22-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
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)

** Affects: isc-dhcp (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apparmor apport-bug yakkety

** Description changed:

- I've tried this in containers
+ I've tried this in containers of xenial, trusty and yakkety.
  
  i've created a lxc network that does not have dhcp4.
  
  See https://github.com/lxc/lxd/issues/2481 for some info on how to do
  that.
  
  Then, I launch an instance:
  
  $ lxc launch ubuntu-daily:xenial --profile=sm-test-profile2 x1
  % 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://www.isc.org/software/dhcp/
  
  Listening on LPF/eth0/00:16:3e:b8:e6:70
  Sending on   LPF/eth0/00:16:3e:b8:e6:70
  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
-               DHCPv6 this sets the maximum duration of the initial exchange to
-               timeout (from dhclient.conf with a default of sixty seconds).
+        -1     Try to get a lease once.  On  failure  exit  with  code  2.   In
+               DHCPv6 this sets the maximum duration of the initial exchange to
+               timeout (from dhclient.conf with a default of sixty seconds).
  
  ProblemType: Bug
  DistroRelease: Ubuntu 16.10
  Package: isc-dhcp-client 4.3.3-5ubuntu15
  ProcVersionSignature: Ubuntu 4.8.0-22.24-generic 4.8.0
  Uname: Linux 4.8.0-22-generic x86_64
  NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
  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)

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1633619

Title:
  dhclient -1 exits 0 when no lease found

Status in isc-dhcp package in Ubuntu:
  New

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://github.com/lxc/lxd/issues/2481 for some info on how to do
  that.

  Then, I launch an instance:

  $ lxc launch ubuntu-daily:xenial --profile=sm-test-profile2 x1
  % 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://www.isc.org/software/dhcp/

  Listening on LPF/eth0/00:16:3e:b8:e6:70
  Sending on   LPF/eth0/00:16:3e:b8:e6:70
  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
                DHCPv6 this sets the maximum duration of the initial exchange to
                timeout (from dhclient.conf with a default of sixty seconds).

  ProblemType: Bug
  DistroRelease: Ubuntu 16.10
  Package: isc-dhcp-client 4.3.3-5ubuntu15
  ProcVersionSignature: Ubuntu 4.8.0-22.24-generic 4.8.0
  Uname: Linux 4.8.0-22-generic x86_64
  NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
  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)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1633619/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to