Hostagent Installation Failing Due To Apt Key Being Not Present.
Problem
The host/node will remain Disconnected to Platform9 Management Plane. Within the node Platform9 service hostagent will be in failed state due the package installation failure.
In the hostagent logs, the errors related to package installation can be observed as shown below:
# sudo /opt/pf9/hostagent/bin/pf9-apt install /var/cache/pf9apps/pf9-hostagent/5.6.3-1010.dec5836/pf9-hostagent-5.6.3-1010.dec5836.x86_64.deb
Traceback (most recent call last):
File "/opt/pf9/hostagent/b%in/pf9-apt", line 87, in <module>
cache = _get_updated_apt_cache()
File "/opt/pf9/hostagent/bin/pf9-apt", line 41, in _get_updated_apt_cache
_update_apt_cache(cache)
File "/opt/pf9/hostagent/bin/pf9-apt", line 36, in _update_apt_cache
cache.update()
File "/usr/lib/python3/dist-packages/apt/cache.py", line 593, in update
raise FetchFailedException()
apt.cache.FetchFailedException
Running apt update command manually showed the following warnings:
W: GPG error: http://<repo_name> Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
Environment
- Platform9 Managed OpenStack - v5.4 and Higher.
- Ubuntu Operating system.
Cause
The signatures couldn't be verified because the public key is not available.
Resolution
The error message indicates that when attempting to update or install packages from the repository, the verification of package signatures failed because the public key necessary for verification is not available. In the context of package management, this typically means that the system does not have the necessary cryptographic key to verify the authenticity and integrity of the packages in the repository.
To unblock this, Need to manually add the keys in the affected node:
# sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys