Control: tags -1 + patch fixed-upstream
On Fri, 10 Nov 2017 12:15:39 +0100 "Santiago R.R."
wrote:
…
> mn tries to run ovs-controller, which has been renamed to
> /usr/bin/ovs-testcontroller according to
> https://github.com/openvswitch/ovs/blob/9a180f2c002adf73951e0ee9990c44e5e5cd4a0f/NEWS#L600
ovs-controller -> test-controller -> ovs-testcontroller
https://github.com/openvswitch/ovs/blob/9a180f2c002adf73951e0ee9990c44e5e5cd4a0f/NEWS#L471
> mininet should Depends or Recomends on openvswitch-testcontroller
It seems I am wrong about this.
>
> $ sudo mn --topo tree,depth=2,fanout=3
> *** Creating network
> *** Adding controller
> *** Adding hosts:
> h1 h2 h3 h4 h5 h6 h7 h8 h9
> *** Adding switches:
> s1 s2 s3 s4
> *** Adding links:
> (s1, s2) (s1, s3) (s1, s4) (s2, h1) (s2, h2) (s2, h3) (s3, h4) (s3, h5) (s3,
> h6) (s4, h7) (s4, h8) (s4, h9)
> *** Configuring hosts
> h1 h2 h3 h4 h5 h6 h7 h8 h9
> *** Starting controller
> c0 Cannot find required executable ovs-controller.
> Please make sure that it is installed and available in your $PATH:
> (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
…
> Versions of packages mininet depends on:
> ii cgroup-bin0.41-8
> ii iperf 2.0.10+dfsg1-1
> ii libc6 2.24-17
> ii net-tools 1.60+git20161116.90da8a0-1
> ii openvswitch-switch2.8.1+dfsg1-3
> ii python2.7.14-1
> ii python-pkg-resources 36.6.0-1
> ii socat 1.7.3.2-1
> ii telnet0.17-41
(I am new on this, and I am trying to understand how mininet relies on
openvswitch, so sorry if what I say doesn't make any sense.)
Actually, the issue doesn't happen in stretch or buster, or more
precisely, with openvswitch-switch 2.6.2~pre+git20161223-3.
As far as I understand, the reason why mininet complains against
openvswtich is because openvswith-common includes
/usr/bin/ovs-testcontroller since 2.8.1+dfsg1-1. Binary that was part of
openvswitch-testcontroller before. Installing -testcontroller in stretch
or buster makes that mininet also complains.
And it also seems that it was already fixed by upstream in commit
57abd9baef8b3ec3ce3c349829b37022cfef724a. Patch attached to this mail.
Cheers,
-- Santiago
P.S. Question for openvswitch maintainers: does it make sense to include
back /usr/bin/ovs-testcontroller in the -testcontroller package?
From a5a3485edbb15d2442eb42d776fb9ba370526e7a Mon Sep 17 00:00:00 2001
From: Santiago
Date: Wed, 29 Nov 2017 18:30:12 +0100
Subject: [PATCH] Add
debian/patches/upstream_0001-Use-correct-command-name-in-OVSController.patch
to take into account the three possible names of ovs-testcontroller
Signed-off-by: Santiago
---
debian/patches/series | 1 +
...Use-correct-command-name-in-OVSController.patch | 38 ++
2 files changed, 39 insertions(+)
create mode 100644 debian/patches/series
create mode 100644 debian/patches/upstream_0001-Use-correct-command-name-in-OVSController.patch
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 000..54f122c
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+upstream_0001-Use-correct-command-name-in-OVSController.patch
diff --git a/debian/patches/upstream_0001-Use-correct-command-name-in-OVSController.patch b/debian/patches/upstream_0001-Use-correct-command-name-in-OVSController.patch
new file mode 100644
index 000..e91ea01
--- /dev/null
+++ b/debian/patches/upstream_0001-Use-correct-command-name-in-OVSController.patch
@@ -0,0 +1,38 @@
+From 57abd9baef8b3ec3ce3c349829b37022cfef724a Mon Sep 17 00:00:00 2001
+From: Bob Lantz
+Date: Tue, 24 May 2016 17:40:00 -0700
+Subject: [PATCH] Use correct command name in OVSController
+
+---
+ mininet/node.py | 10 +-
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/mininet/node.py b/mininet/node.py
+index ea7851b..1e50b51 100644
+--- a/mininet/node.py
b/mininet/node.py
+@@ -1423,16 +1423,16 @@ def isAvailable( cls ):
+
+ class OVSController( Controller ):
+ "Open vSwitch controller"
+-def __init__( self, name, command='ovs-controller', **kwargs ):
+-if quietRun( 'which test-controller' ):
+-command = 'test-controller'
+-Controller.__init__( self, name, command=command, **kwargs )
++def __init__( self, name, **kwargs ):
++kwargs.setdefault( 'command', self.isAvailable() or
++ 'ovs-controller' )
++Controller.__init__( self, name, **kwargs )
+
+ @classmethod
+ def isAvailable( cls ):
+ return ( quietRun( 'which ovs-controller' ) or
+ quietRun( 'which test-controller' ) or
+- quietRun( 'which ovs-testcontroller' ) )
++ quietRun( 'which ovs-testcontroller' ) ).strip()
+
+ class NOX(