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.
The Ironic Inspector dnsmasq service is currently configured using the puppet-ironic module, and the range of IP addresses is taken directly from undercloud.conf. For example, here is the .erb which configures /etc/ironic-inspector/dnsmasq.conf if using TFTP [2]: ###### 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 ############ Since there is only one dnsmasq_ip_range, only a single subnet is served via DHCP. What I would like to do is extend the undercloud.conf to support multiple IP ranges, and I'm looking for input on the best way to represent the data. I am not sure if we can be fully backwards-compatible here. My gut feeling is no, unless we leave the existing parameters as-is and add something like an "additional_inspection_ipranges" parameter. The data that will need to be represented for each subnet is: * Network subnet * Start and end of inspection IP range * Subnet mask (could be determined by parsing cidr, like 172.20.1.0/24) * Gateway router for the subnet We could potentially represent this data as a JSON, or as a list of strings. Here are some potential examples: JSON: additional_inspection_ipranges = [ { "subnet": "172.20.1.0/24", "start": "172.20.1.100", "end": "172.20.1.120", "gateway": "172.20.1.254" }, { "subnet": "172.20.2.0/24", "start": "172.20.2.100", "end": "172.20.2.120", "gateway": "172.20.2.254" } ] 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" Either of these might get unwieldy depending on the number of networks. Perhaps we could have a repeating parameter? Something like this: additional_inspection_iprange = "172.20.1.0,172.20.1.100,172.20.1.120,255.255.255.0,172.20.1.254" additional_inspection_iprange = "172.20.2.0,172.20.2.100,172.20.2.120,255.255.255.0,172.20.2.254" I would like some feedback about how to represent this data in a way that it can be easily parsed by Puppet, while remaining readable. Any suggestions would be very much appreciated. [1] - https://review.openstack.org/#/c/377088 [2] - https://github.com/openstack/puppet-ironic/blob/master/templates/inspector_dnsmasq_tftp.erb -- Dan Sneddon | Senior Principal OpenStack Engineer dsned...@redhat.com | redhat.com/openstack dsneddon:irc | @dxs:twitter __________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev