dhcp subnet snippets are NOT inside the pool block
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Undecided
|
Christian Grabowski |
Bug Description
I'm trying to leverage a combination of a global snippet to "match" hosts into a class and a subnet snippet to deny giving them IP addresses so we can co-exist with openstack DHCP in the same subnet where we provision nodes
Adding a subnet based dhcp snippet to deny these hosts results in it being rendered OUTSIDE of the pool{} block which means snippets like:
deny members of "classname"; will cause DHCP to fail
ISC dhcp docs state that 'deny members of "classname"' rules MUST GO inside of a pool block.
http://
The improper rendering by maas looks like:
#
# Subnet DHCP snippets
#
# Name: deny_openstack_192
deny members of "openstack";
pool {
range 10.40.195.200 10.40.195.221;
}
Whcih causes DHCP to fail to start
Internet Systems Consortium DHCP Server 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https:/
/var/snap/
deny members
^
/var/snap/
deny members of "openstack";
Configuration file errors encountered -- exiting
It should have rendered like:
pool {
#
# Subnet DHCP snippets
#
# Name: deny_openstack_192
deny members of "openstack";
range 10.40.195.200 10.40.195.221;
}
Related branches
- Björn Tillenius: Approve
- MAAS Lander: Approve
-
Diff: 642 lines (+318/-9)14 files modifiedsrc/maasserver/api/dhcpsnippets.py (+3/-0)
src/maasserver/dhcp.py (+22/-2)
src/maasserver/forms/dhcpsnippet.py (+14/-1)
src/maasserver/forms/tests/test_dhcpsnippet.py (+70/-0)
src/maasserver/migrations/maasserver/0239_add_iprange_specific_dhcp_snippets.py (+24/-0)
src/maasserver/models/dhcpsnippet.py (+15/-0)
src/maasserver/models/tests/test_dhcpsnippet.py (+18/-0)
src/maasserver/testing/factory.py (+2/-0)
src/maasserver/tests/test_dhcp.py (+86/-4)
src/maasserver/websockets/handlers/tests/test_dhcpsnippet.py (+4/-0)
src/provisioningserver/dhcp/testing/config.py (+13/-2)
src/provisioningserver/rpc/cluster.py (+22/-0)
src/provisioningserver/templates/dhcp/dhcpd.conf.template (+13/-0)
src/provisioningserver/templates/dhcp/dhcpd6.conf.template (+12/-0)
Changed in maas: | |
assignee: | nobody → Christian Grabowski (cgrabowski) |
Changed in maas: | |
status: | New → In Progress |
Changed in maas: | |
milestone: | none → 3.0.0-rc1 |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |