With I57047682cfa82ba6ca4affff54fab5216e9ba51c Heat has added
a new template version for wallaby. This would allow us to use
2-argument variant of the ``if`` function that would allow for
e.g. conditional definition of resource properties and help
cleanup templates. If only two arguments are passed to ``if``
function, the entire enclosing item is removed when the condition
is false.
Change-Id: I25f981b60c6a66b39919adc38c02a051b6c51269
Neutron's dns_assignments field includes a nice pice of
structured data. This is a prerequirement for Designate
usage. (No plan's to use that, but being a bit ready
does'nt hurt.)
{"hostname": "my-vm",
"ip_address": "192.0.2.16",
"fqdn": "my-vm.example.org."}
Enable for the undercloud:
- dns_domain_ports ml2 extension driver
Change-Id: I46eb9a24dd66821b27524fe4d1fdab617b6fa948
CentOS 8 undercloud installation is failing because
/usr/bin/env python does not exist. Update the
python scripts to use platform-python.
Closes-Bug: #1869714
Change-Id: I459410950503c42cc39a91c64e56f69aa0a34d20
Replace the python script that was run on post-config, by an Ansible
task running on the host where Keystone is running.
It'll be useful later when using OpenStackSDK to have access to the
credentials during the deployment and not having to wait the far end.
It's also reducing the Heat resources.
Depends-On: https://review.opendev.org/#/c/700015
Change-Id: I585abc3e6a3b9b8ae9183e0b5170df2e39301e17
The 'tripleo.validations.v1.upload_validations' workflow has been
removed from tripleo-common, this Undercloud post installation step
could be safely removed.
Change-Id: I55495b932c682367a0b336741319aa31b0dcbcd2
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
Use the parameter UndercloudCtlplaneIPv6AddressMode
to control ipv6 address mode for the provisioning
network instead of hard-codeing to dhcpv6-stateless.
Change-Id: I549f930853539a7cd665a00d7ec3fd1705f819fb
Closes-Bug: #1847606
Depends-On: I7de5f5487065d20068229e0d34102be6119fbeef
Check if the router exists before creating it. The undercloud
re-install fail's when using IPv6 provisioning network since
the router already exists.
Also, don't create the router if routed networks is enabled.
In this case the router in the infrastructure should handle
router advertisements.
Change-Id: I5bc0a88bbb7912bb10693ce393ac89365f29a940
Closes-Bug: #1844767
This change makes sure that we apply pyflake8 checks on all python
codes to improve its readability.
Note that there are some rules applied for other OpenStack projects,
but not yet turned on, which should be enabled in the future.
Change-Id: Iaf0299983d3a3fe48e3beb8f47bd33c21deb4972
We can have both ipv4 and ipv6 networks defined and could end up having
a mix of addresses passed into the undercloud configuration. Neutron
throws an error if the ip address type doesn't match the network being
created (e.g. ipv4 nameserver for ipv6 cidr and vice versa). Let's
filter the nameservers to ensure we only set the appropriate ip version
nameserver for the network.
Change-Id: I184797270dbb6c70cae11bc98128890529035690
Closes-Bug: #1841805
This helps to consolidate the Undercloud and Standalone deployments. It
also avoids an issue where the Ansible Python interperter cannot be
found.
Change-Id: I01a95be975011d2419a523da572503e0ebcfa49b
Resolves: rhbz#1733608
Signed-off-by: Luke Short <ekultails@gmail.com>
Moving undercloud deployment to container means that during execution
of undercloud backup mistral-executor does not have required connections
and data available and so creates empty tarball currently. This patch is
one of many, which are supposed to fix this. On THT side we need to:
- Include DB host IP address in tripleo.undercloud-config env
- we need to have this information about undercloud IP available
as we cannot connect to local socket anymore and using 'localhost'
does not work.
- Mount directories which are meant to be backed up
- currently directories backing up directories local to mistral_executor
are useless for undercloud backup
Change-Id: Ia1fd60a13570a42f5243beb5bb0487c743e31d27
Partial-Bug: #1812960
clouds_yaml.py script is used to generate clouds.yaml
for undercloud and standalone. It is now refactored and moved
to tripleo-common module[1] and can be reused here.
[1.]https://review.opendev.org/#/c/664586/
Related-Bug: #1719369
Depends-On: https://review.opendev.org/#/c/664586/
Change-Id: I50b37df1a87472a16e2d5d2c588c728d2a7a5c76
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Since https://review.opendev.org/656581 is merged (and the revert,
reverting the revert ...) there is no metadata service running.
This change removes all things related to setting up routes
to the metadata service, i.e the EC2MetadataIp. As well as NAT
firewall redirect rule used only on the undercloud but disabled
by default.
Blueprint: nova-less-deploy
Change-Id: Ic4ea74b45c566048e32dde82d2bf00498f932af6
Those are hidden resource types in heat. Changing these types
would not result in replacement of the resources.
Change-Id: I22d23a8f187263bd36e364f0cd3301c830f3220b
Use the DNS nameservers for each ctlplane subnet,
instead of using the same DNSServers for all subnets.
Related-Bug: #1834306
Depends-On: I0dc03eddf9ea00ff33cd3ae0cdc8f42a4961e89c
Change-Id: I4c102d8f728a90cf9eb90f6129738377a8d2503c
Using EndpointMap to ensure we get the hostname/fqdn if possible
otherwise it fallbacks to the IP for Keystone public endpoint.
This is useful when the operator uses a certificate based on
hostname/fqdn and not an IP address.
Closes-Bug #1763776
Change-Id: Ifa9d55cca90caf5be0c83507cb47447e25311fce
Change: I692fcc4a494b2cda1911814a53a0c6ec2f99f807 in
python-tripleoclient added support to define host routes
for the subnets in undercloud.conf.
Update the undercloud ctlplane network post script so
that it add's these routes to the host_routes property
of the undercloud ctlplane subnets.
THT already uses the data in the subnets host_routes, it
is passed as ControlPlaneStaticRoutes to NetworkConfig
unless ControlPlaneStaticRoutes was statically overriden
in the environment.
Closes-Bug: #1819464
Depends-On: I692fcc4a494b2cda1911814a53a0c6ec2f99f807
Change-Id: I46b7c7175f542ad4d375a20f133c05064e7b7222
We need to include also the Undercloud DB in a Mistral
environment to be able to create the DB backup from the CLI.
Now, we do this using python and THT but we didn't include it.
Change-Id: If503e733b103a34ae5639eb56dfae05f9783d59a
Closes-Bug: 1812839
Since the ctlplane network and it's subnets are created
outside of the overcloud heat templates we cannot in an
easy way create a list containing the cidr of each of
the ctlplane subnets in THT.
Prior to routed networks we only had one subnet and was
able to create the NetCidrMapValue by reading the cidr
value of one of the ControlVirtualIP resource. When we
have multiple subnets on each network we should make
NetCidrMapValue contain lists of cidrs for each network.
By setting a tags on the ctlplane network, one
per subnet, containing each individual subnets cidr the
tags can be loaded via the ControlVirtualIP resource so
that we can have NetCidrMapValue contain all the cidrs
of the ctlplane network.
Change-Id: I7d9a951d0c156c83430c1e326bc8edcb52b08537
Partial: blueprint tripleo-routed-networks-templates
Change: I4ba148f465b4c452bd5b2c31009ac8a2897bcd5f makes
dhcp_start and dhcp_end optional for non-local subnet
definitions in undercloud.conf.
Start using the AllocationPools parameter istead of the
legacy DhcpStart | DhcpEnd parameters.
Closes-Bug: #1806512
Closes-Bug: #1807707
Depends-On: I4ba148f465b4c452bd5b2c31009ac8a2897bcd5f
Change-Id: Ifdf3e9d22766c1b5ede151979b93754a3d244cc3
In order to specify which version of python we should use for the
deployment, we need to pass in the python interpreter into the
postconfig where we are directly calling the ansible heat hook.
Change-Id: I9dfc72269f800395a9864c457a5a43f7590c8e75
Related-Blueprint: python3-support
Numerous files have incorrect modes set. Correct these so that executables
have 755 and yaml files are 644 to address rpmlint errors.
Change-Id: I8db36209b41a492f6b85e3469994de884bf556e8
Add the cloud to clouds.yaml for the undercloud so
that it is available for post deploy script's.
The clouds.yaml is created both in the stack users
home directory ~/.config/openstack/clouds.yaml and
globally for the system in /etc/openstack/clouds.yaml.
Update standalone post configuration to use the same
code to create and update clouds.yaml on standalone.
clouds.yaml is used when setting up client's in other
post scripts instead of passing all the options to
each script.
Partial-Bug: #1801927
Change-Id: I6402fa561745bacf184b1ad2ada44bf8f7c75324
Setting boot_option_local is no longer required as its the default.
So setting this is redundant.
Migrate existing flavors to remove boot_option if set to local.
Change-Id: Ib793acc98641091bcde2580b725656976e5d6625
Depends-On: I9fbe12f7878328f0ca084e29483f30d18dad1773
Related-Bug: #1803965
Since Rocky neutron has support to enable routed networks on
existing an network and subnet if certain conditions are met.
The tripleo undercloud does meet these conditions.
This change updates the extraconfig post script that creates
the neutron ctlplane networks. Any non routed network is
updated to a routed network if 'enable_routed_networks' = True
in the configuration.
Closes-Bug: #1790877
Change-Id: Idf2dd4c158d29b147d48153d3626cf403059d660
* https://review.openstack.org/#/c/614540/ converts undercloud
post deploystep to python where property resources:MEMORY_MB
was setted to 1 but earlier it was zero. It fixes the typo.
Change-Id: If26e17cb2079ef994cc0e0506cbf40bf9023808e
Configuring Nova (quota, flavors) and Mistral (workbooks,
workflows, etc.) is a lot faster if we do it in python.
Initial undercloud install - 3.5x faster
----------------------------------------
Run deployment UndercloudPostDeployment ---- 130.50s < Shell
Run deployment UndercloudPostDeployment ---- 37.39s < Python
Re-Running undercloud install - 10x faster
------------------------------------------
Run deployment UndercloudPostDeployment ---- 405.01s < Shell
Run deployment UndercloudPostDeployment ---- 39.95s < Python
Change-Id: If7b3ad701e434ed0d606356b9bbab2716d53c5bb
_run_command() returns the output of the command executed.
If the Neutron API is disabled it would return the string
'false' which is in fact True as far as python is concerned.
We also need a depends_on to ensure the link to hiera.yaml
created in extraconfig/post_deploy/undercloud_post.sh is
already in place.
Change-Id: Iec958a92433d3f671862422ac85bc78d7babc01d
Currently no default plan is created during a container-based undercloud
deployment.
This patch creates a default deployment plan if both of two conditions
apply:
- The /usr/share/openstack-tripleo-heat-templates directory exists
(We need the templates to create the plan)
- There is no container named `overcloud` in swift yet
(If a deployment is run more than once we don't want to recreate
the default plan)
Closes-Bug: #1798590
Change-Id: Id03631432b1fedd75ee3ddba67bfe7d5d6049a07
If we redeploy the undercloud, we want to unset the OS_* variables
before exporting the new ones to avoid any conflict.
Co-Authored-By: Sergii Golovatiuk <sgolovat@redhat.com>
Change-Id: If4fa8533cc1fff33eb27c381ca3ddca96c2d03ca
Long time ago it was required because ironicclient defaulted to
an ancient version. It was changed back in Queens (ironicclient 2.0),
so we can drop it now to avoid confusion.
Change-Id: Icea0bdf6d5dcdd81ce9c34be7af8a241da0861bc
Closes-Bug: #1789392
We fixed the name that is used to be standalone but didn't change the
post script. We document the StandaloneHomeDir so we need to address the
template.
Change-Id: I45f1dbb5c7197b80961ead53c4e5b1403ed4e6db
Closes-Bug: #1788413
With the move from instack-undercloud to containerized undercloud, the
hiera key to check for whether the tripleo-validations are enabled
changed from `enable_validations` to `tripleo_validations_enabled`. This
commit updated the check in undercloud_post.sh to use the right key. It
also removed the useless EnableValidation heat param.
Change-Id: I338e139fa770ebb7bdcc1c0afb79eec062fada8b