Managed Kubernetes
Latest
Frequently Asked Questions
Solutions
How Tos
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?
pf9ctl Binary Incorrectly Updating Proxy Settings
Copy Markdown
Open in ChatGPT
Open in Claude
Problem
- While updating proxy settings with the pf9ctl binary, the
/opt/pf9/hostagent/pf9-hostagent.envfile is being updated incorrectly.
Environment
- Platform9 Managed Kubernetes - v5.9 through v5.11
- pf9ctl
Diagnosis
- Before applying
pf9ctl set-proxythe file/opt/pf9/hostagent/pf9-hostagent.envlooks like below.
Bash
$ cat /opt/pf9/hostagent/pf9-hostagent.envPYTHONPATH="/opt/pf9/hostagent/lib/python3.6/site-packages:/opt/pf9/hostagent/lib/python3.9/site-packages/bbslave:${PYTHONPATH}"PYTHON_EGG_CACHE=/tmp/python-eggsLD_LIBRARY_PATH="/opt/pf9/python/pf9-lib:/opt/pf9/python/pf9-hostagent-lib:${LD_LIBRARY_PATH}"- Setup proxy settings with
pf9ctlon Node.
pf9ctl command
xxxxxxxxxx$ pf9ctl set-proxy --protocol http --host-ip [IP_ADDRESS_1] --port [PORT] --no-proxy [IP_ADDRESS_2],[IP_ADDRESS_3]- After applying
pf9ctl set-proxythe file/opt/pf9/hostagent/pf9-hostagent.envlooks like below.
Bash
$ cat /opt/pf9/hostagent/pf9-hostagent.envPYTHONPATH="/opt/pf9/hostagent/lib/python3.6/site-packages:/opt/pf9/hostagent/lib/python3.9/site-packages/bbslave:${PYTHONPATH}"PYTHON_EGG_CACHE=/tmp/python-eggsLD_LIBRARY_PATH="/opt/pf9/python/pf9-lib:/opt/pf9/python/pf9-hostagent-lib:${LD_LIBRARY_PATH}"export http_proxy=http://[IP_ADDRESS_1]:[PORT]export https_proxy=http://[IP_ADDRESS_1]:[PORT]export HTTP_PROXY=http://[IP_ADDRESS_1]:[PORT]export HTTPS_PROXY=http://[IP_ADDRESS_1]:[PORT]export no_proxy=localhost,127.0.0.1,::1,localhost.localdomain,localhost4,localhost6export NO_PROXY=localhost,127.0.0.1,::1,localhost.localdomain,localhost4,localhost6- Hostagent Logs on the node:
Hostagent Logs
bud2-otp-cp1 systemd[1]: pf9-hostagent.service: Ignoring invalid environment assignment 'export HTTPS_PROXY=http://[IP_ADDRESS_1]:[PORT]': /opt/pf9/hostagent/pf9-hostagent.envbud2-otp-cp1 systemd[1]: pf9-hostagent.service: Ignoring invalid environment assignment 'export no_proxy=localhost,127.0.0.1,::1,localhost.localdomain,localhost4,localhost6': /opt/pf9/>bud2-otp-cp1 systemd[1]: pf9-hostagent.service: Ignoring invalid environment assignment 'export NO_PROXY=localhost,127.0.0.1,::1,localhost.localdomain,localhost4,localhost6': /opt/pf9/>Cause
- This is due to a BUG: PMK-6577 and is resolved in PMK v5.12.
Workaround
- Manually update
/opt/pf9/hostagent/pf9-hostagent.envfile with required environment variables.
Bash
$ cat /opt/pf9/hostagent/pf9-hostagent.envPYTHONPATH="/opt/pf9/hostagent/lib/python3.6/site-packages:/opt/pf9/hostagent/lib/python3.9/site-packages/bbslave:${PYTHONPATH}"PYTHON_EGG_CACHE=/tmp/python-eggsLD_LIBRARY_PATH="/opt/pf9/python/pf9-lib:/opt/pf9/python/pf9-hostagent-lib:${LD_LIBRARY_PATH}"http_proxy=http://[IP_ADDRESS_1]:[PORT]https_proxy=http://[IP_ADDRESS_1]:[PORT]HTTP_PROXY=http://[IP_ADDRESS_1]:[PORT]HTTPS_PROXY=http://[IP_ADDRESS_1]:[PORT]no_proxy=127.0.0.1,localhost,[IP_ADDRESS_2],[IP_ADDRESS_3]NO_PROXY=127.0.0.1,localhost,[IP_ADDRESS_2],[IP_ADDRESS_3]- Restart pf9-hostagent service.
Bash
xxxxxxxxxx$ systemctl restart pf9-hostagent- Verify the proxy settings by fetching pod logs.
Kubectl Command
xxxxxxxxxx$ kubectl logs <POD_NAME> -n <NAMESPACE>Additional Information
- To learn more about configuring a proxy for PMK Cluster, please refer to this KB article.
VariableType 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