Commit Graph

3309 Commits (master)

Author SHA1 Message Date
Zuul 75c5f4057e Merge "[ffwd3] Create nework_environment during node_extraction" 2023-03-24 00:40:25 +00:00
Lukas Bezdicka 61752801c0 [ffwd3] Create nework_environment during node_extraction
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
2023-02-27 16:39:40 +01:00
Miguel Garcia 4d8fe985e0 parse_ansible_inventory: use ansible_runner instead of importing Ansible
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.

Closes-Bug: #2007659
Change-Id: I08330ced3b31d0ff48a881501cae8bd726e36432
2023-02-27 09:52:19 +01:00
Zuul d027aa968a Merge "Add handling for no -e param in CIP" 2023-01-16 10:35:40 +00:00
Brendan Shephard fd7976906f Add handling for no -e param in CIP
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
2023-01-16 14:09:58 +10:00
Zuul 21d95d299f Merge "Rotate ansible.log during ceph deploy" 2023-01-10 11:45:15 +00:00
Manoj Katari 6e7c8c35aa Rotate ansible.log during ceph deploy
'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
2023-01-04 10:13:18 +00:00
Zuul 1199095270 Merge "baremetal node export - auto convert Heat nic-conf" 2023-01-04 01:33:45 +00:00
Zuul 1c993ed816 Merge "Make ~/.tripleo/history owned by the correct user" 2022-12-15 14:48:19 +00:00
Zuul a4b19677bf Merge "bnr - Deprecation note" 2022-12-13 05:32:01 +00:00
Zuul b5e59b5623 Merge "Also export OVN DBs IPs for multi-stack inputs" 2022-12-08 19:07:12 +00:00
Fernando Diaz ca5139211f bnr - Deprecation note
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
2022-12-07 19:17:00 +01:00
Bogdan Dobrelya 28d15c2798 Also export OVN DBs IPs for multi-stack inputs
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 <>
2022-12-06 16:12:21 +01:00
Lukas Bezdicka fe6a5a30ff Fix upgrade playbook path.
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 <>

Change-Id: I2c7fd4304701f128ec0588c5a2bf4a3c7da842ad
2022-12-05 10:15:02 +01:00
Harald Jensås f965bc4f54 baremetal node export - auto convert Heat nic-conf
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/ 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
converted template.

Change-Id: Idbb2345c2b94370bbdc455a96869fcf85c5edfc7
2022-11-29 13:42:08 +01:00
Zuul eb0f82b98d Merge "Removing superflous linebreak character" 2022-11-24 17:08:36 +00:00
Zuul 7aa384e56e Merge "Disable redundant shutoff of ephemeral heat" 2022-11-24 09:05:01 +00:00
Zuul ff717093ee Merge "Standalone: Generate port map in a new format" 2022-11-24 09:04:56 +00:00
Takashi Kajinami f3807e5595 Disable redundant shutoff of ephemeral heat
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
2022-11-22 17:04:31 +09:00
Zuul 04d8bd88d2 Merge "overcloud image build: Use CentOS Stream 9 by default" 2022-11-21 07:06:15 +00:00
Zuul 254753402b Merge "Remove leftover of --heat-type installed" 2022-11-18 09:05:29 +00:00
Zuul 8e468b5799 Merge "tripleo deploy: Use Standalone role by default" 2022-11-17 16:43:04 +00:00
Takashi Kajinami 055133078d Standalone: Generate port map in a new format
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
2022-11-17 10:46:08 +09:00
Zuul 70bbc79cb1 Merge "Remove ANSIBLE_STDOUT_CALLBACK override" 2022-11-16 15:45:56 +00:00
rabi d18b927385 Remove ANSIBLE_STDOUT_CALLBACK override
That PR has merged long time back and we're using
ansible-runner 2.2.0 since a long time.

Change-Id: I1b9d6e87635dd2f0be39780dcee998fe3f1f02b6
2022-11-16 04:23:36 +00:00
Takashi Kajinami edd1ab318d overcloud image build: Use CentOS Stream 9 by default
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

Closes-Bug: #1996567
Change-Id: I4c17917b3c99b17ddca5a00a03486831ee2d9284
2022-11-15 12:55:05 +09:00
Jiri Podivin 8628b07d96 Removing superflous linebreak character
Signed-off-by: Jiri Podivin <>
Change-Id: I22354b47b4687f1a0e81522062fd99281c9314cb
2022-11-11 10:38:19 +01:00
Zuul 4642098b40 Merge "Omit empty environment files" 2022-11-11 08:24:14 +00:00
Zuul 3079c0ddcc Merge "Pass undercloud inventory for running preflight validations" 2022-11-09 17:32:08 +00:00
rabi 81fbe6aa6a Use VerboseFileWrapper from osc
We don't have glanceclient in requirements.

Closes-Bug: #1995961
Change-Id: I2a36b93bd2bc2fea0aadab05ea3d657d47ba5d93
2022-11-08 21:54:59 +05:30
matbu 5589eabcd7 Pass undercloud inventory for running preflight validations
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
2022-11-04 10:02:45 +01:00
Zuul 0cba88a0c1 Merge "Remove logic to detect legacy network resources" 2022-10-27 21:54:18 +00:00
Oliver Walsh bcafdf7114 Fix overcloud cell export paths
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
2022-10-25 00:58:54 +01:00
Takashi Kajinami bd70bcaa2c Make ~/.tripleo/history owned by the correct user
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.

Change-Id: Ie6195b629fa65bcf9e5350f73d332e5034e8039b
2022-10-21 03:16:38 +00:00
Takashi Kajinami 57ddfddbca Omit empty environment files
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.

Change-Id: If2a3f1d2d332a930ea9a529088b3a2ab91d50b53
2022-10-20 14:52:45 +09:00
Zuul 12e788906c Merge "Don't try stack delete with overcloud delete" 2022-10-19 10:57:09 +00:00
Takashi Kajinami 16960e3eb2 Remove leftover of --heat-type installed
Support of --heat-type installed was already removed by [1]. This
removes the remaining implementation for it.

[1] 60d17b2fa1

Change-Id: If3cc6fed8b286c48006990c84fe2ef13cd829c11
2022-10-19 16:59:23 +09:00
Takashi Kajinami ad1f50f21c tripleo deploy: Use Standalone role by default
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.

Change-Id: Ica27ebb06c4d078d6f34a7f70bd0073554554e63
2022-10-19 07:04:59 +00:00
Zuul 008ff277db Merge "Undercloud: Deprecate unused scheduler_max_attempts" 2022-10-18 14:10:50 +00:00
Zuul e386c3a054 Merge "admin authorize: Deprecate ineffective --overcloud-ssh-network" 2022-10-18 11:43:24 +00:00
Zuul 8ccb691724 Merge "overcloud-deploy: Only support pre-provisioned node" 2022-10-18 11:33:40 +00:00
Zuul d3880586da Merge "Undercloud: Deprecate [DEFAULT] enable_swift_encryption" 2022-10-18 11:33:35 +00:00
Takashi Kajinami e7da2e541e Undercloud: Deprecate unused scheduler_max_attempts
The option was used to tune behavior of nova-scheduler but has had no
effect since nova was removed from undercloud.

Change-Id: Ie01f4663b944a12c8ef11addf95b6b3574cb5ee7
2022-10-17 22:40:15 +09:00
Zuul fd886afbe6 Merge "Only use rpm installed collections/modules" 2022-10-17 08:32:24 +00:00
rabi 8129d94a5d Only use rpm installed collections/modules
This would allow us to ignore conflicting versions
of collections installed from galaxy.

Change-Id: I9c0abe546aeadc1365d9e1156c5fb27c5e543b66
2022-10-15 10:47:36 +05:30
matbu 66156f7395 Execute undercloud preflight validations via VF binary
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
2022-10-14 11:41:27 +00:00
Takashi Kajinami 1846d14a2c overcloud-deploy: Only support pre-provisioned node
Since Nova was removed from undercloud, baremetal node should be
always pre-provisioned.

Change-Id: If837d30b5d22a7ba0c3b0ffe8eb641d9ce9f6b55
2022-10-14 10:12:06 +09:00
Zuul aa8618da4f Merge "Fix password file path message" 2022-10-13 13:14:01 +00:00
rabi 0167db8879 Don't try stack delete with overcloud delete
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.

Change-Id: I63cc1a239fe24c8ee7ac4e829c0ac25e344b9a50
2022-10-13 10:47:06 +05:30
Brendan Shephard 17bf3ed4f8 Fix password file path message
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
2022-10-13 12:32:37 +10:00