Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1482189 - EL6: katello-package-upload missing RPM Requires on python-argparse
Summary: EL6: katello-package-upload missing RPM Requires on python-argparse
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: katello-agent
Version: 6.2.11
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Evgeni Golov
QA Contact: jcallaha
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-16 16:24 UTC by Mike McCune
Modified: 2020-12-14 09:33 UTC (History)
10 users (show)

Fixed In Version: katello-host-tools-3.0.2-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-25 19:05:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
verification screenshot (66.66 KB, image/png)
2017-08-29 16:03 UTC, jcallaha
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 20702 0 Normal Closed EL6: katello-package-upload missing RPM Requires on python-argparse 2020-08-31 14:49:05 UTC
Red Hat Product Errata RHBA-2017:2804 0 normal SHIPPED_LIVE Satellite Tools 6.2.12 bug fix update 2017-09-25 23:04:33 UTC

Description Mike McCune 2017-08-16 16:24:00 UTC
Due to changes induced from the addition of:


https://bugzilla.redhat.com/show_bug.cgi?id=1445403

to 6.2.11 we made modifications to the client tooling. There was a change that brought in a requirement to use python-argparse. Without it, katello-package-upload fails to execute:


# katello-package-upload 
Traceback (most recent call last):
  File "/usr/sbin/katello-package-upload", line 17, in <module>
    import argparse
ImportError: No module named argparse


after install it runs fine.

Comment 1 Mike McCune 2017-08-16 16:25:13 UTC
*** WORKAROUND ****

yum install python-argparse

Comment 4 Evgeni Golov 2017-08-17 06:07:43 UTC
The same is true on EL5, and I don't think there is a python-argparse for EL5.

Comment 5 Evgeni Golov 2017-08-23 11:44:39 UTC
Created redmine issue http://projects.theforeman.org/issues/20702 from this bug

Comment 7 Evgeni Golov 2017-08-23 12:54:52 UTC
Thinking more about it, we could also just switch to the old optparse that is available since Python 2.3: https://docs.python.org/2/library/optparse.html

We're not using any features that would be argparse specific.

Comment 8 Evgeni Golov 2017-08-23 12:55:57 UTC
The problem is also in katello-enabled-repos-upload, not only katello-package-upload

Comment 9 Satellite Program 2017-08-24 16:07:18 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20702 has been resolved.

Comment 12 jcallaha 2017-08-29 16:01:51 UTC
Verified in Satellite 6.2.12 Snap 1.

Installed katello-agent on a rhel 6.6. client then performed a katello-package-upload successfully. See below and attached screenshot for verification.

[root@testsix ~]# rpm -Uvh http://ibm-x3550m3-10.lab.eng.brq.redhat.com/pub/katello-ca-consumer-latest.noarch.rpm
Retrieving http://ibm-x3550m3-10.lab.eng.brq.redhat.com/pub/katello-ca-consumer-latest.noarch.rpm
Preparing...                ########################################### [100%]
   1:katello-ca-consumer-ibm########################################### [100%]
[root@testsix ~]# subscription-manager register --org="Default_Organization" --activationkey="rhel6"
The system has been registered with ID: f94b0107-5257-4b82-8e09-ce7bc76aee3f 
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

[root@testsix ~]# yum -y install katello-agent
Loaded plugins: product-id, subscription-manager
Setting up Install Process
Default_Organization_z-stream_6tools                                                                                                                                   | 2.1 kB     00:00     
Default_Organization_z-stream_6tools/primary                                                                                                                           |  18 kB     00:00     
Default_Organization_z-stream_6tools                                                                                                                                                    59/59
rhel-6-server-rpms                                                                                                                                                     | 2.0 kB     00:00     
rhel-6-server-rpms/primary                                                                                                                                             |  32 MB     00:29     
rhel-6-server-rpms                                                                                                                                                                19679/19679
Resolving Dependencies
--> Running transaction check
---> Package katello-agent.noarch 0:3.0.2-1.el6sat will be installed
--> Processing Dependency: python-pulp-agent-lib >= 2.6 for package: katello-agent-3.0.2-1.el6sat.noarch
--> Processing Dependency: python-gofer-proton >= 2.5 for package: katello-agent-3.0.2-1.el6sat.noarch
--> Processing Dependency: pulp-rpm-handlers >= 2.6 for package: katello-agent-3.0.2-1.el6sat.noarch
--> Processing Dependency: gofer >= 2.7.6 for package: katello-agent-3.0.2-1.el6sat.noarch
--> Processing Dependency: yum-plugin-security for package: katello-agent-3.0.2-1.el6sat.noarch
--> Processing Dependency: katello-host-tools for package: katello-agent-3.0.2-1.el6sat.noarch
--> Running transaction check
---> Package gofer.noarch 0:2.7.7-2.el6sat will be installed
--> Processing Dependency: python-gofer = 2.7.7 for package: gofer-2.7.7-2.el6sat.noarch
---> Package katello-host-tools.noarch 0:3.0.2-1.el6sat will be installed
--> Processing Dependency: katello-host-tools-fact-plugin for package: katello-host-tools-3.0.2-1.el6sat.noarch
---> Package pulp-rpm-handlers.noarch 0:2.8.7.16-1.el6sat will be installed
--> Processing Dependency: python-pulp-rpm-common >= 2.8.3 for package: pulp-rpm-handlers-2.8.7.16-1.el6sat.noarch
---> Package python-gofer-proton.noarch 0:2.7.7-2.el6sat will be installed
--> Processing Dependency: python-qpid-proton >= 0.9-5 for package: python-gofer-proton-2.7.7-2.el6sat.noarch
---> Package python-pulp-agent-lib.noarch 0:2.8.7.15-1.el6sat will be installed
--> Processing Dependency: python-pulp-common = 2.8.7.15 for package: python-pulp-agent-lib-2.8.7.15-1.el6sat.noarch
---> Package yum-plugin-security.noarch 0:1.1.30-40.el6 will be installed
--> Running transaction check
---> Package katello-host-tools-fact-plugin.noarch 0:3.0.2-1.el6sat will be installed
---> Package python-gofer.noarch 0:2.7.7-2.el6sat will be installed
---> Package python-pulp-common.noarch 0:2.8.7.15-1.el6sat will be installed
--> Processing Dependency: python-isodate >= 0.5.0-1.pulp for package: python-pulp-common-2.8.7.15-1.el6sat.noarch
---> Package python-pulp-rpm-common.noarch 0:2.8.7.16-1.el6sat will be installed
---> Package python-qpid-proton.x86_64 0:0.9-16.el6 will be installed
--> Processing Dependency: qpid-proton-c(x86-64) = 0.9-16.el6 for package: python-qpid-proton-0.9-16.el6.x86_64
--> Processing Dependency: libqpid-proton.so.2()(64bit) for package: python-qpid-proton-0.9-16.el6.x86_64
--> Running transaction check
---> Package python-isodate.noarch 0:0.5.0-4.el6sat will be installed
---> Package qpid-proton-c.x86_64 0:0.9-16.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================
 Package                                              Arch                         Version                                   Repository                                                  Size
====================
Installing:
 katello-agent                                        noarch                       3.0.2-1.el6sat                            Default_Organization_z-stream_6tools                        25 k
Installing for dependencies:
 gofer                                                noarch                       2.7.7-2.el6sat                            Default_Organization_z-stream_6tools                        84 k
 katello-host-tools                                   noarch                       3.0.2-1.el6sat                            Default_Organization_z-stream_6tools                        17 k
 katello-host-tools-fact-plugin                       noarch                       3.0.2-1.el6sat                            Default_Organization_z-stream_6tools                        11 k
 pulp-rpm-handlers                                    noarch                       2.8.7.16-1.el6sat                         Default_Organization_z-stream_6tools                        76 k
 python-gofer                                         noarch                       2.7.7-2.el6sat                            Default_Organization_z-stream_6tools                       133 k
 python-gofer-proton                                  noarch                       2.7.7-2.el6sat                            Default_Organization_z-stream_6tools                        53 k
 python-isodate                                       noarch                       0.5.0-4.el6sat                            Default_Organization_z-stream_6tools                        50 k
 python-pulp-agent-lib                                noarch                       2.8.7.15-1.el6sat                         Default_Organization_z-stream_6tools                        95 k
 python-pulp-common                                   noarch                       2.8.7.15-1.el6sat                         Default_Organization_z-stream_6tools                       127 k
 python-pulp-rpm-common                               noarch                       2.8.7.16-1.el6sat                         Default_Organization_z-stream_6tools                        69 k
 python-qpid-proton                                   x86_64                       0.9-16.el6                                Default_Organization_z-stream_6tools                       191 k
 qpid-proton-c                                        x86_64                       0.9-16.el6                                Default_Organization_z-stream_6tools                       125 k
 yum-plugin-security                                  noarch                       1.1.30-40.el6                             rhel-6-server-rpms                                          43 k

Transaction Summary
================================================================
Install      14 Package(s)

Total download size: 1.1 M
Installed size: 3.2 M
Downloading Packages:
(1/14): gofer-2.7.7-2.el6sat.noarch.rpm                                                                                                                                ... 
(14/14): yum-plugin-security-1.1.30-40.el6.noarch.rpm                                                                                                                  ----------------------------------------------------------------
Total                                                                                                                                                          46 kB/s | 1.1 MB     00:23     
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Importing GPG key 0xFD431D51:
 Userid : Red Hat, Inc. (release key 2) <security>
 Package: redhat-release-server-6Server-6.6.0.2.el6.x86_64 (@koji-override-0/6.5)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Importing GPG key 0x2FA658E0:
 Userid : Red Hat, Inc. (auxiliary key) <security>
 Package: redhat-release-server-6Server-6.6.0.2.el6.x86_64 (@koji-override-0/6.5)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : python-gofer-2.7.7-2.el6sat.noarch                                                                                                                                        1/14 
...
  Installing : katello-agent-3.0.2-1.el6sat.noarch                                                                                                                                      14/14 
rhel-6-server-rpms/productid                                                                                                                                           | 2.1 kB     00:00     
  Verifying  : python-pulp-rpm-common-2.8.7.16-1.el6sat.noarch                                                                                                                           1/14 
... 
  Verifying  : python-pulp-agent-lib-2.8.7.15-1.el6sat.noarch                                                                                                                           14/14 

Installed:
  katello-agent.noarch 0:3.0.2-1.el6sat                                                                                                                                                       

Dependency Installed:
  gofer.noarch 0:2.7.7-2.el6sat                                katello-host-tools.noarch 0:3.0.2-1.el6sat                  katello-host-tools-fact-plugin.noarch 0:3.0.2-1.el6sat           
  pulp-rpm-handlers.noarch 0:2.8.7.16-1.el6sat                 python-gofer.noarch 0:2.7.7-2.el6sat                        python-gofer-proton.noarch 0:2.7.7-2.el6sat                      
  python-isodate.noarch 0:0.5.0-4.el6sat                       python-pulp-agent-lib.noarch 0:2.8.7.15-1.el6sat            python-pulp-common.noarch 0:2.8.7.15-1.el6sat                    
  python-pulp-rpm-common.noarch 0:2.8.7.16-1.el6sat            python-qpid-proton.x86_64 0:0.9-16.el6                      qpid-proton-c.x86_64 0:0.9-16.el6                                
  yum-plugin-security.noarch 0:1.1.30-40.el6                  

Complete!
[root@testsix ~]# katello-package-upload 

[root@testsix ~]# cat /usr/sbin/katello-package-upload
#!/usr/bin/python
...
import sys
import optparse
...

Comment 13 jcallaha 2017-08-29 16:03:12 UTC
Created attachment 1319652 [details]
verification screenshot

Comment 23 errata-xmlrpc 2017-09-25 19:05:25 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, 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:2804


Note You need to log in before you can comment on or make changes to this bug.