cnti-testcatalog / testsuite

📞📱☎️📡🌐 Cloud Native Telecom Initiative (CNTI) Test Catalog is a tool to check for and provide feedback on the use of K8s + cloud native best practices in networking applications and platforms
https://wiki.lfnetworking.org/display/LN/Test+Catalog
Apache License 2.0
169 stars 70 forks source link

[BUG] reasonable_image_size passing in GH actions but probably falsely #2081

Open martin-mat opened 1 week ago

martin-mat commented 1 week ago

Describe the bug Reasonable_image_size passes but probably fatal errors are seen in logs Example: https://github.com/cnti-testcatalog/testsuite/actions/runs/9588046938/job/26447210155

Issues:

I, [2024-06-19 21:54:01 +00:00 #147289] INFO -- cnf-testsuite: cnf_resource_ymls I, [2024-06-19 21:54:01 +00:00 #147289] INFO -- cnf-testsuite: cnf_installation_method config : CNFManager::Config


- coredns is not installed and waiting for it timeouts

I, [2024-06-19 21:58:28 +00:00 #147289] INFO -- cnf-testsuite: current_replicas: -1, desired_replicas: -1, unavailable_replicas: -1 I, [2024-06-19 21:58:28 +00:00 #147289] INFO -- cnf-testsuite: KubectlClient::Get.resource_wait_for_install attempt: 180; is_ready: false I, [2024-06-19 21:58:29 +00:00 #147289] INFO -- cnf-testsuite: KubectlClient::Get.replica_count command: kubectl get Deployment --namespace=default coredns-coredns -o=jsonpath='{.status.replicas}' I, [2024-06-19 21:58:30 +00:00 #147289] INFO -- cnf-testsuite: KubectlClient::Get.replica_count stderr: Error from server (NotFound): deployments.apps "coredns-coredns" not found

I, [2024-06-19 21:58:30 +00:00 #147289] INFO -- cnf-testsuite: KubectlClient::Get.replica_count command: kubectl get Deployment --namespace=default coredns-coredns -o=jsonpath='{.status.unavailableReplicas}' I, [2024-06-19 21:58:30 +00:00 #147289] INFO -- cnf-testsuite: KubectlClient::Get.replica_count stderr: Error from server (NotFound): deployments.apps "coredns-coredns" not found

I, [2024-06-19 21:58:30 +00:00 #147289] INFO -- cnf-testsuite: KubectlClient::Get.replica_count command: kubectl get Deployment --namespace=default coredns-coredns -o=jsonpath='{.status.readyReplicas}' I, [2024-06-19 21:58:30 +00:00 #147289] INFO -- cnf-testsuite: KubectlClient::Get.replica_count stderr: Error from server (NotFound): deployments.apps "coredns-coredns" not found



Analyze failures, provide fixes.
svteb commented 1 week ago

The spec test passes correctly on a local machine because it deploys a different unprotected sample cnf. After a bit of digging I discovered issue #594 and its solution in #602, which adds support for protected images (helm charts that require docker credentials to pull the image).

Notably this commit was the first one to add the functionality into reasonable_image_size spec test. At first there were only 3 protected variables, and later on the fourth one was added.

Possible solutions:

  1. We could attempt to not use the fourth ENV that was added later (it could have been erroneous when the secret was added and the issue could have gone unnoticed - assuming that the spec test was ever functional).
  2. Create a new protected image for the purposes of this test (should not be too difficult).
  3. There might also be an issue with protected images altogether.

Finally, the image might not even exist anymore.

martin-mat commented 1 week ago

Just to note, I don't see any reason why protected image name should be stored in secrets.

martin-mat commented 6 days ago

1963