ManageIQ / manageiq-appliance-build

Scripts to build ManageIQ appliances
Apache License 2.0
10 stars 55 forks source link

Move manageiq venv to python 3.8 #517

Closed Fryguy closed 2 years ago

Fryguy commented 2 years ago

Newer builds install python 3.8 and ansible itself uses python 3.8. As such, we need the dependencies installed into there, matching the required version.

Part of https://github.com/ManageIQ/manageiq/issues/22009

@agrare Please review.

agrare commented 2 years ago

@Fryguy what about all of the other packages that we "expose" from the system site-packages like the pyvmomi/azure-cli/etc... ones? They would also be unavailable to ansible-playbook running 3.8 right?

Fryguy commented 2 years ago

That's a great question - You might be right, but we'll need to test with something more than a hello_world playbook.

agrare commented 2 years ago

Testing with https://github.com/agrare/manageiq-providers-playbooks I'm seeing issues with pyvmomi

Ansible::Runner.run({}, {"vcenter_hostname" => HOSTNAME, "vcenter_username" => USERNAME, "vce
nter_password" => PASSWORD}, "/var/www/miq/vmdb/data/git_repos/manageiq-providers-playbooks/vsphere.yml", verbosity: 5)

Failure:

Failed to import the required Python library (PyVmomi) on najdorf's Python /usr/libexec/platform-python. 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
Fryguy commented 2 years ago

I think we're gonna have to move everything over to python 3.8

miq-bot commented 2 years ago

Checked commit https://github.com/Fryguy/manageiq-appliance-build/commit/b6c3a5443f82a289d7ceaa5355565ccf8feaa0d7 with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint 0 files checked, 0 offenses detected Everything looks fine. :cookie:

Fryguy commented 2 years ago

Backported to najdorf in commit 183d00a5c6c557beb42de7be33158c4496801c41.

commit 183d00a5c6c557beb42de7be33158c4496801c41
Author: Adam Grare <adam@grare.com>
Date:   Wed Aug 10 08:43:08 2022 -0400

    Merge pull request #517 from Fryguy/fix_ansible_runner

    Move manageiq venv to python 3.8

    (cherry picked from commit 66730121d604308e4b5f89f6d08d10807b303c18)
Fryguy commented 2 years ago

Backported to morphy in commit a3077f72d72ffc1257705aaa872b9ce3d9c08353.

commit a3077f72d72ffc1257705aaa872b9ce3d9c08353
Author: Adam Grare <adam@grare.com>
Date:   Wed Aug 10 08:43:08 2022 -0400

    Merge pull request #517 from Fryguy/fix_ansible_runner

    Move manageiq venv to python 3.8

    (cherry picked from commit 66730121d604308e4b5f89f6d08d10807b303c18)