Created 10-12-2016 02:47 PM
In Cloudbreak version 1.4, I cannot create a cluster in AWS using templates that have the encrypted flag enabled. I get the following error:
create failed: Infrastructure creation failed. Reason: java.lang.String cannot be cast to java.lang.Boolean
This is the corresponding stack trace in the Cloudbreak log:
/cbreak_cloudbreak_1 | 2016-10-12 14:03:50,634 [reactorDispatcher-85] handleStackCreationFailure:176 ERROR c.s.c.c.f.s.p.a.StackCreationService - [owner:38b56d01-b849-47c4-bd3e-0a7b9a78a53b] [type:STACK] [id:59] [name:REDACTED] Error during stack creation flow: /cbreak_cloudbreak_1 | java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean /cbreak_cloudbreak_1 | at com.sequenceiq.cloudbreak.cloud.aws.AwsResourceConnector.isEncryptedVolumeRequested(AwsResourceConnector.java:381) /cbreak_cloudbreak_1 | at com.sequenceiq.cloudbreak.cloud.aws.AwsResourceConnector.getEbsSnapshotIdIfNeeded(AwsResourceConnector.java:320) /cbreak_cloudbreak_1 | at com.sequenceiq.cloudbreak.cloud.aws.AwsResourceConnector.launch(AwsResourceConnector.java:129) /cbreak_cloudbreak_1 | at com.sequenceiq.cloudbreak.cloud.handler.LaunchStackHandler.accept(LaunchStackHandler.java:69) /cbreak_cloudbreak_1 | at com.sequenceiq.cloudbreak.cloud.handler.LaunchStackHandler.accept(LaunchStackHandler.java:33) /cbreak_cloudbreak_1 | at sun.reflect.GeneratedMethodAccessor208.invoke(Unknown Source) /cbreak_cloudbreak_1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) /cbreak_cloudbreak_1 | at java.lang.reflect.Method.invoke(Method.java:498) /cbreak_cloudbreak_1 | at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) /cbreak_cloudbreak_1 | at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) /cbreak_cloudbreak_1 | at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) /cbreak_cloudbreak_1 | at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52) /cbreak_cloudbreak_1 | at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) /cbreak_cloudbreak_1 | at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) /cbreak_cloudbreak_1 | at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) /cbreak_cloudbreak_1 | at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) /cbreak_cloudbreak_1 | at com.sun.proxy.$Proxy204.accept(Unknown Source) /cbreak_cloudbreak_1 | at reactor.bus.EventBus$3.accept(EventBus.java:317) /cbreak_cloudbreak_1 | at reactor.bus.EventBus$3.accept(EventBus.java:310) /cbreak_cloudbreak_1 | at reactor.bus.routing.ConsumerFilteringRouter.route(ConsumerFilteringRouter.java:72) /cbreak_cloudbreak_1 | at reactor.bus.routing.TraceableDelegatingRouter.route(TraceableDelegatingRouter.java:51) /cbreak_cloudbreak_1 | at reactor.bus.EventBus.accept(EventBus.java:591) /cbreak_cloudbreak_1 | at reactor.bus.EventBus.accept(EventBus.java:63) /cbreak_cloudbreak_1 | at reactor.core.dispatch.AbstractLifecycleDispatcher.route(AbstractLifecycleDispatcher.java:160) /cbreak_cloudbreak_1 | at reactor.core.dispatch.MultiThreadDispatcher$MultiThreadTask.run(MultiThreadDispatcher.java:74) /cbreak_cloudbreak_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) /cbreak_cloudbreak_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) /cbreak_cloudbreak_1 | at java.lang.Thread.run(Thread.java:745) /cbreak_cloudbreak_1 | 2016-10-12 14:03:50,634 [reactorDispatcher-85] fireEventAndLog:24DEBUG c.s.c.c.f.s.FlowMessageService - [owner:38b56d01-b849-47c4-bd3e-0a7b9a78a53b] [ type:STACK] [id:59] [name:REDACTED] STACK_INFRASTRUCTURE_CREATE_FAILED [STACK_FLOW_STEP].
Cloudbreak seems to be having trouble retrieving the "encrypted" parameter from the instance template as a boolean.
Does anyone know if this is a bug in 1.4 that is fixed in a newer version of Cloudbreak? Or could I be missing some prerequisite step for getting encrypted EBS volumes to work?
Created 10-13-2016 07:11 PM
Hi @Gerald Lim,
It has been fixed in rc-1.6, if you update now, then you will get the 1.6.1-rc.19 version where this issue and also the VPC issue) are fixed.
Attila
Created 10-12-2016 03:35 PM
Are you using UI or cloudbreak-shell (or maybe the Rest API) to create cluster?
Created 10-12-2016 03:45 PM
It happens both with the UI and with cloudbreak-shell.
Created 10-12-2016 03:52 PM
I created the templates using cloudbreak-shell though.
Created 10-12-2016 03:56 PM
Hi,
Please update to 1.6, the 1.4 is not supported version. You can update it with:
cbd kill cbd update cbd regenerate cbd start
In 1.6 release the error you are referring does not occur and the EBS encrytion is properly applied on attached disks.
Attila
Created 10-12-2016 05:34 PM
Thanks, @Attila Kanto. I updated to 1.6, but then had to update to rc-1.7 because I ran into the default VPC issue.
However, I still had the same "java.lang.String cannot be cast to java.lang.Boolean" error. I then tried to create a cluster in the UI but with a new instance template (with encryption enabled) I created also using the UI and that actually worked fine.
Deleting and recreating the previous templates in rc-1.7 through cloudbreak-shell still gives me the same problem.
Created 10-12-2016 05:58 PM
Hi @Gerald Lim,
The 1.6 is going to have a long term support. The mentioned default VPC issue was backported to 1.6 branch and will be on 1.6.1. You can update:
cbd kill cbd update rc-1.6 cbd regenerate cbd start
This will update you to the 1.6.1 release candidate which is 1.6.1-rc.16 right now.
Could you send me the shell command what you are using to create the template, please?
Attila
Created 10-12-2016 06:04 PM
Thanks for the info about the 1.6 branch.
I tried creating the template two different ways with the same result.
template create --AWS --name "aws-master-medium-m4-xlarge-1tb-enc" --encrypted yes --in stanceType m4.xlarge --volumeCount 1 --volumeSize 1000 --volumeType st1 --publicInAccount ye s template create --AWS --name "aws-master-medium-m4-xlarge-1tb-enc" --encrypted true --in stanceType m4.xlarge --volumeCount 1 --volumeSize 1000 --volumeType st1 --publicInAccount ye s
Created 10-12-2016 07:32 PM
Thanks. It seems that the issue was partially fixed. If you do it from shell it get's stored as string {"encrypted":"true"}, if you do it form UI it stored as boolean {"encrypted":true}.
I will fix it in 1.6 line and let you know when it is available, as a temporary workaround could you create the new templates from UI, please?
Thanks.
Attila
Created 10-13-2016 07:11 PM
Hi @Gerald Lim,
It has been fixed in rc-1.6, if you update now, then you will get the 1.6.1-rc.19 version where this issue and also the VPC issue) are fixed.
Attila