clickos icon indicating copy to clipboard operation
clickos copied to clipboard

Is it possible to change clickos configuration at runtime?

Open stevepp opened this issue 8 years ago • 3 comments

Hi all, Currently the click configuration is hard-coded and wrote into ClickOS using xenstore from Dom0. I am wondering whether the click configuration can be changed at runtime. For example, if I want to change the IP address of eth0 in a running click configuration, do I need to kill that thread and re-instantiate a new configuration with the new IP?

Also, I am not clear of the multithreading support provided by ClickOS. In the NSDI paper it is mentioned that multiple threads can be launched to enable service function chaining. However, I haven't seen any working example.

stevepp avatar Mar 16 '16 18:03 stevepp

Hello

ClickOS doesn't support changing the configuration of a running router, you will need to kill the router and instantiate a new one. Note that you don't need to kill the full VM, you can use ClickOS-ctl to remove and install a new router in the same VM.

Alternatively you can investigate the use of element handlers to change configurations like IP addresses at runtime. This should be the preferred mechanism.

Regarding function chaining, on ClickOS we always talk about chaining multiple VMs, not threads inside the VM. ClickOS supports multiple threads, so indeed you can run multiple router configurations inside the same VM, however:

  • There is no mechanism (aka element) to connect two running routers inside the same VM, so you can't actually chain them
  • ClickOS doesn't support SMP, so you can only make use of a single vCPU per VM

fmanco avatar Mar 17 '16 09:03 fmanco

Great answer. Could you please evaluate the efforts associated with adding support for communication between running routers?

stevepp avatar Mar 17 '16 16:03 stevepp

I suppose you're talking about routers running inside the same VM. For that you'll need two things:

  • Implement some sort of IPC mechanism on top of MiniOS. Something like simplified unix sockets you can read, write and poll should be enough. Given the simplicity of MiniOS (cooperative scheduler and single address space) this should be relatively easy to implement.
  • A couple of new elements to read/write from this new interface. Something like FromDevice and ToDevice but that use the IPC mechanism referred above

You need to write all of this from scratch but it is not that much code. If you're considering writing something like this we are more than happy to help in the process.

fmanco avatar Mar 21 '16 23:03 fmanco