1.19 List index out of range when trying to get phase for test_clusterip_service_endpoint
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Charmed Kubernetes Testing |
Fix Released
|
High
|
Unassigned |
Bug Description
Using hash ea33970, the same hash used to test the 1.19 release, test service endpoint is failing to find the phase for the hello-world container. I'm not seeing anything in the logs as to why that data would have been missing from the pod status, other than get po returning an empty list.
the testrun with crashdump can be found here:
https:/
ERROR: py3: commands failed
2020-11-07-19:53:06 root ERROR [localhost] STDERR follows:
None
2020-11-07 19:53:06.597915 Traceback (most recent call last):
2020-11-07 19:53:06.597930 File "/home/
2020-11-07 19:53:06.597943 await setup_svc(
2020-11-07 19:53:06.597955 File "/home/
2020-11-07 19:53:06.597968 await retry_async_
2020-11-07 19:53:06.597980 File "/home/
2020-11-07 19:53:06.597993 if await func(*args):
2020-11-07 19:53:06.598006 File "/home/
2020-11-07 19:53:06.598019 phase = pod["items"
2020-11-07 19:53:06.598031 IndexError: list index out of range
2020-11-07 19:53:06.598043 -------
2020-11-07 19:53:06.598056 WARNING juju.client.
2020-11-07 19:53:06.598068 WARNING juju.client.
2020-11-07 19:53:06.598081 WARNING juju.model:
2020-11-07 19:53:06.598093 -------
2020-11-07 19:53:06.598106 INFO sh.command:
2020-11-07 19:53:06.598118 INFO sh.command:
2020-11-07 19:53:06.598131 INFO sh.command:
2020-11-07 19:53:06.598145 INFO sh.command:
2020-11-07 19:53:06.598157 INFO sh.command:
2020-11-07 19:53:06.598170 INFO sh.command:
2020-11-07 19:53:06.598182 INFO sh.command:
Changed in charmed-kubernetes-testing: | |
status: | Triaged → Fix Committed |
Changed in charmed-kubernetes-testing: | |
status: | Fix Committed → Fix Released |
It looks like the is_pod_running function doesn't properly handle the case where the Pod doesn't exist yet. It's entirely possible that the Pod would not exist at that point, since the test does not create the Pod directly. The test creates a Deployment, and there may be a delay before Kubernetes gets around to creating the Pods that go with it.