Bug 1964379

Summary: VMs Migrating are Losing ELS Subscriptions and Repos for RHEL 6
Product: [Community] Candlepin Reporter: Nikos Moumoulidis <nmoumoul>
Component: candlepinAssignee: candlepin-bugs
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.1CC: bcourt, candlepin-bugs, dsynk, myoder, nmoumoul, prakgupt, redakkan
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: candlepin-4.1.11-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1964376 Environment:
Last Closed: 2022-02-09 15:39:52 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: 1962410    

Description Nikos Moumoulidis 2021-05-25 11:20:44 UTC
+++ This bug was initially created as a clone of Bug #1964376 +++

+++ This bug was initially created as a clone of Bug #1962410 +++

Description of problem:

VMs that are inheriting an ELS subscription from a hypervisor, are migrating frequently in an environment, sometimes several times a day.  When this happens, the subscriptions for ELS are not auto-attached, therefore the ELS repos are not available.  Running "subscription-manager refresh" will bring the subscription back, and the els repos are enabled again.  2 things that are noticed:

  - RHEL5 servers don't drop their els repositories when they migrate
  - The base RHEL6 repos don't drop when they migrate

Seems to be just an issue with RHEL6 els repositories / subscription.

Version-Release number of selected component (if applicable):
Satellite 6.9.1
Red Hat Server 6

How reproducible:
always

Steps to Reproduce:
1. Have a RHEL6 vm use an ELS subscription inherited via a VDC subscription
2. Have the host migrate to another hypervisor (that is also entitled)
3. 
 
Actual results:
RHEL6 servers drop their els repositories, but not their base rhel6 repos.

Expected results:
ELS repos shouldn't drop due to migration.

Additional info:

subscription-manager refresh fixes this issue.

currently an Ansible Role is being used to re-attach the subscriptions and repos for the RHEL6 hosts.