Forget a replica
Forgetting a replica removes the replica from classification and database state and purges the node.
Ensure you have a valid admin RBAC token and the replica you want to remove is permanently offline.
Run the forget
command whenever a replica node
is destroyed, even if you plan to replace it with a replica with the same name.
You can also follow this process if your replica is offline for an extended period. When the replica is offline, PostgreSQL Write-Ahead Log (WAL) files build up on the primary server, potentially consuming excessive disk space. To avoid this, you can run the forget command and then reprovision the replica.
- On the primary server, as the root user, run
puppet infrastructure forget <REPLICA NODE NAME>
- If the replica node still exists, run
puppet-enterprise-uninstaller –y –p –d
to completely remove Puppet Enterprise (PE) from the node. This action helps to avoid security risks associated with leaving sensitive information in the PostgreSQL database and secret keys on a replica.
The replica is decommissioned, the node is purged as an agent, secret key information is deleted, and a Puppet run is completed on the primary server.