When extracting nodes from stack during Undercloud upgrade
we should also extract network environment so we can use it
during the subsequent Overcloud upgrade.
Change-Id: Ic86c1cab0b5e79326c52098ebf1b3369a6cd3da2
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
places:
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.
Closes-Bug: #2007659
Change-Id: I08330ced3b31d0ff48a881501cae8bd726e36432
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.
Resolves: rhbz#2158380
Change-Id: I81c157d499eda8cb8117aea322518bd2ce819f40
'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.
Change-Id: I13bf6c6377ac049054c22d0b8a0e005366c44b7f
Resolves: rhbz#2149339
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.
Change-Id: Ief36bd72fe58e2b0ac9709ce427407339454afbf
When cell computes do not have external_ids:ovn-remote configured
for OVN, it breaks.
Running manually:
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
the Chassis.
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.
Change-Id: Ib49156d49a7f8e4544f5b73d15a4ad32dba77c98
Related: rhbz#2137904
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
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 <dbengt@redhat.com>
Change-Id: I2c7fd4304701f128ec0588c5a2bf4a3c7da842ad
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
template.
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
converted template.
Change-Id: Idbb2345c2b94370bbdc455a96869fcf85c5edfc7
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.
Change-Id: Ib4d12a6e8227f5f7764761c4904d569625c7ed88
The DeployedServerPortMap parameter was already deprecated[1] 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.
[1] 26be3179905c7751812aa10a0af9f56e58e7ef08
Change-Id: Ifd7bfe266be39b4a3643e5fcf1fd506d777448db
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
version.
Closes-Bug: #1996567
Change-Id: I4c17917b3c99b17ddca5a00a03486831ee2d9284
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.
Closes-bug: #1994032
Change-Id: I66d6435e41a42a9db1772eea36e41c7a5cf87d23
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.
Change-Id: I77442878a6cc0fb7fb2bae71b888678099466300
When a tripleo subcommand command is executed with sudo, we identify
the original user and create the history file in that user's home
directory.
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.
Change-Id: Ie6195b629fa65bcf9e5350f73d332e5034e8039b
The following two environment files are now empty, after we updated
the default in tht to support only pre-provisioned nodes
- deployed-server-environment(.j2).yaml
- deployed-server-noop-ctlplane.yaml
This drops usage of these two files so that we can remove these empty
files completely.
Depends-on: https://review.opendev.org/861547
Change-Id: If2a3f1d2d332a930ea9a529088b3a2ab91d50b53
Support of --heat-type installed was already removed by [1]. This
removes the remaining implementation for it.
[1] 60d17b2fa1
Change-Id: If3cc6fed8b286c48006990c84fe2ef13cd829c11
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.
Depends-on: https://review.opendev.org/849607
Change-Id: Ica27ebb06c4d078d6f34a7f70bd0073554554e63
The option was used to tune behavior of nova-scheduler but has had no
effect since nova was removed from undercloud.
Change-Id: Ie01f4663b944a12c8ef11addf95b6b3574cb5ee7
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
Change-Id: I149932625fe474175e3842fa52adfea30021ab5c
Since Nova was removed from undercloud, baremetal node should be
always pre-provisioned.
Depends-on: https://review.opendev.org/848695
Change-Id: If837d30b5d22a7ba0c3b0ffe8eb641d9ce9f6b55
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()
for it.
Depends-On: https://review.opendev.org/c/openstack/tripleo-ansible/+/860803
Change-Id: I63cc1a239fe24c8ee7ac4e829c0ac25e344b9a50
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
to /home/stack/tripleo-deploy/undercloud
Resolves: rhbz#2133508
Change-Id: Ia2801c535cc81591cbbda64b3c63530e6e533d88