Comment 0 for bug 717166

Will Daniels (wdaniels) wrote :

Using the new v4 DHCP server from Natty, Eucalyptus fails to start the server to assign IP addresses to instances on their private networks.

Steps to Reproduce
==================

Install and configure Eucalyptus in MANAGED mode on Natty (expect other modes have the same problem also). Modify the file /etc/eucalyptus/wrappers.conf to allow calling the new DHCP server bin (dhcpd instead of dhcpd3):

< dhcpd3 /usr/sbin/dhcpd3 0 #cap_net_admin
> dhcpd3 /usr/sbin/dhcpd 0 #cap_net_admin

Install an image and start it.

Result
======

In httpd-cc_error_log...

---
Internet Systems Consortium DHCP Server 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
WARNING: Host declarations are global. They are not limited to the scope you declared them in.
Wrote 0 deleted host decls to leases file.
Wrote 0 new dynamic host decls to leases file.
Wrote 0 leases to leases file.

No subnet declaration for eucabr10 (no IPv4 addresses).
** Ignoring requests on eucabr10. If this is not what
   you want, please write a subnet declaration
   in your dhcpd.conf file for the network segment
   to which interface eucabr10 is attached. **

Not configured to listen on any interfaces!
---

Notes
=====

Confirmed that replacing the v4 DHCP server with the old v3 one solves the problem.

Possibly this is a bug in the DHCP server as the error suggests it is not finding the subnet on the bridge interface eucabr10 ("no IPv4 addresses"), which was assigned correctly according to "ip addr show" using netlink calls, whereas the ioctl calls used by the DHCP server do not return any address for eucabr10. I looked briefly at discover.c in the DHCP server code and nothing jumped out as being substantially different between v3 and v4 though.

It seems that the DHCP config file is written out to /var/run/eucalyptus/net/euca-dhcp.conf and the command used to start the server is like this:

/usr/lib/eucalyptus/euca_rootwrap /usr/sbin/dhcpd -cf //var/run/eucalyptus/net/euca-dhcp.conf -lf //var/run/eucalyptus/net/euca-dhcp.leases -pf //var/run/eucalyptus/net/euca-dhcp.pid -tf //var/run/eucalyptus/net/euca-dhcp.trace eucabr10 eth0

As best I can tell, both the config file and command line look correct. Sample config:

---
# automatically generated config file for DHCP server
default-lease-time 1200;
max-lease-time 1200;
ddns-update-style none;

shared-network euca {
subnet 10.32.8.0 netmask 255.255.255.0 {
  option subnet-mask 255.255.255.0;
  option broadcast-address 10.32.8.255;
  option domain-name-servers 127.0.0.1, 10.32.8.1;
  option routers 10.32.8.1;
}

host node-10.32.8.2 {
  hardware ethernet D0:0D:4C:1A:08:C4;
  fixed-address 10.32.8.2;
}

host node-10.32.8.3 {
  hardware ethernet D0:0D:38:D8:06:CE;
  fixed-address 10.32.8.3;
}
}
---

I don't know what has changed in the v4 DHCP server, but this is not working and I don't really know enough about these things to help further. Probably someone with experience/knowledge of the ISC DHCP server could spot the problem or suggest a simple solution more easily.