From: Giuseppe Lettieri Date: Thu, 27 Sep 2012 14:19:59 +0000 (+0200) Subject: targets for setting the of controllers X-Git-Tag: sliver-openvswitch-1.8.90-3~5 X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=57675f94c6e5639f6d7ea622d441bf410cf84d3c targets for setting the of controllers add CONTROLLER_x=... for each bridge x in conf.mk (e.g., CONTROLLER_SENDER=tcp:127.0.0.1:6663). The run: make -j controllers to set the controllers. Note: use IP addresses and not DNS names. --- diff --git a/planetlab/exp-tool/Makefile b/planetlab/exp-tool/Makefile index a6b0103e2..09560eeb4 100644 --- a/planetlab/exp-tool/Makefile +++ b/planetlab/exp-tool/Makefile @@ -113,6 +113,10 @@ BRIDGES=$(foreach id,$(ALL_NODE_IDS),cache/bridge.$(id)) bridges: $(BRIDGES) .PHONY: bridges +CONTROLLERS=$(foreach id,$(ALL_NODE_IDS),cache/controller.$(id)) +controllers: $(CONTROLLERS) +.PHONY: controllers + ### node-oriented targets # check ssh connectivity cache/sshcheck.%: FORCE @@ -141,6 +145,10 @@ cache/bridge.%: cache/switch.% @$(SSH) $(HOST_$*) $(SUDO) sliver-ovs create-bridge $(BRIDGE) $(IP_$*) > $@ 2> $(call log,$@) || { rm $@; exit 1; } @echo Created bridge with tap $$(cat $@) on $(call display,$*) +cache/controller.%: cache/bridge.% + @echo "Setting controller on $(call display,$*) - logs in $(call log,$@)" + @$(SSH) $(HOST_$*) $(SUDO) ovs-vsctl set-controller $(BRIDGE) $(CONTROLLER_$*) &> $(call log,$@) || { rm $@; exit 1; } + # xxx this probably needs a more thorough cleanup in cache/ cache/stop.%: del-bridge.% @echo "Stopping switch & db on $(call display,$*)"