When extracting nodes from stack during Undercloud upgrade
we should also extract network environment so we can use it
during the subsequent Overcloud upgrade.
All our interactions with Ansible are brokered by the ansible_runner
module, except for this one function which imports the Ansible module
proper. This leads for breakage when using the latest Ansible builds
from EL9, which are on python3.11 instead of 3.9.
By refactoring parse_ansible_inventory to use ansible_runner's
get_inventory we avoid that breakage, but we also lose out on the
pattern matching as that isn't supported. This function is called in two
ceph_hosts_in_inventory: it didn't do any pattern matching at all, so it
isn't impacted by the change.
overcloud admin authorize: we can now offload the pattern matching to
Ansible itself via the limit_hosts parameter we pass to the playbook run
command, preserving the original functionality.
Container image prepare will fail with a traceback
if the -e param is not provided. Accordingly, this
change adds a default None value and handling for
cases where the -e param is not provided.
'overcloud ceph deploy' logs are redirected to /home/stack/ansible.log.
Before python-tripleo-client runs cephadm playbook, check if the log
file ansible.log exists (from a previous run). If it does, then rename it
to append a timestamp. When cephadm is run,a new log will be created.
A new parameter 'rotate_log=False' is added to run_ansible_playbook function
which can be enabled for any other operations to perform log rotation.
Backup and restore is deprecated and will be removed in the next release. This change informs adds a deprecation note everytime a backup command is executed.
When cell computes do not have external_ids:ovn-remote configured
for OVN, it breaks.
ovs-vsctl set open . external_ids:ovn-remote="ssl:<ovn_dns_vip>:6642"
(or by DBs IPs) fixes it and ovn-controller connects the db and adds
Fix multi-cell/multi-stack exports by also exporting ovn_dbs_node_ips.
So that when there is no ovn_dbs_vip data in hiera (i.e. no value for
t-h-t OVNDBsVirtualFixedIPs), there are still ovn_dbs_node_ips data to
have things configured properly for OVN on computes.
Signed-off-by: Bogdan Dobrelya <firstname.lastname@example.org>
Ansible is now generated into overcloud-deploy while
constants.MAJOR_UPGRADE_PLAYBOOKS is no longer static path within the
ansible execution dir.
Co-authored-by: Daniel Bengtsson <email@example.com>
If no NetworkConfigTemplate parameter is set when exporting
overcloud nodes to baremetal_deployment.yaml an attempt to
look for a legacy Heat nic-config template is made.
In case a heat nic-config template is found it will be
downloaded from the stack to a temporary file. The tool
$THT/tools/convert_heat_nic_config_to_ansible_j2.py is then
used to convert the template to an ansible j2 nic-config
The template created by the conversion tool is placed in
the working-dir and the baremetal_deployment.yaml
network_config -> template parameter will point to the
Ephemeral heat is shut off just after a Heat stack is created and
playbooks are generated. Thus we don't need to shut it off again.
Exporting stack no longer launches the ephemeral heat service since
commit d7af2f5482 was merged.
The DeployedServerPortMap parameter was already deprecated in favor
of the new NodePortMap, ControlPlaneVipData and VipPortMap. This change
ensures the deployment command use the new parameters.
Note that the old parameter is still kept until the environment file
is updated to use the new deployed-ports.yaml template.
TripleO and RDO no longer support CentOS 8 Stream since Zed. Thus we
should use CentOS Stream 9 by default instead of the unsupported old
The undercloud name is hardcoded in the preflight validations.
This patch generate an undercloud inventory in order to run
preflight validations as prep step of the undercloud install.
This was silently failing with the warning:
File /home/stack/overcloud-deploy/overcloud/config-download/overcloud/overcloud/group_vars/overcloud.json was not found during export
No data returned to export AllNodesExtraMapData from.
Since the stack name was appended to config_download_dir twice.
Also the working_dir, if given, was ignored when exporting passwords
and the default config_download_dir was based on the working_dir instead of
the documented default.
When a tripleo subcommand command is executed with sudo, we identify
the original user and create the history file in that user's home
When creating the file, we should make that user owns it, otherwise
the user no longer able to run tripleo subcommends without sudo once
the history file is created and owned by root.
The following two environment files are now empty, after we updated
the default in tht to support only pre-provisioned nodes
This drops usage of these two files so that we can remove these empty
The tripleo deploy command is designed as a generic command to set up
a standalone deployment. This change ensures the command uses
the standalone by default instead of partially using undercloud and
undercloud install commands override the role name properly.
This change also introduces the option to enable preflight validation.
The validation is disabled by default, to be consistent with inflight
validation, and can be enabled by the --preflight-validation option.
Execute undercloud preflight validations via the Validation Framework
binary instead of via the VF API avoid breakage when an API change is introduce.
Its also fix some issues present in the previous implementation:
- the validations was logged in /tmp instead of the /var/log/validations,
so the logs wasn't shown in the CLI history command.
- the results of the executed validations was never checked, so when the
validations was failing, the undercloud install can still continue
We don't support installed heat anymore and with 'native'
heat there is no heat service running after deployment
for the api request.
Also, fixes native launcher support as there is no rm_heat()
This change fixes the path printed by the UNDERCLOUD_COMPLETION_MESSAGE.
If output_dir is defined in the config, we will use that. Else, we default