Nova-Compute (ostackhost) Fails to Create Resource Provider: "Conflicting resource provider name: <host> already exists."

Problem

  • Deauthorizing and reauthorizing a host with the same hostname sometimes leaves a stale resource provider entry in the Nova __Placement DB.
  • The following error is observed in the /var/log/pf9/ostackhost.log log.
Copy

Environment

  • Platform9 Managed OpenStack - v4.0 and Higher
  • Nova-Compute

Cause

The Resource Manager service (running on and exposed from the Platform9 management plane) fails to clean up the resource provider entry in Nova for a host in the two situations below.

  1. If the deauthorize operation did not succeed or if the host was forcefully deauthorized by performing a DB operation.
  2. If there are any old instances still associated with this host or if there are any stale allocations.

Resolution

Issue 1:

  1. Find the older host in the OpenStack Compute service list by its UUID.
Copy
  1. Delete the stale service by ID.
Copy
  1. Verify that a new Compute service entry is created with the new host UUID.
Copy
  1. Verify that the resource provider got created for the new host. Check the /var/log/pf9/ostackhost.log file to ensure that the resource provider was created successfully.
Copy

Issue 2:

  1. Check for stale allocations.
None
Copy
  1. Get the Host name associated with the Resource Provider having stale allocations.
None
Copy
  1. Delete stale allocations.
None
Copy
  1. Delete Resource Provider.
None
Copy
  1. Verify that the resource provider got created for the new host. Check the /var/log/pf9/ostackhost.log file to ensure that the resource provider was created successfully.
None
Copy

Additional Information

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard