Force Remove the Host Role From DB for Self Hosted PCD

Problem

Unable to remove a host role from a specific host via the Platform9 UI, pcdctl and curl command. The UI shows a RoleUpdateConflict error when attempting to deauthorize and decommission the host.

Management Plane
Copy

Environment

  • Self-Hosted Private Cloud Director Virtualization - v2025.4 and Higher
  • Self-Hosted Private Cloud Director Kubernetes - v2025.4 and Higher

Cause

The host role remained in a not-applied state in the backend database, which blocked further updates or role removal actions through the UI. This inconsistency prevented the host from being deauthorized or decommissioned.

Diagnostics

These steps are applicable only for Self-hosted Private Cloud Director

To check the role state:

  1. Login into the mysqld-exporter:
Management Plane
Copy
  1. Check the role state:
Management Plane
Copy

The not-applied state indicates that the role was not fully or correctly applied, resulting in a conflict when attempting UI-based role changes.

Resolution

Caution: The following steps involve direct database manipulation and should only be performed under guidance from Platform9 Support.

  1. Delete the role from the backend database:
Management Plane
Copy
  1. Verify that the role mapping has been removed:
Management Plane
Copy

Caution: The following steps only if need to delete the host as well.

  1. Optionally, delete the host from the database if needed:
Management Plane
Copy
  1. Purge PF9 packages (if host is being decommissioned):
Affected Host
Copy
  1. Clean up PF9 services and directories:
Affected Host
Copy

Validation

  • Confirm that the role mapping associated with the host has been removed
  • The host is no longer listed in the UI under Infrastructure > Hosts.
  • If re-onboarding, reauthorize the host and apply roles cleanly.
  • Review logs (/var/log/pf9/hostagent.log, /var/log/pf9/comms/) to ensure role application is successful.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard