Bug 1340252

Summary: removing a vdc subscription causes candlepin listener to fail as the guest subs are removed too
Product: Red Hat Satellite Reporter: Tom McKay <tomckay>
Component: Subscription ManagementAssignee: Tom McKay <tomckay>
Status: CLOSED ERRATA QA Contact: Chris Roberts <chrobert>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: chrobert, cwelton, sghai
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-katello-3.0.0.44-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:21:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1335807    
Attachments:
Description Flags
hypervisor-with-sub
none
vm-with-sub
none
task-still-in-good-state none

Description Tom McKay 2016-05-26 20:41:08 UTC
To reproduce...

1. attach vdc to hypervisor
2. attach guest sub to vm
3. delete the hypervisor
4. note that candlepin event listener task is in errored state

Comment 1 Tom McKay 2016-05-26 20:41:12 UTC
Created from redmine issue http://projects.theforeman.org/issues/15207

Comment 2 Tom McKay 2016-05-26 20:41:15 UTC
Upstream bug assigned to tomckay

Comment 4 Bryan Kearney 2016-06-03 22:16:43 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/15207 has been closed

Comment 5 Bryan Kearney 2016-06-06 13:29:36 UTC
*** Bug 1342386 has been marked as a duplicate of this bug. ***

Comment 6 Chris Roberts 2016-07-21 19:03:17 UTC
Showing delete went ok

==> /var/log/foreman/production.log <==
2016-07-21 15:58:27 [app] [I] Started DELETE "/api/v2/hosts/5" for 10.13.153.158 at 2016-07-21 15:58:27 -0400
2016-07-21 15:58:27 [app] [I] Processing by Api::V2::HostsController#destroy as JSON
2016-07-21 15:58:27 [app] [I]   Parameters: {"apiv"=>"v2", "id"=>"5"}

==> /var/log/httpd/foreman-ssl_access_ssl.log <==
10.13.153.158 - - [21/Jul/2016:15:58:27 -0400] "DELETE /api/v2/hosts/5 HTTP/1.1" 200 557 "https://dhcp-10-12-211-135.hq.gsslab.rdu.redhat.com/content_hosts/5/info" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36"

==> /var/log/foreman/production.log <==
2016-07-21 15:58:28 [app] [I] Completed 200 OK in 1717ms (Views: 4.2ms | ActiveRecord: 117.9ms)

Uploading screenshots of candlepin listenon events still running after hypervisor delete.

Comment 7 Chris Roberts 2016-07-21 19:03:46 UTC
Created attachment 1182652 [details]
hypervisor-with-sub

Comment 8 Chris Roberts 2016-07-21 19:04:11 UTC
Created attachment 1182653 [details]
vm-with-sub

Comment 9 Chris Roberts 2016-07-21 19:05:00 UTC
Created attachment 1182654 [details]
task-still-in-good-state

Comment 10 Chris Roberts 2016-07-21 19:06:44 UTC
candlepin log from delete, no tracebacks

2016-07-21 15:58:28,292 [thread=http-bio-8443-exec-7] [req=32b8e8e0-8021-4372-aa99-205ab9323ad3, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=DELETE, uri=/candlepin/consumers/7f8e093a-f1
24-48c2-bad2-21f2e90abaa1
2016-07-21 15:58:28,342 [thread=http-bio-8443-exec-7] [req=32b8e8e0-8021-4372-aa99-205ab9323ad3, org=Default_Organization] INFO  org.candlepin.controller.CandlepinPoolManager - Batch revoking entitlements: 1
2016-07-21 15:58:28,371 [thread=http-bio-8443-exec-7] [req=32b8e8e0-8021-4372-aa99-205ab9323ad3, org=Default_Organization] INFO  org.candlepin.controller.CandlepinPoolManager - Starting batch delete of pools and
 entitlements
2016-07-21 15:58:28,392 [thread=http-bio-8443-exec-7] [req=32b8e8e0-8021-4372-aa99-205ab9323ad3, org=Default_Organization] INFO  org.candlepin.controller.CandlepinPoolManager - All deletes flushed successfully
2016-07-21 15:58:28,501 [thread=http-bio-8443-exec-7] [req=32b8e8e0-8021-4372-aa99-205ab9323ad3, org=Default_Organization] INFO  org.candlepin.controller.CandlepinPoolManager - Modifier entitlements done.
2016-07-21 15:58:28,501 [thread=http-bio-8443-exec-7] [req=32b8e8e0-8021-4372-aa99-205ab9323ad3, org=Default_Organization] INFO  org.candlepin.controller.CandlepinPoolManager - Recomputing status for 2 consumers
.
2016-07-21 15:58:28,549 [thread=http-bio-8443-exec-7] [req=32b8e8e0-8021-4372-aa99-205ab9323ad3, org=Default_Organization] INFO  org.candlepin.controller.CandlepinPoolManager - All statuses recomputed.
2016-07-21 15:58:28,610 [thread=http-bio-8443-exec-7] [req=32b8e8e0-8021-4372-aa99-205ab9323ad3, org=Default_Organization] INFO  org.candlepin.audit.HornetqEventDispatcher - Sending event: Event [id=null, target
=COMPLIANCE, type=CREATED, time=Thu Jul 21 15:58:28 EDT 2016, entity=8a8c5307560945ad01560ddf856c032f]
2016-07-21 15:58:28,620 [thread=http-bio-8443-exec-7] [req=32b8e8e0-8021-4372-aa99-205ab9323ad3, org=Default_Organization] INFO  org.candlepin.audit.HornetqEventDispatcher - Sending event: Event [id=null, target
=COMPLIANCE, type=CREATED, time=Thu Jul 21 15:58:28 EDT 2016, entity=8a8c5307560945ad0156098fe7a80297]
2016-07-21 15:58:28,623 [thread=http-bio-8443-exec-7] [req=32b8e8e0-8021-4372-aa99-205ab9323ad3, org=Default_Organization] INFO  org.candlepin.audit.HornetqEventDispatcher - Sending event: Event [id=null, target
=ENTITLEMENT, type=DELETED, time=Thu Jul 21 15:58:28 EDT 2016, entity=8a8c5307560945ad01560de028550337]
2016-07-21 15:58:28,645 [thread=http-bio-8443-exec-7] [req=32b8e8e0-8021-4372-aa99-205ab9323ad3, org=Default_Organization] INFO  org.candlepin.audit.HornetqEventDispatcher - Sending event: Event [id=null, target
=ENTITLEMENT, type=DELETED, time=Thu Jul 21 15:58:28 EDT 2016, entity=8a8c5307560945ad01560de05aeb0359]
2016-07-21 15:58:28,649 [thread=http-bio-8443-exec-7] [req=32b8e8e0-8021-4372-aa99-205ab9323ad3, org=Default_Organization] INFO  org.candlepin.audit.HornetqEventDispatcher - Sending event: Event [id=null, target
=CONSUMER, type=DELETED, time=Thu Jul 21 15:58:28 EDT 2016, entity=8a8c5307560945ad0156098fe7a80297]
2016-07-21 15:58:28,679 [thread=http-bio-8443-exec-7] [req=32b8e8e0-8021-4372-aa99-205ab9323ad3, org=Default_Organization] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=204, content-type="nu
ll", time=387
2016-07-21 15:58:28,740 [thread=http-bio-8443-exec-10] [req=35257b4a-c3d0-4d35-ba62-20e2706f57a3, org=] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/pools/8a8c5307560945ad0
15609733e0101c1
2016-07-21 15:58:28,768 [thread=http-bio-8443-exec-10] [req=35257b4a-c3d0-4d35-ba62-20e2706f57a3, org=Default_Organization] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=200, content-type="a
pplication/json", time=28

Comment 11 Bryan Kearney 2016-07-27 11:21:25 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