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

[JENKINS-69399] Prevent offlining ec2 node if jobs in node queue #768

Conversation

grogersxyz
Copy link
Contributor

@grogersxyz grogersxyz commented Aug 22, 2022

Overview

In our current environment we have agents that are launched by the ec2-plugin that build individual Ivy/Maven Module builds. These module builds must build on the same node as their parent.

In the event that their parent node is terminated then the module can no longer be built.

To solve this in our environment we have made a small change to the EC2RetentionStrategy class that will check for items in the queue just prior to termination.

We have been using this change on multiple versions of the ec2-plugin for the last 6 years.

Changes made

This pull requests includes changes to the EC2RetentionStrategy that prior to a nodes timout checks if there are any builds in the nodes queue. If there are builds in the queue it prevents the node from timing out.

Associated ticket

JENKINS-69399

Checklist

  • 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

Timothy Bingaman and others added 4 commits August 22, 2022 18:31
Check to see if any items in the queue (including blocked items) ask for this node explicitly.
This is the case for individual Ivy/Maven Module builds which must build on the same node as their parent.
If there are any then don't offline this node.
@res0nance res0nance self-requested a review August 24, 2022 14:06
@res0nance res0nance added the enhancement Feature additions or enhancements label Aug 24, 2022
@res0nance res0nance merged commit 1a236e4 into jenkinsci:master Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature additions or enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants