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 1146292 - katello-agent will fail to start properly on future rhel releases (and subscription-manager releases)
Summary: katello-agent will fail to start properly on future rhel releases (and subscr...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: katello-agent
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: Tazim Kolhar
URL: http://projects.theforeman.org/issues...
Whiteboard:
: 1158585 (view as bug list)
Depends On:
Blocks: 1163962
TreeView+ depends on / blocked
 
Reported: 2014-09-24 23:47 UTC by Justin Sherrill
Modified: 2019-09-26 18:08 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
A recent update in the Red Hat Subscription Manager (RHSM) package moved the ConsumerIdentity class location and prevented goferd from importing the katello plugin. This prevented all katello-agent functionality from working. A fix has been added to reference the new location for ConsumerIdentity. The katello plugin should import without any issues when goferd is started.
Clone Of:
: 1163962 (view as bug list)
Environment:
Last Closed: 2014-11-13 22:29:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1857 0 normal SHIPPED_LIVE Red Hat Satellite 6 server bug fix update 2014-11-14 03:28:23 UTC

Description Justin Sherrill 2014-09-24 23:47:19 UTC
Description of problem:

Starting at version 1.11.5, subscription-manager had this change:  https://github.com/candlepin/subscription-manager/commit/c641b59240e46274087f90ed2e85514fe18b9176

Removing an import that we relied on (probably mistakenly relied on).

As a result, attempting to start goferd (as part of katello-agent), will result in an error in /var/log/message:

Sep 24 19:38:51 dhcp129-85 goferd: [ERROR][MainThread] gofer.agent.plugin:535 - plugin "katelloplugin", import failed
Sep 24 19:38:51 dhcp129-85 goferd: [ERROR][MainThread] gofer.agent.plugin:535 - Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/gofer/agent/plugin.py", line 519, in _import plugin.impl = imp.load_source(name, path) File "/usr/lib/gofer/plugins/katelloplugin.py", line 33, in ? from subscription_manager.certlib import ConsumerIdentity ImportError: cannot import name ConsumerIdentity

As a result all katello-agent functionality does not work. 

Version-Release number of selected component (if applicable):

any client running subscription manager 1.11.5 or newer, with katello-agent installed


How reproducible:
Always

Steps to Reproduce:
1. Install subscription-manager >= 1.11.5
2. Install katello-agent
3. restart katello-agent
4. monitor /var/log/messages

Actual results:
Nasty traceback seen above, package actions when registered against a satellite do not work, running 'katello-package-upload' fails.

Expected results:
katello-agent works fine

Additional info:

This does not affect 5.11, but will affect 6.6 upon release, and i assume 7.1 upon release.

Comment 1 Justin Sherrill 2014-09-24 23:48:21 UTC
fix: https://github.com/Katello/katello-agent/pull/13/files

Comment 2 Justin Sherrill 2014-09-24 23:48:54 UTC
traceback running katello-package-upload

[root@dhcp129-85 ~]# katello-package-upload 
Traceback (most recent call last):
  File "/usr/sbin/katello-package-upload", line 19, in ?
    import package_upload
  File "/usr/lib/yum-plugins/package_upload.py", line 19, in ?
    from subscription_manager import certmgr
ImportError: cannot import name certmgr

Comment 3 Justin Sherrill 2014-09-24 23:50:00 UTC
Connecting redmine issue http://projects.theforeman.org/issues/7553 from this bug

Comment 5 Bryan Kearney 2014-09-25 00:05:19 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/7553 has been closed
-------------
Xak Ru
I found this module in https://github.com/alikins/subscription-manager-docs/blob/master/subscription_manager.certlib
how to fix this error? In katello-agent 1.4 i don't see same errors. Only in katello-agent 2.0
-------------
Eric Helms
After talking to Xak, this appears to be an issue with the newest subscription manager. They moved the location of ConsumerIdentity that katello-agent relies on (https://github.com/candlepin/subscription-manager/commit/c641b59240e46274087f90ed2e85514fe18b9176). Instead of being at:

subscription_manager.certlib

The ConsumerIdentity class looks like it is located at:

subscription_manager.identity (https://github.com/candlepin/subscription-manager/blob/master/src/subscription_manager/identity.py#L28)

-------------
Justin Sherrill
Christian, see the comments above, there is a PR open to fix that issue (#4) https://github.com/Katello/katello-agent/pull/12

It should fix it for el6 and 7.  It was introduced by a change to subscription-manager upstream.

Comment 6 Justin Sherrill 2014-10-07 19:12:57 UTC
Note this is not fully fixed due to

http://projects.theforeman.org/issues/7815

Moving back to assigned

Comment 7 Bryan Kearney 2014-10-07 20:05:05 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/7553 has been closed
-------------
Xak Ru
I found this module in https://github.com/alikins/subscription-manager-docs/blob/master/subscription_manager.certlib
how to fix this error? In katello-agent 1.4 i don't see same errors. Only in katello-agent 2.0
-------------
Eric Helms
After talking to Xak, this appears to be an issue with the newest subscription manager. They moved the location of ConsumerIdentity that katello-agent relies on (https://github.com/candlepin/subscription-manager/commit/c641b59240e46274087f90ed2e85514fe18b9176). Instead of being at:

subscription_manager.certlib

The ConsumerIdentity class looks like it is located at:

subscription_manager.identity (https://github.com/candlepin/subscription-manager/blob/master/src/subscription_manager/identity.py#L28)

-------------
Justin Sherrill
Christian, see the comments above, there is a PR open to fix that issue (#4) https://github.com/Katello/katello-agent/pull/12

It should fix it for el6 and 7.  It was introduced by a change to subscription-manager upstream.

Comment 8 Bryan Kearney 2014-10-08 18:05:00 UTC
Upstream bug assigned to jsherril

Comment 9 Bryan Kearney 2014-10-09 20:04:40 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/7815 has been closed

Comment 10 Justin Sherrill 2014-10-14 12:46:40 UTC
NOTE! there are 2 PRs/commits that need cherry picking:

https://github.com/Katello/katello-agent/pull/12
https://github.com/Katello/katello-agent/pull/15

In that order

Comment 13 Tazim Kolhar 2014-10-31 11:37:30 UTC
VERIFIED:

*** This bug is verified in upstream.  This fix should eventually land in future downstream builds ***

# rpm -qa | grep foreman
foreman-1.6.0.47-1.el7sat.noarch
foreman-compute-1.6.0.47-1.el7sat.noarch
ruby193-rubygem-foreman_hooks-0.3.5-2.el7sat.noarch
foreman-gce-1.6.0.47-1.el7sat.noarch
ruby193-rubygem-foreman_discovery-1.3.0-2.el7sat.noarch
foreman-libvirt-1.6.0.47-1.el7sat.noarch
foreman-proxy-1.6.0.30-1.el7sat.noarch
ruby193-rubygem-foreman-redhat_access-0.0.4-2.el7sat.noarch
foreman-vmware-1.6.0.47-1.el7sat.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3-3.el7sat.noarch
foreman-selinux-1.6.0.15-1.el7sat.noarch
ruby193-rubygem-foreman-tasks-0.6.9-1.1.el7sat.noarch
foreman-ovirt-1.6.0.47-1.el7sat.noarch
foreman-postgresql-1.6.0.47-1.el7sat.noarch
qe-sat6-rhel7.usersys.redhat.com-foreman-proxy-1.0-1.noarch
qe-sat6-rhel7.usersys.redhat.com-foreman-client-1.0-1.noarch
rubygem-hammer_cli_foreman-0.1.1-16.el7sat.noarch
ruby193-rubygem-foreman_bootdisk-2.0.6-1.1.el7sat.noarch

# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.9.26-1
subscription management rules: 5.11
subscription-manager: 1.12.14-7.el6

# tail  -f /var/log/messages
Oct 31 07:34:42 hp-ml370g5-01 yum[24493]: Installed: pulp-rpm-handlers-2.4.3-1.el6sat.noarch
Oct 31 07:34:45 hp-ml370g5-01 goferd: [INFO][MainThread] gofer.agent.plugin:521 - plugin [builtin] loaded using: /usr/share/gofer/plugins/builtin.py
Oct 31 07:34:45 hp-ml370g5-01 yum[24493]: Installed: katello-agent-1.5.3-6.el6sat.noarch
Oct 31 07:34:45 hp-ml370g5-01 goferd: [INFO][MainThread] gofer.agent.plugin:521 - plugin [katelloplugin] loaded using: /usr/lib/gofer/plugins/katelloplugin.py
Oct 31 07:34:46 hp-ml370g5-01 goferd: [INFO][MainThread] rhsm.connection:659 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False
Oct 31 07:34:46 hp-ml370g5-01 goferd: [INFO][MainThread] rhsm.connection:670 - Connection Built: host: subscription.rhn.redhat.com, port: 443, handler: /subscription
Oct 31 07:34:47 hp-ml370g5-01 goferd: [INFO][MainThread] katelloplugin:277 - reporting: {'enabled_repos': {'repos': [{'baseurl': ['https://cdn.redhat.com/content/aus/rhel/server/6/6Server/x86_64/os'], 'repositoryid': 'rhel-6-server-aus-rpms'}, {'baseurl': ['https://cdn.redhat.com/content/eus/rhel/server/6/6Server/x86_64/os'], 'repositoryid': 'rhel-6-server-eus-rpms'}, {'baseurl': ['https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/mrg-g/2/os'], 'repositoryid': 'rhel-6-server-grid-rpms'}, {'baseurl': ['https://cdn.redhat.com/content/htb/rhel/server/6/6Server/x86_64/os'], 'repositoryid': 'rhel-6-server-htb-rpms'}, {'baseurl': ['https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/mrg-g-execute/2/os'], 'repositoryid': 'rhel-6-server-mrg-grid-execute-rpms'}, {'baseurl': ['https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/mrg-r/2/os'], 'repositoryid': 'rhel-6-server-realtime-rpms'}, {'baseurl': ['https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/os'], 'repositoryid': 'rhel-6-server-rpms'}, {'baseurl': ['https://cdn.redhat.com/content/dist/rhs/server/2.0/x86_64/rhel/6.2/scalablefilesystem/os'], 'repositoryid': 'rhel-6.2-scalefs-server-for-rhs-2.0-rpms'}, {'baseurl': ['https://cdn.redhat.com/content/dist/rhs/server/2.0/x86_64/rhel/6.2/os'], 'repositoryid': 'rhel-6.2-server-for-rhs-2.0-rpms'}, {'baseurl': ['https://cdn.redhat.com/content/aus/rhel/server/6/6Server/x86_64/highavailability/os'], 'repositoryid': 'rhel-ha-for-rhel-6-server-aus-rpms'}, {'baseurl': ['https://cdn.redhat.com/content/eus/rhel/server/6/6Server/x86_64/highavailability/os'], 'repositoryid': 'rhel-ha-for-rhel-6-server-eus-rpms'}, {'baseurl': ['https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/highavailability/os'], 'repositoryid': 'rhel-ha-for-rhel-6-server-rpms'}, {'baseurl': ['https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/hpn/os'], 'repositoryid': 'rhel-hpn-for-rhel-6-server-rpms'}, {'baseurl': ['https://cdn.redhat.com/content/aus/rhel/server/6/6Server/x86_64/loadbalancer/os'], 'reposi
Oct 31 07:34:48 hp-ml370g5-01 goferd: [ERROR][MainThread] katelloplugin:103 - send enabled report failed: Runtime Error Could not find resource for relative : /systems/e177350e-596b-4f7f-a6c0-ad3f0a5730f0/enabled_repos of full path: http://candlepin.dist.prod.ext.phx2.redhat.com/candlepin/systems/e177350e-596b-4f7f-a6c0-ad3f0a5730f0/enabled_repos at org.jboss.resteasy.core.registry.RootSegment.matchChildren:360
Oct 31 07:34:48 hp-ml370g5-01 goferd: [INFO][Actions] builtin:38 - Hello:  [main] enabled=1  [messaging] url= uuid=admin.eng.bos.redhat.com
Oct 31 07:34:48 hp-ml370g5-01 goferd: [INFO][MainThread] gofer.transport.qpid.broker:69 - connecting: {subscription.rhn.redhat.com:5671}:|transport=SSL|host=subscription.rhn.redhat.com|port=5671|cacert=/etc/rhsm/ca/candlepin-local.pem|clientcert=/etc/pki/consumer/bundle.pem|userid=None|password=None|vhost=None
Oct 31 07:35:48 hp-ml370g5-01 goferd: [WARNING][MainThread] qpid.messaging:453 - recoverable error[attempt 1]: timed out
Oct 31 07:35:48 hp-ml370g5-01 goferd: [WARNING][MainThread] qpid.messaging:455 - sleeping 1 seconds
Oct 31 07:35:49 hp-ml370g5-01 goferd: [WARNING][Thread-2] qpid.messaging:537 - trying: subscription.rhn.redhat.com:5671
Oct 31 07:36:49 hp-ml370g5-01 goferd: [WARNING][Thread-2] qpid.messaging:453 - recoverable error[attempt 2]: timed out
Oct 31 07:36:49 hp-ml370g5-01 goferd: [WARNING][Thread-2] qpid.messaging:455 - sleeping 2 seconds
Oct 31 07:36:51 hp-ml370g5-01 goferd: [WARNING][Thread-2] qpid.messaging:537 - trying: subscription.rhn.redhat.com:5671

katello-agent works fine

Comment 14 Tazim Kolhar 2014-10-31 13:19:11 UTC
VERIFIED

against z-stream

Comment 16 errata-xmlrpc 2014-11-13 22:29:24 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-2014:1857

Comment 22 Adam Price 2015-05-07 18:05:24 UTC
*** Bug 1158585 has been marked as a duplicate of this bug. ***


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