Platform9 Generic
Latest
Frequently Asked Questions
How To
Solution
Internal Only
Templates
Powered By

Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
Hostagent Stuck While Executing an Extension
Copy Markdown
Open in ChatGPT
Open in Claude
Problem
- A Platform9 managed host is showing offline from Clarity UI.
- The Hostagent i.e. pf9-hostagent service has a forked process which is running a script from /opt/pf9/hostagent/extensions.
xxxxxxxxxx# systemctl status pf9-hostagent ● pf9-hostagent.service - Platform9 Host Agent ServiceLoaded: loaded (/lib/systemd/system/pf9-hostagent.service; enabled; vendor preset: enabled)Active: active (running) since XXX YYYY-MM-DD TT:TT:TT 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.pyEnvironment
- Platform9 Managed OpenStack - All Versions
- Platform9 Managed Kubernetes - All Versions
Cause
There may be various factors which can contribute to one of the Hostagent extension scripts failing to execute and subsequently entering a defunct state.
Resolution
- Inspect the script in question and identify if any of the commands may be ran manually.
Example: /opt/pf9/hostagent/extensions/fetch_mounted_nfs.py
xxxxxxxxxxprocess = subprocess.Popen(["mount", "-t", "nfs,nfs4"],The corresponding command would be as follows.
xxxxxxxxxxmount -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 pf9-hostagent service.
xxxxxxxxxxservice pf9-hostagent stop- Kill any remaining forked processes (if present).
xxxxxxxxxx# kill [PID]You may need to add a -9 or -SIGKILLflag if any of the processes remain.
- Start pf9-hostagent service.
xxxxxxxxxxservice pf9-hostagent startVariableType to search · ESC to discard
GlossaryType to search · ESC to discard
InsertType to search · ESC to discard
No matches
Last updated on
Was this page helpful?
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message