Demonstration 3 - adjacentlink/python-etce-tutorial GitHub Wiki

Purpose

Demonstration 3 moves towards ETCEs main purpose - to make writing and running EMANE emulations easier. Accordingly, in this demo we'll run emane-tutorial demonstration 3 using ETCE. We'll focus on these things:

  1. The Demonstration 3 Test Directory, 03.emane, is deliberately laid out in what might descriptively be called published form - all of the participant host subdirectories are present and each contains all of the configuration files used in the Test. Nothing needs to be generated. We'll examine this form to emphasize the interconnection between the Test steps, input files and host directories and the way the Test runs. Just viewing a Test Directory in this format gives a rough idea of what's happening in the test.

  2. The ETCE Plan File for this demonstration adds a new section, containertemplates, that can help to reduce duplication by building container configuration incrementally through inheritance. We'll compare this with the Plan File seen previously.

Activity 1 - Steps, Input Files and Host Directories

Let's take a moment to examine the current demonstration Test Directory, 03.emane. The top level directory contains eleven host subdirectories, one for helper and another ten for node-001 through node-010:

[etceuser@host]$ tree -d 03.emane
03.emane
|__ doc
|__ helper
|__ node-001
|__ node-002
|__ node-003
|__ node-004
|__ node-005
|__ node-006
|__ node-007
|__ node-008
|__ node-009
|__ node-010

The helper has these files:

[etceuser@host]$ ls -1 03.emane/helper
eelgenerator.xml
eventservice.xml
otestpoint-broker.xml
scenario.eel

And drilling down into any two node directories shows that they contain the same file names:

[etceuser@host]$ ls -1 03.emane/node-001
emaneshsnapshot.flag
eventdaemon.xml
gpsd.flag
gpsdlocationagent.xml
ieee80211abgmac.xml
ieee80211abgnem.xml
ieee80211pcr.xml
mgen.script
olsrd.conf
otestpointd.xml
otestpoint-recorder.xml
platform.xml
probe-emane-ieee80211abg.xml
probe-emane-physicallayer.xml
probe-emane-virtualtransport.xml
transvirtual.xml

[etceuser@host]$ ls -1 03.emane/node-002
emaneshsnapshot.flag
eventdaemon.xml
gpsd.flag
gpsdlocationagent.xml
ieee80211abgmac.xml
ieee80211abgnem.xml
ieee80211pcr.xml
mgen.script
olsrd.conf
otestpointd.xml
otestpoint-recorder.xml
platform.xml
probe-emane-ieee80211abg.xml
probe-emane-physicallayer.xml
probe-emane-virtualtransport.xml
transvirtual.xml

Also recall that the steps.xml file defines a sequence of Wrapper calls, broken into user defined steps, that make up the test. Our current Steps File is more interesting than in the previous demos:

<steps>
  <step name="emane.start">
    <run wrapper="emane.emane"/>
  </step>
  <step name="routing.start">
    <run wrapper="utils.olsrd"/>
  </step>
  <step name="otestpoint.start">
    <run wrapper="otestpoint.otestpointrecorder"/>
    <run wrapper="otestpoint.otestpointd"/>
    <run wrapper="otestpoint.otestpointbroker"/>
  </step>
  <step name="run">
    <run wrapper="emane.emaneeventd"/>
    <run wrapper="emane.emaneeventservice"/>
    <run wrapper="utils.gpsd"/>
    <run wrapper="utils.mgen"/>
  </step>
  <step name="emanesh.snapshot">
    <run wrapper="emane.emaneshsnapshot"/>
  </step>
</steps>

And we've also covered that Wrappers define input file names to use as triggers for running. Here is the emane Wrapper listing:

[etceuser@host]$ etce-wrapper list -v emane.emane
-----------
emane.emane
-----------
path:
        /opt/etce/wrappers
description:
	
    Run emane with the provided configuration file.
    
input file name:
        platform.xml
output file name:
        emane.log
arguments:
        loglevel
                log level - [0,4]
                default: 2
        priority
                realtime priority level
                default: None

Understanding the connection between these items is important for developing ETCE Tests. ETCE Wrappers run on a given host when they are invoked on the host in a Test step and the associated input file is present in the host subdirectory (/tmp/etce/current_test/HOST). When writing a test, deciding which hosts run which applications boils down to placing the Wrapper input file in the appropriate host subdirectories of the Test Directory. The file names must match the name advertised by the Wrapper. We can visualize this idea by making a grid with steps on rows, hosts in columns, and an x mark at their intersection when the appropriate Wrapper input file exists in the host subdirectory. For this demo it looks like this:

demo3-executiongrid

One last point to make here is that, while the demo Test Directory contains all of the host subdirectories and their files, it isn't quite finished and ready to run. Let's use etce-test to list the test summary:

[etceuser@host]$ etce-test list -v 03.emane
--------
03.emane
--------
location:
  03.emane/
description:

    emane-tutorial demonstration 3 in ETCE Test Directory format.

overlays:
  etce_log_path

The overlays section identifies the missing piece. Somewhere, in one if the test files, is a mako template string containing the variable etce_log_path that requires a value before the configuration is complete. With a little searching, the template can be found in the olsrd.conf, otestpoint-recorder.xml and gpsdlocationagent.xml in every host directory. We can see it here in node-003/gpsdlocationagent.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE eventagent SYSTEM "file:///usr/share/emane/dtd/eventagent.dtd">
<eventagent library="gpsdlocationagent">
  <param name="pseudoterminalfile"
         value="${etce_log_path}/gps.pty"/>
</eventagent>

etce_log_path is a reserved ETCE template variable that gets filled in with the host output directory name generated at the time the test is run. We'll look more closely at using template strings in Test Directory definitions in the next demo.

Activity 2 - LXC Plan Revisited

03.emane/doc/lxcplan.xml is the LXC Plan File for this demo:

<?xml version="1.0" encoding="UTF-8"?>
<lxcplan>
  <containertemplates>
    <containertemplate name="node">
      <parameters>
        <parameter name="lxc.tty" value="1"/>
        <parameter name="lxc.pts" value="128"/>
        <parameter name="lxc.console" value="none"/>
        <parameter name="lxc.mount.auto" value="proc sys"/>
      </parameters>
      <interfaces>
        <interface bridge="br.ctl" hosts_entry_ipv4="${lxc_name}">
          <parameter name="lxc.network.type" value="veth"/>
          <parameter name="lxc.network.name" value="backchan0"/>
          <parameter name="lxc.network.flags" value="up"/>
          <parameter name="lxc.network.ipv4" value="10.76.0.${lxc_index}/16"/>
          <parameter name="lxc.network.veth.pair" value="veth.ctl.${lxc_index}"/>
        </interface>
        <interface bridge="br.ota">
          <parameter name="lxc.network.type" value="veth"/>
          <parameter name="lxc.network.name" value="ota0"/>
          <parameter name="lxc.network.flags" value="up"/>
          <parameter name="lxc.network.ipv4" value="10.77.0.${lxc_index}/16"/>
          <parameter name="lxc.network.veth.pair" value="veth.ota.${lxc_index}"/>
        </interface>
      </interfaces>
      <initscript>#!/bin/bash

# make node for tun device
mkdir /dev/net
mknod /dev/net/tun c 10 200

pidfile="${lxc_directory}/var/run/sshd.pid"
/usr/sbin/sshd -o "PidFile=$pidfile" -o "PermitRootLogin=yes" -o "PasswordAuthentication=no"
      </initscript>
    </containertemplate>
  </containertemplates>

  <hosts>
    <host hostname="localhost">
      <bridges>
        <bridge name="br.ctl">
          <ipaddress>
            <ipv4>10.76.0.200/16</ipv4>
          </ipaddress>
        </bridge>
        <bridge name="br.ota">
          <ipaddress>
            <ipv4>10.77.0.200/16</ipv4>
          </ipaddress>
        </bridge>
      </bridges>

      <containers>
        <container lxc_name="helper" lxc_indices="201" template="node"/>
        <container lxc_name="node-${'%03d' % lxc_index}" lxc_indices="1-10" template="node"/>
      </containers>
    </host>
  </hosts>
</lxcplan>

It describes this network:

demo3-network

The Plan File content is largely the same as in the previous demo except that the container configuration is moved into a new containertemplates section above the hosts section examined previously. The container elements reference their configuration via a template attribute:

  <containers>
    <container lxc_name="helper" lxc_indices="201" template="node"/>
    <container lxc_name="node-${'%03d' % lxc_index}" lxc_indices="1-10" template="node"/>
  </containers>

Our new Plan File is not clearer or more concise than the previous one. However, for networks more complex than 11 replicated containers, templates can be chained by inheritance to build up configuration with minimal duplication. In general, Plan Files like this one, with configuration placed in the containertemplates section are more typical. We will use this format for the remaining demos.

Beyond the format change, the new Plan File contains a few network changes:

  • A new bridge, br.ota is added to each container. This will carry the EMANE OTA channel in the emulation.
  • The number of node containers is increased from 2 to 10 based on the new range of indices (lxc_indices="1-10").
  • A helper container is added that references the same template. helper runs network wide emulation applications. Common examples include applications that send EMANE Events, that generate OTA interference or that send TDMA schedules. Placing these on a dedicated container, as opposed to running them directly on the host, confines them to the virtual LXC network; tearing down the network cleanly terminates all test processes.

Activity 3 - Run The Demo

Let's run the demo with start_demo.sh. This time, some of the applications require elevated privileges - emane among them. Set the SSHUSER argument to root to account for this.

[etceuser@host]$ ./start_demo.sh root 03.emane
sshuser=root
demodir=03.emane
[sudo] password for etceuser:
Bringing up bridge: br.ota
Bringing up bridge: br.ctl
lxc-execute -f /tmp/etce/lxcroot/helper/config  -n helper -o /tmp/etce/lxcroot/helper/log -- /tmp/etce/lxcroot/helper/init.sh 2> /dev/null &
lxc-execute -f /tmp/etce/lxcroot/node-001/config  -n node-001 -o /tmp/etce/lxcroot/node-001/log -- /tmp/etce/lxcroot/node-001/init.sh 2> /dev/null &
lxc-execute -f /tmp/etce/lxcroot/node-002/config  -n node-002 -o /tmp/etce/lxcroot/node-002/log -- /tmp/etce/lxcroot/node-002/init.sh 2> /dev/null &
lxc-execute -f /tmp/etce/lxcroot/node-003/config  -n node-003 -o /tmp/etce/lxcroot/node-003/log -- /tmp/etce/lxcroot/node-003/init.sh 2> /dev/null &
lxc-execute -f /tmp/etce/lxcroot/node-004/config  -n node-004 -o /tmp/etce/lxcroot/node-004/log -- /tmp/etce/lxcroot/node-004/init.sh 2> /dev/null &
lxc-execute -f /tmp/etce/lxcroot/node-005/config  -n node-005 -o /tmp/etce/lxcroot/node-005/log -- /tmp/etce/lxcroot/node-005/init.sh 2> /dev/null &
lxc-execute -f /tmp/etce/lxcroot/node-006/config  -n node-006 -o /tmp/etce/lxcroot/node-006/log -- /tmp/etce/lxcroot/node-006/init.sh 2> /dev/null &
lxc-execute -f /tmp/etce/lxcroot/node-007/config  -n node-007 -o /tmp/etce/lxcroot/node-007/log -- /tmp/etce/lxcroot/node-007/init.sh 2> /dev/null &
lxc-execute -f /tmp/etce/lxcroot/node-008/config  -n node-008 -o /tmp/etce/lxcroot/node-008/log -- /tmp/etce/lxcroot/node-008/init.sh 2> /dev/null &
lxc-execute -f /tmp/etce/lxcroot/node-009/config  -n node-009 -o /tmp/etce/lxcroot/node-009/log -- /tmp/etce/lxcroot/node-009/init.sh 2> /dev/null &
lxc-execute -f /tmp/etce/lxcroot/node-010/config  -n node-010 -o /tmp/etce/lxcroot/node-010/log -- /tmp/etce/lxcroot/node-010/init.sh 2> /dev/null &
Waiting for LXCs ...

Checking ssh connections on port 22 ...
helper
node-001
node-002
node-003
node-004
node-005
node-006
node-007
node-008
node-009
node-010

TestCollection:
  03.emane

Enter passphrase for /home/etceuser/.ssh/id_rsa:
===============
BEGIN "03.emane" trial 1
Trial Start Time: 2019-05-15T20:59:30
----------
testprepper run 2019-05-15T20:59:30 data/etcedemo-03.emane-20190515T205841/template data/etcedemo-03.emane-20190515T205841/data
[helper]
[helper] Publishing 03.emane to /tmp/etce/current_test
----------
step: emane.start 2019-05-15T20:59:30 data/etcedemo-03.emane-20190515T205841/data
[node-005] /usr/bin/emane /tmp/etce/current_test/node-005/platform.xml --daemonize --realtime --loglevel 2 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-005/emane.log --pidfile /tmp/etce/lock/etce.node-005.emane.pid
[node-003] /usr/bin/emane /tmp/etce/current_test/node-003/platform.xml --daemonize --realtime --loglevel 2 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-003/emane.log --pidfile /tmp/etce/lock/etce.node-003.emane.pid
[node-004] /usr/bin/emane /tmp/etce/current_test/node-004/platform.xml --daemonize --realtime --loglevel 2 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-004/emane.log --pidfile /tmp/etce/lock/etce.node-004.emane.pid
[node-006] /usr/bin/emane /tmp/etce/current_test/node-006/platform.xml --daemonize --realtime --loglevel 2 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-006/emane.log --pidfile /tmp/etce/lock/etce.node-006.emane.pid
[node-001] /usr/bin/emane /tmp/etce/current_test/node-001/platform.xml --daemonize --realtime --loglevel 2 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-001/emane.log --pidfile /tmp/etce/lock/etce.node-001.emane.pid
[node-010] /usr/bin/emane /tmp/etce/current_test/node-010/platform.xml --daemonize --realtime --loglevel 2 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-010/emane.log --pidfile /tmp/etce/lock/etce.node-010.emane.pid
[node-007] /usr/bin/emane /tmp/etce/current_test/node-007/platform.xml --daemonize --realtime --loglevel 2 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-007/emane.log --pidfile /tmp/etce/lock/etce.node-007.emane.pid
[node-002] /usr/bin/emane /tmp/etce/current_test/node-002/platform.xml --daemonize --realtime --loglevel 2 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-002/emane.log --pidfile /tmp/etce/lock/etce.node-002.emane.pid
[node-009] /usr/bin/emane /tmp/etce/current_test/node-009/platform.xml --daemonize --realtime --loglevel 2 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-009/emane.log --pidfile /tmp/etce/lock/etce.node-009.emane.pid
[node-008] /usr/bin/emane /tmp/etce/current_test/node-008/platform.xml --daemonize --realtime --loglevel 2 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-008/emane.log --pidfile /tmp/etce/lock/etce.node-008.emane.pid
----------
step: routing.start 2019-05-15T20:59:30 data/etcedemo-03.emane-20190515T205841/data
[node-001] /usr/sbin/olsrd -f /tmp/etce/current_test/node-001/olsrd.conf
[node-003] /usr/sbin/olsrd -f /tmp/etce/current_test/node-003/olsrd.conf
[node-006] /usr/sbin/olsrd -f /tmp/etce/current_test/node-006/olsrd.conf
[node-009] /usr/sbin/olsrd -f /tmp/etce/current_test/node-009/olsrd.conf
[node-005] /usr/sbin/olsrd -f /tmp/etce/current_test/node-005/olsrd.conf
[node-010] /usr/sbin/olsrd -f /tmp/etce/current_test/node-010/olsrd.conf
[node-007] /usr/sbin/olsrd -f /tmp/etce/current_test/node-007/olsrd.conf
[node-002] /usr/sbin/olsrd -f /tmp/etce/current_test/node-002/olsrd.conf
[node-004] /usr/sbin/olsrd -f /tmp/etce/current_test/node-004/olsrd.conf
[node-008] /usr/sbin/olsrd -f /tmp/etce/current_test/node-008/olsrd.conf
----------
step: otestpoint.start 2019-05-15T20:59:30 data/etcedemo-03.emane-20190515T205841/data
[node-003] /usr/bin/otestpoint-recorder /tmp/etce/current_test/node-003/otestpoint-recorder.xml --daemonize --loglevel 3 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-003/otestpoint-recorder.log --pidfile /tmp/etce/lock/etce.node-003.otestpointrecorder.pid
[node-004] /usr/bin/otestpoint-recorder /tmp/etce/current_test/node-004/otestpoint-recorder.xml --daemonize --loglevel 3 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-004/otestpoint-recorder.log --pidfile /tmp/etce/lock/etce.node-004.otestpointrecorder.pid
[node-001] /usr/bin/otestpoint-recorder /tmp/etce/current_test/node-001/otestpoint-recorder.xml --daemonize --loglevel 3 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-001/otestpoint-recorder.log --pidfile /tmp/etce/lock/etce.node-001.otestpointrecorder.pid
[node-006] /usr/bin/otestpoint-recorder /tmp/etce/current_test/node-006/otestpoint-recorder.xml --daemonize --loglevel 3 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-006/otestpoint-recorder.log --pidfile /tmp/etce/lock/etce.node-006.otestpointrecorder.pid
[node-005] /usr/bin/otestpoint-recorder /tmp/etce/current_test/node-005/otestpoint-recorder.xml --daemonize --loglevel 3 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-005/otestpoint-recorder.log --pidfile /tmp/etce/lock/etce.node-005.otestpointrecorder.pid
[node-007] /usr/bin/otestpoint-recorder /tmp/etce/current_test/node-007/otestpoint-recorder.xml --daemonize --loglevel 3 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-007/otestpoint-recorder.log --pidfile /tmp/etce/lock/etce.node-007.otestpointrecorder.pid
[node-006] /usr/bin/otestpointd /tmp/etce/current_test/node-006/otestpointd.xml --daemonize --loglevel 3 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-006/otestpointd.log --pidfile /tmp/etce/lock/etce.node-006.otestpointd.pid
[node-004] /usr/bin/otestpointd /tmp/etce/current_test/node-004/otestpointd.xml --daemonize --loglevel 3 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-004/otestpointd.log --pidfile /tmp/etce/lock/etce.node-004.otestpointd.pid
[node-003] /usr/bin/otestpointd /tmp/etce/current_test/node-003/otestpointd.xml --daemonize --loglevel 3 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-003/otestpointd.log --pidfile /tmp/etce/lock/etce.node-003.otestpointd.pid
[node-001] /usr/bin/otestpointd /tmp/etce/current_test/node-001/otestpointd.xml --daemonize --loglevel 3 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-001/otestpointd.log --pidfile /tmp/etce/lock/etce.node-001.otestpointd.pid
[node-005] /usr/bin/otestpointd /tmp/etce/current_test/node-005/otestpointd.xml --daemonize --loglevel 3 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-005/otestpointd.log --pidfile /tmp/etce/lock/etce.node-005.otestpointd.pid
[node-007] /usr/bin/otestpointd /tmp/etce/current_test/node-007/otestpointd.xml --daemonize --loglevel 3 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-007/otestpointd.log --pidfile /tmp/etce/lock/etce.node-007.otestpointd.pid
[node-009] /usr/bin/otestpoint-recorder /tmp/etce/current_test/node-009/otestpoint-recorder.xml --daemonize --loglevel 3 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-009/otestpoint-recorder.log --pidfile /tmp/etce/lock/etce.node-009.otestpointrecorder.pid
[node-009] /usr/bin/otestpointd /tmp/etce/current_test/node-009/otestpointd.xml --daemonize --loglevel 3 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-009/otestpointd.log --pidfile /tmp/etce/lock/etce.node-009.otestpointd.pid
[node-010] /usr/bin/otestpoint-recorder /tmp/etce/current_test/node-010/otestpoint-recorder.xml --daemonize --loglevel 3 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-010/otestpoint-recorder.log --pidfile /tmp/etce/lock/etce.node-010.otestpointrecorder.pid
[node-008] /usr/bin/otestpoint-recorder /tmp/etce/current_test/node-008/otestpoint-recorder.xml --daemonize --loglevel 3 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-008/otestpoint-recorder.log --pidfile /tmp/etce/lock/etce.node-008.otestpointrecorder.pid
[node-002] /usr/bin/otestpoint-recorder /tmp/etce/current_test/node-002/otestpoint-recorder.xml --daemonize --loglevel 3 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-002/otestpoint-recorder.log --pidfile /tmp/etce/lock/etce.node-002.otestpointrecorder.pid
[node-008] /usr/bin/otestpointd /tmp/etce/current_test/node-008/otestpointd.xml --daemonize --loglevel 3 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-008/otestpointd.log --pidfile /tmp/etce/lock/etce.node-008.otestpointd.pid
[node-010] /usr/bin/otestpointd /tmp/etce/current_test/node-010/otestpointd.xml --daemonize --loglevel 3 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-010/otestpointd.log --pidfile /tmp/etce/lock/etce.node-010.otestpointd.pid
[node-002] /usr/bin/otestpointd /tmp/etce/current_test/node-002/otestpointd.xml --daemonize --loglevel 3 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-002/otestpointd.log --pidfile /tmp/etce/lock/etce.node-002.otestpointd.pid
[helper] /usr/bin/otestpoint-broker /tmp/etce/current_test/helper/otestpoint-broker.xml --daemonize --loglevel 3 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/helper/otestpoint-broker.log --pidfile /tmp/etce/lock/etce.helper.otestpointbroker.pid
----------
step: run 2019-05-15T20:59:30 data/etcedemo-03.emane-20190515T205841/data
[helper] /usr/bin/emaneeventservice /tmp/etce/current_test/helper/eventservice.xml --daemonize --realtime --loglevel 3 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/helper/emaneeventservice.log --pidfile /tmp/etce/lock/etce.helper.emaneeventservice.pid --starttime 20:59:30
[node-005] /usr/bin/emaneeventd /tmp/etce/current_test/node-005/eventdaemon.xml --daemonize --realtime --loglevel 2 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-005/eventdaemon.log --pidfile /tmp/etce/lock/etce.node-005.emaneeventd.pid
[node-006] /usr/bin/emaneeventd /tmp/etce/current_test/node-006/eventdaemon.xml --daemonize --realtime --loglevel 2 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-006/eventdaemon.log --pidfile /tmp/etce/lock/etce.node-006.emaneeventd.pid
[node-008] /usr/bin/emaneeventd /tmp/etce/current_test/node-008/eventdaemon.xml --daemonize --realtime --loglevel 2 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-008/eventdaemon.log --pidfile /tmp/etce/lock/etce.node-008.emaneeventd.pid
[node-001] /usr/bin/emaneeventd /tmp/etce/current_test/node-001/eventdaemon.xml --daemonize --realtime --loglevel 2 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-001/eventdaemon.log --pidfile /tmp/etce/lock/etce.node-001.emaneeventd.pid
[node-007] /usr/bin/emaneeventd /tmp/etce/current_test/node-007/eventdaemon.xml --daemonize --realtime --loglevel 2 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-007/eventdaemon.log --pidfile /tmp/etce/lock/etce.node-007.emaneeventd.pid
[node-003] /usr/bin/emaneeventd /tmp/etce/current_test/node-003/eventdaemon.xml --daemonize --realtime --loglevel 2 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-003/eventdaemon.log --pidfile /tmp/etce/lock/etce.node-003.emaneeventd.pid
[node-002] /usr/bin/emaneeventd /tmp/etce/current_test/node-002/eventdaemon.xml --daemonize --realtime --loglevel 2 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-002/eventdaemon.log --pidfile /tmp/etce/lock/etce.node-002.emaneeventd.pid
[node-004] /usr/bin/emaneeventd /tmp/etce/current_test/node-004/eventdaemon.xml --daemonize --realtime --loglevel 2 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-004/eventdaemon.log --pidfile /tmp/etce/lock/etce.node-004.emaneeventd.pid
[node-010] /usr/bin/emaneeventd /tmp/etce/current_test/node-010/eventdaemon.xml --daemonize --realtime --loglevel 2 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-010/eventdaemon.log --pidfile /tmp/etce/lock/etce.node-010.emaneeventd.pid
[node-009] /usr/bin/emaneeventd /tmp/etce/current_test/node-009/eventdaemon.xml --daemonize --realtime --loglevel 2 --logfile /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-009/eventdaemon.log --pidfile /tmp/etce/lock/etce.node-009.emaneeventd.pid
[node-005] /usr/sbin/gpsd -P /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-005/gpsd.pid -G -n -b /dev/pts/1
[node-005] /usr/bin/mgen input /tmp/etce/current_test/node-005/mgen.script txlog output /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-005/mgen.log start 20:59:30
[node-008] /usr/sbin/gpsd -P /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-008/gpsd.pid -G -n -b /dev/pts/1
[node-006] /usr/sbin/gpsd -P /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-006/gpsd.pid -G -n -b /dev/pts/1
[node-008] /usr/bin/mgen input /tmp/etce/current_test/node-008/mgen.script txlog output /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-008/mgen.log start 20:59:30
[node-001] /usr/sbin/gpsd -P /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-001/gpsd.pid -G -n -b /dev/pts/1
[node-006] /usr/bin/mgen input /tmp/etce/current_test/node-006/mgen.script txlog output /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-006/mgen.log start 20:59:30
[node-001] /usr/bin/mgen input /tmp/etce/current_test/node-001/mgen.script txlog output /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-001/mgen.log start 20:59:30
[node-007] /usr/sbin/gpsd -P /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-007/gpsd.pid -G -n -b /dev/pts/1
[node-007] /usr/bin/mgen input /tmp/etce/current_test/node-007/mgen.script txlog output /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-007/mgen.log start 20:59:30
[node-004] /usr/sbin/gpsd -P /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-004/gpsd.pid -G -n -b /dev/pts/1
[node-002] /usr/sbin/gpsd -P /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-002/gpsd.pid -G -n -b /dev/pts/1
[node-004] /usr/bin/mgen input /tmp/etce/current_test/node-004/mgen.script txlog output /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-004/mgen.log start 20:59:30
[node-003] /usr/sbin/gpsd -P /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-003/gpsd.pid -G -n -b /dev/pts/1
[node-002] /usr/bin/mgen input /tmp/etce/current_test/node-002/mgen.script txlog output /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-002/mgen.log start 20:59:30
[node-003] /usr/bin/mgen input /tmp/etce/current_test/node-003/mgen.script txlog output /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-003/mgen.log start 20:59:30
[node-010] /usr/sbin/gpsd -P /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-010/gpsd.pid -G -n -b /dev/pts/1
[node-010] /usr/bin/mgen input /tmp/etce/current_test/node-010/mgen.script txlog output /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-010/mgen.log start 20:59:30
[node-009] /usr/sbin/gpsd -P /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-009/gpsd.pid -G -n -b /dev/pts/1
[node-009] /usr/bin/mgen input /tmp/etce/current_test/node-009/mgen.script txlog output /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-009/mgen.log start 20:59:30

The olsrlinkview.py script in included in python-etce-tutorial/scripts. In a second terminal, run it and verify you see the same results as described in the EMANE Tutorial version of the demo.

In the first terminal, exit the test by issuing SIGQUIT (Ctrl + \') and then running stop_demo.sh`.

Ctrl-\
^\./start_demo.sh: line 124:  1688 Quit
[etceuser@host]$ ./stop_demo.sh
[sudo] password for etceuser:
lxc-stop -n helper -k &> /dev/null
lxc-stop -n node-001 -k &> /dev/null
lxc-stop -n node-002 -k &> /dev/null
lxc-stop -n node-003 -k &> /dev/null
lxc-stop -n node-004 -k &> /dev/null
lxc-stop -n node-005 -k &> /dev/null
lxc-stop -n node-006 -k &> /dev/null
lxc-stop -n node-007 -k &> /dev/null
lxc-stop -n node-008 -k &> /dev/null
lxc-stop -n node-009 -k &> /dev/null
lxc-stop -n node-010 -k &> /dev/null
Bringing down bridge: br.ota
Bringing down bridge: br.ctl

Before proceeding, let's look at the final form of the node-003/gpsdlocationagent.xml published to /tmp/etce/current_test directory for the test:

[etceuser@host]$ cat /tmp/etce/current_test/node-003/gpsdlocationagent.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE eventagent SYSTEM "file:///usr/share/emane/dtd/eventagent.dtd">
<eventagent library="gpsdlocationagent">
  <param name="pseudoterminalfile"
         value="/tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-003/gps.pty"/>
</eventagent>

As desired, we see the ${etce_log_path} template is replaced with /tmp/etce/data/etcedemo-03.emane-20190515T205841/data/node-003, the node-003 output path for this run.

⚠️ **GitHub.com Fallback** ⚠️