During running a rally scenario, I have seen contrail-api got stuck (not responding on time), so restarted contrail-api - then on, one of the port is not getting deleted - its instance-ip deletion is causing exception because its virtual_network_refs are recorded as "to: [ERROR]" rather than id (see below output).
It is three node setup with three control nodes as VMs (three VMs). But I only enabled harishku-vm3 for config api for easy troubleshooting. contrail version - 2.21-105
curl -u admin:secret http://localhost:8095/instance-ip/04c016bd-b9c1-412e-9eed-6ee09504f3b4 ; echo
{"instance-ip": {"display_name": "default-domain__c_rally_d68a4cf1_ZGNDTqOJ__si_6840042f-351b-4726-93d4-8bd4f41848d9-left", "uuid": "04c016bd-b9c1-412e-9eed-6ee09504f3b4", "instance_ip_address": "100.64.0.4", "virtual_machine_interface_refs": [{"to": ["default-domain", "c_rally_d68a4cf1_ZGNDTqOJ", "default-domain__c_rally_d68a4cf1_ZGNDTqOJ__si_6840042f-351b-4726-93d4-8bd4f41848d9__2__left__2"], "href": "http://localhost:8095/virtual-machine-interface/a4de7e38-872c-4aab-9a04-b24dbe6f3ae3", "attr": null, "uuid": "a4de7e38-872c-4aab-9a04-b24dbe6f3ae3"}], "instance_ip_mode": "active-standby", "href": "http://localhost:8095/instance-ip/04c016bd-b9c1-412e-9eed-6ee09504f3b4", "id_perms": {"enable": true, "description": null, "created": "2015-12-01T09:36:35.060840", "creator": null, "uuid": {"uuid_mslong": 342298575801237806, "uuid_lslong": 11451931338324898740}, "user_visible": true, "last_modified": "2015-12-01T10:23:31.651271", "permissions": {"owner": "cloud-admin", "owner_access": 7, "other_access": 7, "group": "cloud-admin-group", "group_access": 7}}, "fq_name": ["default-domain__c_rally_d68a4cf1_ZGNDTqOJ__si_6840042f-351b-4726-93d4-8bd4f41848d9-left"], "virtual_network_refs": [{"to": ["ERROR"], "href": "http://localhost:8095/virtual-network/9f0f9931-1f21-4152-ba4f-51a38c28f703", "attr": null, "uuid": "9f0f9931-1f21-4152-ba4f-51a38c28f703"}, {"to": ["default-domain", "c_rally_d68a4cf1_ZGNDTqOJ", "snat-si-left_si_6840042f-351b-4726-93d4-8bd4f41848d9"], "href": "http://localhost:8095/virtual-network/faf035ec-9bc6-4abd-9644-ee53a9339dbe", "attr": null, "uuid": "faf035ec-9bc6-4abd-9644-ee53a9339dbe"}], "name": "default-domain__c_rally_d68a4cf1_ZGNDTqOJ__si_6840042f-351b-4726-93d4-8bd4f41848d9-left"}}
Logs available at http:// 10.204. 216.50/ Docs/bugs/ 1521853/