Bug 1876046

Summary: python2-* packages are not uninstalled from overcloud nodes
Product: Red Hat OpenStack Reporter: Takashi Kajinami <tkajinam>
Component: openstack-tripleo-heat-templatesAssignee: Jose Luis Franco <jfrancoa>
Status: CLOSED ERRATA QA Contact: Lukas Bezdicka <lbezdick>
Severity: low Docs Contact:
Priority: low    
Version: 16.1 (Train)CC: ccamacho, dmacpher, jfrancoa, jpretori, mburns
Target Milestone: z6Keywords: Triaged, Upgrades
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-11.3.2-1.20210316133633.29a02c1.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-26 13:49:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Takashi Kajinami 2020-09-05 06:40:01 UTC
Description of problem:

Current upgrade documentation mentions that we should uninstall python2-* packages from undercloud nodes[1].

[1] https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.1/html-single/framework_for_upgrades_13_to_16.1/index#removing-unnecessary-packages-from-the-undercloud-ceph-4


However it doesn't mention the same for overcloud nodes so python2-* packages, and actually there are some python2-* packages left after upgrades.
If these packages are not used in overcloud nodes, we should uninstall them from overcloud nodes as well.

~~~
[heat-admin@controller-0 ~]$ rpm -qa | grep python2-* | sort
python2-2.7.17-1.module+el8.2.0+4561+f4e0d66a.x86_64
python2-asn1crypto-0.23.0-3.el7ost.noarch
python2-babel-2.5.1-9.module+el8.1.0+3111+de3f2d8e.noarch
python2-backports-1.0-15.module+el8.1.0+3111+de3f2d8e.x86_64
python2-backports-ssl_match_hostname-3.5.0.1-11.module+el8.1.0+3111+de3f2d8e.noarch
python2-chardet-3.0.4-10.module+el8.1.0+3111+de3f2d8e.noarch
python2-dateutil-2.6.1-1.el7ost.noarch
python2-idna-2.5-7.module+el8.1.0+3111+de3f2d8e.noarch
python2-ipaddress-1.0.18-6.module+el8.1.0+3111+de3f2d8e.noarch
python2-jinja2-2.10-8.module+el8.1.0+3111+de3f2d8e.noarch
python2-leapp-0.10.0-2.el7_8.noarch
python2-libs-2.7.17-1.module+el8.2.0+4561+f4e0d66a.x86_64
python2-markupsafe-0.23-19.module+el8.1.0+3111+de3f2d8e.x86_64
python2-nose-1.3.7-30.module+el8.1.0+3111+de3f2d8e.noarch
python2-pip-9.0.3-16.module+el8.2.0+5478+b505947e.noarch
python2-pip-wheel-9.0.3-16.module+el8.2.0+5478+b505947e.noarch
python2-psycopg2-2.7.5-7.module+el8.1.0+3111+de3f2d8e.x86_64
python2-pytz-2017.2-12.module+el8.1.0+3111+de3f2d8e.noarch
python2-pyyaml-3.12-16.module+el8.1.0+3111+de3f2d8e.x86_64
python2-requests-2.20.0-3.module+el8.2.0+4577+feefd9b8.noarch
python2-setuptools-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch
python2-setuptools-wheel-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch
python2-six-1.11.0-5.module+el8.1.0+3111+de3f2d8e.noarch
python2-urllib3-1.24.2-1.module+el8.1.0+3280+19512f10.noarch
~~~

Version-Release number of selected component (if applicable):
RHOSP16.1.1

How reproducible:
Always

Steps to Reproduce:
1. Upgrade RHOSP13 to 16.1 by following the upgrade documentation

Actual results:
python2-* packages are left in overcloud nodes

Expected results:
python2-* packages are removed from overcloud nodes

Additional info:

Comment 1 Dan Macpherson 2020-09-23 05:24:45 UTC
Hi Jose,

Is this implemented in config-download? (or should it be implemented as a part of config-download)?

Just want to check if this should be an eng BZ rather than a docs BZ. If you reckon a docs BZ, I can implement something, but thought I'd at least give you a chance to steal this BZ from me.

- Dan

Comment 2 Jose Luis Franco 2020-09-23 06:11:19 UTC
Hello Dan,

After checking the code, I can confirm that Takashi is right. We missed the removal of the remaining python2* packages post system_upgrade step. So this BZ should be moved as an Engineering one.

Assigning it to us.

Comment 3 Dan Macpherson 2020-09-23 08:48:27 UTC
Quick question that just occurred to me. If you implement this cleanup as a post system_upgrade step, this will only affect the overcloud, not the undercloud, right? I just remembered we need to keep those python2 packages on the undercloud for ceph-ansible v3. But it seems like what you're proposing will only affect the overcloud since the leapp upgrade is manual on the undercloud. Is that a correct assumption?

Comment 4 Jose Luis Franco 2020-09-23 12:53:03 UTC
Exactly, that would the best approach. To include some post_upgrade tasks in tripleo-packages service that will clean up all the remainings in the overcloud node. I need to confirm with the rest of the team if it makes sense to have that post-upgrade task tighten to the tag: system_upgrade or if it's better to run it once we have finished with the whole overcloud node upgrade (no tags).

Thanks for your inputs Dan!

Comment 19 Lukas Bezdicka 2021-05-10 10:43:13 UTC
2021-05-06 23:09:30 | TASK [Clean up Python 2 packages] **********************************************
2021-05-06 23:09:30 | Thursday 06 May 2021  23:07:31 +0000 (0:00:07.974)       0:02:08.227 ********** 
2021-05-06 23:09:30 | changed: [controller-0] => {"changed": true, "msg": "", "rc": 0, "results": ["Removed: pygobject2-2.28.7-4.module+el8+2760+3d7d61b2.x86_64", "Removed: python-PyMySQL-0.7.11-1.el7ost.noarch", "Removed: python-deprecation-1.0-3.el7.noarch", "Removed: python-pysocks-1.5.6-3.el7ost.noarch", "Removed: python-semantic_version-2.4.2-2.el7.noarch", "Removed: python2-2.7.17-1.module+el8.2.0+4561+f4e0d66a.x86_64", "Removed: python2-asn1crypto-0.23.0-3.el7ost.noarch", "Removed: python2-babel-2.5.1-9.module+el8.1.0+3111+de3f2d8e.noarch", "Removed: python2-backports-1.0-15.module+el8.1.0+3111+de3f2d8e.x86_64", "Removed: python2-backports-ssl_match_hostname-3.5.0.1-11.module+el8.1.0+3111+de3f2d8e.noarch", "Removed: python2-chardet-3.0.4-10.module+el8.1.0+3111+de3f2d8e.noarch", "Removed: python2-dateutil-1:2.6.1-1.el7ost.noarch", "Removed: python2-idna-2.5-7.module+el8.1.0+3111+de3f2d8e.noarch", "Removed: python2-ipaddress-1.0.18-6.module+el8.1.0+3111+de3f2d8e.noarch", "Removed: python2-jinja2-2.10-8.module+el8.1.0+3111+de3f2d8e.noarch", "Removed: python2-leapp-0.12.0-1.el7_9.noarch", "Removed: python2-libs-2.7.17-1.module+el8.2.0+4561+f4e0d66a.x86_64", "Removed: python2-markupsafe-0.23-19.module+el8.1.0+3111+de3f2d8e.x86_64", "Removed: python2-nose-1.3.7-30.module+el8.1.0+3111+de3f2d8e.noarch", "Removed: python2-pip-9.0.3-16.module+el8.2.0+5478+b505947e.noarch", "Removed: python2-pip-wheel-9.0.3-16.module+el8.2.0+5478+b505947e.noarch", "Removed: python2-psycopg2-2.7.5-7.module+el8.1.0+3111+de3f2d8e.x86_64", "Removed: python2-pytz-2017.2-12.module+el8.1.0+3111+de3f2d8e.noarch", "Removed: python2-pyyaml-3.12-16.module+el8.1.0+3111+de3f2d8e.x86_64", "Removed: python2-requests-2.20.0-3.module+el8.2.0+4577+feefd9b8.noarch", "Removed: python2-setuptools-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch", "Removed: python2-setuptools-wheel-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch", "Removed: python2-six-1.11.0-5.module+el8.1.0+3111+de3f2d8e.noarch", "Removed: python2-urllib3-1.24.2-1.module+el8.1.0+3280+19512f10.noarch", "Removed: leapp-0.12.0-1.el7_9.noarch", "Removed: leapp-deps-el8-5.0.0-100.202004161145Z.de6626f.master.el8.noarch", "Removed: leapp-repository-0.13.0-2.el7_9.noarch"]}

Comment 25 errata-xmlrpc 2021-05-26 13:49:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform 16.1.6 bug fix and enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:2097