[2.0] MAAS enabling DHCP against the wrong interface
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
Blake Rouse |
Bug Description
I used the following commands to enable DHCP:
# add a subnet because it wasn't automatically added.
maas admin subnets create cidr=192.
# create an ip range whree to provide DHCP
maas admin ipranges create type=dynamic start_ip=
# add an interface to rack controller, because it wasn't automatically added.
maas admin interfaces create-physical 4y3h7n name=virbr0 mac_address=
# link an interface to a subnet.
maas admin interface link-subnet 4y3h7n virbr0 mode=static ip_address=
# enable dhcp.
- Went to the WebUI to enable DHCP in the primary rack!
This should have enabled DHCP on virbr0, unfortunately, the config file below was enabled against 'wlan0'
=======
virbr0 Physical 192.168.122.1 (Static assign)
virbr1 Physical (Unconfigured)
wlan0 Physical (Unconfigured)
=======
Feb 29 13:29:36 unleashed systemd[1]: Starting MAAS instance of ISC DHCP server for IPv4...
Feb 29 13:29:36 unleashed systemd[1]: Started MAAS instance of ISC DHCP server for IPv4.
Feb 29 13:29:36 unleashed dhcpd[26917]: WARNING: Host declarations are global. They are not limited to the scope you declared them in.
Feb 29 13:29:36 unleashed dhcpd[26917]: Wrote 0 class decls to leases file.
Feb 29 13:29:36 unleashed dhcpd[26917]: Wrote 0 deleted host decls to leases file.
Feb 29 13:29:36 unleashed dhcpd[26917]: Wrote 0 new dynamic host decls to leases file.
Feb 29 13:29:36 unleashed dhcpd[26917]: Wrote 0 leases to leases file.
Feb 29 13:29:36 unleashed systemd[1]: maas-dhcpd.service: Main process exited, code=exited, status=1/FAILURE
Feb 29 13:29:36 unleashed systemd[1]: maas-dhcpd.service: Unit entered failed state.
Feb 29 13:29:36 unleashed systemd[1]: maas-dhcpd.service: Failed with result 'exit-code'.
=======
Feb 29 13:41:56 unleashed sh[12568]: 2016-02-29 13:41:56 [-] 127.0.0.1 - - [29/Feb/
Feb 29 13:41:57 unleashed systemd[1]: Starting MAAS instance of ISC DHCP server for IPv4...
Feb 29 13:41:57 unleashed systemd[1]: Started MAAS instance of ISC DHCP server for IPv4.
Feb 29 13:41:57 unleashed dhcpd[9817]: Wrote 0 class decls to leases file.
Feb 29 13:41:57 unleashed dhcpd[9817]: Wrote 0 deleted host decls to leases file.
Feb 29 13:41:57 unleashed dhcpd[9817]: Wrote 0 new dynamic host decls to leases file.
Feb 29 13:41:57 unleashed dhcpd[9817]: Wrote 0 leases to leases file.
Feb 29 13:41:57 unleashed dhcpd[9817]:
Feb 29 13:41:57 unleashed dhcpd[9817]: No subnet declaration for wlan0 (192.168.1.72).
Feb 29 13:41:57 unleashed dhcpd[9817]: ** Ignoring requests on wlan0. If this is not what
Feb 29 13:41:57 unleashed dhcpd[9817]: you want, please write a subnet declaration
Feb 29 13:41:57 unleashed dhcpd[9817]: in your dhcpd.conf file for the network segment
Feb 29 13:41:57 unleashed dhcpd[9817]: to which interface wlan0 is attached. **
Feb 29 13:41:57 unleashed dhcpd[9817]:
Feb 29 13:41:57 unleashed dhcpd[9817]:
Feb 29 13:41:57 unleashed dhcpd[9817]: Not configured to listen on any interfaces!
Feb 29 13:41:57 unleashed dhcpd[9817]:
Feb 29 13:41:57 unleashed dhcpd[9817]: If you think you have received this message due to a bug rather
Feb 29 13:41:57 unleashed dhcpd[9817]: than a configuration issue please read the section on submitting
Feb 29 13:41:57 unleashed dhcpd[9817]: bugs on either our web page at www.isc.org or in the README file
Feb 29 13:41:57 unleashed dhcpd[9817]: before submitting a bug. These pages explain the proper
Feb 29 13:41:57 unleashed dhcpd[9817]: process and the information we find helpful for debugging..
Feb 29 13:41:57 unleashed dhcpd[9817]:
Feb 29 13:41:57 unleashed dhcpd[9817]: exiting.
Feb 29 13:41:57 unleashed systemd[1]: maas-dhcpd.service: Main process exited, code=exited, status=1/FAILURE
Feb 29 13:41:57 unleashed systemd[1]: maas-dhcpd.service: Unit entered failed state.
Feb 29 13:41:57 unleashed systemd[1]: maas-dhcpd.service: Failed with result 'exit-code'.
=======
# WARNING: Do not edit /var/lib/
# changes made there.
#
# Instead, edit /etc/maas/
# will be present whenever MAAS rewrites the DHCP configuration. Update and save
# the cluster's configuration in MAAS to trigger an update to this file.
option arch code 93 = unsigned integer 16; # RFC4578
option path-prefix code 210 = text; #RFC5071
subnet 192.168.122.0 netmask 255.255.255.0 {
if option arch = 00:07 {
filename "bootx64.efi";
} elsif option arch = 00:0C {
filename "bootppc64.bin";
} elsif option arch = 00:0B {
filename "grubaa64.efi";
} elsif option arch = 00:0E {
filename "pxelinux.0";
option path-prefix "b'ppc64el/'";
} else {
filename "pxelinux.0";
}
interface "wlan0";
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.122.255;
option domain-name-servers 192.168.1.72;
option domain-name "maas";
option routers 192.168.122.1;
option ntp-servers ntp.ubuntu.com;
class "PXE" {
match if substring (option vendor-
}
pool {
range 192.168.122.10 192.168.122.100;
}
on commit {
set clhw = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
set clip = binary-to-ascii(10, 8, ".", leased-address);
set cllt = binary-to-ascii(10, 32, "", encode-
set clht = pick-first-
execute(
}
on expiry {
set clhw = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
set clip = binary-to-ascii(10, 8, ".", leased-address);
execute(
}
on release {
set clhw = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
set clip = binary-to-ascii(10, 8, ".", leased-address);
execute(
}
host unleashed-virbr0 {
hardware ethernet 52:54:00:d3:1a:ac;
}
}
omapi-port 7911;
key omapi_key {
algorithm HMAC-MD5;
secret "E3h7s8W18yUFBw
};
omapi-key omapi_key;
Related branches
- Mike Pontillo (community): Approve
- LaMont Jones (community): Approve
- Lee Trager (community): Approve
-
Diff: 2245 lines (+844/-628)15 files modifiedetc/maas/templates/dhcp/dhcpd.conf.template (+100/-85)
etc/maas/templates/dhcp/dhcpd6.conf.template (+70/-56)
src/maasserver/dhcp.py (+134/-52)
src/maasserver/exceptions.py (+4/-0)
src/maasserver/tests/test_dhcp.py (+294/-290)
src/provisioningserver/dhcp/config.py (+10/-10)
src/provisioningserver/dhcp/testing/config.py (+27/-11)
src/provisioningserver/dhcp/tests/test_config.py (+46/-46)
src/provisioningserver/rpc/cluster.py (+25/-20)
src/provisioningserver/rpc/clusterservice.py (+8/-4)
src/provisioningserver/rpc/dhcp.py (+14/-7)
src/provisioningserver/rpc/tests/test_clusterservice.py (+22/-8)
src/provisioningserver/rpc/tests/test_dhcp.py (+55/-37)
src/provisioningserver/utils/network.py (+5/-1)
src/provisioningserver/utils/tests/test_network.py (+30/-1)
Changed in maas: | |
milestone: | none → 2.0.0 |
importance: | Undecided → Critical |
description: | updated |
description: | updated |
summary: |
- maas-dhcpd is not started after enabling DHCP + MAAS enabling DHCP against the wrong interface |
description: | updated |
summary: |
- MAAS enabling DHCP against the wrong interface + [2.0] MAAS enabling DHCP against the wrong interface |
description: | updated |
description: | updated |
Changed in maas: | |
assignee: | nobody → Blake Rouse (blake-rouse) |
Changed in maas: | |
status: | New → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |