Bug 1475275

Summary: enabled_repos_upload.py has invalid syntax for Python2.4 on EL5
Product: Red Hat Satellite Reporter: Evgeni Golov <egolov>
Component: katello-agentAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.2.11CC: jcallaha, mmccune, zhunting
Target Milestone: UnspecifiedKeywords: Regression
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: katello-host-tools-3.0.1-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-17 19:44:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Evgeni Golov 2017-07-26 11:18:12 UTC
With the update from katello-agent-3.0.0-2.el5.noarch to katello-agent-3.0.0-3.el5.noarch several files were moved to the katello-host-tools-3.0.0-3.el5.noarch package.
In this package the pyc and pyo files for /usr/lib/yum-plugins/enabled_repos_upload.py are missing.
As a result yum is broken:
# yum list kernel
Plugin "enabled_repos_upload" can't be imported
Loaded plugins: package_upload, product-id, security, subscription-manager

Comment 1 Evgeni Golov 2017-07-26 11:18:16 UTC
Created from redmine issue http://projects.theforeman.org/issues/20404

Comment 2 Evgeni Golov 2017-07-26 11:18:20 UTC
Upstream bug assigned to None

Comment 3 Evgeni Golov 2017-07-26 11:20:15 UTC
The issue is not really the missing files, it's the syntax of the plugin not being compatible with Python 2.4.

Comment 6 Satellite Program 2017-07-26 22:15:06 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20404 has been resolved.

Comment 7 Evgeni Golov 2017-08-01 15:06:47 UTC
Verification:

After installation, the following files exist:
/usr/lib/yum-plugins/enabled_repos_upload.py
/usr/lib/yum-plugins/enabled_repos_upload.pyc
/usr/lib/yum-plugins/enabled_repos_upload.pyo
(the later two were missing before)

The plugin loads fine, that means, any yum command (like "yum list kernel") succeeds
* without the output of Plugin '"enabled_repos_upload" can't be imported'
* and the "Loaded plugins" line contains "enabled_repos_upload"

Comment 8 Evgeni Golov 2017-08-01 15:08:22 UTC
The above should be after installing katello-host-tools in a EL5 client.

Comment 9 jcallaha 2017-08-01 15:13:54 UTC
Verified in Satellite 6.2.11 Snap 3

I was able to successfully install katello-agent on a RHEL5 client, then verified that the expected files were present.

Installed:
  katello-agent.noarch 0:3.0.1-1.el5                                                                                                                                                          

Dependency Installed:
  gofer.noarch 0:2.7.7-2.el5
  katello-host-tools.noarch 0:3.0.1-1.el5
  katello-host-tools-fact-plugin.noarch 0:3.0.1-1.el5
  pulp-rpm-handlers.noarch 0:2.8.7.15-2.el5     
  python-ctypes.x86_64 0:1.0.2-3.el5
  python-gofer.noarch 0:2.7.7-2.el5
  python-gofer-proton.noarch 0:2.7.7-2.el5
  python-hashlib.x86_64 0:20081119-7.el5sat
  python-isodate.noarch 0:0.5.0-4.pulp.el5
  python-pulp-agent-lib.noarch 0:2.8.7.13-1.el5
  python-pulp-common.noarch 0:2.8.7.13-1.el5
  python-pulp-rpm-common.noarch 0:2.8.7.15-2.el5
  python-qpid-proton.x86_64 0:0.9-16.el5
  qpid-proton-c.x86_64 0:0.9-16.el5            

Complete!


[root@qe-blade-03 ~]# find /usr/lib/yum-plugins/ -name enabled_repos_upload*
/usr/lib/yum-plugins/enabled_repos_upload.pyc
/usr/lib/yum-plugins/enabled_repos_upload.pyo
/usr/lib/yum-plugins/enabled_repos_upload.py

Comment 10 Mike McCune 2017-08-17 19:44:23 UTC
This bug was incorrectly missed from the Errata advisory for 6.2.11 but we did ship the fix for this bug with that update. Manually moving this to CLOSED:ERRATA.

For information on the 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-2017:2466