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

cannot customize security group to launch slaves into

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • ec2-plugin
    • None

    Description

      It's slightly inconvenient to have to use the 'default' security group for our slaves.

      It's only slightly inconvenient, but it seems that this should be pretty easy to fix, too. I may even try myself!

      Attachments

        Activity

          mwhudson mwhudson added a comment - https://github.com/jenkinsci/ec2-plugin/pull/7
          francisu Francis Upton added a comment -

          Seems this patch was not the right approach and there is no new patch (see the pull request)

          francisu Francis Upton added a comment - Seems this patch was not the right approach and there is no new patch (see the pull request)
          yyuu Yuu Yamashita added a comment -

          oh, i just created my version of the patch but it is a duplication of this issue

          https://github.com/jenkinsci/ec2-plugin/pull/18

          IMHO, putting security group configuration in SlaveTemplate is good idea since some AMIs may require distinct security group.

          yyuu Yuu Yamashita added a comment - oh, i just created my version of the patch but it is a duplication of this issue https://github.com/jenkinsci/ec2-plugin/pull/18 IMHO, putting security group configuration in SlaveTemplate is good idea since some AMIs may require distinct security group.
          mwhudson mwhudson added a comment -

          I'm not sure really – and I'm not administering Jenkins myself any more, so I'm might not to be able to contribute any useful thinking here.

          IIRC, one of the reasons I wanted to put it onto the cloud was that I wanted to be able to count the instances Jenkins has launched by checking the security group. We've had issues where Jenkins has refused to launch instances because there have been other instances launched by the same account and they are currently counted against the cap. If the jenkins-launched instances had a distinct security group, a more accurate count of how many instances have been launched by jenkins would be possible.'

          mwhudson mwhudson added a comment - I'm not sure really – and I'm not administering Jenkins myself any more, so I'm might not to be able to contribute any useful thinking here. IIRC, one of the reasons I wanted to put it onto the cloud was that I wanted to be able to count the instances Jenkins has launched by checking the security group. We've had issues where Jenkins has refused to launch instances because there have been other instances launched by the same account and they are currently counted against the cap. If the jenkins-launched instances had a distinct security group, a more accurate count of how many instances have been launched by jenkins would be possible.'
          yyuu Yuu Yamashita added a comment -

          Thanks for comment.

          umm... I perfer EC2 instance tag to count matching instances. EC2's DescribeInstances API has capability to find instances with specified tags.

          Now I'm planning to write new patch to apply instance tags to provisioned instances and then count them later.

          yyuu Yuu Yamashita added a comment - Thanks for comment. umm... I perfer EC2 instance tag to count matching instances. EC2's DescribeInstances API has capability to find instances with specified tags. Now I'm planning to write new patch to apply instance tags to provisioned instances and then count them later.
          mwhudson mwhudson added a comment -

          The problem with tags, unless I'm misremembering or things have changed, is that you can't start an instance with a tag, you can only start an instance and then tag it. So there is a risk of a race there.

          But you're right that it's probably a bit silly to use security groups for that, and there is certainly a case for wanting to have per slave template security groups rather than per cloud groups.

          mwhudson mwhudson added a comment - The problem with tags, unless I'm misremembering or things have changed, is that you can't start an instance with a tag, you can only start an instance and then tag it. So there is a risk of a race there. But you're right that it's probably a bit silly to use security groups for that, and there is certainly a case for wanting to have per slave template security groups rather than per cloud groups.

          Code changed in jenkins
          User: Francis Upton
          Path:
          pom.xml
          src/main/java/hudson/plugins/ec2/SlaveTemplate.java
          src/main/resources/hudson/plugins/ec2/SlaveTemplate/config.jelly
          src/test/java/hudson/plugins/ec2/SlaveTemplateTest.java
          src/test/java/hudson/plugins/ec2/TemplateLabelsTest.java
          http://jenkins-ci.org/commit/ec2-plugin/543777c6f79adaf243df931bfffda6d3a86ca5f7
          Log:
          Merge pull request #18 from yyuu/master

          JENKINS-8617 cannot customize security group to launch slaves into

          Compare: https://github.com/jenkinsci/ec2-plugin/compare/d96e049...543777c

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Francis Upton Path: pom.xml src/main/java/hudson/plugins/ec2/SlaveTemplate.java src/main/resources/hudson/plugins/ec2/SlaveTemplate/config.jelly src/test/java/hudson/plugins/ec2/SlaveTemplateTest.java src/test/java/hudson/plugins/ec2/TemplateLabelsTest.java http://jenkins-ci.org/commit/ec2-plugin/543777c6f79adaf243df931bfffda6d3a86ca5f7 Log: Merge pull request #18 from yyuu/master JENKINS-8617 cannot customize security group to launch slaves into Compare: https://github.com/jenkinsci/ec2-plugin/compare/d96e049...543777c
          francisu Francis Upton added a comment -

          Thanks for your contribution Yuu.

          I committed this, but I'm concerned about the the commit that changes the required version to 1.462; I think that 1.399 should be fine (certain for this work), unless something else has changed. If you agree can you provide another pull request to fix the version back?

          francisu Francis Upton added a comment - Thanks for your contribution Yuu. I committed this, but I'm concerned about the the commit that changes the required version to 1.462; I think that 1.399 should be fine (certain for this work), unless something else has changed. If you agree can you provide another pull request to fix the version back?
          francisu Francis Upton added a comment -

          Sorry for the spam, I fixed the version thing.

          francisu Francis Upton added a comment - Sorry for the spam, I fixed the version thing.
          francisu Francis Upton added a comment -

          Thanks for your contribution!

          francisu Francis Upton added a comment - Thanks for your contribution!
          yyuu Yuu Yamashita added a comment -

          > I committed this, but I'm concerned about the the commit that changes the required version to 1.462; I think that 1.399 should be fine (certain for this work), unless something else has changed. If you agree can you provide another pull request to fix the version back?

          Thanks for merging.

          I'm agree to rollback Jenkins to 1.399.
          There's no special reason to upgrade Jenkins to 1.462.
          I just thought newer Jenkins must be greater

          yyuu Yuu Yamashita added a comment - > I committed this, but I'm concerned about the the commit that changes the required version to 1.462; I think that 1.399 should be fine (certain for this work), unless something else has changed. If you agree can you provide another pull request to fix the version back? Thanks for merging. I'm agree to rollback Jenkins to 1.399. There's no special reason to upgrade Jenkins to 1.462. I just thought newer Jenkins must be greater

          People

            yyuu Yuu Yamashita
            mwhudson mwhudson
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: