Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 858759

Summary: Product and Subscription getting Added and Removed automaticaly
Product: [Community] Candlepin (Migrated to Jira) Reporter: Paresh Mutha <pmutha>
Component: candlepinAssignee: Michael Stead <mstead>
Status: CLOSED CURRENTRELEASE QA Contact: Entitlement Bugs <entitlement-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 0.9CC: adellape, alikins, bkearney, hmiles, jgalipea, jsefler, mstead, wburrows, xdmoon
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-22 22:28:09 UTC Type: Bug
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: 863175    
Attachments:
Description Flags
rhsm logs from 00737365 - demo55 is the hypervisor
none
rhsm logs from 00737365 - demo57 is the guest w/rhsm issues
none
actual hypervisor from case 0073765
none
ch-silver sosreport none

Description Paresh Mutha 2012-09-19 15:40:12 UTC
Description of problem:
After registering the system on RHSM Hosted (subscription.rhn.redhat.com), Products and Subscriptions are automatically Added and Removed. In /var/log/messages we see :

Sep 13 03:21:02 compiler rhsmd: This system is missing one or more valid entitlement certificates. Please run subscription-manager for more information.


Sep 13 18:35:53 compiler subscription-manager: Added subscription for 'Red Hat Enterprise Linux Server, Premium (4 
sockets) (Unlimited guests)' contract '2978570'
Sep 13 18:35:53 compiler subscription-manager: Added subscription for product 'Red Hat Beta'
Sep 13 18:35:53 compiler subscription-manager: Added subscription for product 'Red Hat Enterprise Linux Server'

Sep 13 22:35:57 compiler subscription-manager: Removed subscription for 'Red Hat Enterprise Linux Server, Premium (4 sockets) (Unlimited guests)' contract '2978570'
Sep 13 22:35:57 compiler subscription-manager: Removed subscription for product 'Red Hat Beta'
Sep 13 22:35:57 compiler subscription-manager: Removed subscription for product 'Red Hat Enterprise Linux Server'


Version-Release number of selected component (if applicable):
RHEL 6.3
subscription-manager-0.99.19.4-1.el6_3.x86_64

How reproducible:
Not internally but always reproducible for customer

Steps to Reproduce:
1. Register the guest system (on KVM) on RHSM 
2. Auto Subscribe to products/subscriptions using "subscription-manager register --username=<RHN username> --password=<RHN password> --autosubscribe"

  
Actual results:
Product and Subscription is automatically Removed

Expected results:
Subscribed Products and Subscriptions should persist

Additional info:
Automatic Add and Remove happens everyday for all VMs with host KVM.

Comment 7 Michael Stead 2012-09-20 14:08:53 UTC

*** This bug has been marked as a duplicate of bug 854312 ***

Comment 8 Michael Stead 2012-09-20 14:13:30 UTC
May have jumped the gun on marking this as a duplicate as the serial numbers appear to change here.

Comment 23 Michael Stead 2012-12-10 14:45:13 UTC
Steps to reproduce the issue with local setup:

This BZ is caused when virt-who updates host's guestIds in a candlepin instance that is running in hosted mode. When reproducing, please be sure to set up a candlepin instance that is configured with: candlepin.standalone = false (in /etc/candlepin/candlepin.conf)

1. Install virt-who on host system
2. Register host consumer via subscription-manager.
3. Register guest consumer via subscription-manager.
4. Subscribe the guest to a 'virtual' entitlement.
5. On the host system, run virt-who to update the hosts guestIds.

I run virt-who as follows so that it will only run once:
sudo virt-who -d -o

The host's entitlement should be revoked when the call completes.

Comment 25 Jonathan Meeks 2012-12-10 22:34:19 UTC
Customer in 00737365 is claiming to not have virt-who installed or running:

virt-who is not installed and is not running:

[root@demo55 ~]# rpm -q virt-who
package virt-who is not installed
[root@demo55 ~]# ps -elf | grep virt-who
0 S root      7615  7377  0  80   0 - 25811 pipe_w 10:28 pts/5    00:00:00 grep virt-who

[root@demo57 ~]# rpm -q virt-who
package virt-who is not installed
[root@demo57 ~]# ps -elf | grep virt-who
0 S root     16289 16124  0  80   0 - 25811 pipe_w 10:28 pts/0    00:00:00 grep virt-who

we did get his RHSM logs in the case, however.

Comment 27 Jonathan Meeks 2012-12-11 16:29:35 UTC
Created attachment 661538 [details]
rhsm logs from 00737365 - demo55 is the hypervisor

Comment 28 Jonathan Meeks 2012-12-11 16:30:32 UTC
Created attachment 661539 [details]
rhsm logs from 00737365 - demo57 is the guest w/rhsm issues

Comment 31 Jonathan Meeks 2012-12-17 23:13:00 UTC
Created attachment 665163 [details]
actual hypervisor from case 0073765

Comment 33 Jonathan Meeks 2013-01-18 21:26:27 UTC
Created attachment 682739 [details]
ch-silver sosreport

Comment 37 Michael Stead 2013-05-02 18:01:15 UTC
This has been fixed by 8c26d506eedc14bd03fa58b15886853e848fa7b9 and is available in candlepin-0.7.24-1+

Comment 40 John Sefler 2013-11-22 22:27:23 UTC
Based on comment 24 and comment 37, this bug belongs to Candlepin, not subscription-manager. Moreover, all the external trackers have been CLOSED and the current candlepin deployed in production is newer than candlepin-0.7.24.