Bug 2232436

Summary: subscription registration using rhsm role is not idempotent
Product: Red Hat OpenStack Reporter: mlecki
Component: ansible-role-redhat-subscriptionAssignee: Nobody <nobody>
Status: NEW --- QA Contact: David Rosenfeld <drosenfe>
Severity: medium Docs Contact:
Priority: high    
Version: 17.0 (Wallaby)CC: astupnik, bshephar, emacchi
Target Milestone: ---Keywords: Triaged
Target Release: ---Flags: bshephar: needinfo? (mlecki)
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 mlecki 2023-08-16 21:02:03 UTC
Description of problem:

Running the rhsm role with the following RhsmVars (using portal registration with activation key):

parameter_defaults:
  RhsmVars:
    rhsm_repos:
      - rhel-9-for-x86_64-baseos-eus-rpms
      - rhel-9-for-x86_64-appstream-eus-rpms
      - rhel-9-for-x86_64-highavailability-eus-rpms
    rhsm_activation_key: "xxx"
    rhsm_org_id: "1234567"
    rhsm_pool_ids: "xxx"
    rhsm_method: "portal"
    rhsm_release: 9.0

Works fine one the first try (all nodes get subscribed and repos attached). When running a stack update, the playbook fails because upon re-registering the subscription status is listed as invalid. At this point the playbook fails and the stack update fails.

Version-Release number of selected component (if applicable):
RHEL 9.0 with RHOSP 17.0

How reproducible:
every time

Steps to Reproduce:
1. install overcloud with rhsm.yaml template
2. run stack update with rhsm.yaml template

Actual results:

Stack update fails and all nodes loose subscription registration
Expected results:

Stack update to succeed without destroying the existing registration

Additional info:

Comment 1 Brendan Shephard 2023-08-17 07:02:29 UTC
Do we know why the subscription status is invalid?

Can you attach the ansible.log with the errors you're referring to.