Skip to content

Fix pod ready state bug at creation#477

Merged
dciangot merged 3 commits intomainfrom
claude/investigate-pod-ready-state-mkrRf
Dec 15, 2025
Merged

Fix pod ready state bug at creation#477
dciangot merged 3 commits intomainfrom
claude/investigate-pod-ready-state-mkrRf

Conversation

@dciangot
Copy link
Member

Summary


Related issue :

Previously, pods with init containers were incorrectly set to phase="Running"
with Ready=True immediately upon creation, even though their containers were
still in "Waiting" state with reason "Remote pod submitted".

This fix changes the behavior so that pods with init containers:
- Start in phase="Pending" (not "Running")
- Have Ready=False (not True)
- Have PodInitialized=False (correctly indicates init containers not complete)

This aligns with standard Kubernetes behavior where pods should only be marked
as Ready when their containers are actually ready to serve traffic.

Signed-off-by: Diego Ciangottini <diego.ciangottini@pg.infn.it>
Previously, containers in pods without init containers were incorrectly
marked as Ready=true immediately upon creation, even though they were
still in "Waiting" state with reason "Remote pod submitted".

This fix ensures that all containers start with Ready=false when created,
since they are in Waiting state. The status will be updated to Ready=true
later by the status polling loop once the containers are actually running.

This change affects both pods with and without init containers, ensuring
consistent behavior where containers are only marked Ready when they are
actually ready to serve traffic, not just when they're submitted.

Signed-off-by: Diego Ciangottini <diego.ciangottini@pg.infn.it>
The hasInitContainers variable was no longer needed after fixing the
container Ready status to always be false at creation time. This commit
removes the unused variable declaration to fix compilation.

Signed-off-by: Diego Ciangottini <diego.ciangottini@pg.infn.it>
@dciangot dciangot force-pushed the claude/investigate-pod-ready-state-mkrRf branch from c817f79 to 1adc5a8 Compare December 15, 2025 15:49
@netlify
Copy link

netlify bot commented Dec 15, 2025

Deploy Preview for interlink-dev canceled.

Name Link
🔨 Latest commit c817f79
🔍 Latest deploy log https://app.netlify.com/projects/interlink-dev/deploys/69402e0aba858a0008d2506c

@dciangot
Copy link
Member Author

Tested integration locally

@netlify
Copy link

netlify bot commented Dec 15, 2025

Deploy Preview for interlink-dev canceled.

Name Link
🔨 Latest commit 1adc5a8
🔍 Latest deploy log https://app.netlify.com/projects/interlink-dev/deploys/69402e1b46b8bb000840efeb

@dciangot dciangot merged commit 6257a5f into main Dec 15, 2025
12 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants