Katello / katello-client-bootstrap

Bootstrap Script for migrating systems to Foreman & Katello
GNU General Public License v2.0
52 stars 63 forks source link

Delete katello-host-tools and katello-host-tools-fact-plugin packages when unregistering #222

Closed alosadagrande closed 7 years ago

alosadagrande commented 7 years ago

Unregistering a client running katello-agent 3.0 does not delete katello-host-tools either katello-host-tools-fact-plugin.

This is causing issues when moving a client running katello-agent 3.0 to katello-agent 2.9. Actually katello-agent 2.9 is not installed due to error in dependencies.

alosadagrande commented 7 years ago

Do you think we should check if katello-host-tools and/or katello-host-tools-fact-plugin are installed before calling yum erase on def clean_katello_agent():

call_yum("erase", "'katello-ca-consumer-' katello-agent gofer 'katello-host-tools' ")

sideangleside commented 7 years ago

yum skips non-existing packages so there is no need to have any 'if/then' logic. This would also be consistent with other places where we remove packages (https://github.com/Katello/katello-client-bootstrap/blob/master/bootstrap.py#L418)