Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force to install latest required packages on Photon OS #592

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

keirazhang
Copy link
Contributor

When deploying VM from Photon OS 4.0 OVA, it can't install required packages python3-rpm at cloud-init config because the expired 1024 GPG key, which would led to getting installed packages failed or installing packages failed in the VM because of:

task path: /home/worker/workspace/Ansible_Regression_Photon_4.0_OVA/ansible-vsphere-gos-validation/linux/utils/get_installed_packages.yml:12
fatal: [localhost -> 10.185.15.85]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "manager": [
                "auto"
            ],
            "strategy": "first"
        }
    },
    "msg": "Could not detect a supported package manager from the following list: ['pkg_info', 'apk', 'portage', 'pkg', 'apt', 'pacman', 'rpm'], or the required Python library is not installed. Check warnings for details.",
    "warnings": [
        "Found \"rpm\" but Failed to import the required Python library (rpm) on photon-ova-20240614115745's Python /usr/bin/python3.10. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter",
        "Platform linux on host localhost is using the discovered Python interpreter at /usr/bin/python3.10, but future installation of another Python interpreter could change the meaning of that path. See https://docs.ansible.com/ansible-core/2.15/reference_appendices/interpreter_discovery.html for more information."
    ]
}
error message:
Could not detect a supported package manager from the following list: ['pkg_info', 'apk', 'portage', 'pkg', 'apt', 'pacman', 'rpm'], or the required Python library is not installed. Check warnings for details.

This fix forces Photon OS VM to install latest required packages, so that it can update GPG key firstly, then install those packages.

@keirazhang keirazhang added this to the 3.2 milestone Jun 19, 2024
Copy link
Collaborator

@123lzxm 123lzxm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

Signed-off-by: Qi (Keira) Zhang <qi-keira.zhang@broadcom.com>
Copy link
Member

@Tomorrow9 Tomorrow9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@keirazhang keirazhang merged commit 66d8880 into vmware:main Jun 21, 2024
@keirazhang keirazhang deleted the fix_photon_ova branch June 24, 2024 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants