[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] xl remus - Invoking scripts from xl



I was investigating adding network buffering support to xl Remus.
I need
 1) setup an ifb device and some traffic shaping rules (packet redirection)
 2) control the release of buffer every checkpoint.
For the latter, i have managed to push c API support for Remus network buffer to libnl and the associated Remus network buffer module (sch_plug) into mainline kernel (3.4 onwards).

However, setting up the buffer itself still requires scripting support because there is no proper C API to do this setup from xl.
 For eg, xl invokes a script with domain name or vif name the script does the following:

"modprobe ifb"

bring up an ifb device
"ip link set ifb0 up"

add ingress qdisc to each vif
"tc qdisc add dev vif1.0 ingress"

redirect traffic from vifs to ifb devices
"tc filter add dev vif1.0 parent ffff: proto ip pref 10 u32 match u32 0 0 action mirred egress redirect dev ifb0"

Communicate the ifb device associated with each vif back to xl.

Later, xl would add "plug qdisc" to ifb0 and control buffering via c API available from libnl.

Is there a general convention in the xl code base with respect to invoking external scripts and reading their output back into xl ?

I checked the hotplug script implementation. While there is a reference point to external script invocation, hotplug script results are communicated back to xl using xenstore, -- standard xenstore entries.


I can use xenstore too but I don't want to pollute xenstore entries unless absolutely necessary.

Or is it as simple as reading and writing to files or using standard communication primitives like named fifos or pipes ?

As an alternative, 
Instead of adding libnl dependency to xl,
I can reuse existing python code for network buffering and control the python process via unix sockets or pipes or fifos. The python code does not rely on libnl.

Shriram
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.