Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Stale resources in cloud break cluster

avatar

I created a cluster which was force terminated from the Web UI. Now resources are left in Cloudbreak (blueprint, recipes, network etc).

Trying to delete these from the UI or shell does not work and results in the following error:
cloudbreak-shell>blueprint delete --id 420
Command failed java.lang.RuntimeException: There are clusters associated with blueprint ‘420’. Please remove these before deleting the blueprint. 
There are clusters associated with blueprint '420'. Please remove these before deleting the blueprint. 
java.lang.RuntimeException: There are clusters associated with blueprint '420'. Please remove these before deleting the blueprint. 
at com.sequenceiq.cloudbreak.shell.transformer.ExceptionTransformer.transformToRuntimeException(ExceptionTransformer.java:21) 
at com.sequenceiq.cloudbreak.shell.commands.common.BlueprintCommands.delete(BlueprintCommands.java:230) 
at com.sequenceiq.cloudbreak.shell.commands.common.BlueprintCommands.deleteById(BlueprintCommands.java:237) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:498) 
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:216) 
at org.springframework.shell.core.SimpleExecutionStrategy.invoke(SimpleExecutionStrategy.java:68) 
at org.springframework.shell.core.SimpleExecutionStrategy.execute(SimpleExecutionStrategy.java:59) 
at org.springframework.shell.core.AbstractShell.executeCommand(AbstractShell.java:134) 
at org.springframework.shell.core.JLineShell.promptLoop(JLineShell.java:533) 
at org.springframework.shell.core.JLineShell.run(JLineShell.java:179) 
at java.lang.Thread.run(Thread.java:745) 
1 ACCEPTED SOLUTION

avatar
Super Collaborator

@Sandeep Nemuri

I think this is a bug in your cloudbreak version so you should delete it by hand:

  1. jump into the cloudbreak db container
  2. select id from blueprint where name=<blueprint-name>;
  3. select name,id,status from cluster where blueprint_id=<id>;
  4. update cluster set blueprint_id=null where name=<cluster_name>;
  5. delete blueprint where name=<blueprint-name>;

Let me know how it went,

Br,

R

View solution in original post

3 REPLIES 3

avatar
Super Collaborator

@Sandeep Nemuri which cloudbreak version are you using?

avatar

its 1.16.1

avatar
Super Collaborator

@Sandeep Nemuri

I think this is a bug in your cloudbreak version so you should delete it by hand:

  1. jump into the cloudbreak db container
  2. select id from blueprint where name=<blueprint-name>;
  3. select name,id,status from cluster where blueprint_id=<id>;
  4. update cluster set blueprint_id=null where name=<cluster_name>;
  5. delete blueprint where name=<blueprint-name>;

Let me know how it went,

Br,

R