test_clusterip_service_endpoint fails on connection timeout

Bug #1983990 reported by Bas de Bruijne
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Charmed Kubernetes Testing
Fix Released
Medium
Mateo Florido

Bug Description

In testrun https://solutions.qa.canonical.com/testruns/testRun/672dadce-072f-4fb4-9eb5-563315223ea9, test_clusterip_service_endpoint fails to connect to the hello_kubernetes pod:
```
=================================== FAILURES ===================================
_______________________ test_clusterip_service_endpoint ________________________
Traceback (most recent call last):
  File "/home/ubuntu/k8s-validation/jobs/integration/test_service_endpoints.py", line 124, in test_clusterip_service_endpoint
    raise e
  File "/home/ubuntu/k8s-validation/jobs/integration/test_service_endpoints.py", line 121, in test_clusterip_service_endpoint
    assert "Hello Kubernetes!" in action.results.get("Stdout", "")
AssertionError: assert 'Hello Kubernetes!' in ''
 + where '' = <built-in method get of dict object at 0x7fa82c44e040>('Stdout', '')
 + where <built-in method get of dict object at 0x7fa82c44e040> = {'Code': '28', 'Stderr': '* Trying 10.152.183.3:80...\n* TCP_NODELAY set\n % Total % Received % Xferd Average Speed Time Time Time Current\n Dload Upload Total Spent Left Speed\n\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:06 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:07 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:08 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:09 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:10 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:11 --:--:-- 0\r... 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:00 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:01 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:02 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:03 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:04 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:05 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:06 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:07 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:08 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:09 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:10 --:--:-- 0* connect to 10.152.183.3 port 80 failed: Connection timed out\n* Failed to connect to 10.152.183.3 port 80: Connection timed out\n\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:10 --:--:-- 0\n* Closing connection 0\ncurl: (28) Failed to connect to 10.152.183.3 port 80: Connection timed out\n'}.get
 + where {'Code': '28', 'Stderr': '* Trying 10.152.183.3:80...\n* TCP_NODELAY set\n % Total % Received % Xferd Average Speed Time Time Time Current\n Dload Upload Total Spent Left Speed\n\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:06 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:07 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:08 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:09 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:10 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:11 --:--:-- 0\r... 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:00 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:01 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:02 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:03 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:04 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:05 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:06 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:07 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:08 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:09 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:10 --:--:-- 0* connect to 10.152.183.3 port 80 failed: Connection timed out\n* Failed to connect to 10.152.183.3 port 80: Connection timed out\n\r 0 0 0 0 0 0 0 0 --:--:-- 0:02:10 --:--:-- 0\n* Closing connection 0\ncurl: (28) Failed to connect to 10.152.183.3 port 80: Connection timed out\n'} = <Action entity_id="22">.results
================================================================================
```

In the logs, we see little mention of this particular pod, except for:
```
6/baremetal/var/log/syslog:Aug 5 15:26:33 ip-172-31-47-31 kube-apiserver.daemon[150062]: I0805 15:26:33.346058 150062 alloc.go:327] "allocated clusterIPs" service="default/hello-world" clusterIPs=map[IPv4:10.152.183.3]
```

This run is on aws, but we see the same for k8s on openstack in this testrun:
https://solutions.qa.canonical.com/testruns/testRun/896a5199-5e70-4aa5-931b-e6f44cb31901

Crashdumps:
https://oil-jenkins.canonical.com/artifacts/672dadce-072f-4fb4-9eb5-563315223ea9/index.html
https://oil-jenkins.canonical.com/artifacts/896a5199-5e70-4aa5-931b-e6f44cb31901/index.html

Revision history for this message
Kevin W Monroe (kwmonroe) wrote :
Changed in charmed-kubernetes-testing:
milestone: none → 1.25
status: New → Fix Committed
assignee: nobody → Mateo Florido (mateoflorido)
importance: Undecided → Medium
Adam Dyess (addyess)
Changed in charmed-kubernetes-testing:
status: Fix Committed → Fix Released
Revision history for this message
Bas de Bruijne (basdbruijne) wrote :

Is this fix available on one of the tags already?

Revision history for this message
Mateo Florido (mateoflorido) wrote :

@basdbruijne Yes, fix is available in the 1.25 tag.

Revision history for this message
Bas de Bruijne (basdbruijne) wrote :
Download full text (11.8 KiB)

I'm seeing something similar in this test run (https://solutions.qa.canonical.com/v2/testruns/a9c727a4-7670-49ee-a617-127787248841):

```
2022-11-23-16:19:14 root DEBUG =================================== FAILURES ===================================
2022-11-23-16:19:14 root DEBUG _______________________ test_clusterip_service_endpoint ________________________
2022-11-23-16:19:14 root DEBUG Traceback (most recent call last):
2022-11-23-16:19:14 root DEBUG File "/home/ubuntu/k8s-validation/jobs/integration/test_service_endpoints.py", line 122, in test_clusterip_service_endpoint
2022-11-23-16:19:14 root DEBUG action = await juju_run(unit, cmd)
2022-11-23-16:19:14 root DEBUG File "/home/ubuntu/k8s-validation/jobs/integration/utils.py", line 623, in juju_run
2022-11-23-16:19:14 root DEBUG raise JujuRunError(unit, cmd, result)
2022-11-23-16:19:14 root DEBUG integration.utils.JujuRunError: `curl -vk --noproxy "10.152.183.59" http://10.152.183.59:80` failed on kubernetes-worker/4:
2022-11-23-16:19:14 root DEBUG
2022-11-23-16:19:14 root DEBUG * Trying 10.152.183.59:80...
2022-11-23-16:19:14 root DEBUG % Total % Received % Xferd Average Speed Time Time Time Current
2022-11-23-16:19:14 root DEBUG Dload Upload Total Spent Left Speed
2022-11-23-16:19:14 root DEBUG
  0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:06 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:07 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:08 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:09 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:10 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:11 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:12 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:13 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:14 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:15 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:16 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:17 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:18 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:19 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:21 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:22 --:--:-- 0
  0 0 0 0 0 0 ...

Revision history for this message
George Kraft (cynerva) wrote :

Looks like that last failure is in a different code path. This bug is fix released, can you open a new one?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.