Delete deployment fails with ignored instances error
search cancel

Delete deployment fails with ignored instances error

book

Article ID: 298708

calendar_today

Updated On:

Products

VMware Tanzu Kubernetes Grid Integrated Edition

Issue/Introduction

You are trying to delete a deployment on any of these methods:
  • using bosh command : bosh -d <your-deployment> delete-deployment
  • using cf cli where an on demand service is backed with a bosh deployment : cf delete-service-instance <your-service-instance>
  • using tkgi command: tkgi delete-cluster <cluster-name>

The commands will fail with a similar error below
bosh delete-deployment -d service-instance_fe328048-0383-4af9-bb1b-66fa3b70c489
Using environment '10.52.31.147' as client 'ops_manager'

Using deployment 'service-instance_fe328048-0383-4af9-bb1b-66fa3b70c489'

Continue? [yN]: y

Task 2441

Task 2441 | 06:35:27 | Error: You are trying to delete deployment 'service-instance_fe328048-0383-4af9-bb1b-66fa3b70c489', which contains ignored instance(s). Operation not allowed.

Task 2441 Started  Fri Feb 10 06:35:27 UTC 2023
Task 2441 Finished Fri Feb 10 06:35:27 UTC 2023
Task 2441 Duration 00:00:00
Task 2441 error

Deleting deployment 'service-instance_fe328048-0383-4af9-bb1b-66fa3b70c489':
  Expected task '2441' to succeed but state is 'error'

Exit code 1
tkgi delete-cluster "cluster name"

Instance forced deletion failed: There was a problem completing your request. Please contact your operations team providing the following information: service: p.pks, service-instance-guid: fe328048-0383-4af9-bb1b-66fa3b70c489, broker-request-id: dc5ebef9-dff0-4450-9db8-053e3e160b2f, task-id: 2415, operation: force-delete, error-message: You are trying to delete deployment 'service-instance_fe328048-0383-4af9-bb1b-66fa3b70c489', which contains ignored instance(s). Operation not allowed.
 

 


Environment

Product Version: 1.15

Resolution

This error is thrown due to deployment containing a vm that was deliberately ignored meaning the command below was executed previously  
 
bosh -d <service-instance-deployment> ignore <vm>


You can check if a vm is ignored using 
 
bosh -d  <service-instance-deployment> instances --details

check the column ignore and see if this is set to true

If a vm is marked as ignored any bosh command on this vm will be ignored. For more info, please see doc .
bosh director won't let you delete a deployment if one of the vm on the deployment is ignored.

To resolve this simply unignore the ignored vm
 
bosh -d <service-instance-deployment> unignore vm

The command above tell bosh director to include this vm to be affected by bosh commands. For more info on unignore, please see doc

Then retry deleting the deployment.