Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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.
Description of problem:
Calling RepoActionInvoker.is_managed() on a RHEL 6.7 beta installation yields an exception:
File "/usr/share/rhsm/subscription_manager/repolib.py", line 58, in is_managed
return repo in [c.label for c in action.matching_content()]
AttributeError: 'RepoUpdateActionCommand' object has no attribute 'matching_content'
Version-Release number of selected component (if applicable):
subscription-manager-1.14.5-1.el6.x86_64
How reproducible:
Easily
Steps to Reproduce:
1. Copy the attached script to /tmp/ismanagedtest.py on a RHEL 6.7 system
2. Run "python /tmp/ismanagedtest.py"
3. Observe the traceback with the aforementioned exception
Actual results:
Traceback (most recent call last):
File "/tmp/ismanagedtest.py", line 14, in <module>
print rai.is_managed('some_repo')
File "/usr/share/rhsm/subscription_manager/repolib.py", line 58, in is_managed
return repo in [c.label for c in action.matching_content()]
AttributeError: 'RepoUpdateActionCommand' object has no attribute 'matching_content'
Expected results:
False
(The test script should output the return value of `rai.is_managed('some_repo')`, which should be False)
Additional info:
OpenShift Enterprise 2.x depends on this method call working as expected.
Verifying Version...
[root@jsefler-os6 ~]# rpm -q subscription-manager
subscription-manager-1.14.9-1.el6.x86_64
[root@jsefler-os6 ~]# wget https://bugzilla.redhat.com/attachment.cgi?id=1027300 -q -O /tmp/ismanagedtest.py
[root@jsefler-os6 ~]# cat /tmp/ismanagedtest.py
import sys
_LIBPATH = "/usr/share/rhsm"
# add to the path if need be
if _LIBPATH not in sys.path:
sys.path.append(_LIBPATH)
from subscription_manager.injectioninit import init_dep_injection
init_dep_injection()
from subscription_manager.repolib import RepoActionInvoker
rai = RepoActionInvoker()
# Should print "False" if is_managed is working
print rai.is_managed('some_repo')
[root@jsefler-os6 ~]# python /tmp/ismanagedtest.py
False
VERIFIED: The test script returned False as desired.
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://rhn.redhat.com/errata/RHBA-2015-1345.html
Description of problem: Calling RepoActionInvoker.is_managed() on a RHEL 6.7 beta installation yields an exception: File "/usr/share/rhsm/subscription_manager/repolib.py", line 58, in is_managed return repo in [c.label for c in action.matching_content()] AttributeError: 'RepoUpdateActionCommand' object has no attribute 'matching_content' Version-Release number of selected component (if applicable): subscription-manager-1.14.5-1.el6.x86_64 How reproducible: Easily Steps to Reproduce: 1. Copy the attached script to /tmp/ismanagedtest.py on a RHEL 6.7 system 2. Run "python /tmp/ismanagedtest.py" 3. Observe the traceback with the aforementioned exception Actual results: Traceback (most recent call last): File "/tmp/ismanagedtest.py", line 14, in <module> print rai.is_managed('some_repo') File "/usr/share/rhsm/subscription_manager/repolib.py", line 58, in is_managed return repo in [c.label for c in action.matching_content()] AttributeError: 'RepoUpdateActionCommand' object has no attribute 'matching_content' Expected results: False (The test script should output the return value of `rai.is_managed('some_repo')`, which should be False) Additional info: OpenShift Enterprise 2.x depends on this method call working as expected.