Skip to content

Commit

Permalink
fix: github action cannot ping 114 (#3486)
Browse files Browse the repository at this point in the history
Signed-off-by: oilbeater <[email protected]>
  • Loading branch information
oilbeater authored Dec 4, 2023
1 parent 39e9201 commit 8628642
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,23 @@ ipv4:
POD_GATEWAY: "10.16.0.1"
SVC_CIDR: "10.96.0.0/12"
JOIN_CIDR: "100.64.0.0/16"
PINGER_EXTERNAL_ADDRESS: "114.114.114.114"
PINGER_EXTERNAL_ADDRESS: "1.1.1.1"
PINGER_EXTERNAL_DOMAIN: "alauda.cn."

ipv6:
POD_CIDR: "fd00:10:16::/112"
POD_GATEWAY: "fd00:10:16::1"
SVC_CIDR: "fd00:10:96::/112"
JOIN_CIDR: "fd00:100:64::/112"
PINGER_EXTERNAL_ADDRESS: "2400:3200::1"
PINGER_EXTERNAL_ADDRESS: "2606:4700:4700::1111"
PINGER_EXTERNAL_DOMAIN: "google.com."

dual_stack:
POD_CIDR: "10.16.0.0/16,fd00:10:16::/112"
POD_GATEWAY: "10.16.0.1,fd00:10:16::1"
SVC_CIDR: "10.96.0.0/12,fd00:10:96::/112"
JOIN_CIDR: "100.64.0.0/16,fd00:100:64::/112"
PINGER_EXTERNAL_ADDRESS: "114.114.114.114,2400:3200::1"
PINGER_EXTERNAL_ADDRESS: "1.1.1.1,2606:4700:4700::1111"
PINGER_EXTERNAL_DOMAIN: "google.com."

performance:
Expand Down
20 changes: 10 additions & 10 deletions dist/images/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,27 +49,27 @@ REGISTRY="docker.io/kubeovn"
VPC_NAT_IMAGE="vpc-nat-gateway"
VERSION="v1.13.0"
IMAGE_PULL_POLICY="IfNotPresent"
POD_CIDR="10.16.0.0/16" # Do NOT overlap with NODE/SVC/JOIN CIDR
POD_CIDR="10.16.0.0/16" # Do NOT overlap with NODE/SVC/JOIN CIDR
POD_GATEWAY="10.16.0.1"
SVC_CIDR="10.96.0.0/12" # Do NOT overlap with NODE/POD/JOIN CIDR
JOIN_CIDR="100.64.0.0/16" # Do NOT overlap with NODE/POD/SVC CIDR
PINGER_EXTERNAL_ADDRESS="114.114.114.114" # Pinger check external ip probe
SVC_CIDR="10.96.0.0/12" # Do NOT overlap with NODE/POD/JOIN CIDR
JOIN_CIDR="100.64.0.0/16" # Do NOT overlap with NODE/POD/SVC CIDR
PINGER_EXTERNAL_ADDRESS="1.1.1.1" # Pinger check external ip probe
PINGER_EXTERNAL_DOMAIN="alauda.cn." # Pinger check external domain probe
SVC_YAML_IPFAMILYPOLICY=""
if [ "$IPV6" = "true" ]; then
POD_CIDR="fd00:10:16::/112" # Do NOT overlap with NODE/SVC/JOIN CIDR
POD_CIDR="fd00:10:16::/112" # Do NOT overlap with NODE/SVC/JOIN CIDR
POD_GATEWAY="fd00:10:16::1"
SVC_CIDR="fd00:10:96::/112" # Do NOT overlap with NODE/POD/JOIN CIDR
JOIN_CIDR="fd00:100:64::/112" # Do NOT overlap with NODE/POD/SVC CIDR
PINGER_EXTERNAL_ADDRESS="2400:3200::1"
JOIN_CIDR="fd00:100:64::/112" # Do NOT overlap with NODE/POD/SVC CIDR
PINGER_EXTERNAL_ADDRESS="2606:4700:4700::1111"
PINGER_EXTERNAL_DOMAIN="google.com."
fi
if [ "$DUAL_STACK" = "true" ]; then
POD_CIDR="10.16.0.0/16,fd00:10:16::/112" # Do NOT overlap with NODE/SVC/JOIN CIDR
POD_CIDR="10.16.0.0/16,fd00:10:16::/112" # Do NOT overlap with NODE/SVC/JOIN CIDR
POD_GATEWAY="10.16.0.1,fd00:10:16::1"
SVC_CIDR="10.96.0.0/12,fd00:10:96::/112" # Do NOT overlap with NODE/POD/JOIN CIDR
JOIN_CIDR="100.64.0.0/16,fd00:100:64::/112" # Do NOT overlap with NODE/POD/SVC CIDR
PINGER_EXTERNAL_ADDRESS="114.114.114.114,2400:3200::1"
JOIN_CIDR="100.64.0.0/16,fd00:100:64::/112" # Do NOT overlap with NODE/POD/SVC CIDR
PINGER_EXTERNAL_ADDRESS="1.1.1.1,2606:4700:4700::1111"
PINGER_EXTERNAL_DOMAIN="google.com."
SVC_YAML_IPFAMILYPOLICY="ipFamilyPolicy: PreferDualStack"
fi
Expand Down
6 changes: 3 additions & 3 deletions dist/images/kubectl-ko
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ diagnose(){
kubectl exec -n $KUBE_OVN_NS "$pinger" -- ovs-vsctl show
echo ""
echo "#### pinger diagnose results:"
kubectl exec -n $KUBE_OVN_NS "$pinger" -- /kube-ovn/kube-ovn-pinger --mode=job --external-address=114.114.114.114,2400:3200::1 --target-ip-ports=$targetIPPorts
kubectl exec -n $KUBE_OVN_NS "$pinger" -- /kube-ovn/kube-ovn-pinger --mode=job --external-address=1.1.1.1,2606:4700:4700::1111 --target-ip-ports=$targetIPPorts
echo "### finish diagnose node $nodeName"
echo ""
done
Expand All @@ -703,7 +703,7 @@ diagnose(){
echo "#### ovs-vswitchd log:"
kubectl exec -n $KUBE_OVN_NS "$pinger" -- tail /var/log/openvswitch/ovs-vswitchd.log
echo ""
kubectl exec -n $KUBE_OVN_NS "$pinger" -- /kube-ovn/kube-ovn-pinger --mode=job --external-address=114.114.114.114,2400:3200::1 --target-ip-ports=$targetIPPorts
kubectl exec -n $KUBE_OVN_NS "$pinger" -- /kube-ovn/kube-ovn-pinger --mode=job --external-address=1.1.1.1,2606:4700:4700::1111 --target-ip-ports=$targetIPPorts
echo "### finish diagnose node $nodeName"
echo ""
;;
Expand All @@ -720,7 +720,7 @@ diagnose(){
for pinger in $pingers
do
echo "#### pinger $pinger on namespace $KUBE_OVN_NS diagnose results:"
kubectl exec -n $KUBE_OVN_NS "$pinger" -- /kube-ovn/kube-ovn-pinger --mode=job --ds-name=$subnetName-$CONN_CHECK_SERVER --ds-namespace=$KUBE_OVN_NS --enable-verbose-conn-check=true --external-address=114.114.114.114,2400:3200::1 --target-ip-ports=$targetIPPorts
kubectl exec -n $KUBE_OVN_NS "$pinger" -- /kube-ovn/kube-ovn-pinger --mode=job --ds-name=$subnetName-$CONN_CHECK_SERVER --ds-namespace=$KUBE_OVN_NS --enable-verbose-conn-check=true --external-address=1.1.1.1,2606:4700:4700::1111 --target-ip-ports=$targetIPPorts
echo ""
done
;;
Expand Down
2 changes: 1 addition & 1 deletion pkg/pinger/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func ParseFlags() (*Configuration, error) {
argExitCode = pflag.Int("exit-code", 0, "exit code when failure happens")
argInternalDNS = pflag.String("internal-dns", "kubernetes.default", "check dns from pod")
argExternalDNS = pflag.String("external-dns", "", "check external dns resolve from pod")
argExternalAddress = pflag.String("external-address", "", "check ping connection to an external address, default: 114.114.114.114")
argExternalAddress = pflag.String("external-address", "", "check ping connection to an external address, default: 1.1.1.1")
argTargetIPPorts = pflag.String("target-ip-ports", "", "target protocol ip and port, eg: 'tcp-169.254.1.1-8080,udp-169.254.2.2-8081'")
argNetworkMode = pflag.String("network-mode", "kube-ovn", "The cni plugin current cluster used, default: kube-ovn")
argEnableMetrics = pflag.Bool("enable-metrics", true, "Whether to support metrics query")
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/kube-ovn/kubectl-ko/kubectl-ko.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,6 @@ var _ = framework.Describe("[group:kubectl-ko]", func() {
framework.ConformanceIt(`should support "kubectl ko diagnose subnet IPPorts "`, func() {
f.SkipVersionPriorTo(1, 12, "This feature was introduce in v1.12")
execOrDie("ko diagnose subnet ovn-default")
execOrDie("ko diagnose IPPorts tcp-114.114.114.114-53,udp-114.114.114.114-53")
execOrDie("ko diagnose IPPorts tcp-1.1.1.1-53,udp-1.1.1.1-53")
})
})
4 changes: 2 additions & 2 deletions test/e2e/kube-ovn/subnet/subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,7 @@ func checkAccessExternal(podName, podNamespace, protocol string, expectReachable
ginkgo.By("checking external ip reachable")

if protocol == apiv1.ProtocolIPv4 || protocol == apiv1.ProtocolDual {
externalIP := "114.114.114.114"
externalIP := "1.1.1.1"
isv4ExternalIPReachable := func() bool {
cmd := fmt.Sprintf("ping %s -w 1", externalIP)
output, _ := exec.Command("bash", "-c", cmd).CombinedOutput()
Expand All @@ -1402,7 +1402,7 @@ func checkAccessExternal(podName, podNamespace, protocol string, expectReachable
}

if protocol == apiv1.ProtocolIPv6 || protocol == apiv1.ProtocolDual {
externalIP := "2400:3200::1"
externalIP := "2606:4700:4700::1111"
isv6ExternalIPReachable := func() bool {
cmd := fmt.Sprintf("ping6 %s -w 1", externalIP)
output, _ := exec.Command("bash", "-c", cmd).CombinedOutput()
Expand Down
2 changes: 1 addition & 1 deletion yamls/kube-ovn-dual-stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ spec:
command:
- /kube-ovn/kube-ovn-pinger
args:
- --external-address=114.114.114.114,2400:3200::1
- --external-address=1.1.1.1,2606:4700:4700::1111
- --external-dns=google.com.
- --logtostderr=false
- --alsologtostderr=true
Expand Down
2 changes: 1 addition & 1 deletion yamls/kube-ovn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ spec:
command:
- /kube-ovn/kube-ovn-pinger
args:
- --external-address=114.114.114.114
- --external-address=1.1.1.1
- --external-dns=alauda.cn.
- --logtostderr=false
- --alsologtostderr=true
Expand Down

0 comments on commit 8628642

Please sign in to comment.