Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-62647

Global instance cap incorrectly applying across all "Amazon EC2" clouds

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • ec2-plugin
    • java.runtime.name: OpenJDK Runtime Environment
      java.runtime.version: 11.0.7+10-post-Ubuntu-2ubuntu218.04
      ec2: 1.49.1

      It appears these lines of code and the methods they call are miscalculating availableTotalSlaves when using multiple "Amazon EC2" cloud configurations with the ec2 plugin.

      We have multiple "Amazon EC2" clouds configured with one AMI config each instead of using a single "Amazon EC2" configuration with multiple AMI configs. This is due to using Jenkins Configuration as Code and wanting to be able to put each AMI config in a separate YAML file (one per "customer").

      When we use the global instance cap (instanceCapStr) on one of these configurations, it seems to apply to ALL ec2 instances launched by the Jenkins master, not just the instances launched by that specific "Amazon EC2" cloud. It doesn't seem to use "cloudName" in the filter.

      We have worked around this temporarily by using the AMI-specific instanceCap.

            thoulen FABRIZIO MANFREDI
            mjuszczak Matt Juszczak
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: