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

fix: Ensure modelmesh container comes last in list #202

Merged
merged 1 commit into from
Aug 3, 2022

Conversation

njhill
Copy link
Member

@njhill njhill commented Aug 1, 2022

Motivation

Kubernetes starts containers sequentially in order, which can mean the start of later containers is held up if their images have to be pulled. For large model server images this can cause a problem because model-mesh waits for a limited amount of time at startup for the runtime to become ready before returning ready from its own probe.

Making the mm container last in the list ensures that no image pulling time will be included in this startup polling time and avoids unnecessary timeouts / extended readiness probe failures.

Modifications

  • Add ensureMMContainerIsLast function to runtime deployment reconciliation logic which runs after other modifications to the pod spec.
  • Update unit test fixtures accordingly

Result

More stable deployments in cases where the model server image takes a long time to pull.

Signed-off-by: Nick Hill [email protected]

Motivation

Kubernetes starts containers sequentially in order, which can mean the start of later containers is held up if their images have to be pulled. For large model server images this can cause a problem because model-mesh waits for a limited amount of time at startup for the runtime to become ready before returning ready from its own probe.

Making the `mm` container last in the list ensures that no image pulling time will be included in this startup polling time and avoids unnecessary timeouts / extended readiness probe failures.

Modifications

Add ensureMMContainerIsLast function to runtime deployment reconciliation logic which runs after other modifications to the pod spec.

Result

More stable deployments in cases where the model server image takes a long time to pull.

Signed-off-by: Nick Hill <[email protected]>
Copy link
Contributor

@chinhuang007 chinhuang007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@kserve-oss-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chinhuang007, njhill

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@chinhuang007
Copy link
Contributor

/lgtm

@kserve-oss-bot kserve-oss-bot merged commit d879588 into main Aug 3, 2022
@njhill njhill deleted the container-ordering branch August 8, 2022 18:35
@ckadner ckadner changed the title feat: Ensure modelmesh container comes last in list fix: Ensure modelmesh container comes last in list Jan 12, 2023
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