Tag Jenkins build slave instances

Bug #1067438 reported by Paul Sokolovsky
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro AWS Tools
Won't Fix
Wishlist
Unassigned

Bug Description

Extracted from lp:1045850:

While we're at it, would you please add tags to the slave instances?

Best is Name tag, just like for static instances; at the very least, some tag saying whether ci.linaro.org or android-build.linaro.org launched the build.

Ideally, also tag with the name of the build, albeit that might be trickier.

The idea is to use these tags for billing reports, as to be able to tell how much this or that AWS usage costs us.

Revision history for this message
Paul Sokolovsky (pfalcon) wrote :
Download full text (5.5 KiB)

ec2 plugin 1.17 also has support for setting tags on instances, but that doesn't seem to work:

Launching ami-4bee4422 Looking for existing instances: {Filters: [{Name: image-id, Values: [ami-4bee4422], }, {Name: availability-zone, Values: [us-east-1b], }, {Name: key-name, Values: [jenkins-slave], }, {Name: instance-type, Values: [m1.xlarge], }, {Name: tag:Name, Values: [test], }, {Name: instance-state-name, Values: [stopped, stopping], }], } ERROR: You must specify one or more tags to create ha:AAAAWB+LCAAAAAAAAABb85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0ldFVf2c+b/lb5MDAwVRQxSaBqcITRIIQMEMIIUFgAAckCEiWAAAAA=Status Code: 400, AWS Service: AmazonEC2, AWS Request ID: f17f58ad-2515-4b71-a5e7-de86531be347, AWS Error Code: InvalidParameterValue, AWS Error Message: You must specify one or more tags to create at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:547) at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:284) at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:169) at com.amazonaws.services.ec2.AmazonEC2Client.invoke(AmazonEC2Client.java:5684) at com.amazonaws.services.ec2.AmazonEC2Client.createTags(AmazonEC2Client.java:3102) at hudson.plugins.ec2.SlaveTemplate.provision(SlaveTemplate.java:292) at hudson.plugins.ec2.EC2Cloud.doProvision(EC2Cloud.java:207) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:563) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648) at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:563) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477) at org.kohsuke.stapler.Stapler.service(Stapler.java:159) at javax.servlet.http.HttpServlet.service(HttpServlet.java:45) at winstone.ServletConfiguration.execute(ServletConfiguration.java:248) at winstone.RequestDispatcher.forward(RequestDispatcher.java:333) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) ...

Read more...

Changed in linaro-aws-tools:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

Loïc Minier (lool) wrote on 2012-10-11: #9

tag:Name seems bogus, not sure

Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

> {Name: tag:Name, Values: [test], }

Do you mean "tag:Name" string or "test"? "test" is my 2nd attempt at setting name, w/o spaces, etc.

Revision history for this message
Paul Sokolovsky (pfalcon) wrote :
Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

Similar to lp:968130 this is more of wishlist.

Changed in linaro-aws-tools:
importance: High → Wishlist
Revision history for this message
Milo Casagrande (milo) wrote :

Due to the age of this issue, we are acknowledging that this issue will likely not be fixed, is no longer applicable, or was already fixed by an indirect change. If this issue is still important, please add details and reopen the issue.

Changed in linaro-aws-tools:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.