Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1080648

Summary: Traceback on applicability generation for a repository
Product: Red Hat Satellite Reporter: Mike McCune <mmccune>
Component: Content ManagementAssignee: Justin Sherrill <jsherril>
Status: CLOSED CURRENTRELEASE QA Contact: Sachin Ghai <sghai>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.4CC: cwelton, jmontleo, jsherril, sghai
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/5960
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1080647 Environment:
Last Closed: 2014-07-02 14:05:41 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:
Bug Depends On: 1080647    
Bug Blocks:    

Description Mike McCune 2014-03-25 21:05:55 UTC
+++ This bug was initially created as a clone of Bug #1080647 +++

Description of problem:

Currently under certain situations generating applicability will fail.  Some debugging by a bowl of eggs:

  bowlofeggs | jsherrill: i think this might happen if you had applicbility data, a consumer's profile       
             | changes, and then you asked us to regenerate for a repo                                       
  bowlofeggs | yeah, i'm surprised too                                                                       
  bowlofeggs | slight adjustment to what i said, "a consumer's profile changes, and no other consumer shared it's old profile"                                       

Version-Release number of selected component (if applicable):
pulp-server-2.3.1-1.el6.noarch

How reproducible:
Always maybe?

Steps to Reproduce:
1. Register a consumer and bind it to repo A
2. Request applicability regeneration for RepoA
3. Update the consumer's package profile  (make a change)
4. Request applicability regeneration for Repo A again

Actual results:
ERROR (see traceback below)

Expected results:
Regeneration occurs

Additional info:


    2014-03-25 12:58:37,849 [ERROR][3ffb90ed-7893-4892-9726-34ba2f6f6af2] run() @ consumer.py:72 - failed:
    None
    Traceback (most recent call last):
      File "/usr/lib/python2.6/site-packages/gofer/messaging/consumer.py", line 64, in run
        msg = self.__fetch(receiver)
      File "/usr/lib/python2.6/site-packages/gofer/messaging/consumer.py", line 100, in __fetch
        return receiver.fetch(timeout=self.WAIT)
      File "<string>", line 6, in fetch
      File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 1010, in fetch
        self._ecwait(lambda: self.linked)
      File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 50, in _ecwait
        result = self._ewait(lambda: self.closed or predicate(), timeout)
      File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 973, in _ewait
        result = self.session._ewait(lambda: self.error or predicate(), timeout)
      File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 566, in _ewait
        result = self.connection._ewait(lambda: self.error or predicate(), timeout)
      File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 209, in _ewait
        self.check_error()
      File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 202, in check_error
        raise self.error
    InternalError: Traceback (most recent call last):
      File "/usr/lib/python2.6/site-packages/qpid/messaging/driver.py", line 654, in write
        op.dispatch(self)
      File "/usr/lib/python2.6/site-packages/qpid/ops.py", line 84, in dispatch
        getattr(target, handler)(self, *args)
      File "/usr/lib/python2.6/site-packages/qpid/messaging/driver.py", line 870, in do_session_detached
        sst = self._sessions.pop(dtc.channel)
    KeyError: 0

Comment 1 Justin Sherrill 2014-03-25 21:11:10 UTC
Reproducing in Sat6:

1.  Create a content view with a repo and publish version 1 (Library/ViewA)
2.  Subscribe a system to Library/ViewA
3.  Cause an update to the systems package profile (uninstall/upgrade/install new package)
4.  Wait for its package profile to be sent to katello (wait up to 4 hours, or restart rhsmcertd and wait 2 minutes)
5.  Publish a new version of Library/ViewA

Comment 3 Justin Sherrill 2014-03-26 16:38:35 UTC
Correct tracebacK:

2014-03-25 15:42:31,819 pulp.server.dispatch.task:ERROR: 'NoneType' object is unsubscriptable
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/dispatch/task.py", line 137, in _run
    result = call(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/managers/consumer/applicability.py", line 137, in regenerate_applicability_for_repos
    self.regenerate_applicability(profile_hash, unit_profile['content_type'],
TypeError: 'NoneType' object is unsubscriptable
2014-03-25 15:43:30,806 pulp.plugins.yum_clone_distributor.distributor:INFO: Start publish time 1395776610.81
2014-03-25 15:45:16,145 pulp.plugins.yum_clone_distributor.distributor:INFO: Start publish time 1395776716.15
2014-03-25 15:45:27,437 pulp.server.dispatch.task:ERROR: 'NoneType' object is unsubscriptable
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/dispatch/task.py", line 137, in _run
    result = call(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/managers/consumer/applicability.py", line 137, in regenerate_applicability_for_repos
    self.regenerate_applicability(profile_hash, unit_profile['content_type'],
TypeError: 'NoneType' object is unsubscriptable

Comment 4 Justin Sherrill 2014-06-02 23:58:26 UTC
http://projects.theforeman.org/issues/5960

Comment 6 Sachin Ghai 2014-06-10 09:43:46 UTC
verified with sat6 beta snap8 (Satellite-6.0.3-RHEL-6-20140604.0) as per steps given in comment 1. I tried with Library/ViewA as well as Dev/ViewA. But didn't get any traceback. Moving this verified.

Comment 7 Bryan Kearney 2014-07-02 14:05:41 UTC
This was delivered with 6.0.3, which is the Satellite 6 Beta.