[lnst trac] #47: lnst-slave crashes on modules/tools sync with ctl
by fedora-badges
#47: lnst-slave crashes on modules/tools sync with ctl
------------------------+-------------------------------------------------
Reporter: rpazdera | Owner: somebody
Type: defect | Status: new
Priority: major | Milestone: Push LNST as a package into Fedora
Component: component1 | Version:
Keywords: | Blocked By:
Blocking: |
------------------------+-------------------------------------------------
lnst-slave will crash when it tries to write data data to cache and a
directory with the respective name already exists. This can happen for
instance when lnst-slave was interrupted in the middle of the file
transfer from ctl to cache in a previous run (and therefore the index was
not committed properly).
The expected behaviour is to remove any unexpected data from cache and
continue loading new files WITHOUT a crash :).
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/47>
lnst <https://fedorahosted.org/lnst/>
Linux Network Stack Test
10 years, 12 months
[PATCH] nettestrecipe renaming to lnstrecipe
by Ondrej Lichtner
From: Ondrej Lichtner <olichtne(a)redhat.com>
This patch renames the nettestrecipe tag to lnstrecipe as we discussed
in the meeting. I also renamed the corresponding method in
NetTestParse.py so that it reflects this change.
Please remember to change your custom recipes to reflect this change as
the old recipes will not work after application of this patch.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Controller/NetTestParse.py | 8 ++++----
recipes/examples/quick_guides/ping_check.xml | 4 ++--
recipes/multicast/multicast-all.xml | 4 ++--
recipes/team/recipex_ab_001.xml | 4 ++--
recipes/team/recipex_ab_002.xml | 4 ++--
recipes/team/recipex_ab_003.xml | 4 ++--
recipes/team/recipex_ab_004.xml | 4 ++--
recipes/team/recipex_bcast_001.xml | 4 ++--
recipes/team/recipex_bcast_002.xml | 4 ++--
recipes/team/recipex_bcast_003.xml | 4 ++--
recipes/team/recipex_bcast_004.xml | 4 ++--
recipes/team/recipex_lacp_001.xml | 4 ++--
recipes/team/recipex_lacp_002.xml | 4 ++--
recipes/team/recipex_lacp_003.xml | 4 ++--
recipes/team/recipex_lacp_004.xml | 4 ++--
recipes/team/recipex_lacp_act_001.xml | 4 ++--
recipes/team/recipex_lacp_act_002.xml | 4 ++--
recipes/team/recipex_lacp_act_003.xml | 4 ++--
recipes/team/recipex_lacp_act_004.xml | 4 ++--
recipes/team/recipex_lb_001.xml | 4 ++--
recipes/team/recipex_lb_002.xml | 4 ++--
recipes/team/recipex_lb_003.xml | 4 ++--
recipes/team/recipex_lb_004.xml | 4 ++--
recipes/team/recipex_lb_act_001.xml | 4 ++--
recipes/team/recipex_lb_act_002.xml | 4 ++--
recipes/team/recipex_lb_act_003.xml | 4 ++--
recipes/team/recipex_lb_act_004.xml | 4 ++--
recipes/team/recipex_rr_001.xml | 4 ++--
recipes/team/recipex_rr_002.xml | 4 ++--
recipes/team/recipex_rr_003.xml | 4 ++--
recipes/team/recipex_rr_004.xml | 4 ++--
recipes/team/recipey_ab_lw_001.xml | 4 ++--
recipes/team/recipey_ab_lw_002.xml | 4 ++--
recipes/team/recipey_ab_lw_003.xml | 4 ++--
recipes/team/recipey_ab_lw_004.xml | 4 ++--
recipes/team/recipey_ab_lw_005.xml | 4 ++--
recipes/team/recipey_ab_lw_006.xml | 4 ++--
recipes/team/recipey_ab_lw_007.xml | 4 ++--
recipes/team/recipey_ab_lw_008.xml | 4 ++--
recipes/team/recipey_lacp_act_flows.xml | 4 ++--
recipes/team/recipey_lacp_hashes.xml | 4 ++--
recipes/team/recipey_lacp_passive.xml | 4 ++--
recipes/team/recipey_lacp_slowrate.xml | 4 ++--
recipes/team/recipey_lb_act_flows.xml | 4 ++--
recipes/team/recipey_lb_hashes.xml | 4 ++--
recipes/team/recipey_rr_queue_mapping.xml | 4 ++--
46 files changed, 94 insertions(+), 94 deletions(-)
diff --git a/lnst/Controller/NetTestParse.py b/lnst/Controller/NetTestParse.py
index 2f77284..3a24faf 100644
--- a/lnst/Controller/NetTestParse.py
+++ b/lnst/Controller/NetTestParse.py
@@ -82,13 +82,13 @@ class FirstPass(RecipeParser):
self._recipe["provisioning"]["setup_requirements"] = {}
if node.nodeType == node.DOCUMENT_NODE:
- scheme = {"nettestrecipe": self._nettestrecipe}
+ scheme = {"lnstrecipe": self._lnstrecipe}
self._process_child_nodes(node, scheme,
default_handler=self._ignore_tag)
else:
raise XmlProcessingError("Passed object is not a XML document")
- def _nettestrecipe(self, node, params):
+ def _lnstrecipe(self, node, params):
scheme = {"machines": self._machines}
self._process_child_nodes(node, scheme,
default_handler=self._ignore_tag)
@@ -146,12 +146,12 @@ class SecondPass(RecipeParser):
def parse(self, xml_dom):
if xml_dom.nodeType == xml_dom.DOCUMENT_NODE:
- scheme = {"nettestrecipe": self._nettestrecipe}
+ scheme = {"lnstrecipe": self._lnstrecipe}
self._process_child_nodes(xml_dom, scheme)
else:
raise XmlProcessingError("Passed object is not a XML document")
- def _nettestrecipe(self, node, params):
+ def _lnstrecipe(self, node, params):
scheme = {"machines": self._machines,
"switches": self._switches,
"command_sequence": self._command_sequence}
diff --git a/recipes/examples/quick_guides/ping_check.xml b/recipes/examples/quick_guides/ping_check.xml
index 9a0022c..64e2fa3 100644
--- a/recipes/examples/quick_guides/ping_check.xml
+++ b/recipes/examples/quick_guides/ping_check.xml
@@ -4,7 +4,7 @@ is available on LNST wiki page:
https://fedorahosted.org/lnst/wiki/QuickGuides/QuickGuidePingCheck
-->
-<nettestrecipe>
+<lnstrecipe>
<machines>
<machine id="testmachine1">
<machineconfig>
@@ -53,4 +53,4 @@ is available on LNST wiki page:
</options>
</command>
</command_sequence>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/multicast/multicast-all.xml b/recipes/multicast/multicast-all.xml
index cd8da19..bdd22d7 100644
--- a/recipes/multicast/multicast-all.xml
+++ b/recipes/multicast/multicast-all.xml
@@ -1,5 +1,5 @@
<!-- Execute all tests for multicast -->
-<nettestrecipe>
+<lnstrecipe>
<!-- Change these parameters to match your test environment setup -->
<define>
<alias name="hostname1" value="192.168.122.11"/>
@@ -67,4 +67,4 @@
<command_sequence source="cmd_sequences/multicast/ttl.xml"/>
<command_sequence source="cmd_sequences/multicast/loop.xml"/>
<command_sequence source="cmd_sequences/multicast/simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_ab_001.xml b/recipes/team/recipex_ab_001.xml
index 0176df1..f329131 100644
--- a/recipes/team/recipex_ab_001.xml
+++ b/recipes/team/recipex_ab_001.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_ping_simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_ab_002.xml b/recipes/team/recipex_ab_002.xml
index aec1644..f4c954d 100644
--- a/recipes/team/recipex_ab_002.xml
+++ b/recipes/team/recipex_ab_002.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -33,4 +33,4 @@
<command_sequence source="../multicast/cmd_sequences/ttl.xml"/>
<command_sequence source="../multicast/cmd_sequences/loop.xml"/>
<command_sequence source="../multicast/cmd_sequences/simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_ab_003.xml b/recipes/team/recipex_ab_003.xml
index 7796ec9..97b62ef 100644
--- a/recipes/team/recipex_ab_003.xml
+++ b/recipes/team/recipex_ab_003.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_pktgen.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_ab_004.xml b/recipes/team/recipex_ab_004.xml
index d74113e..70727e3 100644
--- a/recipes/team/recipex_ab_004.xml
+++ b/recipes/team/recipex_ab_004.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_iperf.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_bcast_001.xml b/recipes/team/recipex_bcast_001.xml
index 7e10cbc..6eea76d 100644
--- a/recipes/team/recipex_bcast_001.xml
+++ b/recipes/team/recipex_bcast_001.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_ping_simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_bcast_002.xml b/recipes/team/recipex_bcast_002.xml
index ad3e893..d1b352c 100644
--- a/recipes/team/recipex_bcast_002.xml
+++ b/recipes/team/recipex_bcast_002.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -33,4 +33,4 @@
<command_sequence source="../multicast/cmd_sequences/ttl.xml"/>
<command_sequence source="../multicast/cmd_sequences/loop.xml"/>
<command_sequence source="../multicast/cmd_sequences/simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_bcast_003.xml b/recipes/team/recipex_bcast_003.xml
index acaad20..2874a81 100644
--- a/recipes/team/recipex_bcast_003.xml
+++ b/recipes/team/recipex_bcast_003.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_pktgen.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_bcast_004.xml b/recipes/team/recipex_bcast_004.xml
index b857b99..2f34a26 100644
--- a/recipes/team/recipex_bcast_004.xml
+++ b/recipes/team/recipex_bcast_004.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_iperf.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lacp_001.xml b/recipes/team/recipex_lacp_001.xml
index 3e70ece..fe116ed 100644
--- a/recipes/team/recipex_lacp_001.xml
+++ b/recipes/team/recipex_lacp_001.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_ping_simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lacp_002.xml b/recipes/team/recipex_lacp_002.xml
index ddae1d0..189b22e 100644
--- a/recipes/team/recipex_lacp_002.xml
+++ b/recipes/team/recipex_lacp_002.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -33,4 +33,4 @@
<command_sequence source="../multicast/cmd_sequences/ttl.xml"/>
<command_sequence source="../multicast/cmd_sequences/loop.xml"/>
<command_sequence source="../multicast/cmd_sequences/simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lacp_003.xml b/recipes/team/recipex_lacp_003.xml
index 82ba25f..130caad 100644
--- a/recipes/team/recipex_lacp_003.xml
+++ b/recipes/team/recipex_lacp_003.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_pktgen_lacp.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lacp_004.xml b/recipes/team/recipex_lacp_004.xml
index aae1ef8..758036c 100644
--- a/recipes/team/recipex_lacp_004.xml
+++ b/recipes/team/recipex_lacp_004.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_iperf.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lacp_act_001.xml b/recipes/team/recipex_lacp_act_001.xml
index 8fcbe2a..d48cbac 100644
--- a/recipes/team/recipex_lacp_act_001.xml
+++ b/recipes/team/recipex_lacp_act_001.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_ping_simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lacp_act_002.xml b/recipes/team/recipex_lacp_act_002.xml
index c338571..f4e5c6e 100644
--- a/recipes/team/recipex_lacp_act_002.xml
+++ b/recipes/team/recipex_lacp_act_002.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -33,4 +33,4 @@
<command_sequence source="../multicast/cmd_sequences/ttl.xml"/>
<command_sequence source="../multicast/cmd_sequences/loop.xml"/>
<command_sequence source="../multicast/cmd_sequences/simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lacp_act_003.xml b/recipes/team/recipex_lacp_act_003.xml
index a1bc09c..cfa62ea 100644
--- a/recipes/team/recipex_lacp_act_003.xml
+++ b/recipes/team/recipex_lacp_act_003.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_pktgen_lacp.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lacp_act_004.xml b/recipes/team/recipex_lacp_act_004.xml
index e3b5d05..26ee907 100644
--- a/recipes/team/recipex_lacp_act_004.xml
+++ b/recipes/team/recipex_lacp_act_004.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_iperf.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lb_001.xml b/recipes/team/recipex_lb_001.xml
index b680b4b..84f64c0 100644
--- a/recipes/team/recipex_lb_001.xml
+++ b/recipes/team/recipex_lb_001.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_ping_simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lb_002.xml b/recipes/team/recipex_lb_002.xml
index 2519716..9145b74 100644
--- a/recipes/team/recipex_lb_002.xml
+++ b/recipes/team/recipex_lb_002.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -33,4 +33,4 @@
<command_sequence source="../multicast/cmd_sequences/ttl.xml"/>
<command_sequence source="../multicast/cmd_sequences/loop.xml"/>
<command_sequence source="../multicast/cmd_sequences/simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lb_003.xml b/recipes/team/recipex_lb_003.xml
index 87c9538..dfab190 100644
--- a/recipes/team/recipex_lb_003.xml
+++ b/recipes/team/recipex_lb_003.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_pktgen.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lb_004.xml b/recipes/team/recipex_lb_004.xml
index e3a9632..3b84288 100644
--- a/recipes/team/recipex_lb_004.xml
+++ b/recipes/team/recipex_lb_004.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_iperf.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lb_act_001.xml b/recipes/team/recipex_lb_act_001.xml
index 24ec354..1efd3a7 100644
--- a/recipes/team/recipex_lb_act_001.xml
+++ b/recipes/team/recipex_lb_act_001.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_ping_simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lb_act_002.xml b/recipes/team/recipex_lb_act_002.xml
index bdc5e7e..37c7d0f 100644
--- a/recipes/team/recipex_lb_act_002.xml
+++ b/recipes/team/recipex_lb_act_002.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -33,4 +33,4 @@
<command_sequence source="../multicast/cmd_sequences/ttl.xml"/>
<command_sequence source="../multicast/cmd_sequences/loop.xml"/>
<command_sequence source="../multicast/cmd_sequences/simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lb_act_003.xml b/recipes/team/recipex_lb_act_003.xml
index 1383240..c28393d 100644
--- a/recipes/team/recipex_lb_act_003.xml
+++ b/recipes/team/recipex_lb_act_003.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_pktgen.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lb_act_004.xml b/recipes/team/recipex_lb_act_004.xml
index b436dc4..0cba207 100644
--- a/recipes/team/recipex_lb_act_004.xml
+++ b/recipes/team/recipex_lb_act_004.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_iperf.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_rr_001.xml b/recipes/team/recipex_rr_001.xml
index 7fde885..2b5b129 100644
--- a/recipes/team/recipex_rr_001.xml
+++ b/recipes/team/recipex_rr_001.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_ping_simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_rr_002.xml b/recipes/team/recipex_rr_002.xml
index e8caa42..cdf4611 100644
--- a/recipes/team/recipex_rr_002.xml
+++ b/recipes/team/recipex_rr_002.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -33,4 +33,4 @@
<command_sequence source="../multicast/cmd_sequences/ttl.xml"/>
<command_sequence source="../multicast/cmd_sequences/loop.xml"/>
<command_sequence source="../multicast/cmd_sequences/simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_rr_003.xml b/recipes/team/recipex_rr_003.xml
index c5fec2d..99b0d21 100644
--- a/recipes/team/recipex_rr_003.xml
+++ b/recipes/team/recipex_rr_003.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_pktgen.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipex_rr_004.xml b/recipes/team/recipex_rr_004.xml
index 299016e..4b379c2 100644
--- a/recipes/team/recipex_rr_004.xml
+++ b/recipes/team/recipex_rr_004.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_iperf.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipey_ab_lw_001.xml b/recipes/team/recipey_ab_lw_001.xml
index 36eb419..23a0e38 100644
--- a/recipes/team/recipey_ab_lw_001.xml
+++ b/recipes/team/recipey_ab_lw_001.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_ping_simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipey_ab_lw_002.xml b/recipes/team/recipey_ab_lw_002.xml
index 697addd..75e96b4 100644
--- a/recipes/team/recipey_ab_lw_002.xml
+++ b/recipes/team/recipey_ab_lw_002.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_ping_simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipey_ab_lw_003.xml b/recipes/team/recipey_ab_lw_003.xml
index e375ccf..fbe4446 100644
--- a/recipes/team/recipey_ab_lw_003.xml
+++ b/recipes/team/recipey_ab_lw_003.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_ping_simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipey_ab_lw_004.xml b/recipes/team/recipey_ab_lw_004.xml
index 885b31f..bb0b5d0 100644
--- a/recipes/team/recipey_ab_lw_004.xml
+++ b/recipes/team/recipey_ab_lw_004.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_ping_simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipey_ab_lw_005.xml b/recipes/team/recipey_ab_lw_005.xml
index 2fe4276..b3d507e 100644
--- a/recipes/team/recipey_ab_lw_005.xml
+++ b/recipes/team/recipey_ab_lw_005.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_ping_simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipey_ab_lw_006.xml b/recipes/team/recipey_ab_lw_006.xml
index c0bf973..e6380a9 100644
--- a/recipes/team/recipey_ab_lw_006.xml
+++ b/recipes/team/recipey_ab_lw_006.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_ping_simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipey_ab_lw_007.xml b/recipes/team/recipey_ab_lw_007.xml
index 170f3b0..32fe454 100644
--- a/recipes/team/recipey_ab_lw_007.xml
+++ b/recipes/team/recipey_ab_lw_007.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_ping_simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipey_ab_lw_008.xml b/recipes/team/recipey_ab_lw_008.xml
index 0b1b261..a3ed494 100644
--- a/recipes/team/recipey_ab_lw_008.xml
+++ b/recipes/team/recipey_ab_lw_008.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_ping_simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipey_lacp_act_flows.xml b/recipes/team/recipey_lacp_act_flows.xml
index 82c4166..0926aeb 100644
--- a/recipes/team/recipey_lacp_act_flows.xml
+++ b/recipes/team/recipey_lacp_act_flows.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_pktgen_flows.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipey_lacp_hashes.xml b/recipes/team/recipey_lacp_hashes.xml
index 8e648d6..aaf25e7 100644
--- a/recipes/team/recipey_lacp_hashes.xml
+++ b/recipes/team/recipey_lacp_hashes.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_pktgen_hashes.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipey_lacp_passive.xml b/recipes/team/recipey_lacp_passive.xml
index 5e88fdf..53f43a4 100644
--- a/recipes/team/recipey_lacp_passive.xml
+++ b/recipes/team/recipey_lacp_passive.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_ping_simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipey_lacp_slowrate.xml b/recipes/team/recipey_lacp_slowrate.xml
index 1daead2..6681bc2 100644
--- a/recipes/team/recipey_lacp_slowrate.xml
+++ b/recipes/team/recipey_lacp_slowrate.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_ping_simple.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipey_lb_act_flows.xml b/recipes/team/recipey_lb_act_flows.xml
index c2f6abd..ef02b4c 100644
--- a/recipes/team/recipey_lb_act_flows.xml
+++ b/recipes/team/recipey_lb_act_flows.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_pktgen_flows.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipey_lb_hashes.xml b/recipes/team/recipey_lb_hashes.xml
index 4180aa4..433ed06 100644
--- a/recipes/team/recipey_lb_hashes.xml
+++ b/recipes/team/recipey_lb_hashes.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_pktgen_hashes.xml"/>
-</nettestrecipe>
+</lnstrecipe>
diff --git a/recipes/team/recipey_rr_queue_mapping.xml b/recipes/team/recipey_rr_queue_mapping.xml
index 4250837..6893f9e 100644
--- a/recipes/team/recipey_rr_queue_mapping.xml
+++ b/recipes/team/recipey_rr_queue_mapping.xml
@@ -1,4 +1,4 @@
-<nettestrecipe>
+<lnstrecipe>
<machines>
<define>
<alias name="testip" value="192.168.111.1/24"/>
@@ -18,4 +18,4 @@
</machine>
</machines>
<command_sequence source="sequence_queue_mapping.xml"/>
-</nettestrecipe>
+</lnstrecipe>
--
1.7.11.7
11 years
[PATCH] PacketCapture: Making pcap dump files temporary
by Radek Pazdera
Due to problems with SELinux and a general reconsideration of packet
capture, this patch makes all the dumps saved temporary.
They will be transfered to the controller as soon as the recipe finishes
and removed imediately to avoid disk usage issues on slave side.
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
---
lnst/Controller/NetTestController.py | 11 +++++++----
lnst/Slave/NetTestSlave.py | 18 +++++++++++++-----
2 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/lnst/Controller/NetTestController.py b/lnst/Controller/NetTestController.py
index 1b3bad0..2e66b2a 100644
--- a/lnst/Controller/NetTestController.py
+++ b/lnst/Controller/NetTestController.py
@@ -501,7 +501,7 @@ class NetTestController:
for machine_id in self._recipe["machines"]:
hostname = self._recipe["machines"][machine_id]['info']['hostname']
- slave_logging_dir = os.path.join(logging_root, hostname)
+ slave_logging_dir = os.path.join(logging_root, hostname + "/")
try:
os.mkdir(slave_logging_dir)
except OSError as err:
@@ -511,11 +511,14 @@ class NetTestController:
raise NetTestError(msg)
capture_files = self._remote_capture_files[machine_id]
- for remote_path in capture_files:
- filename = os.path.basename(remote_path)
+ for dev_id, remote_path in capture_files.iteritems():
+ filename = "%s.pcap" % dev_id
local_path = os.path.join(slave_logging_dir, filename)
self._copy_from_slave(machine_id, remote_path, local_path)
+ logging.info("pcap files from machine %s stored at %s",
+ machine_id, slave_logging_dir)
+
def _update_system_config(self, machine_id, res_data, persistent=False):
info = self._get_machineinfo(machine_id)
system_config = info["system_config"]
@@ -589,7 +592,7 @@ class NetTestController:
status = self._rpc_call(machine_id, "start_copy_from", remote_path)
if not status:
raise NetTestError("The requested file cannot be transfered." \
- "It file does not exist on machine %d" % machine_id)
+ "It does not exist on machine %s" % machine_id)
local_file = open(local_path, "wb")
diff --git a/lnst/Slave/NetTestSlave.py b/lnst/Slave/NetTestSlave.py
index 4106f2d..4dc2d19 100644
--- a/lnst/Slave/NetTestSlave.py
+++ b/lnst/Slave/NetTestSlave.py
@@ -59,6 +59,7 @@ class NetTestSlaveXMLRPC:
self.clear_resource_table()
self._cache.del_old_entries()
self.reset_file_transfers()
+ self._remove_capture_files()
return "bye"
def get_new_logs(self):
@@ -110,14 +111,15 @@ class NetTestSlaveXMLRPC:
return self._netconfig.dump_config().items()
def start_packet_capture(self, filt):
- logging_dir = Logs.get_logging_root_path()
- logging_dir = os.path.abspath(logging_dir)
netconfig = self._netconfig.dump_config()
- files = []
+ files = {}
for dev_id, dev_spec in netconfig.iteritems():
- dump_file = os.path.join(logging_dir, "%s.pcap" % dev_id)
- files.append(dump_file)
+ df_handle = NamedTemporaryFile(delete=False)
+ dump_file = df_handle.name
+ df_handle.close()
+
+ files[dev_id] = dump_file
pcap = PacketCapture()
pcap.set_interface(dev_spec["name"])
@@ -127,6 +129,7 @@ class NetTestSlaveXMLRPC:
self._packet_captures[dev_id] = pcap
+ self._capture_files = files
return files
def stop_packet_capture(self):
@@ -137,6 +140,11 @@ class NetTestSlaveXMLRPC:
return True
+ def _remove_capture_files(self):
+ for name in self._capture_files.itervalues():
+ logging.debug("Removing temporary packet capture file %s", name)
+ os.unlink(name)
+
def run_command(self, command):
try:
cmd_cls = NetTestCommand(self._command_context, command,
--
1.7.7.6
11 years
[PATCH] configuration: Always load user configuration
by Radek Pazdera
User configuration was ignored when a config was found in the same
directory as the executable (we also call it the 'gitconfig').
This patch makes lnst-ctl read user configuration everytime. So we
don't have to modify the 'gitconfig' directly, but use the user
configuration instead.
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
---
lnst-ctl | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/lnst-ctl b/lnst-ctl
index 8504ae1..c15e9af 100755
--- a/lnst-ctl
+++ b/lnst-ctl
@@ -101,14 +101,15 @@ def main():
config.load_config(gitcfg)
else:
config.load_config('/etc/lnst-ctl.conf')
- usr_cfg = os.path.expanduser('~/.lnst/lnst-ctl.conf')
- if os.path.isfile(usr_cfg):
- config.load_config(usr_cfg)
- else:
- if not os.path.isdir(os.path.dirname(usr_cfg)):
- os.makedirs(os.path.dirname(usr_cfg))
- with open(usr_cfg, 'w') as f:
- f.write(config.dump_config())
+
+ usr_cfg = os.path.expanduser('~/.lnst/lnst-ctl.conf')
+ if os.path.isfile(usr_cfg):
+ config.load_config(usr_cfg)
+ else:
+ if not os.path.isdir(os.path.dirname(usr_cfg)):
+ os.makedirs(os.path.dirname(usr_cfg))
+ with open(usr_cfg, 'w') as f:
+ f.write(config.dump_config())
debug = 0
--
1.7.7.6
11 years
[PATCH] Logging fix bg processes
by Ondrej Lichtner
From: Ondrej Lichtner <olichtne(a)redhat.com>
Hi,
the following patch is a suggestion for a fix. Please test the functionality
first before actually applying it. The reason is that the fix works but it
brings with itself a compromise that logs from the background processes will
not be in their "correct" order in regards to logs from other parts of the
application.
Ondrej Lichtner (1):
Logging: fix for logs from bg processes
lnst/Common/LoggingHandler.py | 4 ++++
lnst/Common/NetTestCommand.py | 16 ++++++++++++++++
2 files changed, 20 insertions(+)
--
1.7.11.7
11 years
Struggling with SELinux
by Radek Pazdera
Hi!
I am looking into the problems we're having with selinux. And it's not
going well ...
Compiling and installing additional selinux policies in RPMs is *REALLY*
obscure (in my opinion). The problem is that tcpdump doesn't have the
right context to write to /var/log. We would have to allow it by
creating a policy derived from netutils_t and var_log_t (I am not even
sure I understand it properly at the moment).
I have seen some API for changing contexts of processes. Unfortunately,
it is C and python bindings are not included in Fedora.
I think that the best option for us is to just store the dump files
elsewhere. When I thought about it there are multiple reasons for this.
1. Problems with SELinux
2. The pcap dumps have a potential to grow very rapidly. At the moment,
we don't do any cleanup of the logs at all. Permanently storing such a
big files on slave machines in a seriously used pool would lead to a
full disk after a while anyway.
I think it will be better to write them to /tmp on slaves and discard
them when the recipe is over and they've been transfered to the
controller.
What do you think?
Radek
11 years
[lnst] Fix logging issue with python2.6
by Jiří Pírko
commit b14696c20c536b616d0eb62e0dc88b44f5856050
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Tue Nov 27 17:01:57 2012 +0100
Fix logging issue with python2.6
This patch fixes logging issue that caused that the logs for a recipe
were appended with content of further recipes in the test run. This
issue was seen only with python2.6. It's type() built-in function did
not worked properly and python documentation recommends to use isinstance()
instead. This issue was not seen with python2.7.
Also, in case of passing recipe directory the typo was discovered and
fixed, root_logger was incorrectly written as logger.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
lnst/Common/Logs.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/lnst/Common/Logs.py b/lnst/Common/Logs.py
index e9c33ea..799f5da 100644
--- a/lnst/Common/Logs.py
+++ b/lnst/Common/Logs.py
@@ -198,7 +198,7 @@ class Logs:
for logger in cls.loggers:
handlers = list(logger.handlers)
for handler in handlers:
- if type(handler) == logging.FileHandler:
+ if isinstance(handler, logging.FileHandler):
logger.removeHandler(handler)
cls.loggers = cls.loggers[:1]
@@ -242,8 +242,8 @@ class Logs:
handlers = list(root_logger.handlers)
for handler in handlers:
- if type(handler) == logging.FileHandler:
- logger.removeHandler(handler)
+ if isinstance(handler, logging.FileHandler):
+ root_logger.removeHandler(handler)
(file_debug, file_info) = cls._create_file_handler(cls.root_path)
root_logger.addHandler(file_debug)
11 years
[PATCH] Fix logging issue with python2.6
by Jan Tluka
This patch fixes logging issue that caused that the logs for a recipe
were appended with content of further recipes in the test run. This
issue was seen only with python2.6. It's type() built-in function did
not worked properly and python documentation recommends to use isinstance()
instead. This issue was not seen with python2.7.
Also, in case of passing recipe directory the typo was discovered and
fixed, root_logger was incorrectly written as logger.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst/Common/Logs.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lnst/Common/Logs.py b/lnst/Common/Logs.py
index e9c33ea..799f5da 100644
--- a/lnst/Common/Logs.py
+++ b/lnst/Common/Logs.py
@@ -198,7 +198,7 @@ class Logs:
for logger in cls.loggers:
handlers = list(logger.handlers)
for handler in handlers:
- if type(handler) == logging.FileHandler:
+ if isinstance(handler, logging.FileHandler):
logger.removeHandler(handler)
cls.loggers = cls.loggers[:1]
@@ -242,8 +242,8 @@ class Logs:
handlers = list(root_logger.handlers)
for handler in handlers:
- if type(handler) == logging.FileHandler:
- logger.removeHandler(handler)
+ if isinstance(handler, logging.FileHandler):
+ root_logger.removeHandler(handler)
(file_debug, file_info) = cls._create_file_handler(cls.root_path)
root_logger.addHandler(file_debug)
--
1.7.7.6
11 years
[lnst] NetTestController: check for running libvirtd
by Jiří Pírko
commit 2a0f57c89c3ba111a4c28c94e34aa1013d4d26c1
Author: Ondrej Lichtner <olichtne(a)redhat.com>
Date: Tue Nov 27 08:20:20 2012 +0100
NetTestController: check for running libvirtd
The controller now checks if the libvirt daemon is running and based on
this it decides if the MachinePool class should or shouldn't load
machine files that describe virtual machines.
There is also a minor change to the check_process_running function to
redirect the command output so that it isn't logged.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
lnst/Common/Utils.py | 3 ++-
lnst/Controller/MachinePool.py | 8 ++++++--
lnst/Controller/NetTestController.py | 10 ++++++++--
3 files changed, 16 insertions(+), 5 deletions(-)
---
diff --git a/lnst/Common/Utils.py b/lnst/Common/Utils.py
index 65d5902..b2315f8 100644
--- a/lnst/Common/Utils.py
+++ b/lnst/Common/Utils.py
@@ -152,7 +152,8 @@ def _is_newer_than(f, threshold):
def check_process_running(process_name):
try:
- proc = subprocess.check_call(["pgrep", process_name])
+ proc = subprocess.check_call(["pgrep", process_name],
+ stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
return True
except subprocess.CalledProcessError:
return False
diff --git a/lnst/Controller/MachinePool.py b/lnst/Controller/MachinePool.py
index 7ed6272..f70edcb 100644
--- a/lnst/Controller/MachinePool.py
+++ b/lnst/Controller/MachinePool.py
@@ -33,7 +33,10 @@ class MachinePool:
_machine_matches = []
_network_matches = []
- def __init__(self, pool_dirs):
+ _allow_virtual = False
+
+ def __init__(self, pool_dirs, allow_virtual=False):
+ self._allow_virtual = allow_virtual
for pool_dir in pool_dirs:
self.add_dir(pool_dir)
@@ -62,7 +65,8 @@ class MachinePool:
machine["dom_node_ref"] = machineconfig
parser.parse(machineconfig)
- self._pool[machine_id] = machine
+ if 'libvirt_domain' not in machine['info'] or self._allow_virtual:
+ self._pool[machine_id] = machine
def provision_setup(self, setup_requirements):
"""
diff --git a/lnst/Controller/NetTestController.py b/lnst/Controller/NetTestController.py
index 1b3bad0..5e899be 100644
--- a/lnst/Controller/NetTestController.py
+++ b/lnst/Controller/NetTestController.py
@@ -25,6 +25,7 @@ from lnst.Common.XmlRpc import ServerProxy, ServerException
from lnst.Common.NetUtils import MacPool
from lnst.Common.VirtUtils import VirtNetCtl, VirtDomainCtl, BridgeCtl
from lnst.Common.Utils import wait_for, md5sum, dir_md5sum, create_tar_archive
+from lnst.Common.Utils import check_process_running
from lnst.Common.NetTestCommand import NetTestCommandContext, NetTestCommand
from lnst.Common.NetTestCommand import str_command
from lnst.Controller.NetTestParse import NetTestParse
@@ -44,8 +45,13 @@ class NetTestController:
self._remote_capture_files = {}
self._config = config
self._log_root_path = Logs.get_logging_root_path()
- self._machine_pool = MachinePool(config.get_option('environment',
- 'pool_dirs'))
+
+ if check_process_running("libvirtd"):
+ self._machine_pool = MachinePool(config.get_option('environment',
+ 'pool_dirs'), allow_virtual=True)
+ else:
+ self._machine_pool = MachinePool(config.get_option('environment',
+ 'pool_dirs'), allow_virtual=False)
self._recipe = {}
definitions = {"recipe": self._recipe}
11 years
[lnst] NetTestSlave: check if NetworkManager is running
by Jiří Pírko
commit 86fa1afe97381a95940b80225b104133603a813e
Author: Ondrej Lichtner <olichtne(a)redhat.com>
Date: Tue Nov 27 08:20:19 2012 +0100
NetTestSlave: check if NetworkManager is running
This commit adds function check_process_running that checks if there is
a process with a specified name running on the system.
This function is then used in the slaves rpc method hello() to check if
NetworkManager is running. NetworkManager is know for causing problem s
during automatic network testing when he interferes with the testing
network interfaces. The slave now logs a warning message to point out
these potential problems.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
lnst/Common/Utils.py | 8 ++++++++
lnst/Slave/NetTestSlave.py | 7 +++++++
2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/lnst/Common/Utils.py b/lnst/Common/Utils.py
index 00f7428..65d5902 100644
--- a/lnst/Common/Utils.py
+++ b/lnst/Common/Utils.py
@@ -15,6 +15,7 @@ import re
import os
import hashlib
import tempfile
+import subprocess
from lnst.Common.ExecCmd import exec_cmd
def die_when_parent_die():
@@ -148,3 +149,10 @@ def has_changed_since(filepath, threshold):
def _is_newer_than(f, threshold):
stat = os.stat(f)
return stat.st_mtime > threshold
+
+def check_process_running(process_name):
+ try:
+ proc = subprocess.check_call(["pgrep", process_name])
+ return True
+ except subprocess.CalledProcessError:
+ return False
diff --git a/lnst/Slave/NetTestSlave.py b/lnst/Slave/NetTestSlave.py
index 4106f2d..9d3a9d8 100644
--- a/lnst/Slave/NetTestSlave.py
+++ b/lnst/Slave/NetTestSlave.py
@@ -28,6 +28,7 @@ from lnst.Common.NetTestCommand import NetTestCommandContext
from lnst.Common.NetTestCommand import CommandException, NetTestCommand
from lnst.Slave.NetConfig import NetConfig
from lnst.Slave.NetConfigDevice import NetConfigDeviceAllCleanup
+from lnst.Common.Utils import check_process_running
DefaultRPCPort = 9999
@@ -53,6 +54,12 @@ class NetTestSlaveXMLRPC:
self.clear_resource_table()
self._cache.del_old_entries()
self.reset_file_transfers()
+
+ if check_process_running("NetworkManager"):
+ logging.error("=============================================")
+ logging.error("NetworkManager is running on a slave machine!")
+ logging.error("This might effect test results!")
+ logging.error("=============================================")
return "hello"
def bye(self):
11 years