[openstack-dev] [tripleo][ironic][puppet] Spine/Leaf: Adding Multiple Subnets to ironic-inspector-dnsmasq

Miles Gould mgould at redhat.com
Fri Oct 21 12:11:11 UTC 2016


On 19/10/16 18:33, Dan Sneddon wrote:
> I am doing research to support the spec for TripleO deployment on
> routed networks [1]. I would like some input on how to represent
> multiple subnet ranges for the provisioning network in undercloud.conf.
[snip]
> ###### inspector_dnsmasq_tftp.erb ######
> port=0
> interface=<%= @dnsmasq_interface %>
> bind-interfaces
> dhcp-range=<%= @dnsmasq_ip_range %>,29
> dhcp-boot=pxelinux.0,localhost.localdomain,<%= @dnsmasq_local_ip %>
> dhcp-sequential-ip
> ############

Just to note, there's no problem with this at the dnsmasq level: you can 
specify as many dhcp-range options as you like, one per IP range. 
There's no need to break the configuration up into multiple files to 
support this.

> We could potentially represent this data as a JSON, or as a list of
> strings.

I vote for JSON (or maybe YAML?) over creating our own ad-hoc string format.

> String:
> additional_inspection_ipranges =
> "172.20.1.0,172.20.1.100,172.20.1.120,255.255.255.0,172.20.1.254;172.20.2.0,172.20.2.100,172.20.2.120,255.255.255.0,172.20.2.254"

If we're creating a string format, the obvious approach is to re-use the 
one dnsmasq uses, which is

<start-addr>[,<end-addr>|<mode>][,<netmask>[,<broadcast>]][,<lease time>]

If the DHCP server is directly connected to a given network, it can 
deduce the netmask by querying the interface configuration.

OTOH,

  - that doesn't specify gateway
  - I don't like the idea of directly pasting structured strings into 
configuration files without validating their structure, and the 
temptation to do that would be great.

Miles



More information about the OpenStack-dev mailing list