How To Re-generate Certificates If Hostagent Certificates are Expired

Problem

  • Hostagent certificate and other components certificates are expired and all nodes are marked as disconnected and unable to perform upgrades.

  • Performing Higher Version Upgrade is not re-generating hostagent certificates even when the certificates are not expired.

Environment

  • Platform9 Edge Cloud - v5.3 and Higher

  • Airctl

  • Hostagent Certificate

Procedure

circle-check
  • Login/SSH to Deployment Unit Host (DU Host).

  • Start MongoDB container and exec into it.

# docker start airctl-mongo
# docker exec -it airctl-mongo bash
  • Now inside airctl-mongo run the below commands:

circle-exclamation
  • Now open another terminal for Deployment Unit Host and start the pf9deployExec container using the below command and exec into it to export the mentioned env variables:

triangle-exclamation
  • The above check-certs would show the certs version and denote if it's expiring.

  • Now generate certs and check using:

  • Now dump the MongoDB data using airctl:

  • For DU version 5.3

  • For DU version 5.1

  • Once the new certs are generated, you stop the pf9deployExec and airctl-mongo containers and delete the pf9deployExe container using:

circle-exclamation
  • Now we can start with the Same Version or Higher Version upgrade using the steps mentioned in the Upgradearrow-up-right documentation. Only follow steps in that page till the Upgrade DU section section.

  • If the Upgrade operation above fails with the below Ansible Log Trace, refer this Solutionarrow-up-right to troubleshoot the upgrade.

Last updated