Now while that’s O.K. for the RPMs from the pulp repositories, it’s very dangerous for the rest.
For instance, python-ldap.x86_64 and python-isodate.noarch are from CentOS Base, python-blinker.noarch is from CentOS Extras and python-oauth2.noarch is from EPEL7. So chances are other software uses this as well, e.g. ipa-client. If you are using IPA on your system running this will silently remove the ipa-client from your system.
Thus the remove-pulp2 should only do this for the RPMs originated for pulp. At best, you could do a ‘yum autoremove’ after that to remove dependencies which are not required anymore…
@gvde that is fair criticism and we can work to remove the rpms listed that are not in the pulp repos. To be fair though, it does print out the yum install command and prompt you before executing. Maybe we should strongly suggest users run that manually?
@Antarctic_Guy in our testing this did not happen, in fact testing i didn’t see mod_ssl being removed all:
Dependencies Resolved
=========================================================================================================================================================================================================================================================
Package Arch Version Repository Size
Removing:
pulp-puppet-plugins noarch 2.21.5-1.el7 @pulp 345 k
pulp-rpm-plugins noarch 2.21.5-1.el7 @pulp 1.6 M
pulp-selinux noarch 2.21.5-1.el7 @pulp 297 k
pulp-server noarch 2.21.5-1.el7 @pulp 3.4 M
python-blinker noarch 1.3-2.el7 @extras 358 k
python-isodate noarch 0.5.4-8.el7 @base 219 k
python-ldap x86_64 2.4.15-2.el7 @base 683 k
python-mongoengine noarch 0.10.5-1.el7 @pulp 1.3 M
python-nectar noarch 1.6.4-1.el7 @pulp 140 k
python-oauth2 noarch 1.5.211-8.el7 @epel 105 k
python-pulp-common noarch 2.21.5-1.el7 @pulp 250 k
python-pulp-oid_validation noarch 2.21.5-1.el7 @pulp 17 k
python-pulp-puppet-common noarch 2.21.5-1.el7 @pulp 59 k
python-pulp-repoauth noarch 2.21.5-1.el7 @pulp 68 k
python-pulp-rpm-common noarch 2.21.5-1.el7 @pulp 90 k
python-pulp-streamer noarch 2.21.5-1.el7 @pulp 54 k
python-pymongo x86_64 3.2-2.el7 @pulp 1.5 M
python2-celery noarch 10:4.0.2-7.el7 @pulp 2.7 M
python2-django noarch 1.11.27-1.el7 @epel 16 M
Removing for dependencies:
pulp-deb-plugins noarch 1.10.2-1.el7 @pulp 227 k
pulp-docker-plugins noarch 3.2.9-1.el7 @pulp 412 k
pulp-katello noarch 1.0.3-1.el7 katello 37 k
pulp-puppet-tools noarch 2.21.5-1.el7 @pulp 43 k
python-pulp-deb-common noarch 1.10.2-1.el7 @pulp 27 k
python-pulp-docker-common noarch 3.2.9-1.el7 @pulp 57 k
python-pymongo-gridfs x86_64 3.2-2.el7 @pulp 436 k
Transaction Summary
Remove 19 Packages (+7 Dependent packages)
I’m really confused as to why it removed mod_ssl and mod_wsgi for you? This also doesn’t really have anything to do with dependencies as pulp-server-2.21.5-1.el7.noarch & python-pulp-repoauth-2.21.5-1.el7.noarch are the only rpms it directly depends on in my test environment.
I had reverted my to my snapshot before the upgrade so I can’t do additional testing yet. Back on my Katello 3.18.2 instance it appears that if I try to remove pulp-server (2.21.5-1) mod_ssl and mod_wsgi are both removed for dependencies.
—> Marking mod_ssl to be removed - no longer needed by pulp-server
—> Marking mod_wsgi to be removed - no longer needed by pulp-server
My server is running RHEL 7 and was originally deployed with Katello 3.15.1 and upgraded to each release as they came out. Looking back at my yum history I can see that mod_ssl was originally installed when I ran “yum -y install katello” for version 3.15.1. Back then pulp2 must have been the package that marked mod_ssl as a dependency.
well pulp2 still marks it as a dependency, but in our testing a ‘yum remove’ was never removing dependencies. I feel like moving to ‘rpm -e’ would likely be a safer approach with more consistent behavior.
The problem is probably, that the installer scripts checks whether a package is already installed and doesn’t install it if it is. Now if pulp2 had a dependency to mod_ssl and httpd, those are installed as dependency. Later the installer checks for installed mod_ssl and httpd and finds it, thus it doesn’t install the package. This way httpd remains a dependency.
I think if you do an explicit “yum install httpd” or maybe a “yum reinstall httpd” this would tell that httpd is supposed to be installed and not a simple dependency. That’s what I usually do if I run into this situation. Maybe there’s a special yum command for this, too?