Bug 1009912 - @pulp-consumer missing dependency on pymongo
@pulp-consumer missing dependency on pymongo
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: rel-eng (Show other bugs)
Master
x86_64 Linux
unspecified Severity high
: ---
: 2.3.0
Assigned To: Sayli Karmarkar
pulp-qe-list
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-19 09:29 EDT by Barnaby Court
Modified: 2015-03-22 21:12 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-09 09:30:13 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Barnaby Court 2013-09-19 09:29:24 EDT
Description: 

yum install @pulp-consumer does not include a requirement on the pymongo library
This leads to a failure if only @pulp-consumer is installed on RHEL 6:

Command used to install consumer code
yum install @pulp-consumer --nogpg

[root@bcourt-rhel6 consumer]# pulp-consumer -u admin -p admin register --consumer-id joey
Traceback (most recent call last):
  File "/usr/bin/pulp-consumer", line 9, in <module>
    load_entry_point('pulp-client-consumer==2.3.0', 'console_scripts', 'pulp-consumer')()
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 299, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2229, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1948, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.6/site-packages/pulp/client/consumer/__init__.py", line 18, in <module>
    from pulp.client import launcher
  File "/usr/lib/python2.6/site-packages/pulp/client/launcher.py", line 28, in <module>
    from pulp.bindings.bindings import Bindings
  File "/usr/lib/python2.6/site-packages/pulp/bindings/bindings.py", line 18, in <module>
    from pulp.bindings.repository import *
  File "/usr/lib/python2.6/site-packages/pulp/bindings/repository.py", line 16, in <module>
    from pulp.common import constants
  File "/usr/lib/python2.6/site-packages/pulp/common/constants.py", line 14, in <module>
    import pymongo
ImportError: No module named pymongo


I believe this is because python-pulp-common package does not require pymongo even though it imports constants from pymongo.
Comment 1 Randy Barlow 2013-09-19 10:15:42 EDT
I would suggest that we consider not introducing a dependency on pymongo just so we can get some constants. Adding pymongo to every consumer might not be desirable to our users, and it would be pretty easy for us to just put the value of that constant in our constants.py.
Comment 2 Barnaby Court 2013-09-19 10:19:49 EDT
I absolutely agree with Randy on this.  There's no reason we should introduce a dependency on pymongo just for a constant.
Comment 3 Sayli Karmarkar 2013-09-23 00:27:44 EDT
commit 9988e5bd73c1f2a2988e9f32b02733687378678f
Author: Sayli Karmarkar <skarmark@redhat.com>
Date:   Sun Sep 22 21:27:04 2013 -0700

    1009912 - removing pymongo dependency for consumers by using actual constants instead of importing pymongo in common/constants.py
Comment 4 Sayli Karmarkar 2013-09-24 13:00:36 EDT
Merged. yum install @pulp-consumer will not have a dependency on pymongo now and there will not be a failure on rhel6 if only pulp-consumer is installed.
Comment 5 Jeff Ortel 2013-09-26 11:36:34 EDT
build: 2.3.0-0.15.alpha
Comment 6 Preethi Thomas 2013-09-27 13:25:06 EDT
verified


[root@pulp-v2-client ~]# rpm -qa |grep pymongo
[root@pulp-v2-client ~]# yum install @pulp-consumer
Loaded plugins: security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package pulp-agent.noarch 0:2.3.0-0.16.alpha.el6 will be installed
--> Processing Dependency: python-pulp-bindings = 2.3.0 for package: pulp-agent-2.3.0-0.16.alpha.el6.noarch
--> Processing Dependency: python-pulp-agent-lib = 2.3.0 for package: pulp-agent-2.3.0-0.16.alpha.el6.noarch
---> Package pulp-consumer-client.noarch 0:2.3.0-0.16.alpha.el6 will be installed
--> Processing Dependency: python-pulp-common = 2.3.0 for package: pulp-consumer-client-2.3.0-0.16.alpha.el6.noarch
--> Processing Dependency: python-pulp-client-lib = 2.3.0 for package: pulp-consumer-client-2.3.0-0.16.alpha.el6.noarch
---> Package pulp-puppet-consumer-extensions.noarch 0:2.3.0-0.16.alpha.el6 will be installed
--> Processing Dependency: python-pulp-puppet-common = 2.3.0 for package: pulp-puppet-consumer-extensions-2.3.0-0.16.alpha.el6.noarch
---> Package pulp-puppet-handlers.noarch 0:2.3.0-0.16.alpha.el6 will be installed
---> Package pulp-rpm-consumer-extensions.noarch 0:2.3.0-0.16.alpha.el6 will be installed
--> Processing Dependency: python-pulp-rpm-extension = 2.3.0 for package: pulp-rpm-consumer-extensions-2.3.0-0.16.alpha.el6.noarch
---> Package pulp-rpm-handlers.noarch 0:2.3.0-0.16.alpha.el6 will be installed
--> Processing Dependency: python-pulp-rpm-common = 2.3.0 for package: pulp-rpm-handlers-2.3.0-0.16.alpha.el6.noarch
--> Processing Dependency: python-rhsm for package: pulp-rpm-handlers-2.3.0-0.16.alpha.el6.noarch
---> Package pulp-rpm-yumplugins.noarch 0:2.3.0-0.16.alpha.el6 will be installed
--> Running transaction check
---> Package python-pulp-agent-lib.noarch 0:2.3.0-0.16.alpha.el6 will be installed
---> Package python-pulp-bindings.noarch 0:2.3.0-0.16.alpha.el6 will be installed
--> Processing Dependency: m2crypto for package: python-pulp-bindings-2.3.0-0.16.alpha.el6.noarch
---> Package python-pulp-client-lib.noarch 0:2.3.0-0.16.alpha.el6 will be installed
--> Processing Dependency: python-isodate >= 0.5.0-1.pulp for package: python-pulp-client-lib-2.3.0-0.16.alpha.el6.noarch
---> Package python-pulp-common.noarch 0:2.3.0-0.16.alpha.el6 will be installed
---> Package python-pulp-puppet-common.noarch 0:2.3.0-0.16.alpha.el6 will be installed
---> Package python-pulp-rpm-common.noarch 0:2.3.0-0.16.alpha.el6 will be installed
---> Package python-pulp-rpm-extension.noarch 0:2.3.0-0.16.alpha.el6 will be installed
---> Package python-rhsm.x86_64 0:1.8.0-1.pulp.el6 will be installed
--> Running transaction check
---> Package m2crypto.x86_64 0:0.21.1.pulp-8.el6 will be installed
---> Package python-isodate.noarch 0:0.5.0-1.pulp.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                      Arch   Version              Repository       Size
================================================================================
Installing:
 pulp-agent                   noarch 2.3.0-0.16.alpha.el6 pulp-v2-testing  39 k
 pulp-consumer-client         noarch 2.3.0-0.16.alpha.el6 pulp-v2-testing  43 k
 pulp-puppet-consumer-extensions
                              noarch 2.3.0-0.16.alpha.el6 pulp-v2-testing  15 k
 pulp-puppet-handlers         noarch 2.3.0-0.16.alpha.el6 pulp-v2-testing  19 k
 pulp-rpm-consumer-extensions noarch 2.3.0-0.16.alpha.el6 pulp-v2-testing  33 k
 pulp-rpm-handlers            noarch 2.3.0-0.16.alpha.el6 pulp-v2-testing  56 k
 pulp-rpm-yumplugins          noarch 2.3.0-0.16.alpha.el6 pulp-v2-testing  32 k
Installing for dependencies:
 m2crypto                     x86_64 0.21.1.pulp-8.el6    pulp-v2-testing 472 k
 python-isodate               noarch 0.5.0-1.pulp.el6     pulp-v2-testing  46 k
 python-pulp-agent-lib        noarch 2.3.0-0.16.alpha.el6 pulp-v2-testing  50 k
 python-pulp-bindings         noarch 2.3.0-0.16.alpha.el6 pulp-v2-testing  72 k
 python-pulp-client-lib       noarch 2.3.0-0.16.alpha.el6 pulp-v2-testing 154 k
 python-pulp-common           noarch 2.3.0-0.16.alpha.el6 pulp-v2-testing  75 k
 python-pulp-puppet-common    noarch 2.3.0-0.16.alpha.el6 pulp-v2-testing  25 k
 python-pulp-rpm-common       noarch 2.3.0-0.16.alpha.el6 pulp-v2-testing  56 k
 python-pulp-rpm-extension    noarch 2.3.0-0.16.alpha.el6 pulp-v2-testing 102 k
 python-rhsm                  x86_64 1.8.0-1.pulp.el6     pulp-v2-testing  87 k

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

Total download size: 1.3 M
Installed size: 4.2 M
Is this ok [y/N]: y
Downloading Packages:
(1/17): m2crypto-0.21.1.pulp-8.el6.x86_64.rpm            | 472 kB     00:00     
(2/17): pulp-agent-2.3.0-0.16.alpha.el6.noarch.rpm       |  39 kB     00:00     
(3/17): pulp-consumer-client-2.3.0-0.16.alpha.el6.noarch |  43 kB     00:00     
(4/17): pulp-puppet-consumer-extensions-2.3.0-0.16.alpha |  15 kB     00:00     
(5/17): pulp-puppet-handlers-2.3.0-0.16.alpha.el6.noarch |  19 kB     00:00     
(6/17): pulp-rpm-consumer-extensions-2.3.0-0.16.alpha.el |  33 kB     00:00     
(7/17): pulp-rpm-handlers-2.3.0-0.16.alpha.el6.noarch.rp |  56 kB     00:00     
(8/17): pulp-rpm-yumplugins-2.3.0-0.16.alpha.el6.noarch. |  32 kB     00:00     
(9/17): python-isodate-0.5.0-1.pulp.el6.noarch.rpm       |  46 kB     00:00     
(10/17): python-pulp-agent-lib-2.3.0-0.16.alpha.el6.noar |  50 kB     00:00     
(11/17): python-pulp-bindings-2.3.0-0.16.alpha.el6.noarc |  72 kB     00:00     
(12/17): python-pulp-client-lib-2.3.0-0.16.alpha.el6.noa | 154 kB     00:00     
(13/17): python-pulp-common-2.3.0-0.16.alpha.el6.noarch. |  75 kB     00:00     
(14/17): python-pulp-puppet-common-2.3.0-0.16.alpha.el6. |  25 kB     00:00     
(15/17): python-pulp-rpm-common-2.3.0-0.16.alpha.el6.noa |  56 kB     00:00     
(16/17): python-pulp-rpm-extension-2.3.0-0.16.alpha.el6. | 102 kB     00:00     
(17/17): python-rhsm-1.8.0-1.pulp.el6.x86_64.rpm         |  87 kB     00:00     
--------------------------------------------------------------------------------
Total                                           279 kB/s | 1.3 MB     00:04     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : m2crypto-0.21.1.pulp-8.el6.x86_64                           1/17 
  Installing : python-rhsm-1.8.0-1.pulp.el6.x86_64                         2/17 
  Installing : python-isodate-0.5.0-1.pulp.el6.noarch                      3/17 
  Installing : python-pulp-common-2.3.0-0.16.alpha.el6.noarch              4/17 
  Installing : python-pulp-agent-lib-2.3.0-0.16.alpha.el6.noarch           5/17 
  Installing : python-pulp-bindings-2.3.0-0.16.alpha.el6.noarch            6/17 
  Installing : python-pulp-rpm-common-2.3.0-0.16.alpha.el6.noarch          7/17 
  Installing : python-pulp-rpm-extension-2.3.0-0.16.alpha.el6.noarch       8/17 
  Installing : python-pulp-puppet-common-2.3.0-0.16.alpha.el6.noarch       9/17 
  Installing : python-pulp-client-lib-2.3.0-0.16.alpha.el6.noarch         10/17 
  Installing : pulp-consumer-client-2.3.0-0.16.alpha.el6.noarch           11/17 
  Installing : pulp-rpm-consumer-extensions-2.3.0-0.16.alpha.el6.noarch   12/17 
  Installing : pulp-agent-2.3.0-0.16.alpha.el6.noarch                     13/17 
  Installing : pulp-puppet-consumer-extensions-2.3.0-0.16.alpha.el6.noa   14/17 
  Installing : pulp-rpm-handlers-2.3.0-0.16.alpha.el6.noarch              15/17 
  Installing : pulp-rpm-yumplugins-2.3.0-0.16.alpha.el6.noarch            16/17 
  Installing : pulp-puppet-handlers-2.3.0-0.16.alpha.el6.noarch           17/17 
  Verifying  : python-pulp-puppet-common-2.3.0-0.16.alpha.el6.noarch       1/17 
  Verifying  : pulp-rpm-handlers-2.3.0-0.16.alpha.el6.noarch               2/17 
  Verifying  : python-isodate-0.5.0-1.pulp.el6.noarch                      3/17 
  Verifying  : python-pulp-common-2.3.0-0.16.alpha.el6.noarch              4/17 
  Verifying  : python-pulp-agent-lib-2.3.0-0.16.alpha.el6.noarch           5/17 
  Verifying  : m2crypto-0.21.1.pulp-8.el6.x86_64                           6/17 
  Verifying  : python-pulp-rpm-extension-2.3.0-0.16.alpha.el6.noarch       7/17 
  Verifying  : pulp-consumer-client-2.3.0-0.16.alpha.el6.noarch            8/17 
  Verifying  : pulp-rpm-consumer-extensions-2.3.0-0.16.alpha.el6.noarch    9/17 
  Verifying  : pulp-rpm-yumplugins-2.3.0-0.16.alpha.el6.noarch            10/17 
  Verifying  : python-pulp-bindings-2.3.0-0.16.alpha.el6.noarch           11/17 
  Verifying  : python-pulp-rpm-common-2.3.0-0.16.alpha.el6.noarch         12/17 
  Verifying  : pulp-agent-2.3.0-0.16.alpha.el6.noarch                     13/17 
  Verifying  : python-pulp-client-lib-2.3.0-0.16.alpha.el6.noarch         14/17 
  Verifying  : python-rhsm-1.8.0-1.pulp.el6.x86_64                        15/17 
  Verifying  : pulp-puppet-consumer-extensions-2.3.0-0.16.alpha.el6.noa   16/17 
  Verifying  : pulp-puppet-handlers-2.3.0-0.16.alpha.el6.noarch           17/17 

Installed:
  pulp-agent.noarch 0:2.3.0-0.16.alpha.el6                                      
  pulp-consumer-client.noarch 0:2.3.0-0.16.alpha.el6                            
  pulp-puppet-consumer-extensions.noarch 0:2.3.0-0.16.alpha.el6                 
  pulp-puppet-handlers.noarch 0:2.3.0-0.16.alpha.el6                            
  pulp-rpm-consumer-extensions.noarch 0:2.3.0-0.16.alpha.el6                    
  pulp-rpm-handlers.noarch 0:2.3.0-0.16.alpha.el6                               
  pulp-rpm-yumplugins.noarch 0:2.3.0-0.16.alpha.el6                             

Dependency Installed:
  m2crypto.x86_64 0:0.21.1.pulp-8.el6                                           
  python-isodate.noarch 0:0.5.0-1.pulp.el6                                      
  python-pulp-agent-lib.noarch 0:2.3.0-0.16.alpha.el6                           
  python-pulp-bindings.noarch 0:2.3.0-0.16.alpha.el6                            
  python-pulp-client-lib.noarch 0:2.3.0-0.16.alpha.el6                          
  python-pulp-common.noarch 0:2.3.0-0.16.alpha.el6                              
  python-pulp-puppet-common.noarch 0:2.3.0-0.16.alpha.el6                       
  python-pulp-rpm-common.noarch 0:2.3.0-0.16.alpha.el6                          
  python-pulp-rpm-extension.noarch 0:2.3.0-0.16.alpha.el6                       
  python-rhsm.x86_64 0:1.8.0-1.pulp.el6                                         

Complete!
[root@pulp-v2-client ~]# rpm -qa |grep pymongo
[root@pulp-v2-client ~]# 
[root@pulp-v2-client ~]# 
[root@pulp-v2-client ~]# 
[root@pulp-v2-client ~]# vi /etc/pulp/consumer/consumer.conf 
[root@pulp-v2-client ~]# 
[root@pulp-v2-client ~]# 
[root@pulp-v2-client ~]# 
[root@pulp-v2-client ~]# service pulp-agent restart
Stopping goferd                                            [  OK  ]
Starting goferd                                            [  OK  ]
[root@pulp-v2-client ~]# 
[root@pulp-v2-client ~]# 
[root@pulp-v2-client ~]# 
[root@pulp-v2-client ~]# pulp-consumer -u admin -p admin register --consumer-id pulp-client
Consumer [pulp-client] successfully registered

[root@pulp-v2-client ~]# 
[root@pulp-v2-client ~]# 
[root@pulp-v2-client ~]#
Comment 7 Preethi Thomas 2013-12-09 09:30:13 EST
Pulp 2.3 released.

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