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 1659014 - Unable to use auto-attach hitting Cannot read property "length" from undefined (rules#2926)
Summary: Unable to use auto-attach hitting Cannot read property "length" from undefine...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Candlepin
Version: Unspecified
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: 6.5.0
Assignee: Michael Stead
QA Contact: jcallaha
URL:
Whiteboard:
Depends On:
Blocks: 1660532 1660533
TreeView+ depends on / blocked
 
Reported: 2018-12-13 11:17 UTC by Kenny Tordeurs
Modified: 2022-03-13 16:28 UTC (History)
23 users (show)

Fixed In Version: candlepin-2.3.13-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1660532 1684699 (view as bug list)
Environment:
Last Closed: 2019-05-14 12:39:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3754331 0 None None None 2018-12-13 14:37:17 UTC
Red Hat Product Errata RHSA-2019:1222 0 None None None 2019-05-14 12:39:46 UTC

Description Kenny Tordeurs 2018-12-13 11:17:56 UTC
Description of problem:
auto-attach is not working it is failing with:
RestlibException: Runtime Error TypeError: Cannot read property "length" from undefined (rules#2926) at org.mozilla.javascript.ScriptRun
time.constructError:3,785

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

Actual results:
Full backtrace of the error:
~~~
2018-12-12 20:44:28,943 [thread=http-bio-8443-exec-10] [req=46f70e7d-4a6b-45e4-a8b6-3e7b9f7e947b, org=SomeOrg] ERROR org.candlepin.common.exceptions.mappers.CandlepinExceptionMapper - Runtime Error TypeError: Cannot read property "length" from undefined (rules#2926) at org.mozilla.javascript.ScriptRuntime.constructError:3,785
org.mozilla.javascript.EcmaError: TypeError: Cannot read property "length" from undefined (rules#2926)
        at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3785) ~[rhino-1.7R3.jar:1.7R2]
        at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3763) ~[rhino-1.7R3.jar:1.7R2]
        at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3791) ~[rhino-1.7R3.jar:1.7R2]
        at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3810) ~[rhino-1.7R3.jar:1.7R2]
        at org.mozilla.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3823) ~[rhino-1.7R3.jar:1.7R2]
        at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1508) ~[rhino-1.7R3.jar:1.7R2]
        at org.mozilla.javascript.gen.rules_4._c_anonymous_165(rules:2926) ~[na:na]
        at org.mozilla.javascript.gen.rules_4.call(rules) ~[na:na]
        at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:86) ~[rhino-1.7R3.jar:1.7R2]
        at org.mozilla.javascript.gen.rules_4._c_anonymous_169(rules:3065) ~[na:na]
        at org.mozilla.javascript.gen.rules_4.call(rules) ~[na:na]
        at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426) ~[rhino-1.7R3.jar:1.7R2]
        at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3178) ~[rhino-1.7R3.jar:1.7R2]
        at org.mozilla.javascript.gen.rules_4.call(rules) ~[na:na]
        at org.candlepin.policy.js.JsRunner.invokeMethod(JsRunner.java:96) ~[JsRunner.class:na]
        at org.candlepin.policy.js.JsRunner.invokeMethod(JsRunner.java:108) ~[JsRunner.class:na]
        at org.candlepin.policy.js.autobind.AutobindRules.selectBestPools(AutobindRules.java:122) ~[AutobindRules.class:na]
        at org.candlepin.controller.CandlepinPoolManager.getBestPools(CandlepinPoolManager.java:856) ~[CandlepinPoolManager.class:na]
        at org.candlepin.controller.CandlepinPoolManager.entitleByProductsImpl(CandlepinPoolManager.java:548) ~[CandlepinPoolManager.class:na]
        at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:66) ~[guice-persist-3.0.jar:na]
        at org.candlepin.controller.CandlepinPoolManager.entitleByProducts(CandlepinPoolManager.java:504) ~[CandlepinPoolManager.class:na]
        at org.candlepin.controller.Entitler.bindByProducts(Entitler.java:257) ~[Entitler.class:na]
        at org.candlepin.controller.Entitler.bindByProducts(Entitler.java:170) ~[Entitler.class:na]
        at org.candlepin.resource.ConsumerResource.bind(ConsumerResource.java:1562) ~[ConsumerResource.class:na]
        at sun.reflect.GeneratedMethodAccessor448.invoke(Unknown Source) ~[na:na]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_191]
        at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_191]
        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:168) ~[resteasy-jaxrs-2.3.10.Final.jar:na]
        at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269) ~[resteasy-jaxrs-2.3.10.Final.jar:na]
        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227) ~[resteasy-jaxrs-2.3.10.Final.jar:na]
        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216) ~[resteasy-jaxrs-2.3.10.Final.jar:na]
        at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:541) [resteasy-jaxrs-2.3.10.Final.jar:na]
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:523) [resteasy-jaxrs-2.3.10.Final.jar:na]
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:125) [resteasy-jaxrs-2.3.10.Final.jar:na]
        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.10.Final.jar:na]
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.10.Final.jar:na]
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.10.Final.jar:na]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) [tomcat-servlet-3.0-api.jar:na]
        at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) [guice-servlet-3.0.jar:na]
        at org.candlepin.servlet.filter.EventFilter.doFilter(EventFilter.java:63) [EventFilter.class:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at org.candlepin.servlet.filter.ContentTypeHackFilter.doFilter(ContentTypeHackFilter.java:58) [ContentTypeHackFilter.class:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at org.candlepin.common.filter.LoggingFilter.doFilter(LoggingFilter.java:90) [candlepin-common-1.0.23.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at org.candlepin.servlet.filter.CandlepinPersistFilter.doFilter(CandlepinPersistFilter.java:48) [CandlepinPersistFilter.class:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at org.candlepin.servlet.filter.CandlepinScopeFilter.doFilter(CandlepinScopeFilter.java:68) [CandlepinScopeFilter.class:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) [guice-servlet-3.0.jar:na]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.76]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.76]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) [catalina.jar:7.0.76]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110) [catalina.jar:7.0.76]
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506) [catalina.jar:7.0.76]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) [catalina.jar:7.0.76]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) [catalina.jar:7.0.76]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [catalina.jar:7.0.76]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) [catalina.jar:7.0.76]
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087) [tomcat-coyote.jar:7.0.76]
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) [tomcat-coyote.jar:7.0.76]
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) [tomcat-coyote.jar:7.0.76]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) [na:1.7.0_191]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622) [na:1.7.0_191]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-coyote.jar:7.0.76]
        at java.lang.Thread.run(Thread.java:748) [na:1.7.0_191]
~~~

Expected results:
Auto attach to work

Additional info:

Comment 19 Kevin Howell 2019-01-30 21:19:17 UTC
The scenario that causes this is when an older Satellite version imports a manifest that isn't backwards compatible. An updated version of Candlepin that generates manifests that are backward compatible has been deployed in production. Therefore, moving to ON_QA for any further desired verification. Verification should be as simple as generating and importing a manifest.

Comment 20 jcallaha 2019-01-31 21:42:30 UTC
Verified in Satellite 6.5.0 Snap 13

Uploading and refreshing the manifest provided in #5 completed without any errors.

Comment 21 Mike McCune 2019-03-01 22:16:34 UTC
This bug was cloned and is still going to be included in the 6.4.3 release. It no longer has the sat-6.4.z+ flag and 6.4.3 Target Milestone Set which are now on the 6.4.z cloned bug. Please see the Clones field to track the progress of this bug in the 6.4.3 release.

Comment 23 errata-xmlrpc 2019-05-14 12:39:36 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/RHSA-2019:1222


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