Bug 603197 - candlepin event generation may not be working as designed
candlepin event generation may not be working as designed
Status: RELEASE_PENDING
Product: Candlepin
Classification: Community
Component: candlepin (Show other bugs)
0.5
All Linux
low Severity medium
: ---
: ---
Assigned To: Devan Goodwin
Katello QA List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-11 16:12 EDT by wes hayutin
Modified: 2015-05-14 11:21 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
atom feeds working (516.99 KB, image/png)
2010-07-07 09:42 EDT, wes hayutin
no flags Details

  None (edit)
Description wes hayutin 2010-06-11 16:12:37 EDT
I may be misunderstanding how the candlepin server should send events.
I *think* candlepin is supposed to send a new unique event for each new unique action from the client.

Example.

sm register
sm bind --pool=1
sm unsubscribe all
sm bind --pool=2

I think that would be four separate events, and I should have at least four events in my atom feed.  What appears to happen is that I only get a new atom feed for each type of event.

For example, the same scenario..

sm register  - EVENT GENERATED
sm bind --pool=1 - EVENT GENERATED
sm unsubscribe all - EVENT GENERATED
sm bind --pool=2 - EVENT NOT GENERATED
sm unsubscribe all EVENT NOT GENERATED


Here is my current feed..
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><atom:feed xmlns:atom="http://www.w3.org/2005/Atom"><atom:updated>2010-06-11T16:02:19.852-04:00</atom:updated><atom:entry><atom:title>ENTITLEMENT DELETED</atom:title><atom:published>2010-06-11T16:02:19.852-04:00</atom:published><atom:content><event><entityId>1</entityId><id>5</id><ownerId>1</ownerId><principal>ConsumerPrincipal [ownerId=1, uuid=4fb4c4d3-5afe-4a8d-88a8-416ba64672ce, roles=[CONSUMER]]</principal><target>ENTITLEMENT</target><timestamp>2010-06-11T16:02:19.852-04:00</timestamp><type>DELETED</type></event></atom:content></atom:entry><atom:entry><atom:title>ENTITLEMENT CREATED</atom:title><atom:published>2010-06-11T15:57:27.153-04:00</atom:published><atom:content><event><entityId>1</entityId><id>2</id><ownerId>1</ownerId><principal>ConsumerPrincipal [ownerId=1, uuid=4fb4c4d3-5afe-4a8d-88a8-416ba64672ce, roles=[CONSUMER]]</principal><target>ENTITLEMENT</target><timestamp>2010-06-11T15:57:27.153-04:00</timestamp><type>CREATED</type></event></atom:content></atom:entry><atom:entry><atom:title>CONSUMER CREATED</atom:title><atom:published>2010-06-11T15:55:40.525-04:00</atom:published><atom:content><event><entityId>1</entityId><id>1</id><ownerId>1</ownerId><principal>UserPrincipal [ownerId=1, username=admin, roles=[SUPER_ADMIN]]</principal><target>CONSUMER</target><timestamp>2010-06-11T15:55:40.525-04:00</timestamp><type>CREATED</type></event></atom:content></atom:entry></atom:feed>


This may not be a bug, but I'm opening it just to make sure.
Thanks
Comment 1 wes hayutin 2010-06-14 17:03:23 EDT
reverified that this is the current behavior.
I ran ntpdate on both server and the client on the latest builds, and still recreated.
commit 66faa874b651741c8203ffa4f97a894ca2c33d11
Comment 2 Devan Goodwin 2010-06-17 08:33:24 EDT
Hey wes, when you say "unsubscribe all", what command are you running?
Comment 3 Devan Goodwin 2010-06-17 08:49:24 EDT
Also what atom URL were you hitting?
Comment 4 Devan Goodwin 2010-06-17 09:03:34 EDT
If you were using the consumer specific URL I think I see the problem. The query is looking for events where the entity ID matches the consumer, but in the case of a bind/unbind the entity ID is actually an entitlement ID. If you consumer has ID 1, the first entitlement will get ID 1, which explains why you're only seeing the first bind.

Good find. Will be a little tricky to solve with our current model, going to have to think on it.
Comment 5 Devan Goodwin 2010-06-22 08:16:43 EDT
Should be fixed in c6a1ebf78c548d22506da59216915d81f487beba.

This code was deployed with 0.0.18.
Comment 6 wes hayutin 2010-07-07 09:42:06 EDT
Created attachment 430068 [details]
atom feeds working
Comment 7 John Sefler 2011-05-04 10:40:24 EDT
Group move of VERIFIED Candlepin component bugs to RELEASE_PENDING

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