Skip to content

Review pod status on CI pipeline  #466

Closed

Description

@git-hyagi

A common scenario that seems to be constantly happening on pipelines execution is the following:

NAME                                                READY   STATUS    RESTARTS       AGE     IP            NODE       NOMINATED NODE   READINESS GATES
example-pulp-api-7677695b64-c6blm                   0/1     Running   0              80s     172.17.0.9    minikube   <none>           <none>
http: error: ConnectionError: HTTPConnectionPool(host='localhost', port=24880): Max retries exceeded with url: /api/galaxy/pulp/api/v3/status/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f67cdd63160>: Failed to establish a new connection: [Errno 111] Connection refused')) while doing GET request to URL: http://localhost:24880/api/galaxy/pulp/api/v3/status/
output=
rc=1
ERROR 4: Status page never accessible or returning success
NAME                                                READY   STATUS    RESTARTS      AGE   IP            NODE       NOMINATED NODE   READINESS GATES
example-pulp-api-7677695b64-c6blm                   1/1     Running   1 (29m ago)   33m   172.17.0.9    minikube   <none>           <none>

https://github.com/pulp/pulp-operator/runs/7098586003?check_suite_focus=true#step:16:47

## exit code 137 (received SIGKILL from host)
example-pulp-api-7677695b64-c6blm  137 

As @fao89 noticed, this started to happen after updating minikube to v1.26.

To help try to mitigate this issue, while we investigate it further, we could modify the pulp-operator-check-and-wait.sh script to check if the API process is in a listening state already (not the ideal solution, but can be helpful):

if [[ $(echo "$pods" | grep -c -v -E "STATUS|Running") -eq 0 && $(echo "$pods" | grep -c "web") -eq 1 ]]; then

-  if [[ $(echo "$pods" | grep -c -v -E "STATUS|Running") -eq 0 && $(echo "$pods" | grep -c "api") -eq 1 ]]; then
+  api_pod=$(kubectl get pods -l app.kubernetes.io/component=api -oname)
+  if [[ $(echo "$pods" | grep -c -v -E "STATUS|Running") -eq 0 && $(echo "$pods" | grep -c "api") -eq 1 && $(kubectl logs "$api_pod"|grep 'Listening at: ') ]]; then

Activity

  1. git-hyagi commented on Jun 30, 2022

    @git-hyagi
    CollaboratorAuthor

    An even better approach would be to use the kubectl wait command (still experimental but seems to be better than the "grep" workaround).

  2. fao89 commented on Jun 30, 2022

    @fao89
    Member
  3. added 5 commits that reference this issue on Jun 30, 2022
    b4f0812
    56b5d7f
    7292427
    8175238
    8abd531
  4. added 2 commits that reference this issue on Jul 1, 2022
    c4daced
    9904251
  5. added a commit that references this issue on Jul 3, 2022
    fc52a63
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions