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

ec2-plugin cannot add specified instance tags on launched spot instances

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      It is really urgent for me to choose the latest EC2 plugin (still not released) in testing. It seems that there are no latest commits since two months ago.
      I have configured the tags for my new spot instance request, like:
      Name: Name
      Value: Henry

      But after the spot instance launched, it seems no tags have been attached to this spot instance.

      Could you please fix it before the official release?

      Thanks
      Henry

        Attachments

          Activity

          Hide
          henrysher Henry Huang added a comment -

          Thanks for your quick patch and instant response.

          From my testing, when no global security enabled, it works and tags have been added. But if enable the global security, it will pop out the errors like this:

          === Slave ===
          $ java -jar slave.jar -jnlpUrl http://ec2-XX-XX-XX-xX.compute-1.amazonaws.com:8080/computer/XXXXXX-XXXXXX/slave-agent.jnlp

          java.io.IOException: Failed to load http://ec2-XX-XX-XX-XX.compute-1.amazonaws.com:8080/computer/XXXXXX-XXXXXX/slave-agent.jnlp: 403 Forbidden
          at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:261)
          at hudson.remoting.Launcher.run(Launcher.java:215)
          at hudson.remoting.Launcher.main(Launcher.java:189)
          Waiting 10 seconds before retry

          === Master ===
          INFO: While serving http://ec2-XX-XX-XX-XX.compute-1.amazonaws.com:8080/computer/XXXXXX-XXXXXX/slave-agent.jnlp: hudson.security.AccessDeniedException2: anonymous is missing the Slave/Connect permission

          Besides, I also enabled the "Slave/Connect" permission for anonymous users. It still cannot work with 403 forbidden.

          Then, I created one normal user with all permission, and use "-auth xxx:xxx" as a parameter in the command line. It seems that Master did not recognize the user and still consider it as anonymous.

          So I am not sure whether the code has this logic now.

          Thanks
          Henry

          Show
          henrysher Henry Huang added a comment - Thanks for your quick patch and instant response. From my testing, when no global security enabled, it works and tags have been added. But if enable the global security, it will pop out the errors like this: === Slave === $ java -jar slave.jar -jnlpUrl http://ec2-XX-XX-XX-xX.compute-1.amazonaws.com:8080/computer/XXXXXX-XXXXXX/slave-agent.jnlp java.io.IOException: Failed to load http://ec2-XX-XX-XX-XX.compute-1.amazonaws.com:8080/computer/XXXXXX-XXXXXX/slave-agent.jnlp: 403 Forbidden at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:261) at hudson.remoting.Launcher.run(Launcher.java:215) at hudson.remoting.Launcher.main(Launcher.java:189) Waiting 10 seconds before retry === Master === INFO: While serving http://ec2-XX-XX-XX-XX.compute-1.amazonaws.com:8080/computer/XXXXXX-XXXXXX/slave-agent.jnlp: hudson.security.AccessDeniedException2: anonymous is missing the Slave/Connect permission Besides, I also enabled the "Slave/Connect" permission for anonymous users. It still cannot work with 403 forbidden. Then, I created one normal user with all permission, and use "-auth xxx:xxx" as a parameter in the command line. It seems that Master did not recognize the user and still consider it as anonymous. So I am not sure whether the code has this logic now. Thanks Henry
          Hide
          aji9861 Adam Irr added a comment -

          I was able to connect with the following command:
          java -jar slave.jar -jnlpCredentials user:passsword -jnlpUrl http://ec2-xxx-xx-xxx-xxx.compute-1.amazonaws.com:8080/computer/XXXXXX-XXXXXXX/slave-agent.jnlp

          This however requires you put the user password in the command parameters.

          There should be a way to use your auth token instead of your password, but when I try I am getting a 401. Issues with connecting a slave using jnlp are not specific to this plugin/Spot instances. It uses the standard Jenkins jnlp information.

          Show
          aji9861 Adam Irr added a comment - I was able to connect with the following command: java -jar slave.jar -jnlpCredentials user:passsword -jnlpUrl http://ec2-xxx-xx-xxx-xxx.compute-1.amazonaws.com:8080/computer/XXXXXX-XXXXXXX/slave-agent.jnlp This however requires you put the user password in the command parameters. There should be a way to use your auth token instead of your password, but when I try I am getting a 401. Issues with connecting a slave using jnlp are not specific to this plugin/Spot instances. It uses the standard Jenkins jnlp information.
          Hide
          dinesh_dh Dinesh Dharmawardena added a comment -

          I think this is still an issue in version 1.38 of the ec2-plugin. Did this actually get released?

          Show
          dinesh_dh Dinesh Dharmawardena added a comment - I think this is still an issue in version 1.38 of the ec2-plugin. Did this actually get released?
          Hide
          mykola Mykola Marzhan added a comment -

          I still don't have tags on spot instances in plugin version 1.39, Jenkins 2.136

          Show
          mykola Mykola Marzhan added a comment - I still don't have tags on spot instances in plugin version 1.39, Jenkins 2.136
          Hide
          sw97272 simon Wall added a comment -

          Is there any further development on this ticket?  I am hopeful to be able to make use of the EC2 plugin's ability to manage worker nodes using spot instances, but we need to have tags passed to the instance.

          Show
          sw97272 simon Wall added a comment - Is there any further development on this ticket?  I am hopeful to be able to make use of the EC2 plugin's ability to manage worker nodes using spot instances, but we need to have tags passed to the instance.

            People

            • Assignee:
              aji9861 Adam Irr
              Reporter:
              henrysher Henry Huang
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: