From: Ondrej Lichtner olichtne@redhat.com
Because the mixin classes for idlestates and turboboost disabling were moved to be inherited into the Baremetal and Virtual enrtrecipes base classes, the host list definition in BaseEnrtRecipe was being overriden by the higher placed base definition in the original mixin classes like this:
SimpleNetworkRecipe -> Mixin -> BaseEnrtRecipe
The base definition of the "host_list" just returns [], and doesn't call super so the definition from BaseEnrtRecipe was never called. This effectively disabled the mixins in all the enrt recipes that previously used them.
Moving these to the new base classes of BaremetalEnrtRecipe and VirtualEnrtRecipe fixes the issue.
Signed-off-by: Ondrej Lichtner olichtne@redhat.com --- lnst/Recipes/ENRT/BaremetalEnrtRecipe.py | 24 +++++++++++++++++- lnst/Recipes/ENRT/BaseEnrtRecipe.py | 32 ------------------------ lnst/Recipes/ENRT/VirtualEnrtRecipe.py | 24 ++++++++++++++++++ 3 files changed, 47 insertions(+), 33 deletions(-)
diff --git a/lnst/Recipes/ENRT/BaremetalEnrtRecipe.py b/lnst/Recipes/ENRT/BaremetalEnrtRecipe.py index da19095..59e222d 100644 --- a/lnst/Recipes/ENRT/BaremetalEnrtRecipe.py +++ b/lnst/Recipes/ENRT/BaremetalEnrtRecipe.py @@ -23,4 +23,26 @@ class BaremetalEnrtRecipe( IperfMeasurementGenerator, BaseEnrtRecipe, ): - pass + @property + def disable_idlestates_host_list(self): + """ + The `disable_idlestates_host_list` property value is the list of all + matched baremetal hosts for the recipe. + + For detailed explanation of this property see + :any:`DisableIdleStatesMixin` and + :any:`DisableIdleStatesMixin.disable_idlestates_host_list`. + """ + return self.matched + + @property + def disable_turboboost_host_list(self): + """ + The `disable_turboboost_host_list` property value is the list of all + matched baremetal hosts for the recipe. + + For detailed explanation of this property see + :any:`DisableTurboboostMixin` and + :any:`DisableTurboboostMixin.disable_turboboost_host_list`. + """ + return self.matched diff --git a/lnst/Recipes/ENRT/BaseEnrtRecipe.py b/lnst/Recipes/ENRT/BaseEnrtRecipe.py index 9813ba6..c263cfd 100644 --- a/lnst/Recipes/ENRT/BaseEnrtRecipe.py +++ b/lnst/Recipes/ENRT/BaseEnrtRecipe.py @@ -449,8 +449,6 @@ def condition():
self.ctl.wait_for_condition(condition, timeout=5)
- - def _create_reverse_ping(self, pconf): return PingConf( client = pconf.destination, @@ -461,33 +459,3 @@ def _create_reverse_ping(self, pconf): interval = pconf.ping_interval, size = pconf.ping_psize, ) - - @property - def disable_turboboost_host_list(self): - """ - The `disable_turboboost_host_list` property value is the list of all - matched hosts for the recipe. If a specific recipe needs to change - this it should override the :any:`baremetal_hosts` property. - - For detailed explanation of this property see - :any:`DisableTurboboostMixin` and - :any:`DisableTurboboostMixin.disable_turboboost_host_list`. - """ - return self.baremetal_hosts - - @property - def disable_idlestates_host_list(self): - """ - The `disable_idlestates_host_list` property value is the list of all - matched hosts for the recipe. If a specific recipe needs to change - this it should override the :any:`baremetal_hosts` property. - - For detailed explanation of this property see - :any:`DisableIdleStatesMixin` and - :any:`DisableIdleStatesMixin.disable_idlestates_host_list`. - """ - return self.baremetal_hosts - - @property - def baremetal_hosts(self): - return self.matched diff --git a/lnst/Recipes/ENRT/VirtualEnrtRecipe.py b/lnst/Recipes/ENRT/VirtualEnrtRecipe.py index 82d6e3a..d706815 100644 --- a/lnst/Recipes/ENRT/VirtualEnrtRecipe.py +++ b/lnst/Recipes/ENRT/VirtualEnrtRecipe.py @@ -26,3 +26,27 @@ class VirtualEnrtRecipe( @property def hypervisor_hosts(self): return set([self.matched.host1, self.matched.host2]) + + @property + def disable_idlestates_host_list(self): + """ + The `disable_idlestates_host_list` property value is the list of all + matched baremetal hosts for the recipe. + + For detailed explanation of this property see + :any:`DisableIdleStatesMixin` and + :any:`DisableIdleStatesMixin.disable_idlestates_host_list`. + """ + return self.hypervisor_hosts + + @property + def disable_turboboost_host_list(self): + """ + The `disable_turboboost_host_list` property value is the list of all + matched baremetal hosts for the recipe. + + For detailed explanation of this property see + :any:`DisableTurboboostMixin` and + :any:`DisableTurboboostMixin.disable_turboboost_host_list`. + """ + return self.hypervisor_hosts
From: Ondrej Lichtner olichtne@redhat.com
If stream measurement was unsuccessful (no connection, or bad configuration), the recipe would crash with an exception because the dictionary key hierarchy wouldn't be defined - moving this to the "job.passed" branch fixes the issue.
Signed-off-by: Ondrej Lichtner olichtne@redhat.com --- lnst/RecipeCommon/Perf/Measurements/IperfFlowMeasurement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lnst/RecipeCommon/Perf/Measurements/IperfFlowMeasurement.py b/lnst/RecipeCommon/Perf/Measurements/IperfFlowMeasurement.py index ed1f537..81aabb7 100644 --- a/lnst/RecipeCommon/Perf/Measurements/IperfFlowMeasurement.py +++ b/lnst/RecipeCommon/Perf/Measurements/IperfFlowMeasurement.py @@ -164,7 +164,6 @@ def _prepare_client(self, flow): job_level=ResultLevel.NORMAL)
def _parse_job_streams(self, job): - job_start = job.result["data"]["start"]["timestamp"]["timesecs"] result = ParallelPerfResult() if not job.passed: result.append(PerfInterval(0, 0, "bits", None)) @@ -172,6 +171,7 @@ def _parse_job_streams(self, job): for i in job.result["data"]["end"]["streams"]: result.append(SequentialPerfResult())
+ job_start = job.result["data"]["start"]["timestamp"]["timesecs"] for interval in job.result["data"]["intervals"]: interval_start = interval["sum"]["start"] for i, stream in enumerate(interval["streams"]):
Fri, Jan 22, 2021 at 11:48:49AM CET, olichtne@redhat.com wrote:
From: Ondrej Lichtner olichtne@redhat.com
Because the mixin classes for idlestates and turboboost disabling were moved to be inherited into the Baremetal and Virtual enrtrecipes base classes, the host list definition in BaseEnrtRecipe was being overriden by the higher placed base definition in the original mixin classes like this:
SimpleNetworkRecipe -> Mixin -> BaseEnrtRecipe
The base definition of the "host_list" just returns [], and doesn't call super so the definition from BaseEnrtRecipe was never called. This effectively disabled the mixins in all the enrt recipes that previously used them.
Moving these to the new base classes of BaremetalEnrtRecipe and VirtualEnrtRecipe fixes the issue.
Signed-off-by: Ondrej Lichtner olichtne@redhat.com
lnst/Recipes/ENRT/BaremetalEnrtRecipe.py | 24 +++++++++++++++++- lnst/Recipes/ENRT/BaseEnrtRecipe.py | 32 ------------------------ lnst/Recipes/ENRT/VirtualEnrtRecipe.py | 24 ++++++++++++++++++ 3 files changed, 47 insertions(+), 33 deletions(-)
diff --git a/lnst/Recipes/ENRT/BaremetalEnrtRecipe.py b/lnst/Recipes/ENRT/BaremetalEnrtRecipe.py index da19095..59e222d 100644 --- a/lnst/Recipes/ENRT/BaremetalEnrtRecipe.py +++ b/lnst/Recipes/ENRT/BaremetalEnrtRecipe.py @@ -23,4 +23,26 @@ class BaremetalEnrtRecipe( IperfMeasurementGenerator, BaseEnrtRecipe, ):
- pass
- @property
- def disable_idlestates_host_list(self):
"""
The `disable_idlestates_host_list` property value is the list of all
matched baremetal hosts for the recipe.
For detailed explanation of this property see
:any:`DisableIdleStatesMixin` and
:any:`DisableIdleStatesMixin.disable_idlestates_host_list`.
"""
return self.matched
- @property
- def disable_turboboost_host_list(self):
"""
The `disable_turboboost_host_list` property value is the list of all
matched baremetal hosts for the recipe.
For detailed explanation of this property see
:any:`DisableTurboboostMixin` and
:any:`DisableTurboboostMixin.disable_turboboost_host_list`.
"""
return self.matched
diff --git a/lnst/Recipes/ENRT/BaseEnrtRecipe.py b/lnst/Recipes/ENRT/BaseEnrtRecipe.py index 9813ba6..c263cfd 100644 --- a/lnst/Recipes/ENRT/BaseEnrtRecipe.py +++ b/lnst/Recipes/ENRT/BaseEnrtRecipe.py @@ -449,8 +449,6 @@ def condition():
self.ctl.wait_for_condition(condition, timeout=5)
- def _create_reverse_ping(self, pconf): return PingConf( client = pconf.destination,
@@ -461,33 +459,3 @@ def _create_reverse_ping(self, pconf): interval = pconf.ping_interval, size = pconf.ping_psize, )
- @property
- def disable_turboboost_host_list(self):
"""
The `disable_turboboost_host_list` property value is the list of all
matched hosts for the recipe. If a specific recipe needs to change
this it should override the :any:`baremetal_hosts` property.
For detailed explanation of this property see
:any:`DisableTurboboostMixin` and
:any:`DisableTurboboostMixin.disable_turboboost_host_list`.
"""
return self.baremetal_hosts
- @property
- def disable_idlestates_host_list(self):
"""
The `disable_idlestates_host_list` property value is the list of all
matched hosts for the recipe. If a specific recipe needs to change
this it should override the :any:`baremetal_hosts` property.
For detailed explanation of this property see
:any:`DisableIdleStatesMixin` and
:any:`DisableIdleStatesMixin.disable_idlestates_host_list`.
"""
return self.baremetal_hosts
- @property
- def baremetal_hosts(self):
return self.matched
diff --git a/lnst/Recipes/ENRT/VirtualEnrtRecipe.py b/lnst/Recipes/ENRT/VirtualEnrtRecipe.py index 82d6e3a..d706815 100644 --- a/lnst/Recipes/ENRT/VirtualEnrtRecipe.py +++ b/lnst/Recipes/ENRT/VirtualEnrtRecipe.py @@ -26,3 +26,27 @@ class VirtualEnrtRecipe( @property def hypervisor_hosts(self): return set([self.matched.host1, self.matched.host2])
- @property
- def disable_idlestates_host_list(self):
"""
The `disable_idlestates_host_list` property value is the list of all
matched baremetal hosts for the recipe.
For detailed explanation of this property see
:any:`DisableIdleStatesMixin` and
:any:`DisableIdleStatesMixin.disable_idlestates_host_list`.
"""
return self.hypervisor_hosts
- @property
- def disable_turboboost_host_list(self):
"""
The `disable_turboboost_host_list` property value is the list of all
matched baremetal hosts for the recipe.
For detailed explanation of this property see
:any:`DisableTurboboostMixin` and
:any:`DisableTurboboostMixin.disable_turboboost_host_list`.
"""
return self.hypervisor_hosts
-- 2.30.0 _______________________________________________ LNST-developers mailing list -- lnst-developers@lists.fedorahosted.org To unsubscribe send an email to lnst-developers-leave@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/lnst-developers@lists.fedorahos...
Both patches look good.
Acked-by: Jan Tluka jtluka@redhat.com
pushed.
-Ondrej
On Fri, Jan 22, 2021 at 11:48:49AM +0100, olichtne@redhat.com wrote:
From: Ondrej Lichtner olichtne@redhat.com
Because the mixin classes for idlestates and turboboost disabling were moved to be inherited into the Baremetal and Virtual enrtrecipes base classes, the host list definition in BaseEnrtRecipe was being overriden by the higher placed base definition in the original mixin classes like this:
SimpleNetworkRecipe -> Mixin -> BaseEnrtRecipe
The base definition of the "host_list" just returns [], and doesn't call super so the definition from BaseEnrtRecipe was never called. This effectively disabled the mixins in all the enrt recipes that previously used them.
Moving these to the new base classes of BaremetalEnrtRecipe and VirtualEnrtRecipe fixes the issue.
Signed-off-by: Ondrej Lichtner olichtne@redhat.com
lnst-developers@lists.fedorahosted.org