Removing Stacks

If a stack is terminated by a user from the Dell Cloud Manager console or from the Dell Cloud Manager API, the resources created in the stack are terminated and the stack is destroyed and removed from the console Stacks page.

However if a stack fails it will stay on the Dell Cloud Manager Stacks page indefinitely. This gives you the ability to diagnose why the stack failed, however any existing cloud resources associated with the stack will incur costs until they are destroyed. After you have finished diagnosing why the stack failed, you can terminate those cloud resources and destroy the stack manually from the Dell Cloud Manager console.

You can remove a failed stack from the Dell Cloud Manager console or from the Blueprint tools command terminate-stack.

Removing a failed stack from the console

To terminate the cloud resources associated with a failed stack and destroy the stack, click on the failed stack from the Stacks page. Then click on View Stack Details.

../../_images/remove_failed_stack1.png

From the Stack Overview page click on the Terminate resources & delete stack button.

../../_images/remove_failed_stack2.png

Confirmation is required. Click on the Yes button and Dell Cloud Manager will terminate all resources associated with the failed stack and will destroy the stack.

../../_images/remove_failed_stack3.png

Removing a failed stack from the command line

To terminate the cloud resources associated with a failed stack and destroy the stack from the command line you must first determine the stack ID for the stack and then issue the terminate-stack command.

To determine the stack ID for the failed stack you can issue the list-stacks command.

list-stacks

Sample output

 Loading API environment
  API access validated
  API access key type is User, userId: 10
  Found public catalog, id= 15
  Found Company catalog, id= 10

Number of Stacks found: 1

+----+------+------------------------------------+-----------+------------------------------+
| Id | Name | Blueprint                          | State     | Created                      |
+----+------+------------------------------------+-----------+------------------------------+
| 45 | acme | Joomla Two Server Stack using Chef | FAILED    | 2015-11-30T21:55:55.474+0000 |
+----+------+------------------------------------+-----------+------------------------------+

Then delete the failed stack specifying the ID of the failed stack.

terminate-stack 45
Loading API environment
  API access validated
  API access key type is User, userId: 10
  Found public catalog, id= 15
  Found Company catalog, id= 10
Started stack termination, jobId '915'