Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 797212

Summary: System is registered and subscribed in SE but local subscription-manager says otherwise
Product: Red Hat Satellite Reporter: Og Maciel <omaciel>
Component: Subscription ManagementAssignee: Lukas Zapletal <lzap>
Status: CLOSED NOTABUG QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: bkearney, lzap
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-29 10:14:02 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:
Attachments:
Description Flags
Screenshot of my provider none

Description Og Maciel 2012-02-24 15:12:20 UTC
Created attachment 565612 [details]
Screenshot of my provider

Description of problem:

Subscribing a RHEL 6.2 system using an activation key registers the system in the web ui, but it does not correspond to what subscription-manager in the client says.

Created the Seattle organization with a custom provider as follows:

Provider: CloudForms
  Product: RHN
    Repository CFTools:  http://download.englab.brq.redhat.com/rel-eng/CloudForms/1.0/2012-02-22.1/rhn/rhel-x86_64-server-6-cf-tools-1-beta/RPMS/
    Repository RHEL 6Server:  http://download.devel.redhat.com/released/RHEL-6/6.0/Server/x86_64/os/
    Repository RHEL 6.2:  http://download.devel.redhat.com/released/RHEL-6/6.2/Server/x86_64/os/
  Product:  SystemEngine
    Repository el6-tools:  http://download.lab.bos.redhat.com/rel-eng/CloudForms/1.0/2012-02-22.1/el6-tools/x86_64/
    Repository el6-se:  http://download.lab.bos.redhat.com/rel-eng/CloudForms/1.0/2012-02-22.1/el6-se/x86_64/

Activation keys:  devkey1
  Subscriptions:  RHN and SystemEngine

Used this activation key once and successfully subscribed a RHEL 6.2 system. Launched a different RHEL 6.2 system and attempted to register it using the same activation key:

# subscription-manager register --force --org Seattle --activationkey devkey 
Multi-entitlement not supported for pool with id 'ff80808135aaa2c80135ab604b35002f'.

The katello web ui shows that my system is registered and I am able to select and save subscriptions to it, but the client itself doesn't seem to "know" that it is registered:

# subscription-manager refresh
Error: You need to register this system by running `register` command before using this option.


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

Server:
* candlepin-0.5.22-1.el6.noarch
* candlepin-tomcat6-0.5.22-1.el6.noarch
* katello-0.1.300-1.el6.noarch
* katello-all-0.1.300-1.el6.noarch
* katello-certs-tools-1.0.2-2.el6.noarch
* katello-cli-0.1.100-2.el6.noarch
* katello-cli-common-0.1.100-2.el6.noarch
* katello-common-0.1.300-1.el6.noarch
* katello-configure-0.1.100-7.el6.noarch
* katello-glue-candlepin-0.1.300-1.el6.noarch
* katello-glue-foreman-0.1.300-1.el6.noarch
* katello-glue-pulp-0.1.300-1.el6.noarch
* katello-httpd-ssl-key-pair-1.0-1.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-repos-0.1.5-1.el6.noarch
* katello-selinux-0.1.7-1.el6.noarch
* katello-trusted-ssl-cert-1.0-1.noarch
* pulp-0.0.267-2.el6.noarch
* pulp-admin-0.0.267-2.el6.noarch
* pulp-client-lib-0.0.267-2.el6.noarch
* pulp-common-0.0.267-2.el6.noarch
* pulp-selinux-server-0.0.267-2.el6.noarch

Client:
# rpm -qi subscription-manager
Name        : subscription-manager         Relocations: (not relocatable)
Version     : 0.96.17.2                         Vendor: Red Hat, Inc.
Release     : 1.el6                         Build Date: Mon 20 Feb 2012 05:35:45 PM EST
Install Date: Fri 24 Feb 2012 09:28:15 AM EST      Build Host: x86-004.build.bos.redhat.com
Group       : System Environment/Base       Source RPM: subscription-manager-0.96.17.2-1.el6.src.rpm
Size        : 1651071                          License: GPLv2
Signature   : RSA/8, Wed 22 Feb 2012 04:26:09 PM EST, Key ID 938a80caf21541eb
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : https://engineering.redhat.com/trac/subscription-manager
Summary     : Tools and libraries for subscription and repository management
Description :
The Subscription Manager package provides programs and libraries to allow users
to manage subscriptions and yum repositories from the Red Hat entitlement
platform.

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Og Maciel 2012-02-24 15:20:47 UTC
Forgot to mention that all content was properly promoted from Library to Dev1 environment.

Comment 2 Lukas Zapletal 2012-02-28 10:54:44 UTC
Og, the current implementation consumes as many entitlements as you have CPUs (sockets). Example:

# subscription-manager facts --list | grep socket
cpu.core(s)_per_socket: 1
cpu.cpu_socket(s): 3
dmi.processor.socket_designation: CPU 1
lscpu.core(s)_per_socket: 1
lscpu.cpu_socket(s): 3

In this case 3 entitlements are about to be consumed during activation key registration. Now, to be able to do that, you need to import a manifest that has enough entitlements and need to have multi-entitlement flag turned on for given product(s).

Also see here: https://fedorahosted.org/katello/wiki/ActivationKeysDesign

But to be sure I asked on the list if the error message is the expected behavior. I believe it is.

You can check your manifest export file using our catmf utility (git:scripts/catmf). I have extended it today to also print this flag.

02ce713 797212 - extending catmf utility to print multi-ent flag

$ catmf fake-manifest.zip 
Consumer UUID:  ba6710c1-b11e-413a-b2a6-83a948cde026
Export Version: 0.0.0
Creation Date:  2011-11-04T08:19:23.224+0000
Product: rand-19248 (rand-99053)
 Multi-entitlement: No
Product: rand-64228 (rand-66393)
 Multi-entitlement: No
Entitlement (ff808081336da11101336da917760007):
 Product: rand-64228 (rand-66393)
 Pool Id: ff808081336da11101336da917760007
 Quantity: 30
 Contract: 
 Account: 76534
 Ends: 2025-05-29T00:00:00.000+0000
Entitlement (ff808081336da11101336da917fe0009):
 Product: rand-19248 (rand-99053)
 Pool Id: ff808081336da11101336da917fe0009
 Quantity: 20
 Contract: 
 Account: 12345
 Ends: 2025-05-29T00:00:00.000+0000
Consumer Type: candlepin (ff808081335fdf3d01335fdf48e90004)
Consumer Type: person (ff808081335fdf3d01335fdf48e50002)
Consumer Type: system (ff808081335fdf3d01335fdf48e20001)
Consumer Type: domain (ff808081335fdf3d01335fdf48e70003)

Comment 3 Lukas Zapletal 2012-02-29 10:14:02 UTC
This is correct behavior.