Promotion of Manager objects to Policy objects in NSX-T fails: Either use another path or wait for the purge cycle (max 5 minutes) for permanent removal of the object.
search cancel

Promotion of Manager objects to Policy objects in NSX-T fails: Either use another path or wait for the purge cycle (max 5 minutes) for permanent removal of the object.

book

Article ID: 322418

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • You are attempting to promote Management Plane (MP) objects to Policy objects.
  • The following error is displayed and can also be seen in the NSX-T manager logs /var/log/syslog and /var/log/proton/nsxapi.log:
SEGMENT_PORT promotion error. Manager id: ########-92bc-4306-85a1-############, Error : policy_error_code : Policy:500157 policy_error_message : Error during creating objects of type:SegmentPort policy_error_code : Policy:500045 policy_error_message : An object with the same path=[/infra/segments/dvportgroup-######/ports/default:########-92bc-4306-85a1-###########] is marked for deletion. Either use another path or wait for the purge cycle (max 5 minutes) for permanent removal of the object.
  • The error is seen when doing the promotion from API or UI.

Environment

VMware NSX-T Data Center
VMware NSX

Cause

This occurs due to a timing issue, whereby the discovered ports are deleted first, then they are recreated.
However during port recreation (using the same intent path), the process fails, as the original port still exists and is marked for delete.

Resolution

This issue is resolved in VMware NSX 4.2.0

Workaround:

  • Make sure an update to date backup is in place.
  • Cancel the MP to Policy promotion if it is still in progress.
  • Check if the port still exists or is marked for delete, using the intents indicated in the errors using the API:
    • GET https://{{ip}}/policy/api/v1/infra/realized-state/realized-entities?intent_path=<intent path>
    • Sample API: GET https://{{ip}}/policy/api/v1/infra/realized-state/realized-entities?intent_path=/infra/segments/<segment-name>/ports/default:########-4670-495d-b5c4-###########
  • Delete the intents marked for delete using the following API call:
    • DELETE https://{{ip}}/policy/api/<intent path>
    • Sample API : DELETE https://{{ip}}/policy/api/v1/infra/segments/<segment-name>/ports/default:########-4670-495d-b5c4-###########
  • Attempt the MP to Policy promotion again.

Note: NSX does a cleanup every 5 minutes, objects marked for delete should be cleaned during that time, with the initial GET you may find the object does not exist anymore, as it has been cleaned up during the cleanup period. 
Note: If above DELETE API's say, the entity (realized object or intent) doesn't exists, then they have already been deleted. So, please go ahead and attempt MP to policy promotion.