Project

General

Profile

Actions

Bug #6543

closed

[RFE] Subcription Events need to be consumed by katello

Added by dustin tsang almost 10 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
medium
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1115602
Candlepin can create and delete sub-pools based on subscription events. Candlepin is now publishing these events to an AMQP Topic.

This RFE should cover the following:

1) Enhance Katello, perhaps using dynflow, to recieve these events and update the subscription list in katello.
2) Improve the subscription list to not re-poll the subscriptions in candlepin


Related issues 2 (0 open2 closed)

Related to Katello - Bug #6800: qpid-cpp-client-devel in comps Closeddustin tsang07/28/2014Actions
Follows Katello - Feature #6544: katello-installer needs to setup a queue so that katello can pull from for entitlement eventsCloseddustin tsang07/09/2014Actions
Actions #1

Updated by dustin tsang almost 10 years ago

  • Follows Feature #6544: katello-installer needs to setup a queue so that katello can pull from for entitlement events added
Actions #2

Updated by The Foreman Bot almost 10 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 49
  • Pull request https://github.com/Katello/katello/pull/4431 added
Actions #3

Updated by Eric Helms over 9 years ago

  • Category set to 78
  • Difficulty set to medium
  • Triaged changed from No to Yes
Actions #4

Updated by Eric Helms over 9 years ago

  • Target version changed from 49 to 54
Actions #5

Updated by dustin tsang over 9 years ago

  • Related to Bug #6800: qpid-cpp-client-devel in comps added
Actions #6

Updated by Eric Helms over 9 years ago

  • Target version changed from 54 to 55
Actions #7

Updated by Eric Helms over 9 years ago

  • Priority changed from High to Normal
Actions #8

Updated by dustin tsang over 9 years ago

Test Scenarios

Prereqs

Subscriptions Queue ( if katello-installer was used the queue name would be katello_event_queue )

qpid_messaging gem requires that qpid-cpp-client-devel and qpid-cpp-client be present and can be found in the katello-pulp nighties repo.

ensure that /etc/qpid/qpidc.conf exists
if it doens't exist create one using this example: https://gist.github.com/dustint-rh/7115f89cba4f389ab470

ensure your foreman user (the user rails starts as) is in the qpidd group.
May need to re-login to the shell to refresh the group membership for your user.

test to see if there is a 'subscriptions' queue bound to *.* event

qpid-config --ssl-certificate /etc/pki/katello/certs/java-client.crt --ssl-key /etc/pki/katello/private/java-client.key -b 'amqps://localhost:5671' queues -r

and check that output has
(if katello-installer was used the queue name would be katello_event_queue)
Queue 'subscriptions'
    bind [subscriptions] => ''
    bind [*.*] => event

if subscriptions queue isn't present add the queue using

pid-config --ssl-certificate /etc/pki/katello/certs/java-client.crt --ssl-key /etc/pki/katello/private/java-client.key -b 'amqps://localhost:5671' add queue subscriptions --durable

and bind to messages in the event topic with the subject matching *.*
qpid-config --ssl-certificate /etc/pki/katello/certs/java-client.crt --ssl-key /etc/pki/katello/private/java-client.key -b 'amqps://localhost:5671' bind event subscriptions "*.*" 

Katello config

in katello.yml ensure that qpid configurations are present under common.
(if katello-installer was used the queue name would be katello_event_queue instead of subscriptions)

common:
  qpid:
    url: 'amqp:ssl:<fqdn>:5671'                                                                                                                                                                                   
    subscriptions_queue_address: subscriptions

Test Scenario

1. create a new org
2. create/upload a new manifest with a rhel subscription
3. register a content host

subscription-manager register --org="mouse" --environment="Library"

4. go to the Content -> Red Hat Subscriptions ensure that the quantity consumed is 0 for the rhel subscription
5. on the content-host attach to the rhel subscription
subscription-manager attach --pool xxx

6.refresh the page on the browser
=> verify that quantity consumed has been incremented.
7. under Hosts -> Content Hosts, click on the content-host
8. under the subscriptions tab
=> verify the quantity consumed

Actions #9

Updated by Eric Helms over 9 years ago

  • Target version changed from 55 to 56
Actions #10

Updated by dustin tsang over 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #11

Updated by Eric Helms over 9 years ago

  • translation missing: en.field_release set to 14
Actions

Also available in: Atom PDF