In https://review.opendev.org/753195 we set up ctlplane
network attributes and later use those in THT when setting
group_vars for os_net_config templates in ansible.
The change missed to add 'host_routes' for peer-subnets in
a spine-and-leaf set-up. This caused introspection and
provisioning to fail in spine-and-leaf set-ups because the
undercloud did'nt know how to reach the remote subnets.
This change updates the code to include calculated routes
to the remote subnets.
Change-Id: I265b2b586ceaeaa98bbf6073bb79cde6a91627da
Closes-Bug: #1899008
Set CtlplaneNetworkAttributes parameter in overcloud
environment. The parameter contains a map with network
and subnets data.
CtlplaneNetworkAttributes:
network:
dns_domain: ctlplane.localdomain.
mtu: 1442
name: ctlplane
tags: ['192.168.24.0/24', '192.168.25.0/24']
subnets:
ctlplane-leaf1:
cidr: 192.168.25.0/24
dns_nameservers: ['8.8.8.8', '8.8.4.4']
gateway_ip: 192.168.25.254
host_routes:
- {'destination': '192.168.24.0/24', 'nexthop': '192.168.25.254'}
ip_version: 4
name: ctlplane-leaf1
Also set the CtlplaneNetworkAttributes in the undercloud environment
from the data in undercloud.conf.
Also set the CtlplaneNetworkAttributes in the standalone environment.
Change-Id: I12f1ea965d489eb36353e988cc3ec947f72a35ad
Change 2600260be5 introduced validation
to avoid duplicated usage of undercloud IPs, but in fact we don't need
to ensure complete unieqness of local_ip, undercloud_admin_host and
undercloud_public_host, but it should be enough if local_ip and
undercloud_admin_host are different, because public endpoints should
listen on different ports when ssl is enabled.
This patch eases the validation introduced by the previous patch, so
that we allow the deployment especially with the same ip used for
public_host and admin_host, which was allowed in old releases.
Depends-On: https://review.opendev.org/746671
Change-Id: I932482e097d62f46e02eb035435d2bc0d5548b2a
Related-Bug: #1832168
Related: RHBZ#1868910
When deploying routed networks the physical_network
attribute of ironic ports must be set, this has been
a manual task.
With this change we add configuration for the
physnet_cidr_map processing hook in ironic inspector
so that the physical_network field of ironic ports
is set automatically when introspecting nodes.
Depends-On: https://review.opendev.org/722088
Closes-Bug: #1870529
Change-Id: I7f31b9f0143507ec3c9c26efd086f0bd95ef2ce7
When deploying on IPv6 stateful ironic must use the
neutron network interface driver. This because we need
to configure neutron service ports (provisioning, cleaning
etc.) with multiple ip addresses for certain UEFI firmware
and chainloading combinations (iPXE -> Ironic IPA) to work.
Closes-Bug: #1864491
Change-Id: I5a9890ccb95a21b95f488cd7a5b5fd1a6cdff38b
At present chronyd runs as client and can't be used as NTP server
by the overcloud nodes. It would be good to allow the ctlplane
subnets for it to be used by the overcloud.
Change-Id: If5911de750a284ae513b343daa4886bb2f547b29
Closes-Bug: #1858096
We should do a better job indicating that there is invalid data in the
extra subnets that can be defined. This change catches exceptions that
occur when generating the inspection subnet data.
Change-Id: I175ff32ba5e5a271741349794cf28f1e58c50d6a
Closes-Bug: #1857057
When using dhcpv6-stateless a range should not be
used. According to dnsmasq manual page:
A static-only subnet with address all zeros may be
used as a "catch-all" address to enable replies to
all Information-request packets on a subnet which
is provided with stateless DHCPv6, ie
--dhcp-range=::,static
Closes-Bug: #1853334
Change-Id: I6627da48bc170f7ecccaf84c0fccda9e2edd5af3
When including fake-hardware in the undercloud.conf
enabled_hardware_types, some of the fake-hardware default interfaces
are not enabled so it can't be used.
This change allows nodes to be created with driver fake-hardware. If
this proves useful for development or some scale testing then it might
be desirable to add fake-hardware by default to the
enabled_hardware_types list.
Change-Id: I1a6b4df073b39924e6855ea865cfc856a1bdfe6b
Add option ipv6_address_mode in undercloud.conf to control
the address mode, dhcpv6-steteful or dhcpv6-steteless, for
IPv6 provisioning network.
Related-Bug: #1847606
Change-Id: I7de5f5487065d20068229e0d34102be6119fbeef
Set the ironic pxe version according to the IP version
used on the provisionin network.
Change-Id: I32049dfa892d4f4cdc03dcab2ed31a11abe99770
Closes-Bug: #1845746
Depends-On: I6384e11dd68cdbf2179545caae2c818fd1a6b23e
Set the mtu for all subnets in inspector dnsmasq
config to value of 'local_mtu' in undercloud.conf.
Closes-Bug: #1845487
Depends-On: Ic95dbf1867fb5397f1b6d8f23466910a97051cb6
Change-Id: Iafe3156ca0678f3ab3c5e688e712a9fb6b408e7b
If duplicate IPs are used in undercloud.conf it will cause
issues with haproxy.
Closes-Bug: #1832168
Change-Id: I35547080aee943438d34b2d62632795af32f8462
Change I4c102d8f728a90cf9eb90f6129738377a8d2503c
replaced use of the global DNSServers param, it now
uses the per-subnet DnsNameServers instead.
This is a cleanup to remove the now unused parameter.
Closes-Bug: #1834306
Depends-On: I4c102d8f728a90cf9eb90f6129738377a8d2503c
Change-Id: I6e2e728d9e749867be0a90a4e54dce7b5318994c
Add a new option ``dns_nameservers`` in the subnet sections
for the undercloud ctlplane network. By default the option
is not set, and in that case the ``undercloud_nameservers``
are used, maintaining the current behaviour.
This decouples the nameservers used on the undercloud and
the ones used for the overcloud nodes. In a DCN setting
different DNS server may be preferred per-site.
Related-Bug: #1834306
Change-Id: I0dc03eddf9ea00ff33cd3ae0cdc8f42a4961e89c
When deploying the undercloud using an IPv6 control plane
the set various parameters for IPv6 to True.
Change-Id: I101c4c70f2804779089ba25720141a9320270edc
Closes-Bug: #1831315
Configure the host_routes specified for subnets
in undercloud.conf as classless static routes
in ironic inspectors dnsmasq configuration.
The advanced routing options will be pushed to
the inspection ramdisk similar to the way they
are already pushed to ironic-python-agent.
Related-Bug: #1819464
Depends-On: I2229d386bff8ae63e4efe8406770b2b378a1991f
Change-Id: I1afb720ae4ee4ce586c16a440e8edf8c2b23e155
Add new option 'host_routes' to the subnet definitions
for the ctlplane network in undercloud.conf.
Routes defined for the local subnet will be appended
to the THT parameter 'ControlPlaneStaticRoutes'. The
net-config template for the undercloud will ensure
these routes are configured on the undercloud.
Routes are also added to UndercloudCtlplaneSubnets
parameter used by the undercloud to create the
ctlplane network and subnets. In THT change:
I46b7c7175f542ad4d375a20f133c05064e7b7222 this new
data is used so that the host routes are configured
for the neutron ctlplane subnets.
Related-Bug: #1819464
Change-Id: I692fcc4a494b2cda1911814a53a0c6ec2f99f807
The nameservers are limited by neutron to the max configured servers
which is 5 by default. Since we do not offer a way to tune this value,
let's fail the user early if they are providing too many nameservers.
If a user wants to provide more than 5, they can do so by increasing the
max_dns_nameservers in neutron and setting the DnsServers via extra
environment files.
Change-Id: I51ed6f8bb109df7f9038bbf691097d50ce9e54b3
Closes-Bug: 1812919
Generate inspect interface defaults for ironic configuration based
on the enabled hardware types.
Change-Id: Ifa235d0cf5e07f7ebfeff33026494cb28ec62362
Story: 1526753
Task: 24804
THT change Ifdf3e9d22766c1b5ede151979b93754a3d244cc3 switched
to use the AllocationPools parameter, replacing use of the
DhcpStart and DhcpEnd parameters.
Change-Id: Ia96c3af388c40c0bd6ca2b58d1ac5a242608c89d
Related-Bug: #1806512
Depends-On: Ifdf3e9d22766c1b5ede151979b93754a3d244cc3
Ironic is separating the pxe and ipxe implementations into separate boot
interfaces, deprecating the ipxe part of the pxe interface. This change
enables the new ipxe interface instead.
Change-Id: I386ce69e2a2f3d9bcea2eead16802b9a54f04265
Story: #1628069
* Make dhcp_start and dhcp_end optional for subnet definitions
in undercloud.conf.
* Allow non-contiguous allocation pools for ctlplane subnets
Calcualte the allocation pools by removing the local_ip,
gateway, admin_host, public_host and ``inspection_iprange``,
from the subnets full ip range. Allocation_pools for all
remaining ranges will be configured. A new per-subnet option
``dhcp_exclude`` is added, a list of IP addresses or IP
ranges that will be excluded from the allocation pool. For
example:
dhcp_exclude = 172.20.0.101,172.20.0.210-172.20.0.219
^ ip addr ^ ip range
If dhcp_start is defined and dhcp_end is not defined (or vice
versa) any addresses prior to (or after) this address is
removed from the allocation pools.
Make dhcp_start and dhcp_end options ListOpts to enable non-
contigous allocation pools. For example, to create allocation
pools: [{'start': '172.20.0.100', 'end': '172.20.0.150'},
{'start': '172.20.0.200', 'end': '172.20.0.250'}]
the following configuration can be used in undercloud.conf:
dhcp_start = 172.20.0.100,172.20.0.200
dhcp_end = 172.20.0.150,172.20.0.250
A new method is added for remote_subnet_opts, same options as
for the local_subnet_opts but without the defaults.
To allow optional dhcp_start and dhcp_end for the local_subnet
which have defaults defined, a condition is used to ignore
dhcp_start and dhcp_end in case they are the default values
and the cidr is NOT the default.
Related-Bug: #1806512
Related-Bug: #1807707
Change-Id: I4ba148f465b4c452bd5b2c31009ac8a2897bcd5f
Move processing of ctlplane subnet to it's own methods.
Add unit tests for undercloud ctlplane network config.
Note: Also renames some of the test files to avoid
conflicts when using oslo_fixture for config.
Change-Id: I5f4b919c79673c9c1c226dcc9daa5d5e0d356dc2