[lnst trac] #13: Controller Configuration Directory
by fedora-badges
#13: Controller Configuration Directory
-------------------------+-----------------------
Reporter: rpazdera | Owner: somebody
Type: enhancement | Status: new
Priority: major | Milestone:
Component: component1 | Version:
Keywords: | Blocked By:
Blocking: #10 |
-------------------------+-----------------------
We'd like to have a support for configuration through a directory
available from multiple places on the controller machine. The purpose of
this is to store lab-specific controller resources configuration and
settings.
The structure should be following:
- .lnst/pool.d/ - drop-in pool of test machines that are available to the
controller. It should contain *.xml files with machine configs.
- ./lnst/conf - controller specific configuration values, such as address
ranges, etc. Format of this file remains undecided yet (we need to discuss
this further), but it should XML.
LNST will look for the '~/.lnst' dir in with higher priority and then in
'/etc/lnst'. LNST can be run completely without configuration. In these
cases warning should be printed and some default values used.
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/13>
lnst <http://example.org/>
My example project
10 years, 11 months
[lnst trac] #10: Machine pool at controller
by fedora-badges
#10: Machine pool at controller
-------------------------+-----------------------
Reporter: rpazdera | Owner: somebody
Type: enhancement | Status: new
Priority: major | Milestone:
Component: component1 | Version:
Keywords: | Blocked By:
Blocking: |
-------------------------+-----------------------
We discussed an idea concerning recipe execution today. Now you always
need to change some parameters of the recipe in case you want to run it on
a different set of test machines (which kinda sucks).
Jirka proposed, that we could have a local static configuration at each
controller, that would define a pool of available netmachineconfigs. Those
configs would be then
matched against some defined requirements for machines in the recipes and
allocated
for tests.
This would also solve the not-very-pretty <libvirt_create> tag, because it
would be abstracted within the pool. If there is a virtual machine in the
pool, the interfaces could be created automatically without any other
markup.
I thought about the pool and it could be a drop-in configuration directory
with netmachineconfig xmls. This approach would require a minimum of new
code. For instance a pool could look like this:
{{{
/etc/lnst.conf # ini or XML file with some general
# controller specific configuration
# like RPC ports, available IP/MAC addr ranges
/etc/lnst.pool.d/ # the drop-in netmachineconfig pool
/etc/lnst.pool.d/f14-peanut.xml # physical netmachineconfig
/etc/lnst.pool.d/RHEL6-clone.xml # virtual one
}}}
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/10>
lnst <http://example.org/>
My example project
10 years, 11 months
[lnst trac] #15: Matching Algorithm for MachineConfig Templates
by fedora-badges
#15: Matching Algorithm for MachineConfig Templates
-------------------------+-----------------------
Reporter: rpazdera | Owner: somebody
Type: enhancement | Status: new
Priority: major | Milestone:
Component: component1 | Version:
Keywords: | Blocked By:
Blocking: #10 |
-------------------------+-----------------------
We will need to implement an algorithm for matching machineconfig
templates against machines within the controller pool.
We outlined it already at the meeting.
It will also be necessary to finalize the set of parameters on which the
templates will be matched (for instance, available interfaces and
connections, operating system version, kernel version, internet access,
hardware requirements, specific driver requirements etc.).
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/15>
lnst <http://example.org/>
My example project
10 years, 11 months
[lnst trac] #14: Support for machineconfig templates in NetTestParse
by fedora-badges
#14: Support for machineconfig templates in NetTestParse
-------------------------+-----------------------
Reporter: rpazdera | Owner: somebody
Type: enhancement | Status: new
Priority: major | Milestone:
Component: component1 | Version:
Keywords: | Blocked By:
Blocking: #10 |
-------------------------+-----------------------
NetTestParse class will require some modifications in order to make it
work together with the templates.
New bool attribute 'template' should be added to the tag to indicate
whether the config is complete or it's just a template request for a
machine in the controller pool.
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/14>
lnst <http://example.org/>
My example project
10 years, 11 months
[lnst] #5: Controller/Slaves check sequence
by fedora-badges
#5: Controller/Slaves check sequence
-------------------------+-------------------------
Reporter: rpazdera | Owner: rpazdera@…
Type: enhancement | Status: new
Priority: major | Milestone:
Component: component1 | Version:
Keywords: | Blocked By:
Blocking: |
-------------------------+-------------------------
Common failure of LNST recipe setups is caused by NetworkManager or
iptables enabled on slave machines. We could introduce some sort of
checking mechanism that would emit warning in case someone's running lnst
along with these applications.
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/5>
lnst <http://example.org/>
My example project
11 years
[lnst trac] #16: Logs: change location
by fedora-badges
#16: Logs: change location
-------------------------+-----------------------
Reporter: olichtne | Owner: olichtne
Type: enhancement | Status: new
Priority: minor | Milestone:
Component: component1 | Version:
Keywords: | Blocked By:
Blocking: |
-------------------------+-----------------------
On our previous meeting we discussed that logs should be relocated to a
more sensible location.
We agreed that something like /var/log/lnst/ would be best.
In the future when the implementation of configuration files is complete
we could add an option that can change the location of log files.
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/16>
lnst <http://example.org/>
My example project
11 years
[lnst trac] #17: Net addresses verification
by fedora-badges
#17: Net addresses verification
-------------------------+-----------------------
Reporter: rpazdera | Owner: somebody
Type: enhancement | Status: new
Priority: minor | Milestone:
Component: component1 | Version:
Keywords: | Blocked By:
Blocking: |
-------------------------+-----------------------
We could use some functions for inet and hwaddr format validation. The
addresses are almost always user input and that should be checked.
We will also need it in the new Config parsing code.
It could be added to the NetUtils module in Common.
--
Ticket URL: <https://fedorahosted.org/lnst/ticket/17>
lnst <http://example.org/>
My example project
11 years
[lnst] NetTest: Adding MachinePool module
by Jiří Pírko
commit 28b5f16bb69dbc0a4915360b343a2415eeaa26a9
Author: Radek Pazdera <rpazdera(a)redhat.com>
Date: Thu Aug 30 15:02:42 2012 +0200
NetTest: Adding MachinePool module
This commit introduces MachinePool into NetTestController.
MachinePool will be responsible for managing local machine configs
at controller. NetTestController will search for available configs
on startup and then be able to use the machines for testing. Template
matching of test setups against the pool should be done in the future.
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
NetTest/MachinePool.py | 61 ++++++++++++++++++++++++++++++++++++++++++
NetTest/NetTestController.py | 3 ++
2 files changed, 64 insertions(+), 0 deletions(-)
---
diff --git a/NetTest/MachinePool.py b/NetTest/MachinePool.py
new file mode 100644
index 0000000..2712f09
--- /dev/null
+++ b/NetTest/MachinePool.py
@@ -0,0 +1,61 @@
+"""
+This module contains implementaion of MachinePool class that
+can be used to maintain a cluster of test machines.
+
+Copyright 2012 Red Hat, Inc.
+Licensed under the GNU General Public License, version 2 as
+published by the Free Software Foundation; see COPYING for details.
+"""
+
+__author__ = """
+rpazdera(a)redhat.com (Radek Pazdera)
+"""
+
+import logging
+import os
+import re
+from Common.XmlProcessing import XmlDomTreeInit
+from NetTestParse import MachineConfigParse
+
+class MachinePool:
+ """ This class is responsible for managing test machines
+ that are available at controler and can be used for
+ testing via template matching
+ """
+
+ _machines = {}
+
+ def __init__(self, pool_dirs):
+ for pool_dir in pool_dirs:
+ self.add_dir(pool_dir)
+
+ def add_dir(self, pool_dir):
+ dentries = os.listdir(pool_dir)
+
+ for dirent in dentries:
+ self.add_file("%s/%s" % (pool_dir, dirent))
+
+ def add_file(self, filepath):
+ if os.path.isfile(filepath) and re.search("\.xml$", filepath, re.I):
+ dom_init = XmlDomTreeInit()
+ dom = dom_init.parse_file(filepath)
+
+ dirname, basename = os.path.split(filepath)
+
+ parser = MachineConfigParse()
+ parser.set_include_root(dirname)
+ parser.disable_events()
+
+ machine = {"info": {}, "netdevices": {}}
+ machine_id = re.sub("\.xml$", "", basename, flags=re.I)
+ parser.set_machine(machine_id, machine)
+
+ machineconfig = dom.getElementsByTagName("machineconfig")[0]
+ parser.parse(machineconfig)
+ self._machines[machine_id] = machine
+
+ def get_machines(self):
+ return self._machines
+
+ def match_setup(self, templates):
+ pass
diff --git a/NetTest/NetTestController.py b/NetTest/NetTestController.py
index 41707c5..b028e35 100644
--- a/NetTest/NetTestController.py
+++ b/NetTest/NetTestController.py
@@ -26,6 +26,7 @@ from NetTest.NetTestCommand import NetTestCommand, str_command
from Common.LoggingServer import LoggingServer
from Common.VirtUtils import VirtNetCtl, VirtDomainCtl, BridgeCtl
from Common.Utils import wait_for
+from NetTest.MachinePool import MachinePool
MAC_POOL_RANGE = {"start": "52:54:01:00:00:01", "end": "52:54:01:FF:FF:FF"}
@@ -43,6 +44,8 @@ class NetTestController:
self._res_serializer = res_serializer
self._remote_capture_files = {}
+ self._machine_pool = MachinePool([])
+
self._recipe = {}
definitions = {"recipe": self._recipe}
11 years
[lnst] recipes: team: add couple recipes
by Jiří Pírko
commit eba218de46fcc1d23fe1fe0a2aae17833255da52
Author: Jiri Pirko <jiri(a)resnulli.us>
Date: Thu Aug 23 15:34:56 2012 +0200
recipes: team: add couple recipes
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
recipes/team/netconfig-simple.xml | 7 +++++++
recipes/team/netconfig-team_ab_002.xml | 8 +++++++-
recipes/team/recipe_003.xml | 19 +++++++++++++++++++
3 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/recipes/team/netconfig-simple.xml b/recipes/team/netconfig-simple.xml
new file mode 100644
index 0000000..b0473e5
--- /dev/null
+++ b/recipes/team/netconfig-simple.xml
@@ -0,0 +1,7 @@
+<netconfig>
+ <interface id="1" phys_id="1" type="eth">
+ <addresses>
+ <address value="{$testip}"/>
+ </addresses>
+ </interface>
+</netconfig>
diff --git a/recipes/team/netconfig-team_ab_002.xml b/recipes/team/netconfig-team_ab_002.xml
index d3ed392..e77e560 100644
--- a/recipes/team/netconfig-team_ab_002.xml
+++ b/recipes/team/netconfig-team_ab_002.xml
@@ -23,7 +23,13 @@
<option name="teamd_config">
{
"runner": {"name": "activebackup"},
- "link_watch": {"name": "ethtool"}
+ "link_watch": {
+ "name": "arp_ping",
+ "interval": 100,
+ "missed_max": 30,
+ "source_host": "192.168.23.2",
+ "target_host": "192.168.23.1"
+ }
}
</option>
</options>
diff --git a/recipes/team/recipe_003.xml b/recipes/team/recipe_003.xml
new file mode 100644
index 0000000..77fa51c
--- /dev/null
+++ b/recipes/team/recipe_003.xml
@@ -0,0 +1,19 @@
+<nettestrecipe>
+ <machines>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ </define>
+ <machine id="1">
+ <machineconfig source="machineconfig-test1.xml"/>
+ <netconfig source="netconfig-simple.xml"/>
+ </machine>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ </define>
+ <machine id="2">
+ <machineconfig source="machineconfig-test2.xml"/>
+ <netconfig source="netconfig-team_rr.xml"/>
+ </machine>
+ </machines>
+ <command_sequence source="sequence_ping_simple.xml"/>
+</nettestrecipe>
11 years