Tag Jenkins build slave instances
Bug #1067438 reported by
Paul Sokolovsky
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-
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.
To post a comment you must log in.
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 [8mha: AAAAWB+ LCAAAAAAAAABb85 aBtbiIQSmjNKU4P 08vOT+vOD8nVc8D zHWtSE4tKMnMz/ PLL0ldFVf2c+ b/lb5MDAwVRQxSa BqcITRIIQMEMIIU FgAAckCEiWAAAAA =[0mStatus Code: 400, AWS Service: AmazonEC2, AWS Request ID: f17f58ad- 2515-4b71- a5e7-de86531be3 47, AWS Error Code: InvalidParamete rValue, AWS Error Message: You must specify one or more tags to create at com.amazonaws. http.AmazonHttp Client. handleErrorResp onse(AmazonHttp Client. java:547) at com.amazonaws. http.AmazonHttp Client. executeHelper( AmazonHttpClien t.java: 284) at com.amazonaws. http.AmazonHttp Client. execute( AmazonHttpClien t.java: 169) at com.amazonaws. services. ec2.AmazonEC2Cl ient.invoke( AmazonEC2Client .java:5684) at com.amazonaws. services. ec2.AmazonEC2Cl ient.createTags (AmazonEC2Clien t.java: 3102) at hudson. plugins. ec2.SlaveTempla te.provision( SlaveTemplate. java:292) at hudson. plugins. ec2.EC2Cloud. doProvision( EC2Cloud. java:207) at sun.reflect. NativeMethodAcc essorImpl. invoke0( Native Method) at sun.reflect. NativeMethodAcc essorImpl. invoke( NativeMethodAcc essorImpl. java:57) at sun.reflect. DelegatingMetho dAccessorImpl. invoke( DelegatingMetho dAccessorImpl. java:43) at java.lang. reflect. Method. invoke( Method. java:616) at org.kohsuke. stapler. Function$ InstanceFunctio n.invoke( Function. java:288) at org.kohsuke. stapler. Function. bindAndInvoke( Function. java:151) at org.kohsuke. stapler. Function. bindAndInvokeAn dServeResponse( Function. java:90) at org.kohsuke. stapler. MetaClass$ 1.doDispatch( MetaClass. java:111) at org.kohsuke. stapler. NameBasedDispat cher.dispatch( NameBasedDispat cher.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. NameBasedDispat cher.dispatch( NameBasedDispat cher.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.HttpServle t.service( HttpServlet. java:45) at winstone. ServletConfigur ation.execute( ServletConfigur ation.java: 248) at winstone. RequestDispatch er.forward( RequestDispatch er.java: 333) at winstone. RequestDispatch er.doFilter( RequestDispatch er.java: 376) at hudson. util.PluginServ letFilter$ 1.doFilter( PluginServletFi lter.java: 95) at hudson. util.PluginServ letFilter. doFilter( PluginServletFi lter.java: 87) at winstone. FilterConfigura tion.execute( FilterConfigura tion.java: 194) at winstone. RequestDispatch er.doFilter( RequestDispatch er.java: 366) at hudson. security. csrf.CrumbFilte r.doFilter( CrumbFilter. java:47) at winstone. FilterConfigura tion.execute( FilterConfigura tion.java: 194) ...