Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pod-sweeper] Skip Pending pods that haven't started yet #332

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

szemek
Copy link

@szemek szemek commented May 20, 2024

What

Solves issue:

date: invalid date '+%s'
/script/sweep-pod.sh: line 53: [: : integer expression expected

How

Some pods might be in Pending status when sweep-pod.sh is running get_job_pods

In shell session below you can see how statuses and dates may change

➜ [21:46:48] $ get_job_pods
 destination-s3-write-2454-0-hkttw Pending
 orchestrator-repl-job-2454-attempt-0 Running 2024-05-20T19:46:08Z 2024-05-20T19:46:05Z
 source-appstore-read-2454-0-djwvt Pending
➜ [21:46:49] $ get_job_pods
 destination-s3-write-2454-0-hkttw Pending 2024-05-20T19:47:22Z 2024-05-20T19:47:19Z
 orchestrator-repl-job-2454-attempt-0 Running 2024-05-20T19:46:08Z 2024-05-20T19:46:05Z
 source-appstore-read-2454-0-djwvt Pending 2024-05-20T19:47:21Z 2024-05-20T19:47:19Z
➜ [21:47:22] $ get_job_pods
 destination-s3-write-2454-0-hkttw Pending 2024-05-20T19:47:22Z 2024-05-20T19:47:19Z
 orchestrator-repl-job-2454-attempt-0 Running 2024-05-20T19:46:08Z 2024-05-20T19:46:05Z
 source-appstore-read-2454-0-djwvt Running 2024-05-20T19:47:21Z 2024-05-20T19:47:19Z
➜ [21:47:37] $ get_job_pods
 destination-s3-write-2454-0-hkttw Succeeded 2024-05-20T19:47:53Z 2024-05-20T19:47:19Z
 orchestrator-repl-job-2454-attempt-0 Succeeded 2024-05-20T19:47:53Z 2024-05-20T19:46:05Z
 source-appstore-read-2454-0-djwvt Succeeded 2024-05-20T19:47:43Z 2024-05-20T19:47:19Z

Extra condition skips pods that haven't started yet. Pod might be longer in Pending state e.g. when it is necessary to spawn new Kubernetes node to run that pod.

Recommended reading order

  1. charts/airbyte-pod-sweeper/templates/configmap.yaml

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

@CLAassistant
Copy link

CLAassistant commented May 20, 2024

CLA assistant check
All committers have signed the CLA.

Solves issue:
```
date: invalid date '+%s'
/script/sweep-pod.sh: line 53: [: : integer expression expected
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants