Steps to remove orphan service instances
search cancel

Steps to remove orphan service instances

book

Article ID: 378103

calendar_today

Updated On:

Products

VMware vDefend Firewall

Issue/Introduction

  • On the NSX UI under System > Service Deployments > Service Instances, some service instances show "Deployment Status" as "Uninitialized" and "Runtime Status" as "Not Available"

  • Deleting the Service instance from API fails due to a dependency error.

Environment

VMware NSX
VMware vDefend Firewall
East-West Service Insertion deployment

Resolution

  1. Execute the get API to check instance runtime status. In this example, the deployment status is "UNDEPLOYMENT_FAILED"

    GET https://<Manager-IP>/api/v1/serviceinsertion/services/<Service-ID>/service-instances/<Instance-ID>/instance-runtimes

    {
    "results": [
    {
    "runtime_status": "NOT_AVAILABLE", <<<<<<<<<<<<<<<<<<<<
    "unhealthy_reason": "",
    "maintenance_mode": "OFF",
    "deployment_status": "UNDEPLOYMENT_FAILED", <<<<<<<<<<<<<<<<<<<
    "service_instance_id": "#####-####-###-####-######",
    "service_vm_id": "####x-####-####-####-######:vm-####123",
    <SNIP>
    "error_message": "Power off failed for vm vm-####123 in vc ###-####-#### : VC operation failed : An error occurred while communicating with the remote host.",
    "resource_type": "InstanceRuntime",
    <SNIP>
    }
    ],
    "result_count": 1
    }
  2. Delete the service instance runtimes that are not in a healthy state using the following API 

    POST https://<Manager-IP>/api/v1/serviceinsertion/services/<Service-ID>/service-instances/<Instance-ID>/instance-runtimes?action=delete 

  3. After deleting the service instances runtime, the UI should show no stale entries.
  4. If the above steps don't remediate the issue, execute the following from the NSX Manager (as the root user) and collect the output and open a case with Broadcom Support. For more information, see Creating and managing Broadcom support cases.

corfu_tool_runner.py -n nsx -o showTable -t ServiceInstance  > /image/ServiceInstance.txt
corfu_tool_runner.py -n nsx -o showTable -t InstanceEndpoint  > /image/InstanceEndpoint.txt
corfu_tool_runner.py -n nsx -o showTable -t InstanceRuntime  > /image/InstanceRuntime.txt
corfu_tool_runner.py -n nsx -o showTable -t ServiceDeployment  > /image/ServiceDeployment.txt

Additional Information

Reference API guide for Service Insertion