You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#370 added support of remote conditional wait. However, due to limitations of LNST, having condition class in the same file as recipe is not supported.
The file with definition of class is transferred to agent and then loaded. However, its' imports are loaded from Agent._dynamic_modules (Agent.load_chached_module method) which contains only files that have been already transferred using this mechanism so if recipe uses an module, that haven't been transferred to agent, it crashes.
Reproducing patch:
diff --git a/lnst/Recipes/ENRT/ConfigMixins/LongLivedConnectionsMixin.py b/lnst/Recipes/ENRT/ConfigMixins/LongLivedConnectionsMixin.py
index 81e76a97..91a9febe 100644
--- a/lnst/Recipes/ENRT/ConfigMixins/LongLivedConnectionsMixin.py
+++ b/lnst/Recipes/ENRT/ConfigMixins/LongLivedConnectionsMixin.py
@@ -10,6 +10,13 @@ from lnst.Common.Parameters import IPv4NetworkParam, IPv6NetworkParam
from lnst.Common.conditions.WaitForEstablishedConnections import (
WaitForEstablishedConnections,
)
+from lnst.Common.conditions.WaitForConditionModule import WaitForConditionModule
+
+
+class DummyCondition(WaitForConditionModule):
+ def _condition(self):
+ return True
+
class LongLivedConnectionsMixin:
@@ -49,6 +56,8 @@ class LongLivedConnectionsMixin:
host1.eth0.keep_addrs_on_down()
host2.eth0.keep_addrs_on_down()
+ host1.wait_for_condition(DummyCondition())
+
config = super().test_wide_configuration()
# L4 can address up to 65535 ports (size of addresable space
# defined in long_lived_conns_per_ip) Therefore opening connections
The text was updated successfully, but these errors were encountered:
#370 added support of remote conditional wait. However, due to limitations of LNST, having condition class in the same file as recipe is not supported.
The remote agent process crashes with exception:
The file with definition of class is transferred to agent and then loaded. However, its' imports are loaded from
Agent._dynamic_modules
(Agent.load_chached_module
method) which contains only files that have been already transferred using this mechanism so if recipe uses an module, that haven't been transferred to agent, it crashes.Reproducing patch:
The text was updated successfully, but these errors were encountered: