-
Notifications
You must be signed in to change notification settings - Fork 56
Replacing Python Requests Package Removes Key RHEL System Packages #72
Description
Issue Description
When installing RITA on RHEL (specifically RHEL 9.6, but likely other versions as well), replacing the python3-requests package with the pip requests package results in the automatic removal of dependent system utilities.
Current Behavior
The RITA installer, specifically the install_pre.yml Ansible playbook, currently has a step that removes python3-requests due to a reported error:
rita/installer/install_scripts/install_pre.yml
Lines 413 to 436 in 32bc436
| - name: "RITA Pre: replace python3-requests with a new version installed by pip." | |
| block: | |
| - name: "RITA Pre: Uninstall unofficial docker packages on rpm-based distributions." | |
| yum: | |
| name: | |
| - python3-requests #As of 20240618, issue with requests code: "Error connecting: Error while fetching server API version: Not supported URL scheme http+docker". Installing requests with pip appears to install a newer version that handles the issue. | |
| state: absent | |
| update_cache: true | |
| tags: | |
| - docker | |
| - linux | |
| - linuxrpm | |
| - name: "RITA Pre: Install docker modules for Python on rpm-based distributions." | |
| pip: | |
| name: | |
| - docker | |
| - requests | |
| tags: | |
| - docker | |
| - linux | |
| - linuxrpm | |
| when: ( ansible_distribution == 'AlmaLinux' or ansible_distribution == 'CentOS' or ansible_distribution == 'Fedora' or ansible_distribution == 'RedHat' or ansible_distribution == 'Rocky' ) | |
| #OracleLinux and SecurityOnion don't include pip so we can't do these steps there. |
However, this process has a side effect of removing 9 additional packages, several of which (such as subscription-manager) are necessary RHEL system packages, as evidenced below by running yum remove python3-requests (dnf also does the same):
Also, I have observed that this issue also results in the removal of the repository file at /etc/yum.repos.d/redhat.repo.
Desired Behavior
The RITA installer should handle necessary system package replacement/adjustment without causing unintended side effects. The solution to this may be as simple as just removing that step from the playbook, but that will require testing on our other supported RPM-based distributions to ensure that the reported URL scheme error is no longer a factor.