Bug 2118962
| Summary: | If Register() with enable_content == True is used, GetPools() does not return consumed entitlements for non-SCA accounts | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Rehana <redakkan> |
| Component: | subscription-manager | Assignee: | candlepin-bugs |
| Status: | CLOSED ERRATA | QA Contact: | Red Hat subscription-manager QE Team <rhsm-qe> |
| Severity: | high | Docs Contact: | |
| Priority: | medium | ||
| Version: | 9.0 | CC: | jhnidek, jsefler, jstavel, jstodola, mkolman, redakkan, rhsm-qe |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | 9.2 | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | subscription-manager-1.29.31-1.el9 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 2101510 | Environment: | |
| Last Closed: | 2023-05-09 08:18:42 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: | |||
| Bug Depends On: | 2101510 | ||
| Bug Blocks: | 2083318, 2083319 | ||
|
Comment 1
Jan Stavel
2022-10-13 17:58:20 UTC
a playbook that simulates the case added. Hello, I have verified it already. I will attach a useful report ASAP. For the ball keep rolling I will move this issue now. - name: start a register server
command:
cmd: >-
dbus-send
--system
--print-reply
--dest='com.redhat.RHSM1'
'/com/redhat/RHSM1/RegisterServer'
com.redhat.RHSM1.RegisterServer.Start
string:""
register: register_output
changed_when: register_output.rc != 0
- name: Output of register command
debug: msg="{{ register_output.stdout }}"
# method return time=1664912979.024710 sender=:1.29 -> destination=:1.28 serial=7 reply_serial=2
# string "unix:abstract=/run/dbus-jTdfQetjRJ,guid=b4e7912afa7c3c60387ca7ee633c8e53"
- name: set a socket url for Register Server
set_fact:
socket_path: "{{ (register_output.stdout.split('string')[1]).replace('\"','').strip() }}"
- name: try to register a system using dbus method
command:
cmd: >-
dbus-send --address={{ socket_path }} --print-reply --dest=com.redhat.RHSM1.Register
/com/redhat/RHSM1/Register
com.redhat.RHSM1.Register.Register
string:'{{ rhsm.account.org }}'
string:'{{ rhsm.account.username }}'
string:'{{ rhsm.account.password }}'
dict:string:string:'enable_content','1'
dict:string:string:'',''
string:''
register: out
ignore_errors: yes
#
# method return time=1668172038.207707 sender=(null sender) -> destination=(null destination) serial=1 reply_serial=1
# string "{"created": "2022-11-11T13:07:14+0000", "
#
- name: Result should be json
set_fact:
response_from_register: "{{ out.stdout | split('string \"') | last | regex_replace('[ \"]+$','') }}"
- name: "format of a response is json. It should contains of fields 'id' and 'uuid', 'owner'"
ansible.builtin.assert:
that:
- response_from_register.id is defined
- response_from_register.owner is defined
- response_from_register.uuid is defined
fail_msg: "required field not in the response"
success_msg: "id, uuid, owner field in the response presented"
- name: DBus method GetPools before a DBus method AutoAttach is called
command:
cmd: >-
dbus-send --system --print-reply --dest=com.redhat.RHSM1
/com/redhat/RHSM1/Entitlement
com.redhat.RHSM1.Entitlement.GetPools
dict:string:string:"pool_subsets","consumed"
dict:string:string:"",""
string:""
register: out
ignore_errors: yes
- name: Response from GetPools should be JSON
set_fact:
response_from_getpools: "{{ out.stdout | split('string \"') | last | regex_replace('[ \"]+$','') }}"
- name: Output from GetPools
debug: var=response_from_getpools
- name: "At least one consumed pool should appear in the GetPools response"
ansible.builtin.assert:
that:
- response_from_getpools.consumed | length > 0
fail_msg: "No pools was returned in GetPools call"
success_msg: "At least one pool was sent back in GetPools call"
TASK [Output from GetPools] ***************************************************************************************************************************************************************************************
ok: [hp-moonshot-01-c02.ml3.eng.bos.redhat.com] =>
response_from_getpools:
consumed:
- account: '6371032'
active: true
addons: ''
contract: ''
ends: '2024-07-26'
pool_id: 8a99f9ac7b5ee892017b81e016ee08f6
provides:
'249': Red Hat Enterprise Linux for SAP HANA for x86_64 Beta
'326': Red Hat Enterprise Linux Fast Datapath Beta for x86_64
'362': Red Hat Enterprise Linux for Power, little endian Beta
'363': Red Hat Enterprise Linux for ARM 64 Beta
'433': Red Hat Enterprise Linux for IBM z Systems Beta
'475': Red Hat Enterprise Linux Fast Datapath Beta for Power, little endian
'486': Red Hat Enterprise Linux for x86_64 Beta
'487': Red Hat Enterprise Linux High Availability Beta
'488': Red Hat Enterprise Linux Resilient Storage Beta
'495': Red Hat CodeReady Linux Builder for x86_64 Beta
'496': Red Hat CodeReady Linux Builder for Power, little endian Beta
'497': Red Hat CodeReady Linux Builder for ARM 64 Beta
'498': Red Hat CodeReady Linux Builder for IBM z Systems Beta
'499': Red Hat Enterprise Linux for Real Time Beta
'501': Red Hat Enterprise Linux for Real Time for NFV Beta
'529': Red Hat Enterprise Linux Advanced Virtualization Beta (for RHEL Server for IBM System Z)
'552': Red Hat Enterprise Linux for SAP HANA for Power, little endian Beta
'553': Red Hat Enterprise Linux for SAP Applications for x86_64 Beta
'554': Red Hat Enterprise Linux for SAP Applications for Power, little endian Beta
'555': Red Hat Enterprise Linux for SAP Applications for IBM z Systems Beta
'576': Red Hat Directory Server Beta
'577': Red Hat Certificate System Beta
provides_management: 'No'
quantity_used: 1
roles: ''
serial: 6167098677378502336
service_level: Self-Support
service_type: L1-L3
sku: RH00069
starts: '2021-07-26'
status_details:
- Subscription is current
subscription_name: Red Hat Beta Access
subscription_type: Standard
system_type: Physical
usage: ''
TASK [Version of the package subscription-manager] ************************************************************************************************************************************************************
ok: [hp-moonshot-01-c02.ml3.eng.bos.redhat.com] =>
msg: |-
server type: Red Hat Subscription Management
subscription management server: 4.2.10-1
subscription management rules: 5.43
subscription-manager: 1.29.31-1.el9
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 (subscription-manager bug fix and enhancement update), 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-2023:2493 |