Change I5f5cec5a1622be4983b4d0db392453d1c489fa40 allowed the
net_config_override file to be yaml as well as json, but if
enable_validations is true the _validate_no_ip_change assumes the
network config is json.
This change loads this file as yaml in _validate_no_ip_change.
Change-Id: Iaeadf412865c059d252ffc7087db3853569b74ee
Related-Bug: #1927090
(cherry picked from commit f8ee246464)
On setting net_config_override parameter, the undercloud uses
a JSON or YAML format template to configure the networking
with os-net-config and ignores the network parameters set in
undercloud.conf. We can use this parameter when we want to
configure bonding or add an option to the interface.
This patch will allow net_config_override to work with a json
or a yaml as an input.
Closes-Bug: #1927090
Change-Id: I5f5cec5a1622be4983b4d0db392453d1c489fa40
(cherry picked from commit 253bd6e7db)
(cherry picked from commit 06a82e0ebf)
(cherry picked from commit aa9996e139)
This patch adds a new --skiplist argument to the run sub command.
This feature allows the operator to provide a file with a list of
Validations to skip via the run sub command.
More details could be found in the official validations-libs
documentation [1].
PS: To avoid requirements and upper constraints headache, this patch
will not use validations_libs.cli.common.read_cli_data_file() coming
from recent validations-libs release but the skip list file will be open
and read directly in the tripleo_validator.py.
Depends-On: https://review.opendev.org/c/openstack/validations-libs/+/809289
[1] - https://docs.openstack.org/validations-libs/latest/readme.html#skip-list
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
Change-Id: Ibe6d56fc4eea93ab333fab237aa22e554fc245f3
(cherry picked from commit b7e50a9a15)
(cherry picked from commit 70883be45e)
In Train we still run Validation over Mistral for the Deployment which
is broken atm. Some pieces of the code has been dropped which make
the option --run-validations broken.
This review just call, like the undercloud-preflight Validations, the
Validation Framework instead of Mistral.
The results and output if some Validations failed will be easier to
debug, which is very difficult to do in the Mistral context.
Relared BZ:
https://bugzilla.redhat.com/show_bug.cgi?id=1974353
Change-Id: I88d7d09c2f3cf1b5bb23bca3e1436ea8e2ca0d07
This validation is no longer helpful, and it prevents deploying for
multi-architecture x86/ppc64le environments.
Change-Id: Ibb71e5dabaf09e45f0d2671aa0dfa60944728a2f
(cherry picked from commit f9e5d79f91)
Now that UpgradeConverge inherits from UpgradePrepare, overcloud
status is left as 'deploying' after it finishes. Let's set the
status to 'success'.
Note: With ephemeral heat (Wallaby and after) we would not need the
converge step as there is no stack/plan. This change would be
backported to stable/train.
Change-Id: I4329b21adbc4cd568c0a164d2778b79df700ae48
(cherry picked from commit e8d1da4ba3)
The legacy directory can exist, but the validations don't have to be there.
In such a case, the legacy directory would still be used by VF,
instead of the new directory containing validation playbooks.
This patch reverses the condition, so that the client first
attempts to use the new validations playbook directory,
and only if it doesn't exist falls back to the legacy one.
Resolves: rhbz#2001968
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
(cherry picked from commit 9a586eb25d)
Change-Id: I6fb72ea7d170a2bcb0a1e3225d0fd8e9d97e0591
This change ensures that the inventory function returns the inventory file
path instead of the inventory content when we run
external_update/upgrade. Without this review the funtion
returns inventory content which may not be parsed correctly as
external_* don't use mistral when the playbooks are executed.
rhbz: 1944321
Change-Id: I6aa9056939c9cc5311034160c790e4893e7d7ce5
Signed-off-by: Kevin Carter <kecarter@redhat.com>
Initially the idea was to have for each cell export information
for the additional cell to deploy. The name of the new cell
is provided to the export command to create the export file
name, if not specified via --output-file.
Since the exported information is not in all cases specific to
the new cell and can be shared with multiple cells, it does
not make sense to have the new cell name as a required parameter.
Lets remove the name parameter is it is right now that the
export information file name is generic to be used for multiple
cells.
Change-Id: If8b15fd206a32dbd5b2edb1cd500f4e2151313d9
(cherry picked from commit f10842848b)
(cherry picked from commit 035f9b6a29)
(cherry picked from commit 456dc483ff)
(cherry picked from commit a769ed7af0)
This fix is to avoid the issue described in #1942356
Cloud-init may not give permissions to the entire .ssh directory
which breaks sed --in-place operation, since it always create a
temporary file in the same directory.
New releases already use ssh-admin playbook instead of shell
commands.
Closes-Bug: #1942356
Change-Id: If2db45f09eface56b5b26646b97e1fdbfb7b5a3e
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
We update the stack assuming that there would be no change
during upgrades. This does not allow blacklisting nodes
during upgrades.
This probably won't be relevant for master/wallaby with
ephemeral heat. Only proposed for backport to older branches.
Change-Id: I3a154dbedd115d121bfc826513141c2d8be98508
(cherry picked from commit 7dd1f6e26f)
Network environment validation fails when accessing value
with the key 'os_net_config' from the nic-config files.
Fix the dictionary keys needed to fetch the network
config from nic_data.
Signed-off-by: Yadnesh Kulkarni <ykulkarn@redhat.com>
Change-Id: I2ec628dd9c9cf14c0cd9d8ba30f53ac18efe115f
(cherry picked from commit 930abb12b3)
With external-update/upgrade run, --limit is not mandatory,
as it can be run on all nodes. However, we don't seem to honor
blacklisted hosts.
This is fine from ussuri onwards after we dropped mistral[1] and
used deployment.config_download() for all these.
[1] https://review.opendev.org/c/openstack/python-tripleoclient/+/707894
Change-Id: I7072617770d258b2ba790fa274d2153c01bfe650
overcloud support report collect relies on
os-collect-config running on the overcloud nodes.
Since this isn't the case in Train, we need to
change how we manage this process. This change will
backport pieces from Ussuri and use Ansible rather
than Mistral.
Closes-Bug: #1939461
Depends-On: https://review.opendev.org/c/openstack/tripleo-ansible/+/804181
Change-Id: I7adcf5ed310903ed8f5064fbbb6af6b42f280936
Normally, backups are not done interactively, but during nights or
weekends. This patch introduces the capacity of introducing in an easy
way cron programming that will execute backups in predictable intervals.
Closes-Bug: #1935675
Depends-on: I86b3fb2c3d846bcd56859e0d572f1fe4d5e148fa
Change-Id: I28219759922b7407121a3fa4d2f49ee1f4b8a3cd
(cherry picked from commit c5347fbac3)
This patch adds a new option --db-only which will perform a DB backup
of the Undercloud node. This option will have precedence to --init, --setup-nfs
or --setup-rear, but it won't complain. If the --db-only option is being
passed then only the play in charge of performing the Undercloud's DB backup
will be triggered.
This patch also corrects the call import from unittest.mock which does
not work with Python2.7 version.
Change-Id: Idd905e32dc70728abdb4cea1a14f43c7f11ff311
Resolves: rhbz#1977392
Depends-On: I62cadfd95c514edf0b982fa652a53feadb24f2b7
(cherry picked from commit a792bbd874)
(cherry picked from commit 579b5c5e1e)
(cherry picked from commit 66e61a3408)
(cherry picked from commit 134ca3910c)
Ironic uses the order of enabled interfaces to attempt each interface
in turn, so sorting the list will result in an incorrect order in some
cases, which will cause deployment failures on some hardware.
This change sets an explicit order for each interface.
Change-Id: If2740767521453c7adfca56d942db97af13bfaf2
Closes-Bug: #1931161
(cherry picked from commit 05500120e0)
This partially reverts commit f1450b3ae8.
Reason for revert: undercloud_nameservers is supposed to configured
/etc/resolv.conf. The previous patch broke the link between the
configuration and the os-net-config configuration to ensure that
/etc/resolv.conf was updated at install time.
NOTE: This only affects Train through Victoria as we rewrote the network
configuration in Wallaby.
Closes-Bug: #1929117
Change-Id: Ibec901441952ee3336ca3a6b7b4381c97d326d22
(cherry picked from commit bf586c4c94)
When the command print the help there are some spaces missing
Change-Id: I1305b519a230823be37b7f50c75ce331c16999d6
(cherry picked from commit a7f177860c)
Currently both the undercloud backup and the overcloud backup
dont show any error msg when the inventory file does not exit.
This patch adds an error msg in case the inventory file does not exit
Change-Id: I57b43a550d8baf23add7794150e1f8591f756275
(cherry picked from commit f737dfcc02)
There is no reason to make --extra-env-vars mutually exclusive with
--extra-vars and --extra-vars-file. Only the last two ones should be.
This patch fixes this.
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
Change-Id: I5c8a0d3a46632ff2ffec35bd07eec233ea9a09cd
(cherry picked from commit a397af28d0)
(cherry picked from commit e8a0124a10)
RHEL-8.3 kernel disabled the Intel TSX (Transactional
Synchronization Extensions) feature by default as a preemptive
security measure, but it breaks live migration from RHEL-7.9
(or even RHEL-8.1 or RHEL-8.2) to RHEL-8.3.
Operators are expected to explicitly define the TSX flag in
their KernelArgs for the compute role to prevent live-migration
issues during the upgrade process.
This is explained in detail in this article [a]
If operators don't want to add the TSX flag to the KernelArgs,
they can always set "ForceNoTsx" to true.
Adding this mandatory validation right after the stacks are
updated is probably the earliest place where we can validate
and fail if necessary. We'd rather fail quickly than too late
as this will provide the best experience for our users.
In addition to this, there's a tripleo-validation [b] in the
work.
This is meant to be train-only for now but we will have to
refactor if (when?) we support FFU from queens to Wallaby+
[a] https://access.redhat.com/solutions/6036141
[b] https://review.opendev.org/c/openstack/tripleo-validations/+/790806
Co-Authored-By: Martin Schuppert <mschuppert@redhat.com>
Related: https://bugzilla.redhat.com/1923165
Closes-Bug: #1916758
Change-Id: I35246fbf74394f6e315973283464085d2aef08b2
When running `openstack tripleo validator list --group pre-update`
command, it returns all the validations catalog and the filtering by
group(s) doesn't work.
This patch fixes this behavior by actually filtering.
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
Change-Id: I5152ad37c7e47a46eb23c3c792b31b2bf3298368
Declare is_failed_validation variable before the if statement otherwise
if results is None, we hit a 'reference before assignment'
Change-Id: I293389c366fd49fbdde2ea55d3a3ebed1c598195
(cherry picked from commit 8edaf4ebbd)
The default output for the run_ansible_playbooks is json,
this patch modifies the output to tripleo, so it will be easier for
operators to see the outcome.
The default output from ussuri is tripleo_dense.
Change-Id: Ieb21ff1cd348bff275a14420e3af8a65f401d631
Kernel and ramdisk images are found nonexistent when "file://"
is prepended to the image path, so replace it with empty
string only when checking the existence of the image
Closes-Bug: #1896262
Signed-off-by: Yadnesh Kulkarni <ykulkarn@redhat.com>
Change-Id: I641dd1c3426048f5aace0ac695eb8cef7126f8c2
(cherry picked from commit 6546970a73)
This is a backport of [1] but in between now and then the code in
tripleo_validation was move back into python-tripleoclient[2] and the
review in [1] was included.
This means that we cannot have a review in master as it's already
there.
[1] https://review.opendev.org/c/openstack/tripleo-validations/+/777220
[2] https://review.opendev.org/c/openstack/python-tripleoclient/+/782776
Original commit message:
Updated _run_validator_run to no longer raise an execption if/when a group is empty
Using a log vs. exception is useful when we want to run an automated set of validations
within our Update CI pipeline.
Co-authored-by: Owen McGonagle <omcgonag@redhat.com>
Co-authored-by: Daniel Bengtsson <dbengt@redhat.com>
Change-Id: I1046148da87712934184373a10fa3d2a46e620e4
(cherry picked from commit 0debcde236)
In order to be re-used by post deployment action, this review
copy the ansible inventory into the output_dir as:
standalone-inventory.yaml.
If file exist it will replace the old one.
Change-Id: Ied14f40cf074755225abe1e8f1c859bacbe9022f
(cherry picked from commit 0736e447f9)