diff --git a/dist/images/install-pre-1.16.sh b/dist/images/install-pre-1.16.sh index 28d53057014..5c827f9f014 100644 --- a/dist/images/install-pre-1.16.sh +++ b/dist/images/install-pre-1.16.sh @@ -1844,6 +1844,9 @@ showHelp(){ echo " nbctl [ovn-nbctl options ...] invoke ovn-nbctl" echo " sbctl [ovn-sbctl options ...] invoke ovn-sbctl" echo " vsctl {nodeName} [ovs-vsctl options ...] invoke ovs-vsctl on selected node" + echo " ofctl {nodeName} [ovs-ofctl options ...] invoke ovs-ofctl on selected node" + echo " dpctl {nodeName} [ovs-dpctl options ...] invoke ovs-dpctl on selected node" + echo " appctl {nodeName} [ovs-appctl options ...] invoke ovs-appctl on selected node" echo " tcpdump {namespace/podname} [tcpdump options ...] capture pod traffic" echo " trace {namespace/podname} {target ip address} {icmp|tcp|udp} [target tcp or udp port] trace ovn microflow of specific packet" echo " diagnose {all|node} [nodename] diagnose connectivity of all nodes or a specific node" @@ -1973,7 +1976,8 @@ trace(){ esac } -vsctl(){ +xxctl(){ + subcommand="$1"; shift nodeName="$1"; shift kubectl get no "$nodeName" > /dev/null ovsPod=$(kubectl get pod -n $KUBE_OVN_NS -o wide | grep " $nodeName " | grep ovs-ovn | awk '{print $1}') @@ -1981,7 +1985,7 @@ vsctl(){ echo "ovs pod doesn't exist on node $nodeName" exit 1 fi - kubectl exec "$ovsPod" -n $KUBE_OVN_NS -- ovs-vsctl "$@" + kubectl exec "$ovsPod" -n $KUBE_OVN_NS -- ovs-$subcommand "$@" } diagnose(){ @@ -2121,8 +2125,8 @@ case $subcommand in sbctl) kubectl exec "$OVN_SB_POD" -n $KUBE_OVN_NS -c ovn-central -- ovn-sbctl "$@" ;; - vsctl) - vsctl "$@" + vsctl|ofctl|dpctl|appctl) + xxctl "$subcommand" "$@" ;; tcpdump) tcpdump "$@" diff --git a/dist/images/install.sh b/dist/images/install.sh index 23ad722a99f..3b21327f85a 100755 --- a/dist/images/install.sh +++ b/dist/images/install.sh @@ -1882,6 +1882,9 @@ showHelp(){ echo " nbctl [ovn-nbctl options ...] invoke ovn-nbctl" echo " sbctl [ovn-sbctl options ...] invoke ovn-sbctl" echo " vsctl {nodeName} [ovs-vsctl options ...] invoke ovs-vsctl on selected node" + echo " ofctl {nodeName} [ovs-ofctl options ...] invoke ovs-ofctl on selected node" + echo " dpctl {nodeName} [ovs-dpctl options ...] invoke ovs-dpctl on selected node" + echo " appctl {nodeName} [ovs-appctl options ...] invoke ovs-appctl on selected node" echo " tcpdump {namespace/podname} [tcpdump options ...] capture pod traffic" echo " trace {namespace/podname} {target ip address} {icmp|tcp|udp} [target tcp or udp port] trace ovn microflow of specific packet" echo " diagnose {all|node} [nodename] diagnose connectivity of all nodes or a specific node" @@ -2011,7 +2014,8 @@ trace(){ esac } -vsctl(){ +xxctl(){ + subcommand="$1"; shift nodeName="$1"; shift kubectl get no "$nodeName" > /dev/null ovsPod=$(kubectl get pod -n $KUBE_OVN_NS -o wide | grep " $nodeName " | grep ovs-ovn | awk '{print $1}') @@ -2019,7 +2023,7 @@ vsctl(){ echo "ovs pod doesn't exist on node $nodeName" exit 1 fi - kubectl exec "$ovsPod" -n $KUBE_OVN_NS -- ovs-vsctl "$@" + kubectl exec "$ovsPod" -n $KUBE_OVN_NS -- ovs-$subcommand "$@" } diagnose(){ @@ -2159,8 +2163,8 @@ case $subcommand in sbctl) kubectl exec "$OVN_SB_POD" -n $KUBE_OVN_NS -c ovn-central -- ovn-sbctl "$@" ;; - vsctl) - vsctl "$@" + vsctl|ofctl|dpctl|appctl) + xxctl "$subcommand" "$@" ;; tcpdump) tcpdump "$@" diff --git a/dist/images/kubectl-ko b/dist/images/kubectl-ko index 68d6426c7ac..29b319b22ff 100644 --- a/dist/images/kubectl-ko +++ b/dist/images/kubectl-ko @@ -11,6 +11,9 @@ showHelp(){ echo " nbctl [ovn-nbctl options ...] invoke ovn-nbctl" echo " sbctl [ovn-sbctl options ...] invoke ovn-sbctl" echo " vsctl {nodeName} [ovs-vsctl options ...] invoke ovs-vsctl on selected node" + echo " ofctl {nodeName} [ovs-ofctl options ...] invoke ovs-ofctl on selected node" + echo " dpctl {nodeName} [ovs-dpctl options ...] invoke ovs-dpctl on selected node" + echo " appctl {nodeName} [ovs-appctl options ...] invoke ovs-appctl on selected node" echo " tcpdump {namespace/podname} [tcpdump options ...] capture pod traffic" echo " trace {namespace/podname} {target ip address} {icmp|tcp|udp} [target tcp or udp port] trace ovn microflow of specific packet" echo " diagnose {all|node} [nodename] diagnose connectivity of all nodes or a specific node" @@ -140,7 +143,8 @@ trace(){ esac } -vsctl(){ +xxctl(){ + subcommand="$1"; shift nodeName="$1"; shift kubectl get no "$nodeName" > /dev/null ovsPod=$(kubectl get pod -n $KUBE_OVN_NS -o wide | grep " $nodeName " | grep ovs-ovn | awk '{print $1}') @@ -148,7 +152,7 @@ vsctl(){ echo "ovs pod doesn't exist on node $nodeName" exit 1 fi - kubectl exec "$ovsPod" -n $KUBE_OVN_NS -- ovs-vsctl "$@" + kubectl exec "$ovsPod" -n $KUBE_OVN_NS -- ovs-$subcommand "$@" } diagnose(){ @@ -287,8 +291,8 @@ case $subcommand in sbctl) kubectl exec "$OVN_SB_POD" -n $KUBE_OVN_NS -c ovn-central -- ovn-sbctl "$@" ;; - vsctl) - vsctl "$@" + vsctl|ofctl|dpctl|appctl) + xxctl "$subcommand" "$@" ;; tcpdump) tcpdump "$@"