- A Platform9-managed host is showing offline from Clarity UI.
- The Hostagent (pf9-hostagent) service has a forked process which is running a script from /opt/pf9/hostagent/extensions.
# systemctl status pf9-hostagent
● pf9-hostagent.service - Platform9 Host Agent Service
Loaded: loaded (/lib/systemd/system/pf9-hostagent.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2019-08-20 19:08:50 PDT; 2h 19min ago
... ├─17643 /bin/bash -c /opt/pf9/hostagent/bin/pf9-hostd >> /var/log/pf9/hostagent-daemon.log 2>&1
├─17645 /opt/pf9/hostagent/bin/python /opt/pf9/hostagent/bin/pf9-hostd
└─18275 /opt/pf9/hostagent/bin/python /opt/pf9/hostagent/extensions/fetch_mounted_nfs.py
- The forked process is in a D (defunct) state.
# ps aux | grep 18275
pf9 18275 0.0 0.0 49944 7792 ? D 19:08 0:00 /opt/pf9/hostagent/bin/python /opt/pf9/hostagent/extensions/fetch_mounted_nfs.py
- Platform9 Managed OpenStack - All Versions
- Platform9 Managed Kubernetes - All Versions
There may be various factors which can contribute to one of the Hostagent extension scripts failing to execute and subsequently entering a defunct state.
- Inspect the script in question and identify if any of the commands may be ran manually.
process = subprocess.Popen(["mount", "-t", "nfs,nfs4"],The corresponding command would be as follows:
# mount -t nfs,nfs4
- If the command executes successfully, proceed to Step #3. Otherwise, you will need to identify what is causing the command to fail.
- Stop the Hostagent service.
# service pf9-hostagent stop
- Kill any remaining forked processes (if present).
# kill <PID>Note: You may need to add a '-9' or '-SIGKILL' flag if any of the processes remain.
- Start the Hostagent service.
# service pf9-hostagent start