Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-5744

rhc role fails with argument 'release' is of type NoneType when run repeatedly

    • None
    • Moderate
    • rhel-sst-system-roles
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • x86_64
    • None

      What were you trying to do that didn't work?

      I attempted to run the rhc role from rhel-system-roles from an AAP 2.4 system a 2nd time.

      Also ran it in an execution environment: registry.redhat.io/ansible-automation-platform-24/ee-minimal-rhel9:latest w/ same result.

      Ansible roles are meant to be ran repeatedly, and for subsequent runs to skip tasks that were already completed.

      The 2nd time the role is ran after registration - it fails.

      Please provide the package NVR for which bug is seen:

      rhel-system-roles-1.21.2-1.el9_2.noarch

      How reproducible:

      Steps to reproduce

      1. create RHEL 9.2 server to act as controller
      2. register
      3. install AAP v2.4
      4. install rhel-system-roles
      5. create RHEL 9.2 server to act as target
      6. do not register target
      7. create a test playbook (in or outside tower) for rhc role
      8. run playbook on controller for target
      9. run playbook a 2nd time after target is registered

      Expected results

      target registers and 2nd run completes with minimal changes

      Actual results

      1st run target registers successfully.

      2nd run playbook fails.

      It fails in rhc role tasks/subscription-manager.yml

      on task

      [Set the release]

      argument 'release' is of type <class 'NoneType'> and we were unable to convert to str:

       

      Suspected root cause - python version differences 3.9 vs 3.11:

      • rhel-system-roles-1.21.2-1.el9_2.noarch is designed to run with
        ansible-core v2.14 - which is based on Python 3.11
      • AAP v2.4 uses ansible-core v2.15 - which is based on Python 3.9
      • The default execution environments for AAP v2.4 are based on ansible-core v2.15 and Python 3.9
      • rhc system role installed from rpm - produce errors when ran under Python 3.9
      • rhc system role installed from rpm - runs fine under Python 3.11
      • Automation Hub based rhc system roles in the redhat.rhel_system_roles do not produce errors under either Python 3.9 nor 3.11
      • AAP v2.4 execution environment are also based on ansible-core v2.15 and Python 3.9 - and will error on rhc system role
      • When crafting a custom EE w/ the Automation Hub based RHEL System Roles (non-rpm based) - the role and task succeed.

       

      Suggested resolution:

      rpm based rhel-system-roles should be updated to 1.22 which resolved the issue (or determined a better way to run set release task)

              rmeggins@redhat.com Richard Megginson
              biholmes Billy Holmes
              Richard Megginson Richard Megginson
              rhel-cs-system-management-subsystem-qe Bot rhel-cs-system-management-subsystem-qe Bot
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: