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

Cancel Queue Items for Pod - TerminateAgentOnContainerTerminated Listener #1118

Merged
merged 3 commits into from
Mar 21, 2022

Conversation

mor120
Copy link
Contributor

@mor120 mor120 commented Jan 20, 2022

Signed-off-by: Mor Cohen mocohen@redhat.com

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

Description:
When creating a pod with a miss configured container, its state becomes CreateContainerError, and for some reason (probably because kubernetes-client) the pipeline enters to an endless loop that creates pods until the pipeline is stopped (aborted/pipeline timeout/etc.. but not by a timeout set by this plugin.).
Currently, the plugin knows how to handle errors like ImagePullBackOff state or when one of the containers are terminated, but not when the pod's state is CreateContainerError.
Jira ticket:
https://issues.jenkins.io/browse/JENKINS-66822

@mor120 mor120 changed the title Add TerminateAgentOnCreateContainerError Create TerminateAgentOnCreateContainerError Listener Jan 20, 2022
@Vlatombe Vlatombe added the enhancement Improvements label Feb 22, 2022
@Vlatombe
Copy link
Member

I would still like to see a unit test showing the condition e.g. some pod with a container calling a non-existent command should do it.

@mor120
Copy link
Contributor Author

mor120 commented Feb 26, 2022

Hey @Vlatombe i'm notifying that I didn't abandon this,
Will make the changes on the next weekend.

Signed-off-by: Mor Cohen <mocohen@redhat.com>
@mor120 mor120 force-pushed the terminate-on-create-container-error branch 2 times, most recently from e92e3e9 to ccbd9d0 Compare March 11, 2022 15:30
@mor120 mor120 force-pushed the terminate-on-create-container-error branch from ccbd9d0 to b893977 Compare March 11, 2022 20:37
@mor120 mor120 changed the title Create TerminateAgentOnCreateContainerError Listener Cancel Queue Items for Pod - TerminateAgentOnContainerTerminated Listener Mar 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants