Add back check for datapath supported
This commit is contained in:
1 parent
a7feb41e62
commit
108f4784a6
3 files changed
+16
-1
No files matched your search
@@ -31,6 +31,19 @@ func deleteDatapath(args []string) error {
|
|||||||
return odp.DeleteDatapath(args[0])
|
return odp.DeleteDatapath(args[0])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Checks whether a datapath can be created by actually creating and destroying it
|
||||||
|
func checkDatapath(args []string) error {
|
||||||
|
if len(args) != 1 {
|
||||||
|
cmdUsage("check-datapath", "<datapath>")
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := createDatapath(args); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return odp.DeleteDatapath(args[0])
|
||||||
|
}
|
||||||
|
|
||||||
func addDatapathInterface(args []string) error {
|
func addDatapathInterface(args []string) error {
|
||||||
if len(args) != 2 {
|
if len(args) != 2 {
|
||||||
cmdUsage("add-datapath-interface", "<datapath> <interface>")
|
cmdUsage("add-datapath-interface", "<datapath> <interface>")
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ func init() {
|
|||||||
"detect-bridge-type": detectBridgeType,
|
"detect-bridge-type": detectBridgeType,
|
||||||
"create-datapath": createDatapath,
|
"create-datapath": createDatapath,
|
||||||
"delete-datapath": deleteDatapath,
|
"delete-datapath": deleteDatapath,
|
||||||
|
"check-datapath": checkDatapath,
|
||||||
"add-datapath-interface": addDatapathInterface,
|
"add-datapath-interface": addDatapathInterface,
|
||||||
"create-plugin-network": createPluginNetwork,
|
"create-plugin-network": createPluginNetwork,
|
||||||
"remove-plugin-network": removePluginNetwork,
|
"remove-plugin-network": removePluginNetwork,
|
||||||
|
|||||||
@@ -442,7 +442,8 @@ validate_bridge_type() {
|
|||||||
detect_bridge_type || return 0
|
detect_bridge_type || return 0
|
||||||
|
|
||||||
if [ -n "$LAUNCHING_ROUTER" ] ; then
|
if [ -n "$LAUNCHING_ROUTER" ] ; then
|
||||||
if [ "$BRIDGE_TYPE" = bridge -a -z "$WEAVE_NO_FASTDP" ] ; then
|
if [ "$BRIDGE_TYPE" = bridge -a -z "$WEAVE_NO_FASTDP" ] &&
|
||||||
|
util_op check-datapath 2>/dev/null ; then
|
||||||
cat <<EOF >&2
|
cat <<EOF >&2
|
||||||
WEAVE_NO_FASTDP is not set, but there is already a bridge present of
|
WEAVE_NO_FASTDP is not set, but there is already a bridge present of
|
||||||
the wrong type for fast datapath. Please do 'weave reset' to remove
|
the wrong type for fast datapath. Please do 'weave reset' to remove
|
||||||
|
|||||||
Reference in new issue
Block a user