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

update statefulset pod when it is not running and has ErrImagePullBackOff error #89801

Conversation

chenkaiyue
Copy link
Contributor

@chenkaiyue chenkaiyue commented Apr 3, 2020

What type of PR is this?

/kind bug

What this PR does / why we need it:
update statefulset pod when it is not running and has ErrImagePullBackOff error

Which issue(s) this PR fixes:
Fixes #88896

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

update statefulset pod when it is not running and has ErrImagePullBackOff error

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Apr 3, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @chenkaiyue. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. sig/apps Categorizes an issue or PR as relevant to SIG Apps. labels Apr 3, 2020
@k8s-ci-robot k8s-ci-robot removed the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Apr 3, 2020
@chenkaiyue
Copy link
Contributor Author

/assign @soltysh

@@ -219,6 +219,10 @@ func isTerminating(pod *v1.Pod) bool {
return pod.DeletionTimestamp != nil
}

// isPending returns true if pod has a Phase of PodPending
func isPending(pod *v1.Pod) bool{
return pod.Status.Phase != v1.PodPending
Copy link
Contributor

Choose a reason for hiding this comment

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

The func name is isPending and the check is pod.Status.Phase != v1.PodPending. Is it expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My fault, i have corrected it, THX!

@chenkaiyue chenkaiyue force-pushed the update-statefulset-pod-when-pending branch from 73817bd to e4d8e9c Compare April 7, 2020 02:01
@chenkaiyue
Copy link
Contributor Author

@mortent @krmayankk Can you help review this pr?

@chenkaiyue
Copy link
Contributor Author

@soltysh Can you help review this pr?

@ialidzhikov
Copy link
Contributor

/kind bug

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Apr 20, 2020
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 19, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 18, 2020
@silenceper
Copy link

I encountered the same problem and hope to fix it soon.

@pigletfly
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 8, 2020
@silenceper
Copy link

@chenkaiyue ci failed.

@soltysh
Copy link
Contributor

soltysh commented Oct 2, 2020

@chenkaiyue can you update your PR?

@chenkaiyue
Copy link
Contributor Author

@chenkaiyue can you update your PR?

ok

@chenkaiyue chenkaiyue force-pushed the update-statefulset-pod-when-pending branch from e4d8e9c to ae77366 Compare October 14, 2020 13:49
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 14, 2020
@chenkaiyue chenkaiyue force-pushed the update-statefulset-pod-when-pending branch 3 times, most recently from c6703fb to 92250c3 Compare October 14, 2020 15:30
@chenkaiyue chenkaiyue changed the title update statefulset pod when pending update statefulset pod's image in updateStatefulSet Oct 15, 2020
@chenkaiyue chenkaiyue force-pushed the update-statefulset-pod-when-pending branch from 92250c3 to 8691dd2 Compare October 15, 2020 10:43
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 15, 2020
@chenkaiyue chenkaiyue changed the title update statefulset pod's image in updateStatefulSet update image when pod is not running and has ErrImagePullBackOff error Oct 15, 2020
@chenkaiyue
Copy link
Contributor Author

chenkaiyue commented Oct 15, 2020

@chenkaiyue can you update your PR?

@soltysh Hi, I have updated the PR, and the CI is ok, can you help review?

@chenkaiyue chenkaiyue changed the title update image when pod is not running and has ErrImagePullBackOff error update pod when pod is not running and has ErrImagePullBackOff error Oct 15, 2020
@chenkaiyue chenkaiyue changed the title update pod when pod is not running and has ErrImagePullBackOff error update statefulset pod when it is not running and has ErrImagePullBackOff error Oct 15, 2020
Copy link
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

One more nit and you're good to go
/approve

@@ -17,6 +17,7 @@ limitations under the License.
package statefulset

import (
"k8s.io/kubernetes/pkg/kubelet/images"
Copy link
Contributor

Choose a reason for hiding this comment

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

Import order: golang stdlib, 3rd party, k8s imports

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Import order: golang stdlib, 3rd party, k8s imports

Thx~, I have fixed it.

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 15, 2020
@chenkaiyue chenkaiyue force-pushed the update-statefulset-pod-when-pending branch from c8ff342 to e402042 Compare October 15, 2020 13:27
@chenkaiyue
Copy link
Contributor Author

@mortent @krmayankk Can you help review?

Copy link
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

/approve cancel
/hold
None of our controllers uses that much of insights into pod lifecycle. I think it would be good to have a broader discussion within sig-apps how to approach pod failures due to image pulls and alike in the controllers. I've added this topic for next sig-apps call on Nov 2nd.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 29, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: chenkaiyue
To complete the pull request process, please assign soltysh after the PR has been reviewed.
You can assign the PR to them by writing /assign @soltysh in a comment when ready.

The full list of commands accepted by this bot can be found 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

@k8s-ci-robot k8s-ci-robot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 29, 2020
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closed this PR.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/apps Categorizes an issue or PR as relevant to SIG Apps. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StatefulSet does not update the Pod image
7 participants