Bug 1839063

Summary: Add option to set release when registering nodes
Product: Red Hat OpenStack Reporter: PURANDHAR SAIRAM MANNIDI <pmannidi>
Component: ansible-role-redhat-subscriptionAssignee: Emilien Macchi <emacchi>
Status: CLOSED ERRATA QA Contact: David Rosenfeld <drosenfe>
Severity: high Docs Contact:
Priority: high    
Version: 16.1 (Train)CC: aschultz, emacchi, jhajyahy, shrjoshi
Target Milestone: betaKeywords: Triaged, ZStream
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ansible-role-redhat-subscription-1.1.1-0.20200522204523.5f65ba4.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-29 07:52:55 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:

Description PURANDHAR SAIRAM MANNIDI 2020-05-22 12:25:10 UTC
Description of problem:
Add option to set release when registering.
Deployment fails with 

Failed to download metadata for repo 'rhel-8-for-x86_64-baseos-eus-rpms'

Version-Release number of selected component (if applicable):
Red Hat OpenStack Platform 16

How reproducible:
Always

Steps to Reproduce:
1. Deploy OpenStack 16 with repos containing 'rhel-8-for-x86_64-baseos-eus-rpms' as mentioned in documentation


Actual results:
Deployment fails, unless we set release to 8.1 using
subscription-manager release --set=8.1

Expected results:
Deployment should either be able to set the release automatically or give an option to user 

Additional info:
Setting rhsm_release to 8.1 under RhsmVars and following code fixed the issue.

diff --git a/tasks/portal.yml b/tasks/portal.yml
index 34fa58d..87942cc 100644
--- a/tasks/portal.yml
+++ b/tasks/portal.yml
@@ -19,6 +19,7 @@
             server_proxy_port: "{{ rhsm_rhsm_proxy_port | default(omit) }}"
             server_proxy_user: "{{ rhsm_rhsm_proxy_user | default(omit) }}"
             server_proxy_password: "{{ rhsm_rhsm_proxy_password | default(omit) }}"
+            release: "{{ rhsm_release | default(omit)}}"
           register: subscrition_result
           tags:
             - rhsm
diff --git a/tasks/register.yml b/tasks/register.yml
index fe16d34..7908e65 100644
--- a/tasks/register.yml
+++ b/tasks/register.yml
@@ -14,6 +14,7 @@
     server_proxy_port: "{{ rhsm_rhsm_proxy_port | default(omit) }}"
     server_proxy_user: "{{ rhsm_rhsm_proxy_user | default(omit) }}"
     server_proxy_password: "{{ rhsm_rhsm_proxy_password | default(omit) }}"
+    release: "{{ rhsm_release | default(omit) }}"
   register: subscrition_result
   tags:
     - rhsm

Comment 6 Alex McLeod 2020-06-16 12:29:47 UTC
If this bug requires doc text for errata release, please set the 'Doc Type' and provide draft text according to the template in the 'Doc Text' field. The documentation team will review, edit, and approve the text.

If this bug does not require doc text, please set the 'requires_doc_text' flag to '-'.

Comment 8 errata-xmlrpc 2020-07-29 07:52:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:3148