-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetch pre_upgrade data based on node properties #16423
Fetch pre_upgrade data based on node properties #16423
Conversation
6b7301e
to
edcb360
Compare
tests/upgrades/conftest.py
Outdated
if len(upgrade_data) == 1: | ||
param_value = next(iter(upgrade_data.values())) | ||
else: | ||
param_value = upgrade_data.get(request.param) | ||
network_type = dict(request.keywords.node.user_properties).get('SatelliteNetworkType') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The network type is not always SatelliteNetworkType
, it is first checked in tests param and if not then only in SatelliteNetworkType
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic is that extracted_value
can be anything like rhel7
, rhel7-ipv4
, rhel7-ipv6
and other rhel variants.
Also request.param
can be anything like that - with or without ipvX. When it is decorated with ipvX, only that single value is added to the upgrade_data
list due to the if
on line 263. On the other hand, when request.param
is not decorated with ipvX (i.e. just plain rhel7
) the upgrade_data
gets filled with everything that contains rhel7
, like ['rhel7-ipv4', 'rhel7-ipv6']
. Only in that case we read the SatelliteNetworkType
to resolve which one should be picked from upgrade_data
.
@vsedmik We accept this as a half solution and we need to communicate to the team that, for now we are not supporting upgrade scenarios parametrization for network type. |
* Fetch pre_upgrade data regardless the ipvX suffix * Fetch pre_upgrade data based on node properties * Fetch pre_upgrade data based on settings (cherry picked from commit 65d7c33)
* Fetch pre_upgrade data regardless the ipvX suffix * Fetch pre_upgrade data based on node properties * Fetch pre_upgrade data based on settings (cherry picked from commit 65d7c33)
Fetch pre_upgrade data based on node properties (#16423) * Fetch pre_upgrade data regardless the ipvX suffix * Fetch pre_upgrade data based on node properties * Fetch pre_upgrade data based on settings (cherry picked from commit 65d7c33) Co-authored-by: vsedmik <46570670+vsedmik@users.noreply.github.com>
Fetch pre_upgrade data based on node properties (#16423) * Fetch pre_upgrade data regardless the ipvX suffix * Fetch pre_upgrade data based on node properties * Fetch pre_upgrade data based on settings (cherry picked from commit 65d7c33) Co-authored-by: vsedmik <46570670+vsedmik@users.noreply.github.com>
* Fetch pre_upgrade data regardless the ipvX suffix * Fetch pre_upgrade data based on node properties * Fetch pre_upgrade data based on settings
Problem Statement
During TFA I've seen several
post_upgrade
failures for "rhel_contenthost
-parametrized" upgrade scenario tests where the pre-data could not be fetched from thescenario_entities
file:The reason is that the pre-upgrade test names are now suffixed with
-ipv4
or-ipv6
so thescenario_entities
hold items like this:while this piece of code requires the exact param, which is just
rhel7
,rhel8
,rhel9
.Solution(?)
There are probably more than one solution and I'm not sure which one would be the best.
Initially I thought we could go regardless the
ipvX
suffix since I supposed the pipelines were separated (first commit).That's probably not a good solution when we start decorating tests with
['ipv4', 'ipv6']
explicitly, so I took the network type from the settings.Please let me know if there is a better place where to get that information from in scope of the
pre_upgrade_data
fixture.