mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +00:00
tests: Extends agnhost netexec udp buffers
Currently, the UDP buffer sizes are set to 1024 bytes. Larger requests will not be read entirely by the UDP handlers, which can lead to tests relying on this to fail.
This commit is contained in:
parent
99d40d3d44
commit
8880a4f74f
@ -40,7 +40,7 @@ For example, let's consider the following `pod.yaml` file:
|
||||
containers:
|
||||
- args:
|
||||
- dns-suffix
|
||||
image: gcr.io/kubernetes-e2e-test-images/agnhost:2.2
|
||||
image: gcr.io/kubernetes-e2e-test-images/agnhost:2.7
|
||||
name: agnhost
|
||||
dnsConfig:
|
||||
nameservers:
|
||||
@ -258,14 +258,14 @@ Examples:
|
||||
|
||||
```console
|
||||
docker run -i \
|
||||
gcr.io/kubernetes-e2e-test-images/agnhost:2.2 \
|
||||
gcr.io/kubernetes-e2e-test-images/agnhost:2.7 \
|
||||
logs-generator --log-lines-total 10 --run-duration 1s
|
||||
```
|
||||
|
||||
```console
|
||||
kubectl run logs-generator \
|
||||
--generator=run-pod/v1 \
|
||||
--image=gcr.io/kubernetes-e2e-test-images/agnhost:2.2 \
|
||||
--image=gcr.io/kubernetes-e2e-test-images/agnhost:2.7 \
|
||||
--restart=Never \
|
||||
-- logs-generator -t 10 -d 1s
|
||||
```
|
||||
@ -392,7 +392,7 @@ Usage:
|
||||
```console
|
||||
kubectl run test-agnhost \
|
||||
--generator=run-pod/v1 \
|
||||
--image=gcr.io/kubernetes-e2e-test-images/agnhost:2.2 \
|
||||
--image=gcr.io/kubernetes-e2e-test-images/agnhost:2.7 \
|
||||
--restart=Never \
|
||||
--env "POD_IP=<POD_IP>" \
|
||||
--env "NODE_IP=<NODE_IP>" \
|
||||
@ -447,7 +447,7 @@ Usage:
|
||||
```console
|
||||
kubectl run test-agnhost \
|
||||
--generator=run-pod/v1 \
|
||||
--image=gcr.io/kubernetes-e2e-test-images/agnhost:2.1 \
|
||||
--image=gcr.io/kubernetes-e2e-test-images/agnhost:2.7 \
|
||||
--restart=Never \
|
||||
--env "BIND_ADDRESS=localhost" \
|
||||
--env "BIND_PORT=8080" \
|
||||
@ -534,6 +534,6 @@ The image contains `iperf`.
|
||||
|
||||
## Image
|
||||
|
||||
The image can be found at `gcr.io/kubernetes-e2e-test-images/agnhost:2.2` for Linux
|
||||
containers, and `e2eteam/agnhost:2.2` for Windows containers. In the future, the same
|
||||
The image can be found at `gcr.io/kubernetes-e2e-test-images/agnhost:2.7` for Linux
|
||||
containers, and `e2eteam/agnhost:2.7` for Windows containers. In the future, the same
|
||||
repository can be used for both OSes.
|
||||
|
@ -1 +1 @@
|
||||
2.6
|
||||
2.7
|
||||
|
@ -44,7 +44,7 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
rootCmd := &cobra.Command{Use: "app", Version: "2.6"}
|
||||
rootCmd := &cobra.Command{Use: "app", Version: "2.7"}
|
||||
|
||||
rootCmd.AddCommand(auditproxy.CmdAuditProxy)
|
||||
rootCmd.AddCommand(connect.CmdConnect)
|
||||
|
@ -288,7 +288,7 @@ func dialUDP(request string, remoteAddress *net.UDPAddr) (string, error) {
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("udp connection write failed. err:%v", err)
|
||||
}
|
||||
udpResponse := make([]byte, 1024)
|
||||
udpResponse := make([]byte, 2048)
|
||||
Conn.SetReadDeadline(time.Now().Add(5 * time.Second))
|
||||
count, err := Conn.Read(udpResponse)
|
||||
if err != nil || count == 0 {
|
||||
@ -393,7 +393,7 @@ func startUDPServer(udpPort int) {
|
||||
serverConn, err := net.ListenUDP("udp", serverAddress)
|
||||
assertNoError(err)
|
||||
defer serverConn.Close()
|
||||
buf := make([]byte, 1024)
|
||||
buf := make([]byte, 2048)
|
||||
|
||||
log.Printf("Started UDP server")
|
||||
// Start responding to readiness probes.
|
||||
|
Loading…
Reference in New Issue
Block a user