Commit Graph

21 Commits (4b0b290ec17325b1ea6dcf2914bb8d9edd0c1f49)

Author SHA1 Message Date
ramishra 3739872bcd Allow enabling swift on undercloud
If swift is needed on the undercloud, specifically for missing
use case, it can be enabled.

Change-Id: I70469b29b71746fcfdb6382c080baf836c61f2ef
2 years ago
ramishra 876b24b55d Disable swift on undercloud
This disables swift on the undercloud.

Change-Id: Ib6c895a3263df6accdc75dd52fe2b10f12d6a7e5
2 years ago
ramishra e93244a2a5 Refactor jinja rendering of templates
We do the same thing for all deployments. Refactor the code
to utils.

Change-Id: Ic9db8d852fbfa50f4ac574ebe524c1fb1d85c588
2 years ago
MSA 4a07e16a58 Remove detection of package manager for undercloud upgrade
In [1] we added protection for yum not being available.
We should just default to dnf for anything newer than

[1] 9c53cb3ef5

Change-Id: I5056579ae117c46944f20868c5cd1edfc1b86036
3 years ago
Ade Lee bf348d8f97 Deprecate novajoin
We are deprecating and removing novajoin in Victoria. Lets remove
the config option and add a service to clean it up on the undercloud

Depends-On: I7803cccc4b4bf8c7cc201372ec91f9254cef7eb3
Change-Id: I8d4af24337ff8123b3d9899982033df05470cc22
3 years ago
Emilien Macchi 04e9966b7f undercloud: disable Mistral and Zaqar by default
Mistral isn't needed by default anymore, we replaced it by Ansible.
Therefore, we don't need Zaqar enabled by default as well.


Change-Id: I327d7f06fc6f49aae42d0a9d22c840f94bd84705
3 years ago
Marios Andreou 9c53cb3ef5 Fix package manager used during undercloud packages update
As described in the related bug we need to use dnf instead of yum
for centos8 otherwise it fails in the undercloud packages update.

I am using the python version to determine - py3 is dnf. As part of
discussion here when dnf isn't available fall back to yum.

Found as part of the work in [1].

Related-Bug: 1886837

Change-Id: Idac62d37a19ee49f30936e20021a9dab5af40eec
3 years ago
Alex Schultz c0b0a5aa67 Fix upgrade prompt
We need to prompt the user if we should upgrade earlier in the code so
we can handle additional things like package upgrades in the undercloud
upgrade after the prompt. This change pulls the confirmation logic out
of tripleo_deploy and reuses the prompt_user_for_confirmation code in
the tripleo upgrade and undercloud upgrade actions.

Change-Id: I8dbcae39e6f6d966c1337bad5fb5ba673f7be874
Closes-Bug: #1877825
3 years ago
Alex Schultz 7d1b738910 Use undercloud upgrade to update all required pkgs
Rather than require the end user to manually update packages prior to
kicking off the undercloud process we can do it ourselves by
implementing a flag to skip the update and invoking the upgrade after
the packages have been updated.

Change-Id: Idda6387922adeb182afd11cb0d692d1fcceff9a8
Related-Bug: #1869776
3 years ago
Sofer Athlan-Guyot 0227a54473 Update necessary packages before undercloud upgarde.
This used to be a manual step in the tripleo process. You still have
to update python-tripleoclient and tripleo-common manually.  But:

 - "openstack-tripleo-heat-templates"
 - "openstack-tripleo-validations"
 - "tripleo-ansible"

can all be installed from this process as we spawn another new process
"openstack tripleo upgrade".  Thus all those packages will be
available for it.

Note that tripleo-common should still be installed before running that
command as some of its code is used by tripleoclient.

Eventually adding version dependencies from python-tripleoclient to those
other packages (or from tht which would stay a manual step) looks
challenging as it would be hard to track which version work with which

Change-Id: Ic258f314074007e7e5fd16d87448ffb7a3447fc3
Closes-Bug: #1869776
3 years ago
Kevin Carter bcc9c66747
Replace ansible shell with python runner
This change replaces all of the ansible shell commands with the
python library, ansible-runner. This library is supported by
upstream ansible, is approved by the openstack foundation, is
supported in global requirements, and provides a better, more
programatic interface into running ansible playbooks.

All tests that interacted with the old shell commands have been
updated to now test using the library.

Change-Id: I8db50da826e2fbc074f4e7986d6fd00f6d488648
Signed-off-by: Kevin Carter <>
3 years ago
Alex Schultz 0faa33a6b0 Disable telemetry if it's not enabled
The disable-telemetry.yaml environment is used to disable all the
telemetry services and to disable the notification drivers. Since we
didn't have this by default, notifications were still being sent to
the undercloud rabbitmq and never consumed.

Change-Id: I53eab2c41c80f5dafff9824bf3086e1d9a369e22
Closes-Bug: #1838828
4 years ago
Alex Schultz 75defc10fa Remove tripleo-ui items from the undercloud install
We've retired the tripleo-ui repository so we need to remove the ui
configurations for the undercloud.

Change-Id: I536b2cf361cc4b2e47332bb9842d85ffe0643a60
Related-Bug: #1831478
4 years ago
Alex Schultz 93bff99379 Fix timezone lookup
Unfortunately strftime does not always return a timezone that matches up
with what is available via zoneinfo on the file system. So instead of
using that, this patch creates a function to use timedatectl on the host
itself to determine what the current timezone is configured to.

Change-Id: I0d64cb0a534b48f1aa747655f7b7d997c74d77bc
Closes-Bug: #1820081
4 years ago
Zuul 034edf0c93 Merge "Add support for networks data in Standalone" 4 years ago
Zuul dcbd17c07a Merge "Use --preserve-env to keep proxy settings" 4 years ago
Emilien Macchi 269319182f undercloud: load podman environment when enabled
When podman is enabled, we should load podman.yaml environment from THT,
therefore we can benefit from the parameters in this env.

Change-Id: Id4e6795499009da9b9689d400052a8d547306162
Closes-Bug: #1811951
4 years ago
Rabi Mishra 0e5a10e297 Use --preserve-env to keep proxy settings
User may set http_proxy/no_proxy and then run the install.
We don't preserve the env when doing undercloud install.

Change-Id: Iec51bf33bdca7fb0d3026512abd9360ef3cecb70
Closes-Bug: #1811376
4 years ago
Harald Jensås 51ad17ba18 Add support for networks data in Standalone
Standalone does not use any of the composable networks by
default. Deploy Standaloen using /dev/null as network data
so that these resources are not included when creating the

Undercloud uses only the External network for the external
VIP. Deploy the undercloud using the Undercloud specific
network_data_undercloud.yaml, ensures external_from_pool.yaml
is in the plan.

Related-Bug: #1809313
Depends-On: Ib11a134df93e59947168b40bc71fb1da9172d4ac
Change-Id: I102912851a3b9952daaf7c4d5a34a919f527f805
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