[lnst] Incorrect mode for file reading
by Jiří Pírko
commit fc1bcfcfa7f012b8369d6b59438dc12ef2410fec
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Mon Feb 4 16:38:40 2013 +0100
Incorrect mode for file reading
Incorrect mode for file reading was specified for files to be copied to
slaves. We need only 'read,binary' mode.
Using current mode results in crash of the controller when run by
ordinary non-root user because such user does not have modify access rights
for the files in /usr/share.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
lnst/Controller/NetTestController.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lnst/Controller/NetTestController.py b/lnst/Controller/NetTestController.py
index 042d197..df22a07 100644
--- a/lnst/Controller/NetTestController.py
+++ b/lnst/Controller/NetTestController.py
@@ -584,7 +584,7 @@ class NetTestController:
def _copy_to_slave(self, local_path, machine_id, remote_path=None):
remote_path = self._rpc_call(machine_id, "start_copy_to", remote_path)
- f = open(local_path, "r+b")
+ f = open(local_path, "rb")
while True:
data = f.read(1024*1024) # 1MB buffer
11 years, 2 months
[PATCH] Incorrect mode for file reading
by Jan Tluka
Incorrect mode for file reading was specified for files to be copied to
slaves. We need only 'read,binary' mode.
Using current mode results in crash of the controller when run by
ordinary non-root user because such user does not have modify access rights
for the files in /usr/share.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst/Controller/NetTestController.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lnst/Controller/NetTestController.py b/lnst/Controller/NetTestController.py
index 042d197..df22a07 100644
--- a/lnst/Controller/NetTestController.py
+++ b/lnst/Controller/NetTestController.py
@@ -584,7 +584,7 @@ class NetTestController:
def _copy_to_slave(self, local_path, machine_id, remote_path=None):
remote_path = self._rpc_call(machine_id, "start_copy_to", remote_path)
- f = open(local_path, "r+b")
+ f = open(local_path, "rb")
while True:
data = f.read(1024*1024) # 1MB buffer
--
1.7.7.6
11 years, 2 months
[lnst] slave: Don't crash when lnst-setup.sh is missing
by Jiří Pírko
commit ba90a608f6a6c0d5c2a0245a90d233f36fb05491
Author: Radek Pazdera <rpazdera(a)redhat.com>
Date: Mon Feb 4 14:35:39 2013 +0100
slave: Don't crash when lnst-setup.sh is missing
lnst-slave crashed with exception if the init script file was missing.
This patch adds a check and only prints a warning, that the init was
skipped.
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
lnst/Common/ResourceCache.py | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/lnst/Common/ResourceCache.py b/lnst/Common/ResourceCache.py
index 9563d8c..a4ab955 100644
--- a/lnst/Common/ResourceCache.py
+++ b/lnst/Common/ResourceCache.py
@@ -17,6 +17,8 @@ import shutil
from lnst.Common.Utils import md5sum
from lnst.Common.ExecCmd import exec_cmd
+SETUP_SCRIPT_NAME = "lnst-setup.sh"
+
class ResourceCacheError(Exception):
pass
@@ -107,7 +109,13 @@ class ResourceCache(object):
tools_dir = "%s/%s" % (entry_dir, filename)
exec_cmd("tar xjmf \"%s\" -C \"%s\"" % (entry_path, entry_dir))
- exec_cmd("cd \"%s\" && ./lnst-setup.sh" % tools_dir)
+
+ if os.path.exists("%s/%s" % (tools_dir, SETUP_SCRIPT_NAME)):
+ exec_cmd("cd \"%s\" && ./%s" % (tools_dir, SETUP_SCRIPT_NAME))
+ else:
+ msg = "%s not found in %s tools, skipping initialization." % \
+ (SETUP_SCRIPT_NAME, entry_name)
+ logging.warn(msg)
entry = {"type": entry_type, "name": entry_name,
"last_used": int(time.time()),
11 years, 2 months
[lnst] setup.py: Adding missing file from multicast tools
by Jiří Pírko
commit 30a029463193a25aaf46f40a564c3d3142fe82b9
Author: Radek Pazdera <rpazdera(a)redhat.com>
Date: Mon Feb 4 14:35:04 2013 +0100
setup.py: Adding missing file from multicast tools
File 'lnst-setup.sh' from the multicast tools was missing in the
lnst-ctl pagkage for Fedora. As it turns out, it wasn't listed in the
python's setup script that is used to install.
This patch adds it there.
Reported-by: Jan Tluka <jtluka(a)redhat.com>
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
setup.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/setup.py b/setup.py
index 9954bbf..a401ccc 100755
--- a/setup.py
+++ b/setup.py
@@ -113,6 +113,7 @@ TEST_MODULES = [
MULTICAST_TEST_TOOLS = [
(CTL_TOOLS_LOCATIONS + "multicast",
["test_tools/multicast/igmp_utils.h",
+ "test_tools/multicast/lnst-setup.sh",
"test_tools/multicast/Makefile",
"test_tools/multicast/multicast_utils.h",
"test_tools/multicast/parameters_igmp.h",
11 years, 2 months
[PATCH] slave: Don't crash when lnst-setup.sh is missing
by Radek Pazdera
lnst-slave crashed with exception if the init script file was missing.
This patch adds a check and only prints a warning, that the init was
skipped.
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
---
lnst/Common/ResourceCache.py | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/lnst/Common/ResourceCache.py b/lnst/Common/ResourceCache.py
index 9563d8c..a4ab955 100644
--- a/lnst/Common/ResourceCache.py
+++ b/lnst/Common/ResourceCache.py
@@ -17,6 +17,8 @@ import shutil
from lnst.Common.Utils import md5sum
from lnst.Common.ExecCmd import exec_cmd
+SETUP_SCRIPT_NAME = "lnst-setup.sh"
+
class ResourceCacheError(Exception):
pass
@@ -107,7 +109,13 @@ class ResourceCache(object):
tools_dir = "%s/%s" % (entry_dir, filename)
exec_cmd("tar xjmf \"%s\" -C \"%s\"" % (entry_path, entry_dir))
- exec_cmd("cd \"%s\" && ./lnst-setup.sh" % tools_dir)
+
+ if os.path.exists("%s/%s" % (tools_dir, SETUP_SCRIPT_NAME)):
+ exec_cmd("cd \"%s\" && ./%s" % (tools_dir, SETUP_SCRIPT_NAME))
+ else:
+ msg = "%s not found in %s tools, skipping initialization." % \
+ (SETUP_SCRIPT_NAME, entry_name)
+ logging.warn(msg)
entry = {"type": entry_type, "name": entry_name,
"last_used": int(time.time()),
--
1.7.7.6
11 years, 2 months
[PATCH] setup.py: Adding missing file from multicast tools
by Radek Pazdera
File 'lnst-setup.sh' from the multicast tools was missing in the
lnst-ctl pagkage for Fedora. As it turns out, it wasn't listed in the
python's setup script that is used to install.
This patch adds it there.
Reported-by: Jan Tluka <jtluka(a)redhat.com>
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
---
setup.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/setup.py b/setup.py
index 9954bbf..a401ccc 100755
--- a/setup.py
+++ b/setup.py
@@ -113,6 +113,7 @@ TEST_MODULES = [
MULTICAST_TEST_TOOLS = [
(CTL_TOOLS_LOCATIONS + "multicast",
["test_tools/multicast/igmp_utils.h",
+ "test_tools/multicast/lnst-setup.sh",
"test_tools/multicast/Makefile",
"test_tools/multicast/multicast_utils.h",
"test_tools/multicast/parameters_igmp.h",
--
1.7.7.6
11 years, 2 months
Nice project
by Bill Peck
Hello Everyone,
I've looked over the documentation but I don't see how to specify
machines and interfaces based on the driver. For example, say I want to
do some netperf tests between bnx2x and tg3. Would I be able to specify
that in the recipe xml? Or would I have to know that system A has the
bnx2x and system B has tg3?
Thanks!
11 years, 2 months