Bug 1956236 - activation key creation does not work with simple content access
Summary: activation key creation does not work with simple content access
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Ansible Collection
Version: 6.9.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-03 09:26 UTC by Johannes Scheiber
Modified: 2021-05-03 10:12 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-03 10:12:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
extract from Satellite task List (109.39 KB, image/png)
2021-05-03 09:26 UTC, Johannes Scheiber
no flags Details

Description Johannes Scheiber 2021-05-03 09:26:04 UTC
Created attachment 1778873 [details]
extract from Satellite task List

Description of problem:
- If Simple Content Access (SCA) is enabled on the manifest, the creation of Activation Keys Ansible fails.
- If SCA is disabled it works as expected.
- In any of the cases the key is successfully created on Satellite (see screenshot)


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


How reproducible:
always if SCA is enabled
- enable simple content access
- try to create activation key


Steps to Reproduce:
example snippet:
=====%<-----------------
- name: "create ak-rhel8-lab activation keys"
  redhat.satellite.activation_key:
    organization: "{{ satellite_organization }}"
    server_url: "{{ satellite_url }}"
    username: "{{ satellite_username }}"
    password: "{{ satellite_password }}"
    name: "ak-rhel8-lab-dev"
    lifecycle_environment: "dev"
    content_view: 'ccv-rhel-8'
    host_collections:
        - rhel8
        - lab
    content_overrides:
        - label: "rhel-8-for-x86_64-baseos-rpms"
          override: enabled
        - label: "rhel-8-for-x86_64-appstream-rpms"
          override: enabled
        - label: "rhel-8-for-x86_64-baseos-kickstart"
          override: enabled
        - label: "rhel-8-for-x86_64-appstream-kickstart"
          override: enabled
        - label: "satellite-tools-6.8-for-rhel-8-x86_64-rpms"
          override: enabled
    state: present
-------->%==========

Actual results:

As you can see from the screenshot attached, each activation key creation was successful in Satellite itself, whereas Ansible returned with a fatal error:

- SCA enabled
TASK [sat-activation-keys : create ak-rhel8-lab activation keys] **************************************************************************************************************************************************
fatal: [sat.lab.scheibernet.de]: FAILED! => {"changed": false, "error": {"displayMessage": "The specified organization is in Simple Content Access mode. Attaching subscriptions is disabled", "errors": ["The specified organization is in Simple Content Access mode. Attaching subscriptions is disabled"]}, "msg": "Error while performing add_subscriptions on activation_keys: 400 Client Error: Bad Request"}

- SCA disabled:
TASK [sat-activation-keys : create ak-rhel8-lab activation keys] **************************************************************************************************************************************************
changed: [sat.lab.scheibernet.de]


Expected results:
On both cases the key should be created without the ansible script failing.

Comment 1 Johannes Scheiber 2021-05-03 10:12:20 UTC
Not a bug!
Tests have been done using the wrong set of scripts, thus everything is valid and working as expected


Note You need to log in before you can comment on or make changes to this bug.