Failure Of Hostagent Extension Scripts Due To Special Characters In /etc/pf9/nodelet/config_sunpike.yaml
Problem
- The node is disconnected from the management plane due to extension script failures affecting the host agent service. Despite the hostagent, comms, and sidekick services running, the host remains disconnected from the management plane. The host agent logs the following error:
2024-01-05 05:42:40,535 - session.py WARNING - Extension returned data in stderr : b'utils.sh: line 137: $itf_file: ambiguous redirect\n'
2024-01-05 05:43:42,338 - session.py INFO - Already converged. Idling
2024-01-05 05:43:44,596 - session.py ERROR - timeout 120 /opt/pf9/hostagent/extensions/fetch_pod_info.py command failed: Command '['timeout', '120', '/opt/pf9/hostagent/extensions/fetch_pod_info.py']' returned non-zero exit status 1.
2024-01-05 05:43:45,406 - session.py WARNING - Extension returned data in stderr : b'utils.sh: line 137: $itf_file: ambiguous redirect\n'
- While trying the extension script manually on the node, observed the following error:
File "/opt/pf9/hostagent/lib/python3.9/site-packages/yaml/reader.py", line 143, in check_printable
raise ReaderError(self.name, position, ord(character),
yaml.reader.ReaderError: unacceptable character #x0080: special characters are not allowed
in "/etc/pf9/nodelet/config_sunpike.yaml", position 24
Environment
- Platform9 Managed Kubernetes - v5.6 and Higher
Cause
- On the
/etc/pf9/nodelet/config_sunpike.yaml
there were some special characters. - This was due to the locale being set to en_US instead of en_US.UTF-8.
pf9@test:~$ cat /etc/pf9/nodelet/config_sunpike.yaml
# Generated by Nodelet - DO NOT EDIT. <<<---- Rather than the '-' after Nodelet, there was some special characters like @~<80><90>
Resolution
- Remove the special character from the
/etc/pf9/nodelet/config_sunpike.yaml
Restart the hostagent service
# systemctl restart pf9-hostagent
Additional Information
- The JIRA ticket PMK-6300 was raised to address the issue, and the fix has been delivered in PMK v5.9.2.
Was this page helpful?