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.
bridges: $(BRIDGES)
.PHONY: bridges
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
### node-oriented targets
# check ssh connectivity
cache/sshcheck.%: FORCE
@$(SSH) $(HOST_$*) $(SUDO) sliver-ovs create-bridge $(BRIDGE) $(IP_$*) > $@ 2> $(call log,$@) || { rm $@; exit 1; }
@echo Created bridge with tap $$(cat $@) on $(call display,$*)
@$(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,$*)"
# xxx this probably needs a more thorough cleanup in cache/
cache/stop.%: del-bridge.%
@echo "Stopping switch & db on $(call display,$*)"