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 1204962

Summary: changing system content view or environment results in candlepin error (No entitlements for products)
Product: Red Hat Satellite Reporter: Justin Sherrill <jsherril>
Component: CandlepinAssignee: William Poteat <wpoteat>
Status: CLOSED ERRATA QA Contact: Corey Welton <cwelton>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: alikins, bbuckingham, cwelton, wpoteat
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 09:14:46 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:
Attachments:
Description Flags
Tail of all relevant logs while changing a content view none

Description Justin Sherrill 2015-03-23 21:55:37 UTC
Created attachment 1005588 [details]
Tail of all relevant logs while changing a content view

Description of problem:

Changing environment/content view of host throws harmless error in logs:




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


How reproducible:
always


Steps to Reproduce:
1.  Register a system
2.  Attempt to change its environment or content view

Actual results:
Errors in /var/log/candlepin/*

Expected results:
No errors in /var/log/candlepin/*

Additional info:

I am unsure if the system needs subscriptions assigned or not.  In this case they were all RHEL systems with their appropriate subscriptions to be green.


2015-03-23 17:36:34,957 [req=1fc36b36-e968-4233-9dfe-112a4d052f51, org=Default_Organization] ERROR org.candlepin.resource.ConsumerResource - Autobind error
java.lang.RuntimeException: No entitlements for products: []
        at org.candlepin.policy.js.autobind.AutobindRules.selectBestPools(AutobindRules.java:77) ~[AutobindRules.class:na]
        at org.candlepin.controller.CandlepinPoolManager.getBestPools(CandlepinPoolManager.java:731) ~[CandlepinPoolManager.class:na]
        at org.candlepin.controller.CandlepinPoolManager.entitleByProducts(CandlepinPoolManager.java:467) ~[CandlepinPoolManager.class:na]
        at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:58) ~[guice-persist-3.0-redhat-1.jar:3.0-redhat-1]
        at org.candlepin.controller.Entitler.bindByProducts(Entitler.java:194) ~[Entitler.class:na]
        at org.candlepin.controller.Entitler.bindByProducts(Entitler.java:146) ~[Entitler.class:na]
        at org.candlepin.resource.ConsumerResource.bind(ConsumerResource.java:1484) ~[ConsumerResource.class:na]
        at org.candlepin.guice.TransactionalInvoker.invoke(TransactionalInvoker.java:34) ~[TransactionalInvoker.class:na]
        at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:66) ~[guice-persist-3.0-redhat-1.jar:3.0-redhat-1]
        at org.candlepin.guice.CandlepinResourceTxnInterceptor.invoke(CandlepinResourceTxnInterceptor.java:33) ~[CandlepinResourceTxnInterceptor.class:na]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_75]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_75]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_75]
        at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_75]



Full foreman debug in https://bugzilla.redhat.com/show_bug.cgi?id=1204949

Also attaching a tail of all logs during this action

Comment 1 Justin Sherrill 2015-03-23 22:07:56 UTC
candlepin version:

candlepin-0.9.47-1.el7.noarch

Comment 3 Justin Sherrill 2015-03-24 14:25:49 UTC
Note, we are triggering autobind/heal after changing the environment, so that is likely the cause of this error.

Comment 4 Adrian Likins 2015-04-15 13:33:05 UTC
in master, next build should be: 0.9.50-1
commit c33bd46f5ee65c493b893e27a6807a5f77116091
Author: William Poteat <wpoteat>
Date:   Mon Mar 30 09:28:06 2015 -0400

    1204962: remove throw/catch/eat of runtime exception in bind

Comment 5 Tazim Kolhar 2015-10-19 11:37:55 UTC
*** This bug is verified in upstream.  This fix should eventually land in future downstream builds ***
Version Tested:

# rpm -qa | grep foreman
nec-em17.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch
foreman-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.3-4.el7.noarch
nec-em17.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch
tfm-rubygem-hammer_cli_foreman-0.4.0-1.201510071112git33fd59b.el7.noarch
foreman-debug-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch
foreman-release-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch
foreman-postgresql-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch
foreman-vmware-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch
tfm-rubygem-foreman_hooks-0.3.9-1.el7.noarch
tfm-rubygem-foreman-tasks-0.7.6-1.fm1_10.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.8-1.el7.noarch
tfm-rubygem-foreman_bootdisk-6.0.0-2.fm1_10.el7.noarch
foreman-release-scl-1-1.el7.x86_64
foreman-libvirt-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch
foreman-selinux-1.11.0-0.develop.201510071426git6234447.el7.noarch
foreman-ovirt-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-3.el7.noarch
tfm-rubygem-foreman_gutterball-0.0.1-3.el7.noarch
nec-em17.rhts.eng.bos.redhat.com-foreman-proxy-1.0-2.noarch
tfm-rubygem-foreman_discovery-4.1.0-1.fm1_10.el7.noarch
tfm-rubygem-foreman_docker-1.4.1-2.fm1_10.el7.noarch
foreman-proxy-1.11.0-0.develop.201510120849git5f36f2e.el7.noarch
foreman-compute-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch
foreman-gce-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch


steps:
1.  Register a system
2.  Attempt to change its environment or content view

No errors in /var/log/candlepin/*

Comment 9 errata-xmlrpc 2016-07-27 09:14:46 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-2016:1501