Bug 1152633 - During yum install/remove, our yum plugin prints: 'NoneType' object has no attribute 'startswith'
Summary: During yum install/remove, our yum plugin prints: 'NoneType' object has no at...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: consumers
Version: Master
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 2.5.0
Assignee: Brian Bouterse
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-14 14:53 UTC by Randy Barlow
Modified: 2014-11-24 21:33 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-24 21:33:45 UTC
Embargoed:


Attachments (Terms of Use)

Description Randy Barlow 2014-10-14 14:53:04 UTC
Description of problem:
On my 2.5.0-beta test system (RPM install, not dev install) I see this error printed anytime I install or remove any package:

'NoneType' object has no attribute 'startswith'

Version-Release number of selected component (if applicable):
2.5.0-0.7.beta

How reproducible:
Every time.

Steps to Reproduce:
1. Install or remove a package on a system that is configured as a Pulp consumer (i.e., has our yum plugin installed).

Actual results:
[rbarlow@pamphlet]~% sudo yum remove -y pulp-selinux
Loaded plugins: fastestmirror, pulp-profile-update
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package pulp-selinux.noarch 0:2.5.0-0.7.beta.el6 will be erased
--> Finished Dependency Resolution
base                                                                              | 3.7 kB     00:00     
epel/metalink                                                                     |  15 kB     00:00     
epel                                                                              | 4.4 kB     00:00     
epel/primary_db                                                                   | 6.3 MB     00:01     
extras                                                                            | 3.3 kB     00:00     
pulp-2-stable                                                                     | 3.6 kB     00:00     
pulp-2-stable/primary_db                                                          |  34 kB     00:00     
pulp-2.4-beta                                                                     | 3.6 kB     00:00     
pulp-2.4-beta/primary_db                                                          |  34 kB     00:00     
pulp-2.4-testing                                                                  | 3.6 kB     00:00     
pulp-2.4-testing/primary_db                                                       |  34 kB     00:00     
pulp-2.5-beta                                                                     | 3.6 kB     00:00     
pulp-2.5-beta/primary_db                                                          |  35 kB     00:00     
pulp-2.5-testing                                                                  | 3.6 kB     00:00     
pulp-2.5-testing/primary_db                                                       |  35 kB     00:00     
pulp-stable                                                                       | 3.6 kB     00:00     
pulp-stable/primary_db                                                            |  34 kB     00:00     
https://limeade.usersys.redhat.com/pulp/repos/rhel-6-ddns/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'limeade.usersys.redhat.com'"
Trying other mirror.
updates                                                                           | 3.4 kB     00:00     
updates/primary_db                                                                | 5.4 MB     00:10     

Dependencies Resolved

=========================================================================================================
 Package                 Arch              Version                       Repository                 Size
=========================================================================================================
Removing:
 pulp-selinux            noarch            2.5.0-0.7.beta.el6            @pulp-2.5-beta            171 k

Transaction Summary
=========================================================================================================
Remove        1 Package(s)

Installed size: 171 k
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : pulp-selinux-2.5.0-0.7.beta.el6.noarch                                                1/1 
'NoneType' object has no attribute 'startswith'
  Verifying  : pulp-selinux-2.5.0-0.7.beta.el6.noarch                                                1/1 

Removed:
  pulp-selinux.noarch 0:2.5.0-0.7.beta.el6                                                               

Complete!

Expected results:
No output should be printed in between the Erasing (or Installed) and Verifying steps.

Comment 1 Randy Barlow 2014-10-14 15:11:04 UTC
I noticed that the system I observed this problem on was not actually registered as a consumer, but it does have the pulp-profile-update yum plugin.

Comment 2 Jeff Ortel 2014-10-15 16:12:31 UTC
Verify profile reporting is working.  If so, change priority and severity to medium and clear the target release.

Comment 3 Brian Bouterse 2014-10-20 15:18:23 UTC
I believe profile reporting is 100% broken due to an exception that occurs before the yum plugin posts the profile bundle. I've also experimentally shown no profile data is populated using the profile calls in the API. I'm moving on to fixing the bug now.

Comment 4 Brian Bouterse 2014-10-20 17:33:01 UTC
PR available at:  https://github.com/pulp/pulp_rpm/pull/583

Comment 5 Brian Bouterse 2014-10-20 17:37:37 UTC
QE, you can reproduce with the following:

1. register a consumer as consumer c1
2. bind c1 to a repo, and issue an update for c1.
3. On the consumer c1, do a yum install (ie: yum install sl)
4. Verify that the yum output shows pulp-profile-update
"Loaded plugins: langpacks, pulp-profile-update, refresh-packagekit"
5. Use pic to get the profile for the consumer c1 by running:

pic.GET('/pulp/api/v2/consumers/c1/profiles/')

You should see a lot of output, and in that output you should see whatever you just installed correctly listed. If that is the case, VERIFY the BZ. If you just see a [] as the output, then it's wrong.

Comment 6 Brian Bouterse 2014-10-20 18:14:30 UTC
Merged to 2.5-testing -> 2.5-dev -> master

Comment 7 Chris Duryee 2014-10-20 21:52:08 UTC
build: 2.5.0-0.10.beta

Comment 8 Preethi Thomas 2014-10-23 19:46:18 UTC
verified
[root@cloud-qe-22 ~]# rpm -qa pulp-server
pulp-server-2.5.0-0.11.beta.el6.noarch
[root@cloud-qe-22 ~]# 

[root@cloud-qe-22 ~]# yum install bear
Loaded plugins: product-id, pulp-profile-update, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package bear.noarch 0:4.1-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================================================
 Package                                           Arch                                                Version                                              Repository                                        Size
===================================================================================================================================================================================================================
Installing:
 bear                                              noarch                                              4.1-1                                                zoo                                              2.4 k

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

Total download size: 2.4 k
Installed size: 42  
Is this ok [y/N]: y
Downloading Packages:
bear-4.1-1.noarch.rpm                                                                                                                                                                       | 2.4 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : bear-4.1-1.noarch                                                                                                                                                                               1/1 

  Verifying  : bear-4.1-1.noarch                                                                                                                                                                               1/1 

Installed:
  bear.noarch 0:4.1-1                                                                                                                                                                                              

Complete!



[root@cloud-qe-22 ~]# yum install screen
Loaded plugins: product-id, pulp-profile-update, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package screen.x86_64 0:4.0.3-16.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package        Arch           Version              Repository             Size
================================================================================
Installing:
 screen         x86_64         4.0.3-16.el6         beaker-Server         494 k

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

Total download size: 494 k
Installed size: 795 k
Is this ok [y/N]: y
Downloading Packages:
screen-4.0.3-16.el6.x86_64.rpm                           | 494 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : screen-4.0.3-16.el6.x86_64                                   1/1 

  Verifying  : screen-4.0.3-16.el6.x86_64                                   1/1 

Installed:
  screen.x86_64 0:4.0.3-16.el6                                                  

Complete!
[root@cloud-qe-22 ~]#


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