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

Ansible install fails on RedHat 8.9 #19

Open
benf33 opened this issue Mar 18, 2024 · 6 comments
Open

Ansible install fails on RedHat 8.9 #19

benf33 opened this issue Mar 18, 2024 · 6 comments

Comments

@benf33
Copy link

benf33 commented Mar 18, 2024

TASK [packages : Install build-related tools] **********************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (ansible.legacy.dnf) module: install_recommends. Supported parameters include: allow_downgrade, allowerasing, autoremove, bugfix, cacheonly, conf_file, disable_excludes, disable_gpg_check, disable_plugin, disablerepo, download_dir, download_only, enable_plugin, enablerepo, exclude, install_repoquery, install_weak_deps, installroot, list, lock_timeout, name, nobest, releasever, security, skip_broken, sslverify, state, update_cache, update_only, use_backend, validate_certs (expire-cache, pkg)."}

$ lsb_release -d
Description: Red Hat Enterprise Linux release 8.9 (Ootpa)
$ ansible --version
ansible [core 2.15.3]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/opt/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.11/site-packages/ansible
ansible collection location = /opt/ansible/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.11.5 (main, Sep 22 2023, 15:34:29) [GCC 8.5.0 20210514 (Red Hat 8.5.0-20)] (/usr/bin/python3.11)
jinja version = 3.1.2
libyaml = True

@benf33
Copy link
Author

benf33 commented Mar 18, 2024

Commenting out "install_recommends" allows to got further in the build proccess
$ sed -ir 's/install_recommends: no/# install_recommends: no/' ansible/roles/packages/tasks/main.yml

@benf33
Copy link
Author

benf33 commented Mar 18, 2024

There are no packages named python-setuptools, zlib1g, libselinux-python on RHEL 8.9

@acroucher
Copy link
Contributor

It looks like there are two things going on, the first being that Ansible's 'package' tool doesn't seem to support 'install_recommends' on RHEL. It should be fine to just comment that out, as you have done - it just tries to minimise how many packages are installed (mainly for building the Docker image).

The second thing is that it looks like some package names have changed on RHEL, so the file install/ansible/roles/get_variables/vars/RedHat.yml probably needs updating. RHEL doesn't seem to have a searchable package list online as far as I can see, so I can't easily check what these packages might be called now. Can you easily have a look using e.g. yum? I can try spinning up a RHEL VM and having a look, but my yum skills are rusty.

  • python-setuptools may have been renamed python3-setuptools (as it has been on many Debian-based distros)?
  • you could probably try removing zlib1g-dev from install/ansible/roles/get_variables/defaults/main.yml, as we have PETSc downloading its own zlib dependency now anyway
  • I'm not sure why libselinux-python is needed (it isn't in the Ansible setup except for Red Hat and CentOS), so you could try removing it, but if it is needed, perhaps it is now called something like python3-selinux (as in Debian)?

@benf33
Copy link
Author

benf33 commented Mar 19, 2024

What is the last version of CentOS/RH you tested the build process on?

@acroucher
Copy link
Contributor

Not sure to be honest - it was done by someone else who has since left - but it was back just before Waiwera was first released in late 2019, so I'm guessing probably CentOS 8.

@benf33
Copy link
Author

benf33 commented Mar 19, 2024

I susprised it would be CentOS 8, my bet would be CentOS 7.
It is a bit more than a few packages names:

  1. mpiexec is expected to be in the path, it is not when installed by openmpi-devel
  2. module is expected to be installed but never part of the required packages
  3. assumption ~/.profile exists
  4. application directory tree creation tasks fails

I have not been further yet so there might be more.

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

No branches or pull requests

2 participants