Description of problem: If a hypervisor is created with two guests, and the two guests are consuming bonus pool subs, then unregistering the host via sam UI will result in the following stack: Apr 10 13:26:50 [http-8443-1] ERROR org.candlepin.exceptions.mappers.CandlepinExceptionMapper - Runtime Error null at java.util.HashMap$HashIterator.nextEntry:810 java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:810) at java.util.HashMap$KeyIterator.next(HashMap.java:845) at org.hibernate.collection.AbstractPersistentCollection$IteratorProxy.next(AbstractPersistentCollection.java:577) at org.candlepin.controller.CandlepinPoolManager.removeEntitlement(CandlepinPoolManager.java:736)
81d0626d master 0.5.28+
(In reply to comment #0) > Description of problem: > > If a hypervisor is created with two guests, and the two guests are consuming > bonus pool subs, then unregistering the host via sam UI will result in the > following stack: > > Apr 10 13:26:50 [http-8443-1] ERROR > org.candlepin.exceptions.mappers.CandlepinExceptionMapper - Runtime Error > null at java.util.HashMap$HashIterator.nextEntry:810 > java.util.ConcurrentModificationException > at java.util.HashMap$HashIterator.nextEntry(HashMap.java:810) > at java.util.HashMap$KeyIterator.next(HashMap.java:845) > at > org.hibernate.collection.AbstractPersistentCollection$IteratorProxy. > next(AbstractPersistentCollection.java:577) > at > org.candlepin.controller.CandlepinPoolManager. > removeEntitlement(CandlepinPoolManager.java:736) Excuse me for interrupting you. where does the error data display? the web UI of the sam or the command line of the host's terminal?
The error would be in catalina.out on the sam machine
The bug didn't accur anymore using KVM as the hypervisor, but find another error in the procedure. version: candlepin-0.6.5-1.el6_2.noarch subscription-manager-1.0.14-1.el5 subscription-manager-gui-1.0.14-1.el5 subscription-manager-firstboot-1.0.14-1.el5 verification step: 1 register host and guest with same username and password 2 the host consumed the Subscription Name: Red Hat Employee Subscription SKU: SYS0395 and the guest consumed the bonus 3 check the identity of the host #subscription-manager identity [root@dhcp-65-49 ~]# subscription-manager identity Current identity is: 74dbab0d-6605-4397-a7bf-7676af2e27e5 name: dhcp-65-49.nay.redhat.com org name: ACME_Corporation org id: 8ac28c0b38ffeff30138fff0b3430001 check the enentitlement cert of the two guests consuming the same bonus subscription #ls /etc/pki/entitlement guest1: [root@nnnn ~]# ls /etc/pki/entitlement/ 6914168988218302237-key.pem 6914168988218302237.pem guest2: [root@nnn ~]# ls /etc/pki/entitlement/ 9183429069551125552-key.pem 9183429069551125552.pem 4 unregister the host via sam UI there is not any error displed in the web 5 check /var/log/tomcat6/catalina.out # tail -f /var/log/tomcat6/catalina.out > /a.txt there are some ERRORs in the file. 6 check the host [root@dhcp-65-49 ~]# subscription-manager identity Consumer 74dbab0d-6605-4397-a7bf-7676af2e27e5 has been deleted 7 check all the guests #subscription-manager refresh All local data refreshed. #ls /etc/pki/entitlement there is nothing to be displayed. Sep 19 00:03:22 [http-8443-1] ERROR org.hibernate.jdbc.AbstractBatcher - ………………………………………………………………………………………………………………… Exception executing batch: …………………………………………………………………… org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:85) at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:70) at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:90) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1030) at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:304) at org.candlepin.model.AbstractHibernateCurator.flush(AbstractHibernateCurator.java:141) at org.candlepin.model.AbstractHibernateCurator.save(AbstractHibernateCurator.java:137) at org.candlepin.model.ConsumerCurator.updateLastCheckin(ConsumerCurator.java:271) at org.candlepin.model.ConsumerCurator$$EnhancerByGuice$$32dc7e13.CGLIB$updateLastCheckin$15(<generated>) at org.candlepin.model.ConsumerCurator$$EnhancerByGuice$$32dc7e13$$FastClassByGuice$$88ceec25.invoke(<generated>) at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:66) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52) at org.candlepin.model.ConsumerCurator$$EnhancerByGuice$$32dc7e13.updateLastCheckin(<generated>) at org.candlepin.resteasy.interceptor.AuthInterceptor.preProcess(AuthInterceptor.java:158) at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:247) at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222) at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211) at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) at org.candlepin.servlet.filter.ContentTypeHackFilter.doFilter(ContentTypeHackFilter.java:61) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at org.candlepin.servlet.filter.logging.LoggingFilter.doFilter(LoggingFilter.java:60) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at org.candlepin.servlet.filter.CandlepinPersistFilter.doFilter(CandlepinPersistFilter.java:48) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) 299,1-8 65%
Should this bug be reassigned to 1.2 and set to NEW at this point?
regarding to comment#5 is there any logical issues or the matter is just the log to be fixed? I guess it is right that guests' subscription got taken back and flow in general is correct right?
# VERIFIED catalina.out looks clean (no ERROR-s) + the logic is correct: host unsubscribed, guests are getting unsubscribed from bonus pool too. checked on: --- candlepin-0.7.23-1.el6_3.noarch candlepin-cert-consumer-tigger.idm.lab.bos.redhat.com-1.0-1.noarch candlepin-tomcat6-0.7.23-1.el6_3.noarch katello-candlepin-cert-key-pair-1.0-1.noarch katello-certs-tools-1.2.1-1h.el6_3.noarch katello-cli-1.2.1-11h.el6_3.noarch katello-cli-common-1.2.1-11h.el6_3.noarch katello-common-1.2.1-10h.el6_3.noarch katello-configure-1.2.3-1h.el6_3.noarch katello-glue-candlepin-1.2.1-10h.el6_3.noarch katello-headpin-1.2.1-10h.el6_3.noarch katello-headpin-all-1.2.1-10h.el6_3.noarch katello-selinux-1.2.1-1h.el6_3.noarch rubygem-ldap_fluff-0.1.3-1.el6_3.noarch thumbslug-0.0.28-1.el6_3.noarch thumbslug-selinux-0.0.28-1.el6_3.noarch
Closing out verified bugs from 1.2. Somehow the errata tool missed them.