Multiple Trema Instances for Multiple Bridges on the same machine

31 views
Skip to first unread message

Nikos Makris

unread,
Aug 26, 2014, 11:17:15 AM8/26/14
to trem...@googlegroups.com
Hello to all,

we have been trying to start multiple trema instances for multiple switches from the same machine but we are facing several problems with it.

For the creation of the bridges we are using Open VSwitch at the same machine where trema is supposed to run, as follows:

    Bridge "br0"
        Controller "tcp:127.0.0.1:6655"
        Port "br0"
            Interface "br0"
                type: internal
        Port "eth0"
            Interface "eth0"
        Port "tap0"
            Interface "tap0"
    Bridge "br1"
        Controller "tcp:127.0.0.1:6644"
        Port "br1"
            Interface "br1"
                type: internal
        Port "tap1"
            Interface "tap1"
        Port "eth1"
            Interface "eth1"


We then try to execute two different trema instances for the two different bridges as follows:

#trema run control1.rb -p 6655 
#trema run control2.rb -p 6644

Unfortunately, only the controller that is launched first seems to get connected (as indicated by the `ovs-vsctl show` output).

We have been trying unsuccessfully to start the two controllers using an external configuration file (like the one indicated here) but when we use in each run block the `config.port` option (set to 6655 and 6644 respectively) we only get the last controller running (the last entry that sets the config.port variable, which seems to be a global one). 

From what we have encountered so far, it seems impossible to run two instances from the same machine. Is there any workaround on it (apart from using one controller for managing multiple switches)?

We are using the trema gem (v. 0.4.6) and Open VSwitch v. 1.10.0 on a Centos 6.5 machine with ruby rvm (ruby version 1.9.3p547).

Looking forward to your replies,
Regards,
Nikos Makris
 

Denis Ovsienko

unread,
Aug 26, 2014, 1:18:02 PM8/26/14
to trem...@googlegroups.com
>#trema run control1.rb -p 6655
>#trema run control2.rb -p 6644

AFAIR, Trema internally consists of several modules, which coordinate by means of a pidfile and one or more UNIX sockets, which all reside under the source tree directory. For more than one instance of Trema to run in parallel on the same host, it is likely that each instance would need to be run from its own copy of the source tree like this:

cd trema-a
./trema run control1.rb -p 6655
cd ../trema-b
./trema run control2.rb -p 6644

--
Denis Ovsienko

Reply all
Reply to author
Forward
0 new messages