-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major
-
Component/s: ec2-plugin
-
Environment:jenkins:2.361.2-alpine docker image
Amazon EC2 plugin 2.0.3
Hi,Â
My configuration was working until october, 21st 2022. Without any configuration changes, I got this issue when I try to start a new Jenkins slave via the ec2 plugin
WARNING Â Â h.i.i.InstallUncaughtExceptionHandler#handleException: Caught unhandled exception with ID 2e1ab38d-5e9b-4b32-9f79-199a86a20d08 com.amazonaws.services.ec2.model.AmazonEC2Exception: /dev/sda1 is being assigned to multiple times. (Service: AmazonEC2; Status Code: 400; Error Code: InvalidBlockDeviceMapping; Request ID: 8e1dd6f7-7d5d-44eb-a7c5-3458e68d60a2; Proxy: null) Â Â at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1879) Â Â at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleServiceErrorResponse(AmazonHttpClient.java:1418) Â Â at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1387) Â Â at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1157) Â Â at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:814) Â Â at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:781) Â Â at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:755) Â Â at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:715) Â Â at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:697) Â Â at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:561) Â Â at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:541) Â Â at com.amazonaws.services.ec2.AmazonEC2Client.doInvoke(AmazonEC2Client.java:34698) Â Â at com.amazonaws.services.ec2.AmazonEC2Client.invoke(AmazonEC2Client.java:34665) Â Â at com.amazonaws.services.ec2.AmazonEC2Client.invoke(AmazonEC2Client.java:34654) Â Â at com.amazonaws.services.ec2.AmazonEC2Client.executeRunInstances(AmazonEC2Client.java:33356) Â Â at com.amazonaws.services.ec2.AmazonEC2Client.runInstances(AmazonEC2Client.java:33325) Â Â at hudson.plugins.ec2.SlaveTemplate.provisionOndemand(SlaveTemplate.java:1159) Â Â at hudson.plugins.ec2.SlaveTemplate.provisionOndemand(SlaveTemplate.java:1101) Â Â at hudson.plugins.ec2.SlaveTemplate.provision(SlaveTemplate.java:907) Â Â at hudson.plugins.ec2.EC2Cloud.getNewOrExistingAvailableSlave(EC2Cloud.java:717) Â Â at hudson.plugins.ec2.EC2Cloud.doProvision(EC2Cloud.java:454) Â Â at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(Unknown Source) Â Â at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:397) Â Â at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:409) Â Â at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:78) Â Â at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26) Â Â at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:207) Â Â at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:140) Â Â at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:558) Â Â at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:59) Â Â at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:762) Â Â at org.kohsuke.stapler.Stapler.invoke(Stapler.java:894) Â Â at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:289) Â Â at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:59) Â Â at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:762) Â Â at org.kohsuke.stapler.Stapler.invoke(Stapler.java:894) Â Â at org.kohsuke.stapler.Stapler.invoke(Stapler.java:690) Â Â at org.kohsuke.stapler.Stapler.service(Stapler.java:240) Â Â at javax.servlet.http.HttpServlet.service(HttpServlet.java:590) Â Â at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764) Â Â at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1665) Â Â at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:157) Â Â at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:129) Â Â at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) Â Â at jenkins.security.ResourceDomainFilter.doFilter(ResourceDomainFilter.java:81) Â Â at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) Â Â at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:160) Â Â at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) Â Â at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) Â Â at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:154) Â Â at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) Â Â at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) Â Â at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:94) Â Â at jenkins.security.AcegiSecurityExceptionFilter.doFilter(AcegiSecurityExceptionFilter.java:52) Â Â at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) Â Â at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:54) Â Â at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) Â Â at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122) Â Â at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116) Â Â at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) Â Â at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109) Â Â at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) Â Â at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:106) Â Â at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:97) Â Â at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) Â Â at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:223) Â Â at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:217) Â Â at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) Â Â at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:97) Â Â at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) Â Â at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:112) Â Â at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:82) Â Â at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:63) Â Â at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) Â Â at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:111) Â Â at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:172) Â Â at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) Â Â at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) Â Â at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:53) Â Â at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) Â Â at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) Â Â at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:86) Â Â at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) Â Â at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) Â Â at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) Â Â at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) Â Â at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) Â Â at jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:38) Â Â at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) Â Â at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) Â Â at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:527) Â Â at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131) Â Â at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:549) Â Â at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) Â Â at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223) Â Â at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1571) Â Â at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221) Â Â at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1378) Â Â at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176) Â Â at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484) Â Â at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1544) Â Â at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174) Â Â at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1300) Â Â at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129) Â Â at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) Â Â at org.eclipse.jetty.server.Server.handle(Server.java:562) Â Â at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:505) Â Â at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:762) Â Â at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:497) Â Â at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:282) Â Â at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:319) Â Â at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100) Â Â at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53) Â Â at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:412) Â Â at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:381) Â Â at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:268) Â Â at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.lambda$new$0(AdaptiveExecutionStrategy.java:138) Â Â at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:407) Â Â at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:894) Â Â at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1038) Â Â at java.base/java.lang.Thread.run(Unknown Source)
This is caused by the following configuration to transform the 8GB gp2 EBS in a 30GB gp3:Â
customDeviceMapping: "/dev/sda1=:30:true:gp3::encrypted"
When I removed it, my EC2 instance started with a 8 GB gp2 EBS .Â
I'm using the AMI fetcher and the fetched the latest ubuntu 22.04 LTS AMI id (ami-08c40ec9ead489470Â in us-east-1).Â
This might be a recent change in the AWS API.Â