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

Add Verbose Filters to Counting Existing Instances #650

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pyieh
Copy link
Contributor

@pyieh pyieh commented Sep 14, 2021

In the case of when there are multiple Jenkins in the same AWS account sharing the same URL but in different VPCs (e.g. when migrating from 1 Kubernetes cluster to another)
Similar (but not exactly) to : #310

When counting the number of existing instances to determine if there's capacity to create new instances for a given SlaveTemplate, there is a bug where the EC2 plugin will count EC2 instances regardless of different characteristics than the ones configured on the given SlaveTemplate: notably security group, subnet, VPC, and IAM roles. Instances with different characteristics than those on the given SlaveTemplate shouldn't be counted as it could have different network permissions, be unreachable due to different subnets, etc.

Fix is to add more verbose filters when making the AWS request for instance count. The following filters were added: security group, subnet, IAM role, VPC.

Note VPC is only added when counting all instances and uses the given SlaveTemplate's configured subnet to get the respective VPC.

  • 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

@pyieh pyieh changed the title Add Security Group and Subnet Filters to Counting Add Verbose Filters to Existing Counting Sep 15, 2021
@pyieh pyieh changed the title Add Verbose Filters to Existing Counting Add Verbose Filters to Counting Existing Instances Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant