Commit Graph

29 Commits (4b0b290ec17325b1ea6dcf2914bb8d9edd0c1f49)

Author SHA1 Message Date
Harald Jensås 6ac7c08257 Generate routes for undercloud ctlplane network attrs
In 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
3 years ago
Harald Jensås 6ced9c71db ctlplane network attributes in overcloud environment
Set CtlplaneNetworkAttributes parameter in overcloud
environment. The parameter contains a map with network
and subnets data.

    dns_domain: ctlplane.localdomain.
    mtu: 1442
    name: ctlplane
    tags: ['', '']
      dns_nameservers: ['', '']
      - {'destination': '', 'nexthop': ''}
      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
3 years ago
Takashi Kajinami 5b246e4f1a Allow usage of duplicated IPs for undercloud config
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.

Change-Id: I932482e097d62f46e02eb035435d2bc0d5548b2a
Related-Bug: #1832168
Related: RHBZ#1868910
3 years ago
Harald Jensås 9cd91775f2 Inspector set baremetal port physical_network
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.

Closes-Bug: #1870529
Change-Id: I7f31b9f0143507ec3c9c26efd086f0bd95ef2ce7
3 years ago
Harald Jensås af4721b7fa Add option to control ironic network interfaces
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
3 years ago
Zuul 497f2487d1 Merge "Allow ctlplane subnets in undercloud chrony acl rules" 3 years ago
Rabi Mishra 9e5c1103ef Allow ctlplane subnets in undercloud chrony acl rules
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
3 years ago
Alex Schultz e970ca3cdf Catch exceptions when processing subnets
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
4 years ago
Harald Jensås 69eec5ce08 Fix inspector ip range for dhcpv6-stateless
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

Closes-Bug: #1853334
Change-Id: I6627da48bc170f7ecccaf84c0fccda9e2edd5af3
4 years ago
Steve Baker 3657d1dc8d Support undercloud fake-hardware ironic driver
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
4 years ago
Harald Jensås d5e3726999 Add option to control IPv6 address mode
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
4 years ago
Zuul 8b9bb10455 Merge "Set option:mtu in inspector dnsmasq" 4 years ago
Harald Jensås fd2ca88220 IronicIpVersion: '6' if local_ip is IPv6
Set the ironic pxe version according to the IP version
used on the provisionin network.

Change-Id: I32049dfa892d4f4cdc03dcab2ed31a11abe99770
Closes-Bug: #1845746
Depends-On: I6384e11dd68cdbf2179545caae2c818fd1a6b23e
4 years ago
Harald Jensås ff31fe18ec Set option:mtu in inspector dnsmasq
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
4 years ago
Brendan 2600260be5 Ensure no duplicate IPs are used in undercloud.conf
If duplicate IPs are used in undercloud.conf it will cause
issues with haproxy.

Closes-Bug: #1832168
Change-Id: I35547080aee943438d34b2d62632795af32f8462
4 years ago
Dmitry Tantsur 719267e4db Remove support for Cisco hardware types
Removed from ironic in

Change-Id: I6e6a587333e93eb117afe8e6bad1c65962db6cb2
4 years ago
Harald Jensås f1450b3ae8 Don't pass the DNSServers param in undercloud env
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
4 years ago
Harald Jensås ee16c09447 Allow per-subnet DNSNameServers for ctlplane network
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
4 years ago
Harald Jensås 5e66a91ef0 Set IPv6 params True if undercloud local_ip is IPv6
When deploying the undercloud using an IPv6 control plane
the set various parameters for IPv6 to True.

Change-Id: I101c4c70f2804779089ba25720141a9320270edc
Closes-Bug: #1831315
4 years ago
Harald Jensås 931e88a63e Undercloud - ironic inspector - host routes
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
4 years ago
Harald Jensås 034778b6a8 Undercloud - support ctlplane subnet host routes
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
4 years ago
Alex Schultz cf026ddb20 Fail if too many nameservers are provided
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
4 years ago
Ilya Etingof 49d92c9f9b Undercloud: support inspect interface for redfish, idrac, ilo, irmc
Generate inspect interface defaults for ironic configuration based
on the enabled hardware types.

Change-Id: Ifa235d0cf5e07f7ebfeff33026494cb28ec62362
Story: 1526753
Task: 24804
4 years ago
Zuul 0d9ac70c03 Merge "Undercloud: support bios interface for ilo, irmc, redfish" 4 years ago
Ilya Etingof f20e47c9e8 Undercloud: support bios interface for ilo, irmc, redfish
Generate BIOS interface defaults for ironic configuration.

Change-Id: I19d4ae45c4e08d4e02bae194e49f63ed0a1d3d8e
Story: 2001791
Task: 28731
4 years ago
Harald Jensås 5c293711d8 Remove DhcpStart and DhcpEnd - Replaced by AllocationPools
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
4 years ago
Dmitry Tantsur 1014a3d42c undercloud: enable the ipxe boot interface by default
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
4 years ago
Harald Jensås 8355e76ca4 Calculate undercloud ctlplane DHCP allocation pools
* 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

  dhcp_exclude =,
                   ^ 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': '', 'end': ''},
        {'start': '', 'end': ''}]
the following configuration can be used in undercloud.conf:

  dhcp_start =,
  dhcp_end =,

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
5 years ago
Harald Jensås ce9a49fe68 Add unit test for undercloud ctlplane network config
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
5 years ago