Moved monitor() and readline() into net.py and node.py respectively,
which will hopefully be useful for monitoring large sets of hosts,
as is done in udpbwtest.py.
Changed iperf to use interactive command infrastructure (such as it
is), which may make it more reliable. Hopefully it's a bit clearer
as well, although it is slightly more complicated.
Before this commit, you'd have to manually insert the kernel module for
OVS or OF kernel modules, and you couldn't run one regression test with
all 3.
Now, these are kmod insert/remove is handled automatically.
I've changed the way things work a bit:
1. netns is replaced by mnexec, a general-purpose mininet helper.
2. For interactive commands, we now use mnexec -p, which prints out
the pid, so we can kill it when someone hits control-C!
3. We close file descriptors for subshells. This might save memory,
but who knows.
4. We detach our subshells from the tty using mnexec -s; thus
control-C should not terminate everything.
5. Given 4, mn -c is now necessary if you kill mininet.
I've changed the way things work a bit:
1. netns is replaced by mnexec, a general-purpose mininet helper.
2. For interactive commands, we now use mnexec -p, which prints out
the pid, so we can kill it when someone hits control-C!
3. We close file descriptors for subshells. This might save memory,
but who knows.
4. We detach our subshells from the tty using mnexec -s; thus
control-C should not terminate everything.
5. Given 4, mn -c is now necessary if you kill mininet.
Call netns using setsid to detach from the tty; this is
intended to fix the problem of control-C killing your network.
sendInt() doesn't actually work - hopefully we can fix this in the
future, but it's tricky since we want to detach the many shells from
our tty, but then optionally send tty interrupts to them! Ideally we
would either know the pid of the subprocess or be able to send a signal
to bash to get it to interrupt its subprocess.
waitOutput() now uses monitor. We also handle sentinels
coming in the middle of output (but default at end should
still work well.)
Call netns using setsid to detach from the tty; this is
intended to fix the problem of control-C killing your network.
sendInt() doesn't actually work - hopefully we can fix this in the
future, but it's tricky since we want to detach the many shells from
our tty, but then optionally send tty interrupts to them! Ideally we
would either know the pid of the subprocess or be able to send a signal
to bash to get it to interrupt its subprocess.
waitOutput() now uses monitor. We also handle sentinels
coming in the middle of output (but default at end should
still work well.)