Host Decommission: Incomplete Platform9 Cleanup

Problem

After executing the command pcdctl decommission-node --force on host, the following packages weren't cleanly removed/still present in the host :

$ systemctl list-units --all | grep pf9 ● pf9-libvirt-exporter.service not-found inactive dead pf9-libvirt-exporter.service ● pf9-neutron-ovn-metadata-agent.service not-found active running pf9-neutron-ovn-metadata-agent.service ● pf9-node-exporter.service not-found inactive dead pf9-node-exporter.service ● pf9-prometheus.service not-found inactive dead pf9-prometheus.service ● pf9-remote-write.service not-found inactive dead pf9-remote-write.service ● pf9-sidekick.service not-found inactive dead pf9-sidekick.service

Environment

  • Component - pcdctl

Answer

This is a known issue; the Platform9 team has filed the bug PCD-3504 to address the issue.

The fix for this issue is expected to be available in the v2025.12 December release.

Workaround

The workaround is to manually clean the stale packages using the below steps:

  1. Disable the affected service from the impacted host:

sudo systemctl disable pf9-libvirt-exporter pf9-node-exporter pf9-prometheus pf9-remote-write pf9-sidekick 2>/dev/null
  1. Try to stop if any of the services are stoppable:

sudo systemctl stop pf9-libvirt-exporter pf9-node-exporter pf9-prometheus pf9-remote-write pf9-sidekick 2>/dev/null
  1. Remove unit files and drop-ins (common locations)

sudo rm -f /etc/systemd/system/pf9-libvirt-exporter.service sudo rm -f /etc/systemd/system/pf9-node-exporter.service sudo rm -f /etc/systemd/system/pf9-prometheus.service sudo rm -f /etc/systemd/system/pf9-remote-write.service sudo rm -f /etc/systemd/system/pf9-sidekick.service
  1. Drop-in directories if present:

sudo rm -rf /etc/systemd/system/pf9-libvirt-exporter.service.d sudo rm -rf /etc/systemd/system/pf9-node-exporter.service.d sudo rm -rf /etc/systemd/system/pf9-prometheus.service.d sudo rm -rf /etc/systemd/system/pf9-remote-write.service.d sudo rm -rf /etc/systemd/system/pf9-sidekick.service.d
  1. Reload systemd state

sudo systemctl daemon-reload systemctl list-units --all | grep pf9
  1. Purge leftover packages

sudo apt-get purge -y pf9-libvirt-exporter pf9-node-exporter pf9-prometheus pf9-remote-write pf9-sidekick || true sudo apt-get autoremove -y sudo apt-get autoclean
  1. Remove residual binaries/configs

sudo rm -f /etc/systemd/system/pf9-.timer sudo rm -f /etc/systemd/system/pf9-.socket sudo systemctl daemon-reload sudo systemctl reset-failed
  1. Verify if the stale packages are cleaned up using:

systemctl list-units --all | grep pf9