This change uses the `Node.cmd` method instead of `Popen`. The `cmd` method
sends the input to a shell which may be in another namespace (if --innamespace
is in use), while `Popen` would always run in the root namespace.
It appears that under certain conditions, such as when a
namespace exits, both ends of a veth pair may get dumped
into the root namespace. We therefore now remove an interface
both from its home namespace and from the root namespace.
This disables slicing by default but fixes bandwidth limits.
Eventually we want to enable both to work together, but for now
this enables one or the other depending on the dpopts setting.
Currently, slicing on the user switch breaks bandwidth limits.
We don't yet have a good way of using both of them at the same time.
I'm inclined to turn off slicing by default, but I have to think
about it and also see if any one is using it...
Ordinarily, OVS switches back off when they can't reach their controllers.
Under the type of scenarios where Mininet is used, I think this is
probably just inconvenient. This patch set controllers to attempt to
reconnect every second.
This adds a datapath parameter to OVSSwitch which allows one to tell OVS to
run in userspace mode rather than kernel mode. From the commandline, this
is --switch=ovsk,datapath=user.
Note that this makes "ovsk" and the OVSKernelSwitch alias misnomers. Since
the default behavior is still kernel mode, this is hopefully harmless.
This is the second version of this patch, which changes the argument name
and values according to Bob's suggestion.
This may or may not be the right thing to do - an alternative
would be to ignore SIGINT, but that would make the popen()
job unkillable by normal means! So we'll try this and see
how well it works.
Fixes#124
A number of functions in node.py look like this:
return self.intf( intf ).<other stuff>
Previously, self.intf(...) in Node would expect a string name for an
interface and return None if an object was passed in instead of a
string name.
Now, be more permissive and assume that objects passed in are for Intf
objects. This makes all such functions in node.py handle more flexible
input args, either name or actual Intf object.
An alternative and equally valid approach would be to raise an Exception
whenever a non-string, non-falsy value was passed in to Node.intf(), and
to modify the code in at least one place - examples/sshd.py - to pass
the interface name, rather than the interface object.
Also fix input args for examples/scratchnetuser.py - the interface name
was being passed in as the prefix len, which makes no sense.
There are a bunch of these remaining, but I don't think the right course is
to 'fix' all of them to make pep8 happy, but instead to either change
the test in pep8 to consider that a continuation line may itself
be continued halfway, OR, to change the code in these lines to be more
readable by removing the need for all those nested continuations.
Personally, I find multiply-broken lines (aka nested continuations) really
hard to read.